summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS3
-rw-r--r--B/00README.TXT61
-rw-r--r--B/clean.bat2
-rw-r--r--B/clean.cmd2
-rw-r--r--B/done.bat2
-rw-r--r--B/done.cmd2
-rw-r--r--B/dos16/bc.bat19
-rw-r--r--B/dos16/bc_286.bat19
-rw-r--r--B/dos16/bc_pp.bat19
-rw-r--r--B/dos16/dm.bat19
-rw-r--r--B/dos16/mc.bat22
-rw-r--r--B/dos16/sc.bat21
-rw-r--r--B/dos16/tc.bat19
-rw-r--r--B/dos16/vc.bat22
-rw-r--r--B/dos16/wc.bat20
-rw-r--r--B/dos32/dj2.bat21
-rw-r--r--B/dos32/dj2.opt11
-rw-r--r--B/dos32/dm.bat19
-rw-r--r--B/dos32/emx.bat19
-rw-r--r--B/dos32/highc.bat19
-rw-r--r--B/dos32/ndp.bat19
-rw-r--r--B/dos32/sc.bat21
-rw-r--r--B/dos32/wc.bat20
-rw-r--r--B/dos32/wc_c.bat20
-rw-r--r--B/dos32/wc_d.bat20
-rw-r--r--B/dos32/wc_p.bat20
-rw-r--r--B/dos32/zc.bat21
-rwxr-xr-xB/generic/build.sh37
-rwxr-xr-xB/generic/build_gcc.sh24
-rwxr-xr-xB/generic/clean.sh7
-rw-r--r--B/os2/bc.cmd19
-rw-r--r--B/os2/emx.bat19
-rw-r--r--B/os2/emx.cmd19
-rw-r--r--B/os2/va.cmd19
-rw-r--r--B/os2/wc.bat20
-rw-r--r--B/os2/wc.cmd20
-rw-r--r--B/os2/zc.bat21
-rw-r--r--B/os2_16/mc.bat22
-rw-r--r--B/os2_16/sc.cmd21
-rw-r--r--B/os2_16/wc.bat20
-rw-r--r--B/os2_16/wc.cmd20
-rw-r--r--B/prepare.bat12
-rw-r--r--B/prepare.cmd12
-rw-r--r--B/src.rsp18
-rw-r--r--B/unset.bat11
-rw-r--r--B/unset.cmd11
-rw-r--r--B/win16/bc.bat19
-rw-r--r--B/win16/sc.bat21
-rw-r--r--B/win16/vc.bat22
-rw-r--r--B/win16/wc.bat20
-rw-r--r--B/win32/bc.bat19
-rw-r--r--B/win32/cygwin.bat19
-rw-r--r--B/win32/dm.bat19
-rw-r--r--B/win32/ic.bat19
-rw-r--r--B/win32/lccwin32.bat23
-rw-r--r--B/win32/mingw.bat19
-rw-r--r--B/win32/pellesc.bat19
-rw-r--r--B/win32/pgi.bat19
-rw-r--r--B/win32/pw32.bat19
-rw-r--r--B/win32/rsxnt.bat19
-rw-r--r--B/win32/sc.bat21
-rw-r--r--B/win32/sc.rsp1
-rw-r--r--B/win32/vc.bat19
-rw-r--r--B/win32/wc.bat20
-rw-r--r--B/win64/ic.bat19
-rw-r--r--B/win64/vc.bat19
-rw-r--r--COPYING340
-rw-r--r--ChangeLog3
-rw-r--r--INSTALL260
-rw-r--r--Makefile.am13
-rw-r--r--Makefile.in719
-rw-r--r--NEWS63
-rw-r--r--README56
-rw-r--r--THANKS13
-rw-r--r--aclocal.m41411
-rwxr-xr-xautoconf/compile309
-rwxr-xr-xautoconf/config.guess1508
-rwxr-xr-xautoconf/config.rpath672
-rwxr-xr-xautoconf/config.sub1739
-rwxr-xr-xautoconf/depcomp684
-rwxr-xr-xautoconf/install-sh524
-rwxr-xr-xautoconf/ltmain.sh8745
-rwxr-xr-xautoconf/mdate-sh225
-rwxr-xr-xautoconf/missing376
-rwxr-xr-xautoconf/mkinstalldirs162
-rwxr-xr-xautoconf/py-compile146
-rwxr-xr-xautoconf/shtool4083
-rwxr-xr-xautoconf/ylwrap226
-rw-r--r--config.hin428
-rwxr-xr-xconfigure8150
-rw-r--r--configure.ac246
-rw-r--r--doc/Makefile.am39
-rw-r--r--doc/Makefile.in457
-rw-r--r--doc/lzop.1611
-rw-r--r--doc/lzop.html616
-rw-r--r--doc/lzop.man434
-rw-r--r--doc/lzop.pod565
-rw-r--r--doc/lzop.ps818
-rw-r--r--doc/lzop.tex646
-rw-r--r--doc/lzop.txt423
-rw-r--r--doc/magic45
-rw-r--r--packaging/lzop.spec41
-rw-r--r--src/Makefile.am16
-rw-r--r--src/Makefile.in516
-rw-r--r--src/c_ansic.c90
-rw-r--r--src/c_ansim.c78
-rw-r--r--src/c_init.c169
-rw-r--r--src/c_none.c96
-rw-r--r--src/c_screen.c213
-rw-r--r--src/compress.c398
-rw-r--r--src/conf.h753
-rw-r--r--src/console.h197
-rw-r--r--src/djgpp2.c181
-rw-r--r--src/filter.c167
-rw-r--r--src/frames.c247
-rw-r--r--src/frames.h330
-rw-r--r--src/help.c275
-rw-r--r--src/lzop.c3201
-rw-r--r--src/mblock.c106
-rw-r--r--src/miniacc.h6921
-rw-r--r--src/p_lzo.c595
-rw-r--r--src/s_curses.c412
-rw-r--r--src/s_djgpp2.c378
-rw-r--r--src/s_object.c87
-rw-r--r--src/s_vcsa.c488
-rw-r--r--src/screen.h106
-rw-r--r--src/util.c681
-rw-r--r--src/version.h3
128 files changed, 53709 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..7f376f9
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+Authors of LZO and lzop:
+
+Markus F.X.J. Oberhumer. Invented, designed and implemented LZO and lzop.
diff --git a/B/00README.TXT b/B/00README.TXT
new file mode 100644
index 0000000..417f8f2
--- /dev/null
+++ b/B/00README.TXT
@@ -0,0 +1,61 @@
+Simple make drivers for DOS, Windows, OS/2 and other systems
+============================================================
+
+This directory contains a bunch of simple build scripts - I've tried
+to make them as foolproof as possible.
+
+To build lzop for your system type `b\OS\COMPILER' in the base directory,
+e.g. `b\win32\vc.bat' will build the Win32 Visual C/C++ version.
+
+All scripts expect that the LZO library has been installed and built
+in the directory ..\lzo-2.01. You can also set the environment variable
+`LZODIR' to point to your LZO directory, e.g. `set LZODIR=c:\src\lzo-2.01',
+or you can modify `prepare.bat' to suit your needs.
+
+Please send me your additional/improved versions.
+
+
+Overview:
+---------
+
+b\dos16\bc.bat Borland C/C++ (1)
+b\dos16\dm.bat Digital Mars C/C++ (1)
+b\dos16\mc.bat Microsoft C 7.0 (1)
+b\dos16\sc.bat Symantec C/C++ (1)
+b\dos16\tc.bat Turbo C/C++ (1)
+b\dos16\vc.bat Visual C/C++ (1)
+b\dos16\wc.bat Watcom C/C++ (1)
+
+b\dos32\dj2.bat djgpp v2 + gcc
+b\dos32\dm.bat Digital Mars C/C++
+b\dos32\emx.bat emx + gcc
+b\dos32\sc.bat Symantec C/C++
+b\dos32\wc.bat Watcom C/C++
+
+b\os2\emx.cmd emx + gcc
+b\os2\wc.cmd Watcom C/C++
+
+b\win16\bc.bat Borland C/C++ (1)
+b\win16\sc.bat Symantec C/C++ (1)
+b\win16\vc.bat Visual C/C++ (1)
+b\win16\wc.bat Watcom C/C++ (1)
+
+b\win32\bc.bat Borland C/C++
+b\win32\cygwin.bat Cygwin + gcc
+b\win32\dm.bat Digital Mars C/C++
+b\win32\ic.bat Intel C/C++
+b\win32\lccwin32.bat lcc-win32
+b\win32\mingw.bat MinGW + gcc
+b\win32\rsxnt.bat rsxnt + gcc
+b\win32\sc.bat Symantec C/C++
+b\win32\vc.bat Visual C/C++
+b\win32\wc.bat Watcom C/C++
+
+b\win64\ic.bat Intel C/C++ (AMD64 or Itanium)
+b\win64\vc.bat Visual C/C++ (AMD64 or Itanium)
+
+
+Notes:
+ (1) 16-bit versions should work but are not officially supported
+
+
diff --git a/B/clean.bat b/B/clean.bat
new file mode 100644
index 0000000..3108290
--- /dev/null
+++ b/B/clean.bat
@@ -0,0 +1,2 @@
+@del /q *.def *.err *.exp *.map *.o *.obj *.res *.tds > nul 2> nul
+@del /q lzop.exe > nul 2> nul
diff --git a/B/clean.cmd b/B/clean.cmd
new file mode 100644
index 0000000..3108290
--- /dev/null
+++ b/B/clean.cmd
@@ -0,0 +1,2 @@
+@del /q *.def *.err *.exp *.map *.o *.obj *.res *.tds > nul 2> nul
+@del /q lzop.exe > nul 2> nul
diff --git a/B/done.bat b/B/done.bat
new file mode 100644
index 0000000..1ffe502
--- /dev/null
+++ b/B/done.bat
@@ -0,0 +1,2 @@
+@echo //
+@echo // Building %BEXE% was successful. All done.
diff --git a/B/done.cmd b/B/done.cmd
new file mode 100644
index 0000000..1ffe502
--- /dev/null
+++ b/B/done.cmd
@@ -0,0 +1,2 @@
+@echo //
+@echo // Building %BEXE% was successful. All done.
diff --git a/B/dos16/bc.bat b/B/dos16/bc.bat
new file mode 100644
index 0000000..16b668d
--- /dev/null
+++ b/B/dos16/bc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Borland C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+bcc -ml -f- -O1 -w -Isrc -Iacc %CFI% -e%BEXE% @b\src.rsp %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/bc_286.bat b/B/dos16/bc_286.bat
new file mode 100644
index 0000000..d34231c
--- /dev/null
+++ b/B/dos16/bc_286.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Borland C/C++ + Pharlap 286DOS-Extender
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+bcc -ml -2 -f- -O1 -d -w -Isrc -Iacc %CFI% -e%BEXE% @b\src.rsp %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/bc_pp.bat b/B/dos16/bc_pp.bat
new file mode 100644
index 0000000..7ba09e2
--- /dev/null
+++ b/B/dos16/bc_pp.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Borland C/C++ + Borland PowerPack 1.0 (DPMI16)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+bcc -ml -2 -WX -O1 -w -Isrc -Iacc %CFI% -e%BEXE% @b\src.rsp %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/dm.bat b/B/dos16/dm.bat
new file mode 100644
index 0000000..504effa
--- /dev/null
+++ b/B/dos16/dm.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Digital Mars C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+dmc -ml -2 -o -w- %CFI% -o%BEXE% @b\src.rsp %BLDLIBS% -L/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/mc.bat b/B/dos16/mc.bat
new file mode 100644
index 0000000..af2d995
--- /dev/null
+++ b/B/dos16/mc.bat
@@ -0,0 +1,22 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Microsoft C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL
+%CC% -O -W3 %CFI% -c src\*.c
+@if errorlevel 1 goto error
+%CC% -F 2000 -Fm -Fe%BEXE% *.obj %BLDLIBS% /link /noe
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/sc.bat b/B/dos16/sc.bat
new file mode 100644
index 0000000..fec82ce
--- /dev/null
+++ b/B/dos16/sc.bat
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Symantec C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+sc -c -ml -o -w- %CFI% @b\src.rsp
+@if errorlevel 1 goto error
+link @b\win32\sc.rsp,%BEXE%,,lzo/noi/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/tc.bat b/B/dos16/tc.bat
new file mode 100644
index 0000000..580d016
--- /dev/null
+++ b/B/dos16/tc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Turbo C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+tcc -ml -f- -O -G -w -Isrc -Iacc %CFI% -e%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/vc.bat b/B/dos16/vc.bat
new file mode 100644
index 0000000..365f09c
--- /dev/null
+++ b/B/dos16/vc.bat
@@ -0,0 +1,22 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Microsoft Visual C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL
+%CC% -O -W3 %CFI% -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -F 2000 -Fm -Fe%BEXE% *.obj %BLDLIBS% /link /noe
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/wc.bat b/B/dos16/wc.bat
new file mode 100644
index 0000000..cb49f61
--- /dev/null
+++ b/B/dos16/wc.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL=-zq -bt#dos -l#dos %CFI% %WCL_W%
+wcl -ml -ox -k0x2000 -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/dj2.bat b/B/dos32/dj2.bat
new file mode 100644
index 0000000..a3f17ba
--- /dev/null
+++ b/B/dos32/dj2.bat
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // djgpp2 + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+gcc @b/dos32/dj2.opt %CFI% -o %BEXE% @b\src.rsp -L. -llzo2
+@if errorlevel 1 goto error
+stubedit %BEXE% bufsize=64512 minstack=65536
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/dj2.opt b/B/dos32/dj2.opt
new file mode 100644
index 0000000..c85f1de
--- /dev/null
+++ b/B/dos32/dj2.opt
@@ -0,0 +1,11 @@
+-O2
+-Wall
+-W
+-Wbad-function-cast
+-Wcast-align
+-Wcast-qual
+-Wimplicit
+-Wnested-externs
+-Wpointer-arith
+-Wstrict-prototypes
+-Wwrite-strings
diff --git a/B/dos32/dm.bat b/B/dos32/dm.bat
new file mode 100644
index 0000000..81adeaa
--- /dev/null
+++ b/B/dos32/dm.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Digital Mars C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+dmc -mx -o -w- %CFI% -o%BEXE% @b\src.rsp %BLDLIBS% x32.lib -L/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/emx.bat b/B/dos32/emx.bat
new file mode 100644
index 0000000..a90be62
--- /dev/null
+++ b/B/dos32/emx.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // emx + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+gcc -Wall -O2 %CFI% -s -o %BEXE% @b\src.rsp -L. -llzo2
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/highc.bat b/B/dos32/highc.bat
new file mode 100644
index 0000000..576da9b
--- /dev/null
+++ b/B/dos32/highc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // MetaWare High C/C++ (using Pharlap DOS extender)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+hc386 -O3 -w4 -Dconst= %CFI% -o %BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/ndp.bat b/B/dos32/ndp.bat
new file mode 100644
index 0000000..a4cf4d4
--- /dev/null
+++ b/B/dos32/ndp.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Microway NDP C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+mx486 -ansi -on %CFI% -Dconst= -Isrc -o %BEXE% src\*.c %BLDLIBS% -bind -map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/sc.bat b/B/dos32/sc.bat
new file mode 100644
index 0000000..7364340
--- /dev/null
+++ b/B/dos32/sc.bat
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Symantec C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+sc -c -mx -o -w- %CFI% @b\src.rsp
+@if errorlevel 1 goto error
+link @b\win32\sc.rsp,%BEXE%,,lzo/noi/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/wc.bat b/B/dos32/wc.bat
new file mode 100644
index 0000000..5b6cfe5
--- /dev/null
+++ b/B/dos32/wc.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Watcom C/C++ (using DOS/4G extender)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL386=-zq -bt#dos -l#dos4g %CFI% %WCL_W%
+wcl386 -mf -5r -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/wc_c.bat b/B/dos32/wc_c.bat
new file mode 100644
index 0000000..1895c70
--- /dev/null
+++ b/B/dos32/wc_c.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Watcom C/C++ (using CauseWay extender)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL386=-zq -bt#dos -l#CauseWay %CFI% %WCL_W%
+wcl386 -mf -5r -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/wc_d.bat b/B/dos32/wc_d.bat
new file mode 100644
index 0000000..28ec9e8
--- /dev/null
+++ b/B/dos32/wc_d.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Watcom C/C++ (using DOS/32 Advanced extender)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL386=-zq -bt#dos -l#dos32a %CFI% %WCL_W%
+wcl386 -mf -5r -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/wc_p.bat b/B/dos32/wc_p.bat
new file mode 100644
index 0000000..6438851
--- /dev/null
+++ b/B/dos32/wc_p.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Watcom C/C++ (using PMODE/W extender)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL386=-zq -bt#dos -l#pmodew %CFI% %WCL_W%
+wcl386 -mf -5r -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/zc.bat b/B/dos32/zc.bat
new file mode 100644
index 0000000..e1666eb
--- /dev/null
+++ b/B/dos32/zc.bat
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Zortech C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+ztc -b -v0 -c -mx -o -w- -r %CFI% @b\src.rsp
+@if errorlevel 1 goto error
+link @b\win32\sc.rsp,%BEXE%,,lzo/noi/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/generic/build.sh b/B/generic/build.sh
new file mode 100755
index 0000000..6706109
--- /dev/null
+++ b/B/generic/build.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+# vi:ts=4:et
+set -e
+echo "// Copyright (C) 1996-2010 Markus F.X.J. Oberhumer"
+echo "//"
+echo "// Generic Posix/Unix system"
+echo "// Generic C compiler"
+
+test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../..
+
+test "X${CC}" = X && CC="cc"
+test "X${CFLAGS+set}" = Xset || CFLAGS="-O"
+test "X${LIBS+set}" = Xset || LIBS="-llzo2"
+# CPPFLAGS, LDFLAGS
+# LZOP_EXTRA_CPPFLAGS, LZOP_EXTRA_CFLAGS, LZOP_EXTRA_LDFLAGS
+# LZOP_EXTRA_SOURCES, LZOP_EXTRA_LIBS
+
+CFI="-I${top_srcdir}"
+
+CF="$CPPFLAGS $CFI $CFLAGS"
+LF="$LDFLAGS $LZOP_EXTRA_LDFLAGS"
+LL="$LIBS $LZOP_EXRA_LIBS"
+
+. $top_srcdir/B/generic/clean.sh
+
+for f in $top_srcdir/src/*.c $LZOP_EXTRA_SOURCES; do
+ echo $CC $CF $LZOP_EXTRA_CPPFLAGS $LZOP_EXTRA_CFLAGS -c $f
+ $CC $CF $LZOP_EXTRA_CPPFLAGS $LZOP_EXTRA_CFLAGS -c $f
+done
+
+echo $CC $CF $LF -o lzop.out *.o $LL
+ $CC $CF $LF -o lzop.out *.o $LL
+
+echo "//"
+echo "// Building lzop was successful. All done."
+
+true
diff --git a/B/generic/build_gcc.sh b/B/generic/build_gcc.sh
new file mode 100755
index 0000000..8640614
--- /dev/null
+++ b/B/generic/build_gcc.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+# vi:ts=4:et
+set -e
+echo "// Using GNU C compiler."
+echo "//"
+
+test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../..
+UNAME_MACHINE=unknown
+
+CC="gcc -fPIC"
+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
new file mode 100755
index 0000000..35a1063
--- /dev/null
+++ b/B/generic/clean.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+# vi:ts=4:et
+# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+
+rm -f *.o lzop.out
+
+true
diff --git a/B/os2/bc.cmd b/B/os2/bc.cmd
new file mode 100644
index 0000000..aefe3c1
--- /dev/null
+++ b/B/os2/bc.cmd
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // Borland C/C++
+@echo //
+@call b\prepare.cmd
+@if "%BECHO%"=="n" echo off
+
+
+bcc -O2 -d -w -w-aus -Isrc -Iacc %CFI% -ls -e%BEXE% @b\src.rsp %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.cmd
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.cmd
diff --git a/B/os2/emx.bat b/B/os2/emx.bat
new file mode 100644
index 0000000..1aa3c14
--- /dev/null
+++ b/B/os2/emx.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // emx + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+gcc -Wall -O2 %CFI% -s -o %BEXE% @b\src.rsp -L. -llzo2
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2/emx.cmd b/B/os2/emx.cmd
new file mode 100644
index 0000000..00fc74f
--- /dev/null
+++ b/B/os2/emx.cmd
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // emx + gcc
+@echo //
+@call b\prepare.cmd
+@if "%BECHO%"=="n" echo off
+
+
+gcc -Wall -O2 %CFI% -s -o %BEXE% @b\src.rsp -L. -llzo2
+@if errorlevel 1 goto error
+
+
+@call b\done.cmd
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.cmd
diff --git a/B/os2/va.cmd b/B/os2/va.cmd
new file mode 100644
index 0000000..e193e95
--- /dev/null
+++ b/B/os2/va.cmd
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // IBM Visual Age C/C++
+@echo //
+@call b\prepare.cmd
+@if "%BECHO%"=="n" echo off
+
+
+icc -Q+ -O -W3 %CFI% -Fm -Fe%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.cmd
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.cmd
diff --git a/B/os2/wc.bat b/B/os2/wc.bat
new file mode 100644
index 0000000..30425d7
--- /dev/null
+++ b/B/os2/wc.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL386=-zq -bt#os2 -l#os2v2 %CFI% %WCL_W%
+wcl386 -mf -5r -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2/wc.cmd b/B/os2/wc.cmd
new file mode 100644
index 0000000..c4667af
--- /dev/null
+++ b/B/os2/wc.cmd
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.cmd
+@if "%BECHO%"=="n" echo off
+
+
+set WCL386=-zq -bt#os2 -l#os2v2 %CFI% %WCL_W%
+wcl386 -mf -5r -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.cmd
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.cmd
diff --git a/B/os2/zc.bat b/B/os2/zc.bat
new file mode 100644
index 0000000..da64a8b
--- /dev/null
+++ b/B/os2/zc.bat
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // Zortech C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+ztc -b -v0 -c -mf -o -w- -r %CFI% @b\src.rsp
+@if errorlevel 1 goto error
+link @b\win32\sc.rsp,%BEXE%,,lzo/noi/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2_16/mc.bat b/B/os2_16/mc.bat
new file mode 100644
index 0000000..56ef9b4
--- /dev/null
+++ b/B/os2_16/mc.bat
@@ -0,0 +1,22 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 16-bit
+@echo // Microsoft C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL -G2
+%CC% -D__OS2__ -O -W3 %CFI% -c src\*.c
+@if errorlevel 1 goto error
+%CC% -Lp -F 2000 -Fm -Fe%BEXE% *.obj %BLDLIBS% /link /noe
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2_16/sc.cmd b/B/os2_16/sc.cmd
new file mode 100644
index 0000000..01aae28
--- /dev/null
+++ b/B/os2_16/sc.cmd
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 16-bit
+@echo // Symantec C/C++
+@echo //
+@call b\prepare.cmd
+@if "%BECHO%"=="n" echo off
+
+
+sc -c -mlo -2 -o -w- %CFI% @b\src.rsp
+@if errorlevel 1 goto error
+link @b\win32\sc.rsp,%BEXE%,,lzo/noi/map
+@if errorlevel 1 goto error
+
+
+@call b\done.cmd
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.cmd
diff --git a/B/os2_16/wc.bat b/B/os2_16/wc.bat
new file mode 100644
index 0000000..89b980d
--- /dev/null
+++ b/B/os2_16/wc.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 16-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL=-zq -bt#os2 -l#os2 %CFI% %WCL_W%
+wcl -ml -2 -ox -k0x2000 -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2_16/wc.cmd b/B/os2_16/wc.cmd
new file mode 100644
index 0000000..5cc64e7
--- /dev/null
+++ b/B/os2_16/wc.cmd
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 16-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.cmd
+@if "%BECHO%"=="n" echo off
+
+
+set WCL=-zq -bt#os2 -l#os2 %CFI% %WCL_W%
+wcl -ml -2 -ox -k0x2000 -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.cmd
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.cmd
diff --git a/B/prepare.bat b/B/prepare.bat
new file mode 100644
index 0000000..a3386d8
--- /dev/null
+++ b/B/prepare.bat
@@ -0,0 +1,12 @@
+@call b\unset.bat
+@call b\clean.bat
+
+@if "%LZODIR%"=="" if exist b\all\prepare.bat call b\all\prepare.bat
+@if "%LZODIR%"=="" set LZODIR=..\lzo-2.01
+@set CFI=-I. -I%LZODIR%\include
+
+@set BNAME=lzop
+@set BEXE=lzop.exe
+@set BLDLIBS=lzo2.lib
+
+@echo Compiling, please be patient...
diff --git a/B/prepare.cmd b/B/prepare.cmd
new file mode 100644
index 0000000..de2d093
--- /dev/null
+++ b/B/prepare.cmd
@@ -0,0 +1,12 @@
+@call b\unset.cmd
+@call b\clean.cmd
+
+@if "%LZODIR%"=="" if exist b\all\prepare.cmd call b\all\prepare.cmd
+@if "%LZODIR%"=="" set LZODIR=..\lzo-2.01
+@set CFI=-I. -I%LZODIR%\include
+
+@set BNAME=lzop
+@set BEXE=lzop.exe
+@set BLDLIBS=lzo2.lib
+
+@echo Compiling, please be patient...
diff --git a/B/src.rsp b/B/src.rsp
new file mode 100644
index 0000000..6c759a2
--- /dev/null
+++ b/B/src.rsp
@@ -0,0 +1,18 @@
+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
diff --git a/B/unset.bat b/B/unset.bat
new file mode 100644
index 0000000..51250e1
--- /dev/null
+++ b/B/unset.bat
@@ -0,0 +1,11 @@
+@set CC=
+@set CF=
+@set CFI=
+@set CFX=
+@set LF=
+@set BEXE=
+@set BLIB=
+@set BECHO=
+@set WCGMEMORY=
+@set WCL=
+@set WCL386=
diff --git a/B/unset.cmd b/B/unset.cmd
new file mode 100644
index 0000000..51250e1
--- /dev/null
+++ b/B/unset.cmd
@@ -0,0 +1,11 @@
+@set CC=
+@set CF=
+@set CFI=
+@set CFX=
+@set LF=
+@set BEXE=
+@set BLIB=
+@set BECHO=
+@set WCGMEMORY=
+@set WCL=
+@set WCL386=
diff --git a/B/win16/bc.bat b/B/win16/bc.bat
new file mode 100644
index 0000000..6ed8345
--- /dev/null
+++ b/B/win16/bc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Borland C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+bcc -ml -2 -tW -O1 -w -Isrc -Iacc %CFI% -e%BEXE% @b\src.rsp %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/sc.bat b/B/win16/sc.bat
new file mode 100644
index 0000000..4f209ed
--- /dev/null
+++ b/B/win16/sc.bat
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Symantec C/C++ (using WINIO)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+sc -c -ml -2 -W -o -w- %CFI% @b\src.rsp
+@if errorlevel 1 goto error
+link @b\win32\sc.rsp,%BEXE%,,lzo+lwindos+libw+commdlg/noi/map/stack:16384
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/vc.bat b/B/win16/vc.bat
new file mode 100644
index 0000000..0e8e299
--- /dev/null
+++ b/B/win16/vc.bat
@@ -0,0 +1,22 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Microsoft Visual C/C++ (using QuickWin)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL -G2 -Mq
+%CC% -O -W3 %CFI% -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -Fe%BEXE% -Fm *.obj %BLDLIBS% /link /noe
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/wc.bat b/B/win16/wc.bat
new file mode 100644
index 0000000..fa73175
--- /dev/null
+++ b/B/win16/wc.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL=-zq -bt#windows -l#windows %CFI% %WCL_W%
+wcl -ml -2 -bw -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/bc.bat b/B/win32/bc.bat
new file mode 100644
index 0000000..bd8556e
--- /dev/null
+++ b/B/win32/bc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Borland C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+bcc32 -O2 -d -w -w-aus -Isrc -Iacc %CFI% -ls -e%BEXE% @b\src.rsp %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/cygwin.bat b/B/win32/cygwin.bat
new file mode 100644
index 0000000..c23970f
--- /dev/null
+++ b/B/win32/cygwin.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // cygwin + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+gcc -x c -O2 -Wall %CFI% -s -o %BEXE% src/*.[cC] -L. -llzo2 -Wl,-Map,%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/dm.bat b/B/win32/dm.bat
new file mode 100644
index 0000000..4c4c29e
--- /dev/null
+++ b/B/win32/dm.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Digital Mars C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+dmc -mn -o -w- %CFI% -o%BEXE% @b\src.rsp %BLDLIBS% -L/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/ic.bat b/B/win32/ic.bat
new file mode 100644
index 0000000..95f8f98
--- /dev/null
+++ b/B/win32/ic.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Intel C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+icl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/lccwin32.bat b/B/win32/lccwin32.bat
new file mode 100644
index 0000000..9483519
--- /dev/null
+++ b/B/win32/lccwin32.bat
@@ -0,0 +1,23 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // lcc-win32
+@echo //
+@echo // NOTE: some lcc-win32 versions are buggy, so we disable optimizations
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+for %%f in (src\*.c) do lcc -A %CFI% -Iacc -c %%f
+@if errorlevel 1 goto error
+lc *.obj %BLDLIBS% -o %BEXE% -s
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/mingw.bat b/B/win32/mingw.bat
new file mode 100644
index 0000000..5080124
--- /dev/null
+++ b/B/win32/mingw.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // MinGW + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+gcc -x c -O2 -Wall %CFI% -s -o %BEXE% src/*.c -L. -llzo2 -Wl,-Map,%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/pellesc.bat b/B/win32/pellesc.bat
new file mode 100644
index 0000000..f24768c
--- /dev/null
+++ b/B/win32/pellesc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Pelles C
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+cc -Ze -Go -O2 -W2 %CFI% src\*.c %BLDLIBS% /out:%BEXE% /map:%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/pgi.bat b/B/win32/pgi.bat
new file mode 100644
index 0000000..ffc98af
--- /dev/null
+++ b/B/win32/pgi.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Portland Group PGI C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+pgcc -fast %CFI% -o %BEXE% src\*.c -L. -llzo2
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/pw32.bat b/B/win32/pw32.bat
new file mode 100644
index 0000000..148d550
--- /dev/null
+++ b/B/win32/pw32.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // PW32 + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+gcc -x c -O2 -Wall %CFI% -s -o %BEXE% src/*.c -L. -llzo2 -Wl,-Map,%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/rsxnt.bat b/B/win32/rsxnt.bat
new file mode 100644
index 0000000..10a6805
--- /dev/null
+++ b/B/win32/rsxnt.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // rsxnt + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+gcc -Zwin32 -Zsys -mprobe -Wall -O2 %CFI% -s -o %BEXE% @b\src.rsp -L. -llzo2
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/sc.bat b/B/win32/sc.bat
new file mode 100644
index 0000000..781c7b6
--- /dev/null
+++ b/B/win32/sc.bat
@@ -0,0 +1,21 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Symantec C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+sc -c -mn -o -w- %CFI% @b\src.rsp
+@if errorlevel 1 goto error
+link @b\win32\sc.rsp,%BEXE%,,lzo+user32+kernel32/noi/map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/sc.rsp b/B/win32/sc.rsp
new file mode 100644
index 0000000..4a86c84
--- /dev/null
+++ b/B/win32/sc.rsp
@@ -0,0 +1 @@
+c_ansic.obj+c_ansim.obj+c_init.obj+c_none.obj+c_screen.obj+compress.obj+djgpp2.obj+filter.obj+frames.obj+help.obj+lzop.obj+mblock.obj+p_lzo.obj+s_curses.obj+s_djgpp2.obj+s_object.obj+s_vcsa.obj+util.obj
diff --git a/B/win32/vc.bat b/B/win32/vc.bat
new file mode 100644
index 0000000..d32083b
--- /dev/null
+++ b/B/win32/vc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Microsoft Visual C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+cl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/wc.bat b/B/win32/wc.bat
new file mode 100644
index 0000000..7febea0
--- /dev/null
+++ b/B/win32/wc.bat
@@ -0,0 +1,20 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set WCL386=-zq -bt#nt -l#nt %CFI% %WCL_W%
+wcl386 -mf -5r -ox -fm -Fe#%BEXE% src\*.c %BLDLIBS%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win64/ic.bat b/B/win64/ic.bat
new file mode 100644
index 0000000..8c07921
--- /dev/null
+++ b/B/win64/ic.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 64-bit (Itanium)
+@echo // Intel C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+icl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win64/vc.bat b/B/win64/vc.bat
new file mode 100644
index 0000000..02cf45e
--- /dev/null
+++ b/B/win64/vc.bat
@@ -0,0 +1,19 @@
+@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 64-bit (AMD64 or Itanium)
+@echo // Microsoft Visual C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+cl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..b4951ab
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ 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
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+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
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+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
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ 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
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+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
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+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
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+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
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+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>
+
+ 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 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 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.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+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
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..755db71
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,3 @@
+Sorry, no detailed ChangeLog available yet.
+
+Please see the file NEWS for a list of user visible changes.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..6d2c2b7
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,260 @@
+Introduction
+============
+
+ This installation guide is for POSIX (Autoconf) systems.
+ For Win32, Win64, DOS and OS/2 please read the file B/00README.TXT.
+
+
+ Quick start
+ -----------
+ The LZO library must be available on your system. If you haven't
+ installed LZO yet, you can set the environment variables `CPPFLAGS'
+ and `LDFLAGS' to point to your LZO directory, e.g.:
+
+ 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. ]
+
+ Then run the usual commands:
+ ./configure
+ make
+ make install (as root)
+
+ Exotic machines
+ ---------------
+ Instead of using Autoconf you may want to adapt the simple build
+ script in B/generic/build.sh.
+
+
+
+[ The standard Autoconf installation instructions follow below. ]
+
+
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..cefd5ce
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,13 @@
+## Process this file with automake to produce Makefile.in
+#
+# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+#
+
+SUBDIRS = src doc
+
+dist-hook:
+ -rm -rf $(distdir)/autoconf/
+ cp -pR $(srcdir)/B/ $(srcdir)/autoconf/ $(distdir)/
+ find $(distdir)/ -type l -print0 | xargs -0r rm -f
+
+@MAINT@-include $(top_srcdir)/Makefile.maint
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..2405dd1
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,719 @@
+# 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 = .
+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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+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__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
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+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"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+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@
+SUBDIRS = src doc
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ 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*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.hin: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+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"; \
+ 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); \
+ 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)
+ 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; }; }'`; \
+ 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: 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; }; }'`; \
+ 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)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @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
+ @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
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__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
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ 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.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(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" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__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 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after 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
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+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
+
+@MAINT@-include $(top_srcdir)/Makefile.maint
+
+# 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/NEWS b/NEWS
new file mode 100644
index 0000000..fbb26e9
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,63 @@
+==================================================================
+User visible changes for lzop -- a very fast file compressor
+==================================================================
+
+Changes in 1.03 (01 Nov 2010)
+ * Assorted minor updates.
+
+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'
+ compiler option in order to work around bugs in Apple's native
+ "smart" preprocessor.
+ * File sizes > 2GB are correctly displayed.
+
+Changes in 1.01 (27 Apr 2003)
+ * Five years have passed since the last release: completely updated
+ 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
+ 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.
+ * Fixed an assertion that could trigger in very rare cases.
+
+Changes in 1.00 (27 Apr 1998)
+ * Added command '--ls'
+ * Added options '--no-mode', '--no-time', '--no-warn' and '--ignore-warn'
+
+Changes in 0.96 (13 Mar 1998)
+ * Updated documentation
+ * Added option '--no-stdin'
+
+Changes in 0.95 (07 Dec 1997)
+ * Store a checksum by default (use option '-F' to disable)
+ * Added support for filters
+ * Adapted for LZO 1.02
+ * Minor fixes and changes
+
+Changes in 0.94 (15 Oct 1997)
+ * Added support for compressed archives (use with option '-o')
+
+Changes in 0.93 (10 Sep 1997)
+ * Use in-place decompression to reduce memory requirements
+ * Added support for environment variable 'LZOP'
+ * Compile fixes for Solaris
+
+Changes in 0.92 (07 Sep 1997): never released
+ * Fixed a bug in frames.c when passing an invalid pointer to free()
+
+Changes in 0.91 (01 Sep 1997)
+ * Added option '-S'
+ * Use GNU getopt for commandline parsing
+ * Use dynamic memory allocation
+
+Changes in 0.90 (10 Aug 1997)
+ * First public release of lzop - requires LZO library v1.01
+
+Sep 1996:
+ * For historical reasons: this is when I started writing lzop
+
diff --git a/README b/README
new file mode 100644
index 0000000..16ecc18
--- /dev/null
+++ b/README
@@ -0,0 +1,56 @@
+==================================================================
+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
+
+
+Introduction
+------------
+lzop is a file compressor similar to gzip. Its main advantages over gzip
+are much higher compression and decompression speed at the cost of
+some compression ratio.
+
+lzop was designed with the following goals in mind:
+ - speed (both compression and decompression)
+ - reasonable drop-in compatibility to gzip
+ - portability
+
+
+Short documentation
+-------------------
+For detailed usage information please take a look at doc/lzop.txt.
+
+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
+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 uses the LZO data compression library for compression
+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, ...
+doc documentation in various formats
+src source code
+
+
+Have fun,
+Markus
+
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..cfec965
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,13 @@
+lzop would not be what it is today without the invaluable help
+of the following people:
+
+Alexander Lehmann <alex@hal.rhein-main.de>
+Andrew Mauer-Oats <mauer@math.uiuc.edu>
+Bernhard Sadlowski <sadlowsk@mathematik.uni-bielefeld.de>
+Eli Zaretskii <eliz@is.elta.co.il>
+James "Dru" Lemley <spambait@lemley.net>
+Jean-loup Gailly <jloup@gzip.org>
+Mark Adler <madler@alumni.caltech.edu>
+Nelson H. F. Beebe <beebe@math.utah.edu>
+Sasha Mitelman <fake_address@relgyro.stanford.edu>
+Natascha
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..2a5deb7
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1411 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# 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.
+
+# 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.
+
+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.
+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
+])#
+
+
+#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.
+#
+# 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_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# 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'
+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], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_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
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 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/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# 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
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# 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`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# 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_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+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.
+#
+# 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
+# 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
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# 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
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+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=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[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'.
+ 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_$1_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
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ 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 8's {/usr,}/bin/sh.
+ touch 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
+ ;;
+ 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_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# 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
+])
+
+
+# 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])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# 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
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # 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
+ # 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.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # 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
+ 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
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# 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
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# 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.
+#
+# 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.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# 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
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+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_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_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
+
+# 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)
+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_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_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
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ 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_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_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+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.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+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.
+#
+# 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_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 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],
+[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
+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.
+#
+# 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
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [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])
+ 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]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+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.
+#
+# 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.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[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.
+AC_MSG_CHECKING([for style of include used by $am_make])
+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
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+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.
+#
+# 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],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$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.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ 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.
+#
+# 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)])
+
+# _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)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+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) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# 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_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='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# 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
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 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.
+
+# 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).
+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]);;
+esac
+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.
+#
+# 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_INSTALL_STRIP
+# ---------------------
+# 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
+# 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
+# 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'.
+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.
+#
+# 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.
+# This macro is traced by Automake.
+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.
+#
+# 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'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# 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.
+_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
+
+ # 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])
+ 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_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/autoconf/compile b/autoconf/compile
new file mode 100755
index 0000000..46caccc
--- /dev/null
+++ b/autoconf/compile
@@ -0,0 +1,309 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2010-09-21.14; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software
+# Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+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
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+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/,$2, in
+ *,$file_conv,*)
+ ;;
+ 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_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ 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"
+ shift
+ ;;
+ -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"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+case $1 in
+ '')
+ 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
+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'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ 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.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # 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
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+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
+# 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
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# 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-end: "; # UTC"
+# End:
diff --git a/autoconf/config.guess b/autoconf/config.guess
new file mode 100755
index 0000000..4c8f032
--- /dev/null
+++ b/autoconf/config.guess
@@ -0,0 +1,1508 @@
+#! /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.
+
+timestamp='2010-09-24'
+
+# 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
+# (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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# 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.
+#
+# 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.
+#
+# 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
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+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.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' HUP INT TERM
+
+# 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
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+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 ;
+: ${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) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+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
+
+# 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*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # 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)`
+ 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 ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ 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}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ 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}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ 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" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ 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 ;;
+ 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
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *: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:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ 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 (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ 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
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # 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}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # 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 ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 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
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #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);
+
+ 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`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ 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 ;;
+ 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}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # 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
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`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
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ 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}
+ 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
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ 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}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ 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 ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-tilera-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ 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,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ 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.
+ # 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
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /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; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ 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 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ 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
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "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
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ 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`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ 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
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+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
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+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.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/autoconf/config.rpath b/autoconf/config.rpath
new file mode 100755
index 0000000..17298f2
--- /dev/null
+++ b/autoconf/config.rpath
@@ -0,0 +1,672 @@
+#! /bin/sh
+# 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.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# 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,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ 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
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | k*bsd*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ 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
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case $cc_basename in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ library_names_spec='$libname.a'
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd1*)
+ ;;
+ freebsd* | dragonfly*)
+ case "$host_os" in
+ freebsd[123]*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+ esac
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ nto-qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/autoconf/config.sub b/autoconf/config.sub
new file mode 100755
index 0000000..320e303
--- /dev/null
+++ b/autoconf/config.sub
@@ -0,0 +1,1739 @@
+#! /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.
+
+timestamp='2010-09-11'
+
+# 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
+# (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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# 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.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# 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
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+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.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+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* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -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)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | 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 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | rx \
+ | score \
+ | 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 \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-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.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | 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-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile-* | tilegx-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ 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
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ 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
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # 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
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -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* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -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* \
+ | -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*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/autoconf/depcomp b/autoconf/depcomp
new file mode 100755
index 0000000..c3163be
--- /dev/null
+++ b/autoconf/depcomp
@@ -0,0 +1,684 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2010-10-07.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010
+# 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
+# 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.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ 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.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+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
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# 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
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # 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
+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
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## 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).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ 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.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## 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
+## that the space means something, we add a space to the output as
+## well.
+## 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"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # 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
+ ;;
+
+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"
+ ;;
+
+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
+ # 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$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ 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"
+ fi
+ 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
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ 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"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # '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$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#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"
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/ \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/ /
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # 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
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # 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.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$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"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ 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"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ 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"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ 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::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # 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
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# 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-end: "; # UTC"
+# End:
diff --git a/autoconf/install-sh b/autoconf/install-sh
new file mode 100755
index 0000000..3f83ce9
--- /dev/null
+++ b/autoconf/install-sh
@@ -0,0 +1,524 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2010-02-06.18; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# 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
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# 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
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+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.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+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.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # 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
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ 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
+ 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'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ 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;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob 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/
+ 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
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # 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 &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # 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"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# 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-end: "; # UTC"
+# End:
diff --git a/autoconf/ltmain.sh b/autoconf/ltmain.sh
new file mode 100755
index 0000000..04eaea4
--- /dev/null
+++ b/autoconf/ltmain.sh
@@ -0,0 +1,8745 @@
+# Generated from ltmain.m4sh.
+
+# libtool (GNU libtool) 2.2.10
+# 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.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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
+# (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.
+#
+# GNU Libtool 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 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.
+
+# 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
+
+# Be Bourne compatible
+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
+ # 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
+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
+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\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# 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"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${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
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# 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"`
+}
+
+# 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,/*$,/,'
+
+# 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
+}
+
+# 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
+
+ # 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
+
+ # 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
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ 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:
+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 ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && 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_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 ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# 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"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# 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=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_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"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_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
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_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'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# 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.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_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'"
+ fi
+
+ $ECHO "$my_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 ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ 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\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# 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 ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_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\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent 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-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ 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"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent 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-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_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"
+ fi
+ fi
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $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 $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+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
+}
+
+# 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."
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# 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...
+# 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_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# 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"
+
+ 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
+ ;;
+ esac
+ done
+
+
+ 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_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# 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
+$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
+$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
+$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
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ 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."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # 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
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p 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 ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p 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.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# 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_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# 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.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$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.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ 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"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ 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`"
+ 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"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # 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'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# 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}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ 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"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ 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"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ 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_dirname_and_basename "$obj" "/" ""
+ 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
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; 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"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # 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
+ 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
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+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
+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."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$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_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
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$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
+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."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; 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
+ # 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"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$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
+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."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+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
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -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
+ -Wc,FLAG pass FLAG directly to the compiler
+
+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'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+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'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+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."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -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
+ -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
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -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.
+
+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
+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 \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+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
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ echo
+ $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
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for 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
+ echo
+ func_mode_help
+ done
+ } |
+ sed '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # 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"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ 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'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ 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"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ 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"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ 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
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && 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\"
+
+ $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 "----------------------------------------------------------------------"
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # 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 ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # 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"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # 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
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$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"
+ 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"
+
+ 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"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ 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"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ 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"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # 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"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # 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"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ '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"
+ shift
+
+ 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"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # 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
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ 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
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ 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=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ 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
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ 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"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$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'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ 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 "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ 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 */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; 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'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ 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"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ 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
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ 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'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ 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*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # 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*)
+ 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
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ 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"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # 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 '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# 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
+ 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"
+ sleep 2
+ done
+ 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
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ 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" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ 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}"
+ cd "$darwin_curdir"
+ $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`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# 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
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+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
+ # 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
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# 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
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# 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
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; 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\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ 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.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$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
+ fi
+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
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#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) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#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__)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+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"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_pathlist "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+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");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ 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);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#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;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+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);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *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]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
+
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ 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
+ # 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
+ # 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.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not 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
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir="$arg"
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ 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'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ 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"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ 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"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$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"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ 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
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ if test -z "$dir"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ # 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"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # 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"
+ 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"
+ 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" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-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"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ 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"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ 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'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ 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"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ 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"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # 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"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ 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\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # 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
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ 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" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ 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
+ ## 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"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$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"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; 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"
+ fi
+ 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}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ 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 $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
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_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
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; 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_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ 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
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ 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"
+ 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
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ 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
+
+ # 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_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ 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";;
+ 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"
+ fi
+
+ if test "$pass" = conv; 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'"
+ 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"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ 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 -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; 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"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [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 "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ 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"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$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"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$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
+ 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"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; 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
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$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 &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ 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
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || 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"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
+ if test "$linkmode" = prog; 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
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ 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"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ 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_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_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $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
+ 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"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-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"
+ 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"
+ # 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"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; 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:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; 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
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; 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
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ 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"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; 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"
+ 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
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; 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 "*** 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
+ 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 "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && 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 "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [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"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ 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
+ 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 -z "$darwin_install_name"; then
+ 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}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; 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
+ # 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
+ # 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" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ 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"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ 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"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ 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"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # 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"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ 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
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|qnx|sunos)
+ 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"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ 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"
+ ;;
+ 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"
+ ;;
+ 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"
+ ;;
+ 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"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ 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"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ 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
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ 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
+ major=
+ versuffix=
+ 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
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ 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"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # 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=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ 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"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ 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 I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $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
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ 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"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ 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"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ 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
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [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=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ 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"
+ echo "*** because I did check the linker path looking for a file starting"
+ 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"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ 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
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ 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"
+ echo "*** because I did check the linker path looking for a file starting"
+ 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"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ 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
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ 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 "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; 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"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ 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
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ 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"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$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
+ 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:"
+ 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"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ 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"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ 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
+ # 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"
+ 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"
+ $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
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ 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"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && 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"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # '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"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; 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 -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ 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
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $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_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ 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
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # 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\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ 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.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ 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='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ 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"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ 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"
+ $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"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # '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"
+ 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.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; 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
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ 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"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ 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"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # 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
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $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
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ 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."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-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
+ 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"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ 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"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ 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"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$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"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; 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"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ 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=$?'
+
+ # Delete the generated files.
+ 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"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ 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 $?'
+ 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"
+
+ 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
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ 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"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ 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
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # 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"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$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
+ 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"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ 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
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ 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\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ 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=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; 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 -z "$install_libdir"; then
+ break
+ fi
+ 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`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ 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`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # 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`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ 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
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${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'
+ 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'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ 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"
+ 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"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # 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"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ 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
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+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
+# 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
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/autoconf/mdate-sh b/autoconf/mdate-sh
new file mode 100755
index 0000000..60dc485
--- /dev/null
+++ b/autoconf/mdate-sh
@@ -0,0 +1,225 @@
+#!/bin/sh
+# Get modification time of a file or directory and pretty-print it.
+
+scriptversion=2010-08-21.06; # UTC
+
+# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010
+# 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
+# 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>.
+
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # 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
+fi
+
+case $1 in
+ '')
+ echo "$0: No file. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: mdate-sh [--help] [--version] FILE
+
+Pretty-print the modification day of FILE, in the format:
+1 January 1970
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "mdate-sh $scriptversion"
+ exit $?
+ ;;
+esac
+
+error ()
+{
+ echo "$0: $1" >&2
+ exit 1
+}
+
+
+# Prevent date giving response in another language.
+LANG=C
+export LANG
+LC_ALL=C
+export LC_ALL
+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 to its documented default.
+if test "${TIME_STYLE+set}" = set; then
+ TIME_STYLE=posix-long-iso
+ export TIME_STYLE
+fi
+
+save_arg1=$1
+
+# Find out how to get the extended ls output of a file or directory.
+if ls -L /dev/null 1>/dev/null 2>&1; then
+ ls_command='ls -L -l -d'
+else
+ ls_command='ls -l -d'
+fi
+# Avoid user/group names that might have spaces, when possible.
+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.
+# 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 `/'
+# 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.
+
+# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
+set x`$ls_command /`
+
+# Find which argument is the month.
+month=
+command=
+until test $month
+do
+ test $# -gt 0 || error "failed parsing \`$ls_command /' output"
+ shift
+ # Add another shift to the command.
+ command="$command shift;"
+ case $1 in
+ Jan) month=January; nummonth=1;;
+ Feb) month=February; nummonth=2;;
+ Mar) month=March; nummonth=3;;
+ Apr) month=April; nummonth=4;;
+ May) month=May; nummonth=5;;
+ Jun) month=June; nummonth=6;;
+ Jul) month=July; nummonth=7;;
+ Aug) month=August; nummonth=8;;
+ Sep) month=September; nummonth=9;;
+ Oct) month=October; nummonth=10;;
+ Nov) month=November; nummonth=11;;
+ Dec) month=December; nummonth=12;;
+ esac
+done
+
+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\""`
+
+# Remove all preceding arguments
+eval $command
+
+# Because of the dummy argument above, month is in $2.
+#
+# On a POSIX system, we should have
+#
+# $# = 5
+# $1 = file size
+# $2 = month
+# $3 = day
+# $4 = year or time
+# $5 = filename
+#
+# On Darwin 7.7.0 and 7.6.0, we have
+#
+# $# = 4
+# $1 = day
+# $2 = month
+# $3 = year or time
+# $4 = filename
+
+# Get the month.
+case $2 in
+ Jan) month=January; nummonth=1;;
+ Feb) month=February; nummonth=2;;
+ Mar) month=March; nummonth=3;;
+ Apr) month=April; nummonth=4;;
+ May) month=May; nummonth=5;;
+ Jun) month=June; nummonth=6;;
+ Jul) month=July; nummonth=7;;
+ Aug) month=August; nummonth=8;;
+ Sep) month=September; nummonth=9;;
+ Oct) month=October; nummonth=10;;
+ Nov) month=November; nummonth=11;;
+ Dec) month=December; nummonth=12;;
+esac
+
+case $3 in
+ ???*) day=$1;;
+ *) day=$3; shift;;
+esac
+
+# Here we have to deal with the problem that the ls output gives either
+# the time of day or the year.
+case $3 in
+ *:*) set `date`; eval year=\$$#
+ case $2 in
+ Jan) nummonthtod=1;;
+ Feb) nummonthtod=2;;
+ Mar) nummonthtod=3;;
+ Apr) nummonthtod=4;;
+ May) nummonthtod=5;;
+ Jun) nummonthtod=6;;
+ Jul) nummonthtod=7;;
+ Aug) nummonthtod=8;;
+ Sep) nummonthtod=9;;
+ Oct) nummonthtod=10;;
+ Nov) nummonthtod=11;;
+ Dec) nummonthtod=12;;
+ esac
+ # For the first six month of the year the time notation can also
+ # be used for files modified in the last year.
+ if (expr $nummonth \> $nummonthtod) > /dev/null;
+ then
+ year=`expr $year - 1`
+ fi;;
+ *) year=$3;;
+esac
+
+# The result.
+echo $day $month $year
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# 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-end: "; # UTC"
+# End:
diff --git a/autoconf/missing b/autoconf/missing
new file mode 100755
index 0000000..28055d2
--- /dev/null
+++ b/autoconf/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # 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.
+
+# 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.
+
+if test $# -eq 0; then
+ 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
+
+msg="missing on your system"
+
+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
+ ;;
+
+ -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.
+
+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]
+
+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 $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ 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
+
+exit 0
+
+# 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-end: "; # UTC"
+# End:
diff --git a/autoconf/mkinstalldirs b/autoconf/mkinstalldirs
new file mode 100755
index 0000000..4191a45
--- /dev/null
+++ b/autoconf/mkinstalldirs
@@ -0,0 +1,162 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2009-04-28.21; # UTC
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+IFS=" "" $nl"
+errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage"
+ exit $?
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --version)
+ echo "$0 $scriptversion"
+ exit $?
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error. This is a problem when calling mkinstalldirs
+# from a parallel make. We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+ '')
+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ else
+ # 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
+ # exists.
+ test -d ./-p && rmdir ./-p
+ test -d ./--version && rmdir ./--version
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+ test ! -d ./--version; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ else
+ # Clean up after NextStep and OpenStep mkdir.
+ for d in ./-m ./-p ./--version "./$dirmode";
+ do
+ test -d $d && rmdir $d
+ done
+ fi
+ ;;
+esac
+
+for file
+do
+ case $file in
+ /*) pathcomp=/ ;;
+ *) pathcomp= ;;
+ esac
+ oIFS=$IFS
+ IFS=/
+ set fnord $file
+ shift
+ IFS=$oIFS
+
+ for d
+ do
+ test "x$d" = x && continue
+
+ pathcomp=$pathcomp$d
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp=$pathcomp/
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# 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-end: "; # UTC"
+# End:
diff --git a/autoconf/py-compile b/autoconf/py-compile
new file mode 100755
index 0000000..3f9d05b
--- /dev/null
+++ b/autoconf/py-compile
@@ -0,0 +1,146 @@
+#!/bin/sh
+# py-compile - Compile a Python program
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 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
+# 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>.
+
+if [ -z "$PYTHON" ]; then
+ PYTHON=python
+fi
+
+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
+ fi
+ shift
+ ;;
+ --destdir)
+ destdir=$2
+ if test -z "$destdir"; then
+ echo "$0: Missing argument to --destdir." 1>&2
+ exit 1
+ fi
+ shift
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
+
+Byte compile some python scripts FILES. Use --destdir to specify any
+leading directory path to the FILES that you don't want to include in the
+byte compiled file. Specify --basedir for any additional path information you
+do want to be shown in the byte compiled file.
+
+Example:
+ py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v|--v*)
+ echo "py-compile $scriptversion"
+ exit $?
+ ;;
+ *)
+ files="$files $1"
+ ;;
+ esac
+ shift
+done
+
+if test -z "$files"; then
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ exit 1
+fi
+
+# if basedir was given, then it should be prepended to filenames before
+# byte compilation.
+if [ -z "$basedir" ]; then
+ pathtrans="path = file"
+else
+ pathtrans="path = os.path.join('$basedir', file)"
+fi
+
+# if destdir was given, then it needs to be prepended to the filename to
+# byte compile but not go into the compiled file.
+if [ -z "$destdir" ]; then
+ filetrans="filepath = path"
+else
+ filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
+fi
+
+$PYTHON -c "
+import sys, os, py_compile
+
+files = '''$files'''
+
+sys.stdout.write('Byte-compiling python modules...\n')
+for file in files.split():
+ $pathtrans
+ $filetrans
+ if not os.path.exists(filepath) or not (len(filepath) >= 3
+ and filepath[-3:] == '.py'):
+ continue
+ sys.stdout.write(file)
+ sys.stdout.flush()
+ 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
+
+files = '''$files'''
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
+ $pathtrans
+ $filetrans
+ if not os.path.exists(filepath) or not (len(filepath) >= 3
+ and filepath[-3:] == '.py'):
+ continue
+ sys.stdout.write(file)
+ sys.stdout.flush()
+ py_compile.compile(filepath, filepath + 'o', path)
+sys.stdout.write('\n')" 2>/dev/null || :
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# 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-end: "; # UTC"
+# End:
diff --git a/autoconf/shtool b/autoconf/shtool
new file mode 100755
index 0000000..df3fdb3
--- /dev/null
+++ b/autoconf/shtool
@@ -0,0 +1,4083 @@
+#!/bin/sh
+##
+## GNU shtool -- The GNU Portable Shell Tool
+## Copyright (c) 1994-2008 Ralf S. Engelschall <rse@engelschall.com>
+##
+## See http://www.gnu.org/software/shtool/ for more information.
+## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
+##
+## Version: 2.0.8 (18-Jul-2008)
+## Contents: all available modules
+##
+
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
+##
+## NOTICE: Given that you include this file verbatim into your own
+## source tree, you are justified in saying that it remains separate
+## from your package, and that this way you are simply just using GNU
+## shtool. So, in this situation, there is no requirement that your
+## package itself is licensed under the GNU General Public License in
+## order to take advantage of GNU shtool.
+##
+
+##
+## Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]
+##
+## Available commands:
+## echo Print string with optional construct expansion
+## mdate Pretty-print modification time of a file or dir
+## table Pretty-print a field-separated list as a table
+## prop Display progress with a running propeller
+## move Move files with simultaneous substitution
+## install Install a program, script or datafile
+## mkdir Make one or more directories
+## mkln Make link with calculation of relative paths
+## mkshadow Make a shadow tree through symbolic links
+## fixperm Fix file permissions inside a source tree
+## rotate Logfile rotation
+## tarball Roll distribution tarballs
+## subst Apply sed(1) substitution operations
+## platform Platform Identification Utility
+## arx Extended archive command
+## slo Separate linker options by library class
+## scpp Sharing C Pre-Processor
+## version Maintain a version information file
+## path Deal with program paths
+##
+
+# maximum Bourne-Shell compatibility
+if [ ".$ZSH_VERSION" != . ] && (emulate sh) >/dev/null 2>&1; then
+ # reconfigure zsh(1)
+ emulate sh
+ NULLCMD=:
+ alias -g '${1+"$@"}'='"$@"'
+elif [ ".$BASH_VERSION" != . ] && (set -o posix) >/dev/null 2>&1; then
+ # reconfigure bash(1)
+ set -o posix
+fi
+
+# maximum independence of NLS nuisances
+for var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $var=C; export $var) 2>&1`"); then
+ eval $var=C; export $var
+ else
+ unset $var
+ fi
+done
+
+# initial command line handling
+if [ $# -eq 0 ]; then
+ echo "$0:Error: invalid command line" 1>&2
+ echo "$0:Hint: run \`$0 -h' for usage" 1>&2
+ exit 1
+fi
+if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
+ echo "This is GNU shtool, version 2.0.8 (18-Jul-2008)"
+ echo 'Copyright (c) 1994-2008 Ralf S. Engelschall <rse@engelschall.com>'
+ echo 'Report bugs to <bug-shtool@gnu.org>'
+ echo ''
+ echo 'Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]'
+ echo ''
+ echo 'Available global <options>:'
+ echo ' -v, --version display shtool version information'
+ echo ' -h, --help display shtool usage help page (this one)'
+ echo ' -d, --debug display shell trace information'
+ echo ' -r, --recreate recreate this shtool script via shtoolize'
+ echo ''
+ echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
+ echo ' echo [-n|--newline] [-e|--expand] [<string> ...]'
+ echo ' mdate [-n|--newline] [-z|--zero] [-s|--shorten] [-d|--digits]'
+ echo ' [-f|--field-sep <str>] [-o|--order <spec>] <path>'
+ echo ' table [-F|--field-sep <sep>] [-w|--width <width>] [-c|--columns'
+ echo ' <cols>] [-s|--strip <strip>] <str><sep><str>...'
+ echo ' prop [-p|--prefix <str>]'
+ echo ' move [-v|--verbose] [-t|--trace] [-e|--expand] [-p|--preserve]'
+ echo ' <src-file> <dst-file>'
+ echo ' install [-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy]'
+ echo ' [-C|--compare-copy] [-s|--strip] [-m|--mode <mode>]'
+ echo ' [-o|--owner <owner>] [-g|--group <group>] [-e|--exec'
+ echo ' <sed-cmd>] <file> [<file> ...] <path>'
+ echo ' mkdir [-t|--trace] [-f|--force] [-p|--parents] [-m|--mode'
+ echo ' <mode>] [-o|--owner <owner>] [-g|--group <group>] <dir>'
+ echo ' [<dir> ...]'
+ echo ' mkln [-t|--trace] [-f|--force] [-s|--symbolic] <src-path>'
+ echo ' [<src-path> ...] <dst-path>'
+ echo ' mkshadow [-v|--verbose] [-t|--trace] [-a|--all] <src-dir> <dst-dir>'
+ echo ' fixperm [-v|--verbose] [-t|--trace] <path> [<path> ...]'
+ echo ' rotate [-v|--verbose] [-t|--trace] [-f|--force] [-n|--num-files'
+ echo ' <count>] [-s|--size <size>] [-c|--copy] [-r|--remove]'
+ echo ' [-a|--archive-dir <dir>] [-z|--compress [<tool>:]<level>]'
+ echo ' [-b|--background] [-d|--delay] [-p|--pad <len>] [-m|--mode'
+ echo ' <mode>] [-o|--owner <owner>] [-g|--group <group>] [-M|--migrate'
+ echo ' <cmd>] [-P|--prolog <cmd>] [-E|--epilog <cmd>] <file> [...]'
+ echo ' tarball [-t|--trace] [-v|--verbose] [-o|--output <tarball>]'
+ echo ' [-c|--compress <prog>] [-d|--directory <dir>] [-u|--user'
+ echo ' <user>] [-g|--group <group>] [-e|--exclude <pattern>]'
+ echo ' <path> [<path> ...]'
+ echo ' subst [-v|--verbose] [-t|--trace] [-n|--nop] [-w|--warning]'
+ echo ' [-q|--quiet] [-s|--stealth] [-i|--interactive] [-b|--backup'
+ echo ' <ext>] [-e|--exec <cmd>] [-f|--file <cmd-file>] [<file>]'
+ echo ' [...]'
+ echo ' platform [-F|--format <format>] [-S|--sep <string>] [-C|--conc'
+ echo ' <string>] [-L|--lower] [-U|--upper] [-v|--verbose]'
+ echo ' [-c|--concise] [-n|--no-newline] [-t|--type <type>]'
+ echo ' [-V|--version] [-h|--help]'
+ echo ' arx [-t|--trace] [-C|--command <cmd>] <op> <archive> [<file>'
+ echo ' ...]'
+ echo ' slo [-p|--prefix <str>] -- -L<dir> -l<lib> [-L<dir> -l<lib>'
+ echo ' ...]'
+ echo ' scpp [-v|--verbose] [-p|--preserve] [-f|--filter <filter>]'
+ echo ' [-o|--output <ofile>] [-t|--template <tfile>] [-M|--mark'
+ echo ' <mark>] [-D|--define <dname>] [-C|--class <cname>]'
+ echo ' <file> [<file> ...]'
+ echo ' version [-l|--language <lang>] [-n|--name <name>] [-p|--prefix'
+ echo ' <prefix>] [-s|--set <version>] [-e|--edit] [-i|--increase'
+ echo ' <knob>] [-d|--display <type>] <file>'
+ echo ' path [-s|--suppress] [-r|--reverse] [-d|--dirname] [-b|--basename]'
+ echo ' [-m|--magic] [-p|--path <path>] <str> [<str> ...]'
+ echo ''
+ exit 0
+fi
+if [ ".$1" = ".-v" ] || [ ".$1" = ".--version" ]; then
+ echo "GNU shtool 2.0.8 (18-Jul-2008)"
+ exit 0
+fi
+if [ ".$1" = ".-r" ] || [ ".$1" = ".--recreate" ]; then
+ shtoolize -oshtool all
+ exit 0
+fi
+if [ ".$1" = ".-d" ] || [ ".$1" = ".--debug" ]; then
+ shift
+ set -x
+fi
+name=`echo "$0" | sed -e 's;.*/\([^/]*\)$;\1;' -e 's;-sh$;;' -e 's;\.sh$;;'`
+case "$name" in
+ echo|mdate|table|prop|move|install|mkdir|mkln|mkshadow|fixperm|rotate|tarball|subst|platform|arx|slo|scpp|version|path )
+ # implicit tool command selection
+ tool="$name"
+ ;;
+ * )
+ # explicit tool command selection
+ tool="$1"
+ shift
+ ;;
+esac
+arg_spec=""
+opt_spec=""
+gen_tmpfile=no
+
+##
+## DISPATCH INTO SCRIPT PROLOG
+##
+
+case $tool in
+ echo )
+ str_tool="echo"
+ str_usage="[-n|--newline] [-e|--expand] [<string> ...]"
+ arg_spec="0+"
+ opt_spec="n.e."
+ opt_alias="n:newline,e:expand"
+ opt_n=no
+ opt_e=no
+ ;;
+ mdate )
+ str_tool="mdate"
+ str_usage="[-n|--newline] [-z|--zero] [-s|--shorten] [-d|--digits] [-f|--field-sep <str>] [-o|--order <spec>] <path>"
+ arg_spec="1="
+ opt_spec="n.z.s.d.f:o:"
+ opt_alias="n:newline,z:zero,s:shorten,d:digits,f:field-sep,o:order"
+ opt_n=no
+ opt_z=no
+ opt_s=no
+ opt_d=no
+ opt_f=" "
+ opt_o="dmy"
+ ;;
+ table )
+ str_tool="table"
+ str_usage="[-F|--field-sep <sep>] [-w|--width <width>] [-c|--columns <cols>] [-s|--strip <strip>] <str><sep><str>..."
+ arg_spec="1+"
+ opt_spec="F:w:c:s:"
+ opt_alias="F:field-sep,w:width,c:columns,s:strip"
+ opt_F=":"
+ opt_w=15
+ opt_c=3
+ opt_s=79
+ ;;
+ prop )
+ str_tool="prop"
+ str_usage="[-p|--prefix <str>]"
+ arg_spec="0="
+ opt_spec="p:"
+ opt_alias="p:prefix"
+ opt_p=""
+ ;;
+ move )
+ str_tool="move"
+ str_usage="[-v|--verbose] [-t|--trace] [-e|--expand] [-p|--preserve] <src-file> <dst-file>"
+ arg_spec="2="
+ opt_spec="v.t.e.p."
+ opt_alias="v:verbose,t:trace,e:expand,p:preserve"
+ opt_v=no
+ opt_t=no
+ opt_e=no
+ opt_p=no
+ ;;
+ install )
+ str_tool="install"
+ str_usage="[-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy] [-C|--compare-copy] [-s|--strip] [-m|--mode <mode>] [-o|--owner <owner>] [-g|--group <group>] [-e|--exec <sed-cmd>] <file> [<file> ...] <path>"
+ arg_spec="1+"
+ opt_spec="v.t.d.c.C.s.m:o:g:e+"
+ opt_alias="v:verbose,t:trace,d:mkdir,c:copy,C:compare-copy,s:strip,m:mode,o:owner,g:group,e:exec"
+ opt_v=no
+ opt_t=no
+ opt_d=no
+ opt_c=no
+ opt_C=no
+ opt_s=no
+ opt_m="0755"
+ opt_o=""
+ opt_g=""
+ opt_e=""
+ ;;
+ mkdir )
+ str_tool="mkdir"
+ str_usage="[-t|--trace] [-f|--force] [-p|--parents] [-m|--mode <mode>] [-o|--owner <owner>] [-g|--group <group>] <dir> [<dir> ...]"
+ arg_spec="1+"
+ opt_spec="t.f.p.m:o:g:"
+ opt_alias="t:trace,f:force,p:parents,m:mode,o:owner,g:group"
+ opt_t=no
+ opt_f=no
+ opt_p=no
+ opt_m=""
+ opt_o=""
+ opt_g=""
+ ;;
+ mkln )
+ str_tool="mkln"
+ str_usage="[-t|--trace] [-f|--force] [-s|--symbolic] <src-path> [<src-path> ...] <dst-path>"
+ arg_spec="2+"
+ opt_spec="t.f.s."
+ opt_alias="t:trace,f:force,s:symbolic"
+ opt_t=no
+ opt_f=no
+ opt_s=no
+ ;;
+ mkshadow )
+ str_tool="mkshadow"
+ str_usage="[-v|--verbose] [-t|--trace] [-a|--all] <src-dir> <dst-dir>"
+ arg_spec="2="
+ opt_spec="v.t.a."
+ opt_alias="v:verbose,t:trace,a:all"
+ opt_v=no
+ opt_t=no
+ opt_a=no
+ ;;
+ fixperm )
+ str_tool="fixperm"
+ str_usage="[-v|--verbose] [-t|--trace] <path> [<path> ...]"
+ arg_spec="1+"
+ opt_spec="v.t."
+ opt_alias="v:verbose,t:trace"
+ opt_v=no
+ opt_t=no
+ ;;
+ rotate )
+ str_tool="rotate"
+ str_usage="[-v|--verbose] [-t|--trace] [-f|--force] [-n|--num-files <count>] [-s|--size <size>] [-c|--copy] [-r|--remove] [-a|--archive-dir <dir>] [-z|--compress [<tool>:]<level>] [-b|--background] [-d|--delay] [-p|--pad <len>] [-m|--mode <mode>] [-o|--owner <owner>] [-g|--group <group>] [-M|--migrate <cmd>] [-P|--prolog <cmd>] [-E|--epilog <cmd>] <file> [...]"
+ arg_spec="1+"
+ opt_spec="v.t.f.n:s:c.r.a:z:b.d.p:o:g:m:M:P:E:"
+ opt_alias="v:verbose,t:trace,f:force,n:num-files,s:size,c:copy,r:remove,a:archive-dir,z:compress,b:background,d:delay,p:pad,o:owner,g:group,m:mode,M:migrate,P:prolog,E:epilog"
+ opt_v=no
+ opt_t=no
+ opt_f=no
+ opt_n=10
+ opt_s=""
+ opt_c=no
+ opt_r=no
+ opt_a=""
+ opt_z=""
+ opt_b=no
+ opt_d=no
+ opt_p=1
+ opt_o=""
+ opt_g=""
+ opt_m=""
+ opt_M=""
+ opt_P=""
+ opt_E=""
+ ;;
+ tarball )
+ str_tool="tarball"
+ str_usage="[-t|--trace] [-v|--verbose] [-o|--output <tarball>] [-c|--compress <prog>] [-d|--directory <dir>] [-u|--user <user>] [-g|--group <group>] [-e|--exclude <pattern>] <path> [<path> ...]"
+ gen_tmpfile=yes
+ arg_spec="1+"
+ opt_spec="t.v.o:c:d:u:g:e:"
+ opt_alias="t:trace,v:verbose,o:output,c:compress,d:directory,u:user,g:group,e:exclude"
+ opt_t=no
+ opt_v=no
+ opt_o=""
+ opt_c=""
+ opt_d=""
+ opt_u=""
+ opt_g=""
+ opt_e="CVS,\\.cvsignore,\\.svn,\\.[oa]\$"
+ ;;
+ subst )
+ str_tool="subst"
+ str_usage="[-v|--verbose] [-t|--trace] [-n|--nop] [-w|--warning] [-q|--quiet] [-s|--stealth] [-i|--interactive] [-b|--backup <ext>] [-e|--exec <cmd>] [-f|--file <cmd-file>] [<file>] [...]"
+ gen_tmpfile=yes
+ arg_spec="0+"
+ opt_spec="v.t.n.w.q.s.i.b:e+f:"
+ opt_alias="v:verbose,t:trace,n:nop,w:warning,q:quiet,s:stealth,i:interactive,b:backup,e:exec,f:file"
+ opt_v=no
+ opt_t=no
+ opt_n=no
+ opt_w=no
+ opt_q=no
+ opt_s=no
+ opt_i=no
+ opt_b=""
+ opt_e=""
+ opt_f=""
+ ;;
+ platform )
+ str_tool="platform"
+ str_usage="[-F|--format <format>] [-S|--sep <string>] [-C|--conc <string>] [-L|--lower] [-U|--upper] [-v|--verbose] [-c|--concise] [-n|--no-newline] [-t|--type <type>] [-V|--version] [-h|--help]"
+ arg_spec="0="
+ opt_spec="F:S:C:L.U.v.c.n.t:d.V.h."
+ opt_alias="F:format,S:sep,C:conc,L:lower,U:upper,v:verbose,c:consise,t:type,n:no-newline,V:version,h:help"
+ opt_F="%{sp} (%{ap})"
+ opt_S=" "
+ opt_C="/"
+ opt_L=no
+ opt_U=no
+ opt_t=""
+ opt_v=no
+ opt_c=no
+ opt_n=no
+ opt_V=no
+ opt_h=no
+ ;;
+ arx )
+ str_tool="arx"
+ str_usage="[-t|--trace] [-C|--command <cmd>] <op> <archive> [<file> ...]"
+ arg_spec="2+"
+ opt_spec="t.C:"
+ opt_alias="t:trace,C:command"
+ opt_t=no
+ opt_C="ar"
+ ;;
+ slo )
+ str_tool="slo"
+ str_usage="[-p|--prefix <str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]"
+ arg_spec="1+"
+ opt_spec="p:"
+ opt_alias="p:prefix"
+ opt_p="SLO_"
+ ;;
+ scpp )
+ str_tool="scpp"
+ str_usage="[-v|--verbose] [-p|--preserve] [-f|--filter <filter>] [-o|--output <ofile>] [-t|--template <tfile>] [-M|--mark <mark>] [-D|--define <dname>] [-C|--class <cname>] <file> [<file> ...]"
+ gen_tmpfile=yes
+ arg_spec="1+"
+ opt_spec="v.p.f+o:t:M:D:C:"
+ opt_alias="v:verbose,p:preserve,f:filter,o:output,t:template,M:mark,D:define,C:class"
+ opt_v=no
+ opt_p=no
+ opt_f=""
+ opt_o="lib.h"
+ opt_t="lib.h.in"
+ opt_M="%%MARK%%"
+ opt_D="cpp"
+ opt_C="intern"
+ ;;
+ version )
+ str_tool="version"
+ str_usage="[-l|--language <lang>] [-n|--name <name>] [-p|--prefix <prefix>] [-s|--set <version>] [-e|--edit] [-i|--increase <knob>] [-d|--display <type>] <file>"
+ arg_spec="1="
+ opt_spec="l:n:p:s:i:e.d:"
+ opt_alias="l:language,n:name,p:prefix,s:set,e:edit,i:increase,d:display"
+ opt_l="txt"
+ opt_n="unknown"
+ opt_p=""
+ opt_s=""
+ opt_e="no"
+ opt_i=""
+ opt_d="short"
+ ;;
+ path )
+ str_tool="path"
+ str_usage="[-s|--suppress] [-r|--reverse] [-d|--dirname] [-b|--basename] [-m|--magic] [-p|--path <path>] <str> [<str> ...]"
+ gen_tmpfile=yes
+ arg_spec="1+"
+ opt_spec="s.r.d.b.m.p:"
+ opt_alias="s:suppress,r:reverse,d:dirname,b:basename,m:magic,p:path"
+ opt_s=no
+ opt_r=no
+ opt_d=no
+ opt_b=no
+ opt_m=no
+ opt_p="$PATH"
+ ;;
+ -* )
+ echo "$0:Error: unknown option \`$tool'" 2>&1
+ echo "$0:Hint: run \`$0 -h' for usage" 2>&1
+ exit 1
+ ;;
+ * )
+ echo "$0:Error: unknown command \`$tool'" 2>&1
+ echo "$0:Hint: run \`$0 -h' for usage" 2>&1
+ exit 1
+ ;;
+esac
+
+##
+## COMMON UTILITY CODE
+##
+
+# commonly used ASCII values
+ASC_TAB=" "
+ASC_NL="
+"
+
+# determine name of tool
+if [ ".$tool" != . ]; then
+ # used inside shtool script
+ toolcmd="$0 $tool"
+ toolcmdhelp="shtool $tool"
+ msgprefix="shtool:$tool"
+else
+ # used as standalone script
+ toolcmd="$0"
+ toolcmdhelp="sh $0"
+ msgprefix="$str_tool"
+fi
+
+# parse argument specification string
+eval `echo $arg_spec |\
+ sed -e 's/^\([0-9]*\)\([+=]\)/arg_NUMS=\1; arg_MODE=\2/'`
+
+# parse option specification string
+eval `echo h.$opt_spec |\
+ sed -e 's/\([a-zA-Z0-9]\)\([.:+]\)/opt_MODE_\1=\2;/g'`
+
+# parse option alias string
+eval `echo h:help,$opt_alias |\
+ sed -e 's/-/_/g' -e 's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'`
+
+# interate over argument line
+opt_PREV=''
+while [ $# -gt 0 ]; do
+ # special option stops processing
+ if [ ".$1" = ".--" ]; then
+ shift
+ break
+ fi
+
+ # determine option and argument
+ opt_ARG_OK=no
+ if [ ".$opt_PREV" != . ]; then
+ # merge previous seen option with argument
+ opt_OPT="$opt_PREV"
+ opt_ARG="$1"
+ opt_ARG_OK=yes
+ opt_PREV=''
+ else
+ # split argument into option and argument
+ case "$1" in
+ --[a-zA-Z0-9]*=*)
+ eval `echo "x$1" |\
+ sed -e 's/^x--\([a-zA-Z0-9-]*\)=\(.*\)$/opt_OPT="\1";opt_ARG="\2"/'`
+ opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
+ eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
+ ;;
+ --[a-zA-Z0-9]*)
+ opt_OPT=`echo "x$1" | cut -c4-`
+ opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
+ eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
+ opt_ARG=''
+ ;;
+ -[a-zA-Z0-9]*)
+ eval `echo "x$1" |\
+ sed -e 's/^x-\([a-zA-Z0-9]\)/opt_OPT="\1";/' \
+ -e 's/";\(.*\)$/"; opt_ARG="\1"/'`
+ ;;
+ -[a-zA-Z0-9])
+ opt_OPT=`echo "x$1" | cut -c3-`
+ opt_ARG=''
+ ;;
+ *)
+ break
+ ;;
+ esac
+ fi
+
+ # eat up option
+ shift
+
+ # determine whether option needs an argument
+ eval "opt_MODE=\$opt_MODE_${opt_OPT}"
+ if [ ".$opt_ARG" = . ] && [ ".$opt_ARG_OK" != .yes ]; then
+ if [ ".$opt_MODE" = ".:" ] || [ ".$opt_MODE" = ".+" ]; then
+ opt_PREV="$opt_OPT"
+ continue
+ fi
+ fi
+
+ # process option
+ case $opt_MODE in
+ '.' )
+ # boolean option
+ eval "opt_${opt_OPT}=yes"
+ ;;
+ ':' )
+ # option with argument (multiple occurances override)
+ eval "opt_${opt_OPT}=\"\$opt_ARG\""
+ ;;
+ '+' )
+ # option with argument (multiple occurances append)
+ eval "opt_${opt_OPT}=\"\$opt_${opt_OPT}\${ASC_NL}\$opt_ARG\""
+ ;;
+ * )
+ echo "$msgprefix:Error: unknown option: \`$opt_OPT'" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2
+ exit 1
+ ;;
+ esac
+done
+if [ ".$opt_PREV" != . ]; then
+ echo "$msgprefix:Error: missing argument to option \`$opt_PREV'" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2
+ exit 1
+fi
+
+# process help option
+if [ ".$opt_h" = .yes ]; then
+ echo "Usage: $toolcmdhelp $str_usage"
+ exit 0
+fi
+
+# complain about incorrect number of arguments
+case $arg_MODE in
+ '=' )
+ if [ $# -ne $arg_NUMS ]; then
+ echo "$msgprefix:Error: invalid number of arguments (exactly $arg_NUMS expected)" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
+ exit 1
+ fi
+ ;;
+ '+' )
+ if [ $# -lt $arg_NUMS ]; then
+ echo "$msgprefix:Error: invalid number of arguments (at least $arg_NUMS expected)" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
+ exit 1
+ fi
+ ;;
+esac
+
+# establish a temporary file on request
+if [ ".$gen_tmpfile" = .yes ]; then
+ # create (explicitly) secure temporary directory
+ if [ ".$TMPDIR" != . ]; then
+ tmpdir="$TMPDIR"
+ elif [ ".$TEMPDIR" != . ]; then
+ tmpdir="$TEMPDIR"
+ else
+ tmpdir="/tmp"
+ fi
+ tmpdir="$tmpdir/.shtool.$$"
+ ( umask 077
+ rm -rf "$tmpdir" >/dev/null 2>&1 || true
+ mkdir "$tmpdir" >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
+ exit 1
+ fi
+ )
+
+ # create (implicitly) secure temporary file
+ tmpfile="$tmpdir/shtool.tmp"
+ touch "$tmpfile"
+fi
+
+# utility function: map string to lower case
+util_lower () {
+ echo "$1" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
+}
+
+# utility function: map string to upper case
+util_upper () {
+ echo "$1" | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+}
+
+# cleanup procedure
+shtool_exit () {
+ rc="$1"
+ if [ ".$gen_tmpfile" = .yes ]; then
+ rm -rf "$tmpdir" >/dev/null 2>&1 || true
+ fi
+ exit $rc
+}
+
+##
+## DISPATCH INTO SCRIPT BODY
+##
+
+case $tool in
+
+echo )
+ ##
+ ## echo -- Print string with optional construct expansion
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ text="$*"
+
+ # check for broken escape sequence expansion
+ seo=''
+ bytes=`echo '\1' | wc -c | awk '{ printf("%s", $1); }'`
+ if [ ".$bytes" != .3 ]; then
+ bytes=`echo -E '\1' | wc -c | awk '{ printf("%s", $1); }'`
+ if [ ".$bytes" = .3 ]; then
+ seo='-E'
+ fi
+ fi
+
+ # check for existing -n option (to suppress newline)
+ minusn=''
+ bytes=`echo -n 123 2>/dev/null | wc -c | awk '{ printf("%s", $1); }'`
+ if [ ".$bytes" = .3 ]; then
+ minusn='-n'
+ fi
+
+ # determine terminal bold sequence
+ term_bold=''
+ term_norm=''
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[Bb]'`" != . ]; then
+ case $TERM in
+ # for the most important terminal types we directly know the sequences
+ xterm|xterm*|vt220|vt220*)
+ term_bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+ term_norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+ ;;
+ vt100|vt100*|cygwin)
+ term_bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+ term_norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+ ;;
+ # for all others, we try to use a possibly existing `tput' or `tcout' utility
+ * )
+ paths=`echo $PATH | sed -e 's/:/ /g'`
+ for tool in tput tcout; do
+ for dir in $paths; do
+ if [ -r "$dir/$tool" ]; then
+ for seq in bold md smso; do # 'smso' is last
+ bold="`$dir/$tool $seq 2>/dev/null`"
+ if [ ".$bold" != . ]; then
+ term_bold="$bold"
+ break
+ fi
+ done
+ if [ ".$term_bold" != . ]; then
+ for seq in sgr0 me rmso init reset; do # 'reset' is last
+ norm="`$dir/$tool $seq 2>/dev/null`"
+ if [ ".$norm" != . ]; then
+ term_norm="$norm"
+ break
+ fi
+ done
+ fi
+ break
+ fi
+ done
+ if [ ".$term_bold" != . ] && [ ".$term_norm" != . ]; then
+ break;
+ fi
+ done
+ ;;
+ esac
+ if [ ".$term_bold" = . ] || [ ".$term_norm" = . ]; then
+ echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2
+ term_bold=''
+ term_norm=''
+ fi
+ fi
+
+ # determine user name
+ username=''
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[uUgG]'`" != . ]; then
+ username="`(id -un) 2>/dev/null`"
+ if [ ".$username" = . ]; then
+ str="`(id) 2>/dev/null`"
+ if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
+ username=`echo $str | sed -e 's/^uid[ ]*=[ ]*[0-9]*(//' -e 's/).*$//'`
+ fi
+ if [ ".$username" = . ]; then
+ username="$LOGNAME"
+ if [ ".$username" = . ]; then
+ username="$USER"
+ if [ ".$username" = . ]; then
+ username="`(whoami) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$username" = . ]; then
+ username="`(who am i) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$username" = . ]; then
+ username='unknown'
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # determine user id
+ userid=''
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%U'`" != . ]; then
+ userid="`(id -u) 2>/dev/null`"
+ if [ ".$userid" = . ]; then
+ userid="`(id -u ${username}) 2>/dev/null`"
+ if [ ".$userid" = . ]; then
+ str="`(id) 2>/dev/null`"
+ if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
+ userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*$//'`
+ fi
+ if [ ".$userid" = . ]; then
+ userid=`(getent passwd ${username}) 2>/dev/null | \
+ sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$userid" = . ]; then
+ userid=`grep "^${username}:" /etc/passwd 2>/dev/null | \
+ sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$userid" = . ]; then
+ userid=`(ypmatch "${username}" passwd; nismatch "${username}" passwd) 2>/dev/null | \
+ sed -e 'q' | sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$userid" = . ]; then
+ userid=`(nidump passwd . | grep "^${username}:") 2>/dev/null | \
+ sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$userid" = . ]; then
+ userid='?'
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # determine (primary) group id
+ groupid=''
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[gG]'`" != . ]; then
+ groupid="`(id -g ${username}) 2>/dev/null`"
+ if [ ".$groupid" = . ]; then
+ str="`(id) 2>/dev/null`"
+ if [ ".`echo $str | grep 'gid[ ]*=[ ]*[0-9]*('`" != . ]; then
+ groupid=`echo $str | sed -e 's/^.*gid[ ]*=[ ]*//' -e 's/(.*$//'`
+ fi
+ if [ ".$groupid" = . ]; then
+ groupid=`(getent passwd ${username}) 2>/dev/null | \
+ sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$groupid" = . ]; then
+ groupid=`grep "^${username}:" /etc/passwd 2>/dev/null | \
+ sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$groupid" = . ]; then
+ groupid=`(ypmatch "${username}" passwd; nismatch "${username}" passwd) 2>/dev/null | \
+ sed -e 'q' | sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$groupid" = . ]; then
+ groupid=`(nidump passwd . | grep "^${username}:") 2>/dev/null | \
+ sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$groupid" = . ]; then
+ groupid='?'
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # determine (primary) group name
+ groupname=''
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%g'`" != . ]; then
+ groupname="`(id -gn ${username}) 2>/dev/null`"
+ if [ ".$groupname" = . ]; then
+ str="`(id) 2>/dev/null`"
+ if [ ".`echo $str | grep 'gid[ ]*=[ ]*[0-9]*('`" != . ]; then
+ groupname=`echo $str | sed -e 's/^.*gid[ ]*=[ ]*[0-9]*(//' -e 's/).*$//'`
+ fi
+ if [ ".$groupname" = . ]; then
+ groupname=`(getent group) 2>/dev/null | \
+ grep "^[^:]*:[^:]*:${groupid}:" | \
+ sed -e 's/:.*$//'`
+ if [ ".$groupname" = . ]; then
+ groupname=`grep "^[^:]*:[^:]*:${groupid}:" /etc/group 2>/dev/null | \
+ sed -e 's/:.*$//'`
+ if [ ".$groupname" = . ]; then
+ groupname=`(ypcat group; niscat group) 2>/dev/null | \
+ sed -e 'q' | grep "^[^:]*:[^:]*:${groupid}:" | \
+ sed -e 's/:.*$//'`
+ if [ ".$groupname" = . ]; then
+ groupname=`(nidump group .) 2>/dev/null | \
+ grep "^[^:]*:[^:]*:${groupid}:" | \
+ sed -e 's/:.*$//'`
+ if [ ".$groupname" = . ]; then
+ groupname='?'
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # determine host and domain name
+ hostname=''
+ domainname=''
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%h'`" != . ]; then
+ hostname="`(uname -n) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$hostname" = . ]; then
+ hostname="`(hostname) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$hostname" = . ]; then
+ hostname='unknown'
+ fi
+ fi
+ case $hostname in
+ *.* )
+ domainname=".`echo $hostname | cut -d. -f2-`"
+ hostname="`echo $hostname | cut -d. -f1`"
+ ;;
+ esac
+ fi
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%d'`" != . ]; then
+ if [ ".$domainname" = . ]; then
+ if [ -f /etc/resolv.conf ]; then
+ domainname="`grep '^[ ]*domain' /etc/resolv.conf | sed -e 'q' |\
+ sed -e 's/.*domain//' \
+ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
+ -e 's/^\.//' -e 's/^/./' |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$domainname" = . ]; then
+ domainname="`grep '^[ ]*search' /etc/resolv.conf | sed -e 'q' |\
+ sed -e 's/.*search//' \
+ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
+ -e 's/ .*//' -e 's/ .*//' \
+ -e 's/^\.//' -e 's/^/./' |\
+ awk '{ printf("%s", $1); }'`"
+ fi
+ fi
+ fi
+ fi
+
+ # determine current time
+ time_day=''
+ time_month=''
+ time_year=''
+ time_monthname=''
+ if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[DMYm]'`" != . ]; then
+ time_day=`date '+%d'`
+ time_month=`date '+%m'`
+ time_year=`date '+%Y' 2>/dev/null`
+ if [ ".$time_year" = . ]; then
+ time_year=`date '+%y'`
+ case $time_year in
+ [5-9][0-9]) time_year="19$time_year" ;;
+ [0-4][0-9]) time_year="20$time_year" ;;
+ esac
+ fi
+ case $time_month in
+ 1|01) time_monthname='Jan' ;;
+ 2|02) time_monthname='Feb' ;;
+ 3|03) time_monthname='Mar' ;;
+ 4|04) time_monthname='Apr' ;;
+ 5|05) time_monthname='May' ;;
+ 6|06) time_monthname='Jun' ;;
+ 7|07) time_monthname='Jul' ;;
+ 8|08) time_monthname='Aug' ;;
+ 9|09) time_monthname='Sep' ;;
+ 10) time_monthname='Oct' ;;
+ 11) time_monthname='Nov' ;;
+ 12) time_monthname='Dec' ;;
+ esac
+ fi
+
+ # expand special ``%x'' constructs
+ if [ ".$opt_e" = .yes ]; then
+ text=`echo $seo "$text" |\
+ sed -e "s/%B/${term_bold}/g" \
+ -e "s/%b/${term_norm}/g" \
+ -e "s/%u/${username}/g" \
+ -e "s/%U/${userid}/g" \
+ -e "s/%g/${groupname}/g" \
+ -e "s/%G/${groupid}/g" \
+ -e "s/%h/${hostname}/g" \
+ -e "s/%d/${domainname}/g" \
+ -e "s/%D/${time_day}/g" \
+ -e "s/%M/${time_month}/g" \
+ -e "s/%Y/${time_year}/g" \
+ -e "s/%m/${time_monthname}/g" 2>/dev/null`
+ fi
+
+ # create output
+ if [ .$opt_n = .no ]; then
+ echo $seo "$text"
+ else
+ # the harder part: echo -n is best, because
+ # awk may complain about some \xx sequences.
+ if [ ".$minusn" != . ]; then
+ echo $seo $minusn "$text"
+ else
+ echo dummy | awk '{ printf("%s", TEXT); }' TEXT="$text"
+ fi
+ fi
+
+ shtool_exit 0
+ ;;
+
+mdate )
+ ##
+ ## mdate -- Pretty-print modification time of a file or dir
+ ## Copyright (c) 1995-1997 Free Software Foundation, Inc.
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ fod="$1"
+ case "$opt_o" in
+ [dmy][dmy][dmy] )
+ ;;
+ * ) echo "$msgprefix:Error: invalid argument to option \`-o': $opt_o" 1>&2
+ shtool_exit 1
+ ;;
+ esac
+ if [ ! -r "$fod" ]; then
+ echo "$msgprefix:Error: file or directory not found: $fod" 1>&2
+ shtool_exit 1
+ fi
+
+ # GNU ls changes its time format in response to the TIME_STYLE
+ # variable. Since we cannot assume "unset" works, revert this
+ # variable to its documented default.
+ if [ ".$TIME_STYLE" != . ]; then
+ TIME_STYLE=posix-long-iso
+ export TIME_STYLE
+ fi
+
+ # get the extended ls output of the file or directory.
+ if /bin/ls -L /dev/null >/dev/null 2>&1; then
+ set - x`/bin/ls -L -l -d $fod`
+ else
+ set - x`/bin/ls -l -d $fod`
+ fi
+
+ # The month is at least the fourth argument
+ # (3 shifts here, the next inside the loop).
+ shift; shift; shift
+
+ # Find the month. Next argument is day, followed by the year or time.
+ month=""
+ while [ ".$month" = . ]; do
+ shift
+ case $1 in
+ Jan) month=January; nummonth=1 ;;
+ Feb) month=February; nummonth=2 ;;
+ Mar) month=March; nummonth=3 ;;
+ Apr) month=April; nummonth=4 ;;
+ May) month=May; nummonth=5 ;;
+ Jun) month=June; nummonth=6 ;;
+ Jul) month=July; nummonth=7 ;;
+ Aug) month=August; nummonth=8 ;;
+ Sep) month=September; nummonth=9 ;;
+ Oct) month=October; nummonth=10 ;;
+ Nov) month=November; nummonth=11 ;;
+ Dec) month=December; nummonth=12 ;;
+ esac
+ done
+ day="$2"
+ year="$3"
+
+ # We finally have to deal with the problem that the "ls" output
+ # gives either the time of the day or the year.
+ case $year in
+ *:*)
+ this_year=`date '+%Y' 2>/dev/null`
+ if [ ".$this_year" = . ]; then
+ this_year=`date '+%y'`
+ case $this_year in
+ [5-9][0-9]) this_year="19$this_year" ;;
+ [0-4][0-9]) this_year="20$this_year" ;;
+ esac
+ fi
+ # for the following months of the last year the time notation
+ # is usually also used for files modified in the last year.
+ this_month=`date '+%m'`
+ if (expr $nummonth \> $this_month) >/dev/null; then
+ this_year=`expr $this_year - 1`
+ fi
+ year="$this_year"
+ ;;
+ esac
+
+ # Optionally fill day and month with leeding zeros
+ if [ ".$opt_z" = .yes ]; then
+ case $day in
+ [0-9][0-9] ) ;;
+ [0-9] ) day="0$day" ;;
+ esac
+ case $nummonth in
+ [0-9][0-9] ) ;;
+ [0-9] ) nummonth="0$nummonth" ;;
+ esac
+ fi
+
+ # Optionally use digits for month
+ if [ ".$opt_d" = .yes ]; then
+ month="$nummonth"
+ fi
+
+ # Optionally shorten the month name to three characters
+ if [ ".$opt_s" = .yes ]; then
+ month=`echo $month | cut -c1-3`
+ fi
+
+ # Output the resulting date string
+ echo dummy | awk '{
+ for (i = 0; i < 3; i++) {
+ now = substr(order, 1, 1);
+ order = substr(order, 2);
+ if (now == "d")
+ out = day;
+ else if (now == "m")
+ out = month;
+ else if (now == "y")
+ out = year;
+ if (i < 2)
+ printf("%s%s", out, field);
+ else
+ printf("%s", out);
+ }
+ if (newline != "yes")
+ printf("\n");
+ }' "day=$day" "month=$month" "year=$year" \
+ "field=$opt_f" "order=$opt_o" "newline=$opt_n"
+
+ shtool_exit 0
+ ;;
+
+table )
+ ##
+ ## table -- Pretty-print a field-separated list as a table
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ if [ $opt_c -gt 4 ]; then
+ echo "$msgprefix:Error: Invalid number of colums (1..4 allowed only)" 1>&2
+ shtool_exit 1
+ fi
+ case "x$opt_F" in
+ x? ) ;;
+ * ) echo "$msgprefix:Error: Invalid separator (one char allowed only)" 1>&2; shtool_exit 1 ;;
+ esac
+
+ # split the list into a table
+ list=`
+ IFS="$opt_F"
+ for entry in $*; do
+ if [ ".$entry" != . ]; then
+ echo "$entry"
+ fi
+ done |\
+ awk "
+ BEGIN { list = \"\"; n = 0; }
+ {
+ list = list \\$1;
+ n = n + 1;
+ if (n < $opt_c) {
+ list = list \":\";
+ }
+ if (n == $opt_c) {
+ list = list \"\\n\";
+ n = 0;
+ }
+ }
+ END { print list; }
+ "
+ `
+
+ # format table cells and make sure table
+ # doesn't exceed maximum width
+ OIFS="$IFS"
+ IFS='
+'
+ for entry in $list; do
+ case $opt_c in
+ 1 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${opt_w}s\\n\", \$1); }'" ;;
+ 2 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${opt_w}s %-${opt_w}s\\n\", \$1, \$2); }'" ;;
+ 3 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${opt_w}s %-${opt_w}s %-${opt_w}s\\n\", \$1, \$2, \$3); }'" ;;
+ 4 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${opt_w}s %-${opt_w}s %-${opt_w}s %-${opt_w}s\\n\", \$1, \$2, \$3, \$4); }'" ;;
+ esac
+ done |\
+ awk "{
+ if (length(\$0) > $opt_s) {
+ printf(\"%s\\n\", substr(\$0, 0, $opt_s-1));
+ } else {
+ print \$0;
+ }
+ }"
+ IFS="$OIFS"
+
+ shtool_exit 0
+ ;;
+
+prop )
+ ##
+ ## prop -- Display progress with a running propeller
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ perl=''
+ for dir in `echo $PATH | sed -e 's/:/ /g'` .; do
+ if [ -f "$dir/perl" ]; then
+ perl="$dir/perl"
+ break
+ fi
+ done
+ if [ ".$perl" != . ]; then
+ # Perl is preferred because writing to STDERR in
+ # Perl really writes immediately as one would expect
+ $perl -e '
+ @p = ("|","/","-","\\");
+ $i = 0;
+ while (<STDIN>) {
+ printf(STDERR "\r%s...%s\b", $ARGV[0], $p[$i++]);
+ $i = 0 if ($i > 3);
+ }
+ printf(STDERR "\r%s \n", $ARGV[0]);
+ ' "$opt_p"
+ else
+ # But if Perl doesn't exists we use Awk even
+ # some Awk's buffer even the /dev/stderr writing :-(
+ awk '
+ BEGIN {
+ split("|#/#-#\\", p, "#");
+ i = 1;
+ }
+ {
+ printf("\r%s%c\b", prefix, p[i++]) > "/dev/stderr";
+ if (i > 4) { i = 1; }
+ }
+ END {
+ printf("\r%s \n", prefix) > "/dev/stderr";
+ }
+ ' "prefix=$opt_p"
+ fi
+
+ shtool_exit 0
+ ;;
+
+move )
+ ##
+ ## move -- Move files with simultaneous substitution
+ ## Copyright (c) 1999-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ src="$1"
+ dst="$2"
+
+ # consistency checks
+ if [ ".$src" = . ] || [ ".$dst" = . ]; then
+ echo "$msgprefix:Error: Invalid arguments" 1>&2
+ shtool_exit 1
+ fi
+ if [ ".$src" = ".$dst" ]; then
+ echo "$msgprefix:Error: Source and destination files are the same" 1>&2
+ shtool_exit 1
+ fi
+ expsrc="$src"
+ if [ ".$opt_e" = .yes ]; then
+ expsrc="`echo $expsrc`"
+ fi
+ if [ ".$opt_e" = .yes ]; then
+ if [ ".`echo "$src" | sed -e 's;^.*\\*.*$;;'`" = ".$src" ]; then
+ echo "$msgprefix:Error: Source doesn't contain wildcard ('*'): $dst" 1>&2
+ shtool_exit 1
+ fi
+ if [ ".`echo "$dst" | sed -e 's;^.*%[1-9].*$;;'`" = ".$dst" ]; then
+ echo "$msgprefix:Error: Destination doesn't contain substitution ('%N'): $dst" 1>&2
+ shtool_exit 1
+ fi
+ if [ ".$expsrc" = ".$src" ]; then
+ echo "$msgprefix:Error: Sources not found or no asterisk : $src" 1>&2
+ shtool_exit 1
+ fi
+ else
+ if [ ! -r "$src" ]; then
+ echo "$msgprefix:Error: Source not found: $src" 1>&2
+ shtool_exit 1
+ fi
+ fi
+
+ # determine substitution patterns
+ if [ ".$opt_e" = .yes ]; then
+ srcpat=`echo "$src" | sed -e 's/\\./\\\\./g' -e 's/;/\\;/g' -e 's;\\*;\\\\(.*\\\\);g'`
+ dstpat=`echo "$dst" | sed -e 's;%\([1-9]\);\\\\\1;g'`
+ fi
+
+ # iterate over source(s)
+ for onesrc in $expsrc; do
+ if [ .$opt_e = .yes ]; then
+ onedst=`echo $onesrc | sed -e "s;$srcpat;$dstpat;"`
+ else
+ onedst="$dst"
+ fi
+ errorstatus=0
+ if [ ".$opt_v" = .yes ]; then
+ echo "$onesrc -> $onedst"
+ fi
+ if [ ".$opt_p" = .yes ]; then
+ if [ -r $onedst ]; then
+ if cmp -s $onesrc $onedst; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f $onesrc" 1>&2
+ fi
+ rm -f $onesrc || errorstatus=$?
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv -f $onesrc $onedst" 1>&2
+ fi
+ mv -f $onesrc $onedst || errorstatus=$?
+ fi
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv -f $onesrc $onedst" 1>&2
+ fi
+ mv -f $onesrc $onedst || errorstatus=$?
+ fi
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv -f $onesrc $onedst" 1>&2
+ fi
+ mv -f $onesrc $onedst || errorstatus=$?
+ fi
+ if [ $errorstatus -ne 0 ]; then
+ break;
+ fi
+ done
+
+ shtool_exit $errorstatus
+ ;;
+
+install )
+ ##
+ ## install -- Install a program, script or datafile
+ ## Copyright (c) 1997-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ # special case: "shtool install -d <dir> [...]" internally
+ # maps to "shtool mkdir -f -p -m 755 <dir> [...]"
+ if [ "$opt_d" = yes ]; then
+ cmd="$0 mkdir -f -p -m 755"
+ if [ ".$opt_o" != . ]; then
+ cmd="$cmd -o '$opt_o'"
+ fi
+ if [ ".$opt_g" != . ]; then
+ cmd="$cmd -g '$opt_g'"
+ fi
+ if [ ".$opt_v" = .yes ]; then
+ cmd="$cmd -v"
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ cmd="$cmd -t"
+ fi
+ for dir in "$@"; do
+ eval "$cmd $dir" || shtool_exit $?
+ done
+ shtool_exit 0
+ fi
+
+ # determine source(s) and destination
+ argc=$#
+ srcs=""
+ while [ $# -gt 1 ]; do
+ srcs="$srcs $1"
+ shift
+ done
+ dstpath="$1"
+
+ # type check for destination
+ dstisdir=0
+ if [ -d $dstpath ]; then
+ dstpath=`echo "$dstpath" | sed -e 's:/$::'`
+ dstisdir=1
+ fi
+
+ # consistency check for destination
+ if [ $argc -gt 2 ] && [ $dstisdir = 0 ]; then
+ echo "$msgprefix:Error: multiple sources require destination to be directory" 1>&2
+ shtool_exit 1
+ fi
+
+ # iterate over all source(s)
+ for src in $srcs; do
+ dst=$dstpath
+
+ # if destination is a directory, append the input filename
+ if [ $dstisdir = 1 ]; then
+ dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
+ dst="$dst/$dstfile"
+ fi
+
+ # check for correct arguments
+ if [ ".$src" = ".$dst" ]; then
+ echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2
+ continue
+ fi
+ if [ -d "$src" ]; then
+ echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2
+ continue
+ fi
+
+ # make a temp file name in the destination directory
+ dsttmp=`echo $dst |\
+ sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \
+ -e "s;\$;/#INST@$$#;"`
+
+ # verbosity
+ if [ ".$opt_v" = .yes ]; then
+ echo "$src -> $dst" 1>&2
+ fi
+
+ # copy or move the file name to the temp name
+ # (because we might be not allowed to change the source)
+ if [ ".$opt_C" = .yes ]; then
+ opt_c=yes
+ fi
+ if [ ".$opt_c" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp $src $dsttmp" 1>&2
+ fi
+ cp "$src" "$dsttmp" || shtool_exit $?
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv $src $dsttmp" 1>&2
+ fi
+ mv "$src" "$dsttmp" || shtool_exit $?
+ fi
+
+ # adjust the target file
+ if [ ".$opt_e" != . ]; then
+ sed='sed'
+ OIFS="$IFS"; IFS="$ASC_NL"; set -- $opt_e; IFS="$OIFS"
+ for e
+ do
+ sed="$sed -e '$e'"
+ done
+ cp "$dsttmp" "$dsttmp.old"
+ chmod u+w $dsttmp
+ eval "$sed <$dsttmp.old >$dsttmp" || shtool_exit $?
+ rm -f $dsttmp.old
+ fi
+ if [ ".$opt_s" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "strip $dsttmp" 1>&2
+ fi
+ strip $dsttmp || shtool_exit $?
+ fi
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o $dsttmp" 1>&2
+ fi
+ chown $opt_o $dsttmp || shtool_exit $?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g $dsttmp" 1>&2
+ fi
+ chgrp $opt_g $dsttmp || shtool_exit $?
+ fi
+ if [ ".$opt_m" != ".-" ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m $dsttmp" 1>&2
+ fi
+ chmod $opt_m $dsttmp || shtool_exit $?
+ fi
+
+ # determine whether to do a quick install
+ # (has to be done _after_ the strip was already done)
+ quick=no
+ if [ ".$opt_C" = .yes ]; then
+ if [ -r $dst ]; then
+ if cmp -s "$src" "$dst"; then
+ quick=yes
+ fi
+ fi
+ fi
+
+ # finally, install the file to the real destination
+ if [ $quick = yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f $dsttmp" 1>&2
+ fi
+ rm -f $dsttmp
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f $dst && mv $dsttmp $dst" 1>&2
+ fi
+ rm -f $dst && mv $dsttmp $dst
+ fi
+ done
+
+ shtool_exit 0
+ ;;
+
+mkdir )
+ ##
+ ## mkdir -- Make one or more directories
+ ## Copyright (c) 1996-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ errstatus=0
+ for p in ${1+"$@"}; do
+ # if the directory already exists...
+ if [ -d "$p" ]; then
+ if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
+ echo "$msgprefix:Error: directory already exists: $p" 1>&2
+ errstatus=1
+ break
+ else
+ continue
+ fi
+ fi
+ # if the directory has to be created...
+ if [ ".$opt_p" = .no ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $p" 1>&2
+ fi
+ mkdir $p || errstatus=$?
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o $p" 1>&2
+ fi
+ chown $opt_o $p || errstatus=$?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g $p" 1>&2
+ fi
+ chgrp $opt_g $p || errstatus=$?
+ fi
+ if [ ".$opt_m" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m $p" 1>&2
+ fi
+ chmod $opt_m $p || errstatus=$?
+ fi
+ else
+ # the smart situation
+ set fnord `echo ":$p" |\
+ sed -e 's/^:\//%/' \
+ -e 's/^://' \
+ -e 's/\// /g' \
+ -e 's/^%/\//'`
+ shift
+ pathcomp=''
+ for d in ${1+"$@"}; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp="./$pathcomp" ;;
+ esac
+ if [ ! -d "$pathcomp" ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $pathcomp" 1>&2
+ fi
+ mkdir $pathcomp || errstatus=$?
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o $pathcomp" 1>&2
+ fi
+ chown $opt_o $pathcomp || errstatus=$?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g $pathcomp" 1>&2
+ fi
+ chgrp $opt_g $pathcomp || errstatus=$?
+ fi
+ if [ ".$opt_m" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m $pathcomp" 1>&2
+ fi
+ chmod $opt_m $pathcomp || errstatus=$?
+ fi
+ fi
+ pathcomp="$pathcomp/"
+ done
+ fi
+ done
+
+ shtool_exit $errstatus
+ ;;
+
+mkln )
+ ##
+ ## mkln -- Make link with calculation of relative paths
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ # determine source(s) and destination
+ args=$#
+ srcs=""
+ while [ $# -gt 1 ]; do
+ srcs="$srcs $1"
+ shift
+ done
+ dst="$1"
+ if [ ! -d $dst ]; then
+ if [ $args -gt 2 ]; then
+ echo "$msgprefix:Error: multiple sources not allowed when target isn't a directory" 1>&2
+ shtool_exit 1
+ fi
+ fi
+
+ # determine link options
+ lnopt=""
+ if [ ".$opt_f" = .yes ]; then
+ lnopt="$lnopt -f"
+ fi
+ if [ ".$opt_s" = .yes ]; then
+ lnopt="$lnopt -s"
+ fi
+
+ # iterate over sources
+ for src in $srcs; do
+ # determine if one of the paths is an absolute path,
+ # because then we _have_ to use an absolute symlink
+ oneisabs=0
+ srcisabs=0
+ dstisabs=0
+ case $src in
+ /* ) oneisabs=1; srcisabs=1 ;;
+ esac
+ case $dst in
+ /* ) oneisabs=1; dstisabs=1 ;;
+ esac
+
+ # split source and destination into dir and base name
+ if [ -d $src ]; then
+ srcdir=`echo $src | sed -e 's;/*$;;'`
+ srcbase=""
+ else
+ srcdir=`echo $src | sed -e 's;^[^/]*$;;' -e 's;^\(.*/\)[^/]*$;\1;' -e 's;\(.\)/$;\1;'`
+ srcbase=`echo $src | sed -e 's;.*/\([^/]*\)$;\1;'`
+ fi
+ if [ -d $dst ]; then
+ dstdir=`echo $dst | sed -e 's;/*$;;'`
+ dstbase=""
+ else
+ dstdir=`echo $dst | sed -e 's;^[^/]*$;;' -e 's;^\(.*/\)[^/]*$;\1;' -e 's;\(.\)/$;\1;'`
+ dstbase=`echo $dst | sed -e 's;.*/\([^/]*\)$;\1;'`
+ fi
+
+ # consistency check
+ if [ ".$dstdir" != . ]; then
+ if [ ! -d $dstdir ]; then
+ echo "$msgprefix:Error: destination directory not found: $dstdir" 1>&2
+ shtool_exit 1
+ fi
+ fi
+
+ # make sure the source is reachable from the destination
+ if [ $dstisabs = 1 ]; then
+ if [ $srcisabs = 0 ]; then
+ if [ ".$srcdir" = . ]; then
+ srcdir="`pwd | sed -e 's;/*$;;'`"
+ srcisabs=1
+ oneisabs=1
+ elif [ -d $srcdir ]; then
+ srcdir="`cd $srcdir; pwd | sed -e 's;/*$;;'`"
+ srcisabs=1
+ oneisabs=1
+ fi
+ fi
+ fi
+
+ # split away a common prefix
+ prefix=""
+ if [ ".$srcdir" = ".$dstdir" ] && [ ".$srcdir" != . ]; then
+ prefix="$srcdir/"
+ srcdir=""
+ dstdir=""
+ else
+ while [ ".$srcdir" != . ] && [ ".$dstdir" != . ]; do
+ presrc=`echo $srcdir | sed -e 's;^\([^/]*\)/.*;\1;'`
+ predst=`echo $dstdir | sed -e 's;^\([^/]*\)/.*;\1;'`
+ if [ ".$presrc" != ".$predst" ]; then
+ break
+ fi
+ prefix="$prefix$presrc/"
+ srcdir=`echo $srcdir | sed -e 's;^[^/]*/*;;'`
+ dstdir=`echo $dstdir | sed -e 's;^[^/]*/*;;'`
+ done
+ fi
+
+ # destination prefix is just the common prefix
+ dstpre="$prefix"
+
+ # determine source prefix which is the reverse directory
+ # step-up corresponding to the destination directory
+ srcpre=""
+ allow_relative_srcpre=no
+ if [ ".$prefix" != . ] && [ ".$prefix" != ./ ]; then
+ allow_relative_srcpre=yes
+ fi
+ if [ $oneisabs = 0 ]; then
+ allow_relative_srcpre=yes
+ fi
+ if [ ".$opt_s" != .yes ]; then
+ allow_relative_srcpre=no
+ fi
+ if [ ".$allow_relative_srcpre" = .yes ]; then
+ pl="$dstdir/"
+ OIFS="$IFS"; IFS='/'
+ for pe in $pl; do
+ [ ".$pe" = . ] && continue
+ [ ".$pe" = .. ] && continue
+ srcpre="../$srcpre"
+ done
+ IFS="$OIFS"
+ else
+ if [ $srcisabs = 1 ]; then
+ srcpre="$prefix"
+ fi
+ fi
+
+ # determine destination symlink name
+ if [ ".$dstbase" = . ]; then
+ if [ ".$srcbase" != . ]; then
+ dstbase="$srcbase"
+ else
+ dstbase=`echo "$prefix$srcdir" | sed -e 's;/*$;;' -e 's;.*/\([^/]*\)$;\1;'`
+ fi
+ fi
+
+ # now finalize source and destination directory paths
+ srcdir=`echo $srcdir | sed -e 's;\([^/]\)$;\1/;'`
+ dstdir=`echo $dstdir | sed -e 's;\([^/]\)$;\1/;'`
+
+ # run the final link command
+ if [ ".$opt_t" = .yes ]; then
+ echo "ln$lnopt $srcpre$srcdir$srcbase $dstpre$dstdir$dstbase"
+ fi
+ eval ln$lnopt $srcpre$srcdir$srcbase $dstpre$dstdir$dstbase
+ done
+
+ shtool_exit 0
+ ;;
+
+mkshadow )
+ ##
+ ## mkshadow -- Make a shadow tree through symbolic links
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ # source and destination directory
+ src=`echo "$1" | sed -e 's:/$::' -e 's:^\./\(.\):\1:'`
+ dst=`echo "$2" | sed -e 's:/$::' -e 's:^\./\(.\):\1:'`
+
+ # check whether source exists
+ if [ ! -d $src ]; then
+ echo "$msgprefix:Error: source directory not found: \`$src'" 1>&2
+ shtool_exit 1
+ fi
+
+ # determine if one of the paths is an absolute path,
+ # because then we have to use an absolute symlink
+ oneisabs=0
+ case $src in
+ /* ) oneisabs=1 ;;
+ esac
+ case $dst in
+ /* ) oneisabs=1 ;;
+ esac
+
+ # determine reverse directory for destination directory
+ dstrevdir=''
+ if [ $oneisabs = 0 ]; then
+ # derive reverse path from forward path
+ pwd=`pwd`
+ OIFS="$IFS"; IFS='/'
+ for pe in $dst; do
+ if [ "x$pe" = "x.." ]; then
+ OIFS2="$IFS"; IFS="$DIFS"
+ eval `echo "$pwd" |\
+ sed -e 's:\([^/]*\)$:; dir="\1":' \
+ -e 's:^\(.*\)/[^/]*;:pwd="\1";:'\
+ -e 's:^;:pwd="";:'`
+ dstrevdir="$dir/$dstrevdir"
+ IFS="$OIFS2"
+ else
+ dstrevdir="../$dstrevdir"
+ fi
+ done
+ IFS="$OIFS"
+ else
+ src="`cd $src; pwd`";
+ fi
+
+ # create directory tree at destination
+ if [ ! -d $dst ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $dst" 1>&2
+ fi
+ mkdir $dst
+ fi
+ if [ ".$opt_a" = .yes ]; then
+ DIRS=`cd $src; find . -type d -print |\
+ sed -e '/^\.$/d' -e 's:^\./::'`
+ else
+ DIRS=`cd $src; find . -type d -print |\
+ sed -e '/\/CVS/d' -e '/^\.$/d' -e 's:^\./::'`
+ fi
+ for dir in $DIRS; do
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $dst/$dir" 1>&2
+ fi
+ mkdir $dst/$dir
+ done
+
+ # fill directory tree with symlinks to files
+ if [ ".$opt_a" = .yes ]; then
+ FILES="`cd $src; find . -depth -print |\
+ sed -e 's/^\.\///'`"
+ else
+ FILES="`cd $src; find . -depth -print |\
+ sed -e '/\.o$/d' -e '/\.a$/d' -e '/\.so$/d' \
+ -e '/\.cvsignore$/d' -e '/\/CVS/d' \
+ -e '/\/\.#/d' -e '/\.orig$/d' \
+ -e 's/^\.\///'`"
+ fi
+ for file in $FILES; do
+ # don't use `-type f' above for find because of symlinks
+ if [ -d "$src/$file" ]; then
+ continue
+ fi
+ basename=`echo $file | sed -e 's:^.*/::'`
+ dir=`echo $file | sed -e 's:[^/]*$::' -e 's:/$::' -e 's:$:/:' -e 's:^/$::'`
+ from=`echo "$src/$file" | sed -e 's/^\.\///'`
+ to="$dst/$dir$basename"
+ if [ $oneisabs = 0 ]; then
+ if [ ".$dir" != . ]; then
+ subdir=`echo $dir | sed -e 's:/$::'`
+ # derive reverse path from forward path
+ revdir=''
+ OIFS="$IFS"; IFS='/'
+ for pe in $subdir; do
+ revdir="../$revdir"
+ done
+ IFS="$OIFS"
+ # finalize from
+ from="$revdir$from"
+ fi
+ from="$dstrevdir$from"
+ fi
+ if [ ".$opt_v" = .yes ]; then
+ echo " $to" 1>&2
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "ln -s $from $to" 1>&2
+ fi
+ ln -s $from $to
+ done
+
+ shtool_exit 0
+ ;;
+
+fixperm )
+ ##
+ ## fixperm -- Fix file permissions inside a source tree
+ ## Copyright (c) 1996-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ paths="$*"
+
+ # check whether the test command supports the -x option
+ if [ -x /bin/sh ] 2>/dev/null; then
+ minusx="-x"
+ else
+ minusx="-r"
+ fi
+
+ # iterate over paths
+ for p in $paths; do
+ for file in `find $p -depth -print`; do
+ if [ -f $file ]; then
+ if [ $minusx $file ]; then
+ if [ ".$opt_v" = .yes ]; then
+ echo "-rwxr-xr-x $file" 2>&1
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod 755 $file" 2>&1
+ fi
+ chmod 755 $file
+ else
+ if [ ".$opt_v" = .yes ]; then
+ echo "-rw-r--r-- $file" 2>&1
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod 644 $file" 2>&1
+ fi
+ chmod 644 $file
+ fi
+ continue
+ fi
+ if [ -d $file ]; then
+ if [ ".$opt_v" = .yes ]; then
+ echo "drwxr-xr-x $file" 2>&1
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod 755 $file" 2>&1
+ fi
+ chmod 755 $file
+ continue
+ fi
+ if [ ".$opt_v" = .yes ]; then
+ echo "?????????? $file" 2>&1
+ fi
+ done
+ done
+
+ shtool_exit 0
+ ;;
+
+rotate )
+ ##
+ ## rotate -- Logfile rotation
+ ## Copyright (c) 2001-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ # make sure we have at least one file to rotate
+ if [ ".$opt_n" = .0 ]; then
+ echo "$msgprefix:Error: invalid argument \`$opt_n' to option -n." 1>&2
+ shtool_exit 1
+ fi
+
+ # canonicalize -s option argument
+ if [ ".$opt_s" != . ]; then
+ if [ ".`expr $opt_s : '[0-9]*$'`" != .0 ]; then
+ :
+ elif [ ".`expr $opt_s : '[0-9]*[Kk]$'`" != .0 ]; then
+ opt_s=`expr $opt_s : '\([0-9]*\)[Kk]$'`
+ opt_s=`expr $opt_s \* 1024`
+ elif [ ".`expr $opt_s : '[0-9]*[Mm]$'`" != .0 ]; then
+ opt_s=`expr $opt_s : '\([0-9]*\)[Mm]$'`
+ opt_s=`expr $opt_s \* 1048576` # 1024*1024
+ elif [ ".`expr $opt_s : '[0-9]*[Gg]$'`" != .0 ]; then
+ opt_s=`expr $opt_s : '\([0-9]*\)[Gg]$'`
+ opt_s=`expr $opt_s \* 1073741824` # 1024*1024*1024
+ else
+ echo "$msgprefix:Error: invalid argument \`$opt_s' to option -s." 1>&2
+ shtool_exit 1
+ fi
+ fi
+
+ # option -d/-z consistency
+ if [ ".$opt_d" = .yes ] && [ ".$opt_z" = . ]; then
+ echo "$msgprefix:Error: option -d requires option -z." 1>&2
+ shtool_exit 1
+ fi
+
+ # make sure target directory exists
+ if [ ".$opt_a" != . ]; then
+ if [ ! -d $opt_a ]; then
+ if [ ".$opt_f" = .no ]; then
+ echo "$msgprefix:Error: archive directory \`$opt_a' does not exist." 1>&2
+ shtool_exit 1
+ fi
+ mkdir $opt_a || shtool_exit $?
+ chmod 755 $opt_a
+ fi
+ if [ ! -w $opt_a ]; then
+ echo "$msgprefix:Error: archive directory \`$opt_a' not writable." 1>&2
+ shtool_exit 1
+ fi
+ fi
+
+ # determine compression approach
+ if [ ".$opt_z" != . ]; then
+ comp_lvl="$opt_z"
+ comp_prg=""
+ case $comp_lvl in
+ *:* ) eval `echo $comp_lvl |\
+ sed -e 's%^\(.*\):\(.*\)$%comp_prg="\1"; comp_lvl="\2"%'` ;;
+ esac
+
+ # compression level consistency
+ case $comp_lvl in
+ [0-9] )
+ ;;
+ * ) echo "$msgprefix:Error: invalid compression level \`$comp_lvl'" 1>&2
+ shtool_exit 1
+ ;;
+ esac
+
+ # determine a suitable compression tool
+ if [ ".$comp_prg" = . ]; then
+ # check whether the test command supports the -x option
+ if [ -x /bin/sh ] 2>/dev/null; then
+ minusx="-x"
+ else
+ minusx="-r"
+ fi
+ # search for tools in $PATH
+ paths="`echo $PATH |\
+ sed -e 's%/*:%:%g' -e 's%/*$%%' \
+ -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
+ -e 's/:/ /g'`"
+ for prg in bzip2 gzip compress; do
+ for path in $paths; do
+ if [ $minusx "$path/$prg" ] && [ ! -d "$path/$prg" ]; then
+ comp_prg="$prg"
+ break
+ fi
+ done
+ if [ ".$comp_prg" != . ]; then
+ break
+ fi
+ done
+ if [ ".$comp_prg" = . ]; then
+ echo "$msgprefix:Error: no suitable compression tool found in \$PATH" 1>&2
+ shtool_exit 1
+ fi
+ fi
+
+ # determine standard compression extension
+ # and make sure it is a known tool
+ case $comp_prg in
+ */bzip2 | bzip2 ) comp_ext="bz2" comp_lvl="-$comp_lvl" ;;
+ */gzip | gzip ) comp_ext="gz" comp_lvl="-$comp_lvl" ;;
+ */compress | compress ) comp_ext="Z"; comp_lvl="" ;;
+ * ) echo "$msgprefix:Error: tool \`$comp_prg' is not a known compression tool" 1>&2
+ shtool_exit 1
+ ;;
+ esac
+ comp_suf=".$comp_ext"
+ fi
+
+ # iterate over all given logfile arguments
+ for file in $*; do
+ # make sure the logfile exists
+ if [ ! -f $file ]; then
+ if [ ".$opt_f" = .yes ]; then
+ continue
+ fi
+ echo "$msgprefix:Error: logfile \`$file' not found" 1>&2
+ shtool_exit 1
+ fi
+
+ # determine log directory (where original logfile is placed)
+ ldir="."
+ case $file in
+ */* ) eval `echo $file | sed -e 's%^\(.*\)/\([^/]*\)$%ldir="\1"; file="\2";%'` ;;
+ esac
+
+ # determine archive directory (where rotated logfiles are placed)
+ adir="$ldir"
+ if [ ".$opt_a" != . ]; then
+ case "$opt_a" in
+ /* | ./* ) adir="$opt_a" ;;
+ * ) adir="$ldir/$opt_a" ;;
+ esac
+ fi
+
+ # optionally take logfile size into account
+ if [ ".$opt_s" != . ]; then
+ # determine size of logfile
+ set -- `env -i /bin/ls -l "$ldir/$file" | sed -e "s;$ldir/$file;;" |\
+ sed -e 's; -> .*$;;' -e 's;[ ][ ]*; ;g'`
+ n=`expr $# - 3`
+ eval "size=\`echo \${$n}\`"
+
+ # skip logfile if size is still too small
+ if [ $size -lt $opt_s ]; then
+ if [ ".$opt_v" = .yes ]; then
+ echo "$ldir/$file: still too small in size -- skipping"
+ fi
+ continue
+ fi
+ fi
+
+ # verbosity
+ if [ ".$opt_v" = .yes ]; then
+ echo "rotating $ldir/$file"
+ fi
+
+ # execute prolog
+ if [ ".$opt_P" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "$opt_P"
+ fi
+ eval $opt_P
+ [ $? -ne 0 ] && shtool_exit $?
+ fi
+
+ # kick away out-rotated logfile
+ n=`expr $opt_n - 1`
+ n=`echo dummy | awk "{ printf(\"%0${opt_p}d\", n); }" n=$n`
+ if [ -f "${adir}/${file}.${n}${comp_suf}" ]; then
+ # optionally migrate away the out-rotated logfile
+ if [ ".$opt_M" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "$opt_M ${adir}/${file}.${n}${comp_suf}"
+ fi
+ eval "$opt_M ${adir}/${file}.${n}${comp_suf}"
+ [ $? -ne 0 ] && shtool_exit $?
+ fi
+ # finally get rid of the out-rotated logfile
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f ${adir}/${file}.${n}${comp_suf}"
+ fi
+ rm -f ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
+ fi
+
+ # rotate already archived logfiles
+ while [ $n -gt 0 ]; do
+ m=$n
+ n=`expr $n - 1`
+ n=`echo dummy | awk "{ printf(\"%0${opt_p}d\", n); }" n=$n`
+ if [ $n -eq 0 ] && [ ".$opt_d" = .yes ]; then
+ # special case: first rotation file under delayed compression situation
+ if [ ! -f "${adir}/${file}.${n}" ]; then
+ continue
+ fi
+
+ # compress file (delayed)
+ if [ ".$opt_b" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv ${adir}/${file}.${n} ${adir}/${file}.${m}"
+ fi
+ mv ${adir}/${file}.${n} ${adir}/${file}.${m} || shtool_exit $?
+ if [ ".$opt_t" = .yes ]; then
+ echo "(${comp_prg} ${comp_lvl} <${adir}/${file}.${m} >${adir}/${file}.${m}${comp_suf}; rm -f ${adir}/${file}.${m}) &"
+ fi
+ ( ${comp_prg} ${comp_lvl} \
+ <${adir}/${file}.${m} \
+ >${adir}/${file}.${m}${comp_suf} || shtool_exit $?
+ rm -f ${adir}/${file}.${m} || shtool_exit $?
+ ) </dev/null >/dev/null 2>&1 &
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "${comp_prg} ${comp_lvl} <${adir}/${file}.${n} >${adir}/${file}.${m}${comp_suf}"
+ fi
+ ${comp_prg} ${comp_lvl} \
+ <${adir}/${file}.${n} \
+ >${adir}/${file}.${m}${comp_suf} || shtool_exit $?
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f ${adir}/${file}.${n}"
+ fi
+ rm -f ${adir}/${file}.${n} || shtool_exit $?
+ fi
+
+ # fix file attributes
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o ${adir}/${file}.${m}${comp_suf}"
+ fi
+ chown $opt_o ${adir}/${file}.${m}${comp_suf} || shtool_exit $?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g ${adir}/${file}.${m}${comp_suf}"
+ fi
+ chgrp $opt_g ${adir}/${file}.${m}${comp_suf} || shtool_exit $?
+ fi
+ if [ ".$opt_m" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m ${adir}/${file}.${m}${comp_suf}"
+ fi
+ chmod $opt_m ${adir}/${file}.${m}${comp_suf} || shtool_exit $?
+ fi
+ else
+ # standard case: second and following rotation file
+ if [ ! -f "${adir}/${file}.${n}${comp_suf}" ]; then
+ continue
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv ${adir}/${file}.${n}${comp_suf} ${adir}/${file}.${m}${comp_suf}"
+ fi
+ mv ${adir}/${file}.${n}${comp_suf} ${adir}/${file}.${m}${comp_suf} || shtool_exit $?
+ fi
+ done
+
+ # move away current logfile
+ if [ ".$opt_c" = .yes ]; then
+ # approach: copy[+truncate]
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp -p ${ldir}/${file} ${adir}/${file}.${n}"
+ fi
+ cp -p ${ldir}/${file} ${adir}/${file}.${n} || shtool_exit $?
+ if [ ".$opt_r" = .no ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp /dev/null ${ldir}/${file}"
+ fi
+ cp /dev/null ${ldir}/${file} || shtool_exit $?
+ fi
+ else
+ # approach: move[+touch]
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv ${ldir}/${file} ${adir}/${file}.${n}"
+ fi
+ mv ${ldir}/${file} ${adir}/${file}.${n} || shtool_exit $?
+ if [ ".$opt_r" = .no ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "touch ${ldir}/${file}"
+ fi
+ touch ${ldir}/${file} || shtool_exit $?
+ # fix file attributes
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o ${ldir}/${file}"
+ fi
+ chown $opt_o ${ldir}/${file} || shtool_exit $?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g ${ldir}/${file}"
+ fi
+ chgrp $opt_g ${ldir}/${file} || shtool_exit $?
+ fi
+ if [ ".$opt_m" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m ${ldir}/${file}"
+ fi
+ chmod $opt_m ${ldir}/${file} || shtool_exit $?
+ fi
+ fi
+ fi
+
+ # regular compression step
+ if [ ".$opt_z" != . ] && [ ".$opt_d" = .no ]; then
+ # compress file
+ if [ ".$opt_b" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "(${comp_prg} ${comp_lvl} <${adir}/${file}.${n} >${adir}/${file}.${n}${comp_suf}; rm -f ${adir}/${file}.${n}) &"
+ fi
+ ( ${comp_prg} ${comp_lvl} \
+ <${adir}/${file}.${n} \
+ >${adir}/${file}.${n}${comp_suf} || shtool_exit $?
+ rm -f ${adir}/${file}.${n} || shtool_exit $?
+ ) </dev/null >/dev/null 2>&1 &
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "${comp_prg} ${comp_lvl} <${adir}/${file}.${n} >${adir}/${file}.${n}${comp_suf}"
+ fi
+ ${comp_prg} ${comp_lvl} \
+ <${adir}/${file}.${n} \
+ >${adir}/${file}.${n}${comp_suf} || shtool_exit $?
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f ${opt_a}${file}.${n}"
+ fi
+ rm -f ${adir}/${file}.${n} || shtool_exit $?
+ fi
+
+ # fix file attributes
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o ${adir}/${file}.${n}${comp_suf}"
+ fi
+ chown $opt_o ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g ${adir}/${file}.${n}${comp_suf}"
+ fi
+ chgrp $opt_g ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
+ fi
+ if [ ".$opt_m" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m ${adir}/${file}.${n}${comp_suf}"
+ fi
+ chmod $opt_m ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
+ fi
+ fi
+
+ # execute epilog
+ if [ ".$opt_E" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "$opt_E"
+ fi
+ eval $opt_E
+ [ $? -ne 0 ] && shtool_exit $?
+ fi
+ done
+
+ shtool_exit 0
+ ;;
+
+tarball )
+ ##
+ ## tarball -- Roll distribution tarballs
+ ## Copyright (c) 1999-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ srcs="$*"
+
+ # check whether the test command supports the -x option
+ if [ -x /bin/sh ] 2>/dev/null; then
+ minusx="-x"
+ else
+ minusx="-r"
+ fi
+
+ # find the tools
+ paths="`echo $PATH |\
+ sed -e 's%/*:%:%g' -e 's%/*$%%' \
+ -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
+ -e 's/:/ /g'`"
+ for spec in find:gfind,find tar:gtar,tar tardy:tardy,tarcust; do
+ prg=`echo $spec | sed -e 's/:.*$//'`
+ tools=`echo $spec | sed -e 's/^.*://'`
+ eval "prg_${prg}=''"
+ # iterate over tools
+ for tool in `echo $tools | sed -e 's/,/ /g'`; do
+ # iterate over paths
+ for path in $paths; do
+ if [ $minusx "$path/$tool" ] && [ ! -d "$path/$tool" ]; then
+ eval "prg_${prg}=\"$path/$tool\""
+ break
+ fi
+ done
+ eval "val=\$prg_${prg}"
+ if [ ".$val" != . ]; then
+ break
+ fi
+ done
+ done
+
+ # expand source paths
+ exclude=''
+ for pat in `echo $opt_e | sed 's/,/ /g'`; do
+ exclude="$exclude | grep -v '$pat'"
+ done
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp /dev/null $tmpfile.lst" 1>&2
+ fi
+ cp /dev/null $tmpfile.lst
+ for src in $srcs; do
+ if [ -d $src ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "(cd $src && $prg_find . -type f -depth -print) | sed -e 's:^\\.\$::' -e 's:^\\./::' | cat $exclude >>$tmpfile.lst" 1>&2
+ fi
+ (cd $src && $prg_find . -type f -depth -print) |\
+ sed -e 's:^\.$::' -e 's:^\./::' | eval cat $exclude >>$tmpfile.lst
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "echo $src >>$tmpfile.lst" 1>&2
+ fi
+ echo $src >>$tmpfile.lst
+ fi
+ done
+ sort <$tmpfile.lst >$tmpfile.lst.n
+ mv $tmpfile.lst.n $tmpfile.lst
+ if [ ".$opt_v" = .yes ]; then
+ cat $tmpfile.lst | sed -e 's/^/ /' 1>&2
+ fi
+
+ # determine tarball file and directory name
+ if [ ".$opt_o" != . ]; then
+ tarfile="$opt_o"
+ if [ ".$opt_d" != . ]; then
+ tarname="$opt_d"
+ else
+ tarname=`echo $tarfile | sed -e 's/\.tar.*$//' -e 's;.*/\([^/]*\)$;\1;'`
+ fi
+ else
+ if [ ".$opt_d" != . ]; then
+ tarname="$opt_d"
+ elif [ -d "$from" ]; then
+ tarname=`echo $from | sed -e 's;.*/\([^/]*\)$;\1;'`
+ else
+ tarname="out"
+ fi
+ tarfile="$tarname.tar"
+ fi
+
+ # roll the tarball
+ compress=''
+ if [ ".$opt_c" != . ]; then
+ compress="| $opt_c"
+ fi
+ if [ ".$prg_tardy" != . ]; then
+ # the elegant hackers way
+ tardy_opt="--prefix=$tarname"
+ tardy_opt="$tardy_opt --user_number=0 --group_number=0" # security!
+ if [ ".$opt_u" != . ]; then
+ tardy_opt="$tardy_opt --user_name=$opt_u"
+ fi
+ if [ ".$opt_g" != . ]; then
+ tardy_opt="$tardy_opt --group_name=$opt_g"
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "cat $tmpfile.lst | xargs $prg_tar cf - | $prg_tardy $tardy_opt | cat $compress >$tmpfile.out" 1>&2
+ fi
+ cat $tmpfile.lst |\
+ xargs $prg_tar cf - |\
+ $prg_tardy $tardy_opt |\
+ eval cat $compress >$tmpfile.out
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp $tmpfile.out $tarfile" 1>&2
+ fi
+ cp $tmpfile.out $tarfile
+ else
+ # the portable standard way
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $tmpdir/$tarname" 1>&2
+ fi
+ mkdir $tmpdir/$tarname || shtool_exit 1
+ if [ ".$opt_t" = .yes ]; then
+ echo "cat $tmpfile.lst | xargs $prg_tar cf - | (cd $tmpdir/$tarname && $prg_tar xf -)" 1>&2
+ fi
+ cat $tmpfile.lst |\
+ xargs $prg_tar cf - |\
+ (cd $tmpdir/$tarname && $prg_tar xf -)
+ if [ ".$opt_u" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown -R $opt_u $tmpdir/$tarname >/dev/null 2>&1" 2>&1
+ fi
+ chown -R $opt_u $tmpdir/$tarname >/dev/null 2>&1 ||\
+ echo "$msgprefix:Warning: cannot set user name \`$opt_u' (would require root privileges)"
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp -R $opt_g $tmpdir/$tarname >/dev/null 2>&1" 2>&1
+ fi
+ chgrp -R $opt_g $tmpdir/$tarname >/dev/null 2>&1 ||\
+ echo "$msgprefix:Warning: cannot set group name \`$opt_g' (would require root privileges)"
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "(cd $tmpdir && $prg_find $tarname -type f -depth -print | sort | xargs $prg_tar cf -) | cat $compress >$tmpfile.out" 1>&2
+ fi
+ (cd $tmpdir && $prg_find $tarname -type f -depth -print | sort | xargs $prg_tar cf -) |\
+ eval cat $compress >$tmpfile.out
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp $tmpfile.out $tarfile" 1>&2
+ fi
+ cp $tmpfile.out $tarfile
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -rf $tmpdir/$tarname" 1>&2
+ fi
+ rm -rf $tmpdir/$tarname
+ fi
+
+ # cleanup
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f $tmpfile.lst $tmpfile.out" 1>&2
+ fi
+ rm -f $tmpfile.lst $tmpfile.out
+
+ shtool_exit 0
+ ;;
+
+subst )
+ ##
+ ## subst -- Apply sed(1) substitution operations
+ ## Copyright (c) 2001-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ # remember optional list of file(s)
+ files="$*"
+ files_num="$#"
+
+ # parameter consistency check
+ if [ $# -eq 0 ] && [ ".$opt_b" != . ]; then
+ echo "$msgprefix:Error: option -b cannot be applied to stdin" 1>&2
+ shtool_exit 1
+ fi
+ if [ $# -eq 0 ] && [ ".$opt_s" = .yes ]; then
+ echo "$msgprefix:Error: option -s cannot be applied to stdin" 1>&2
+ shtool_exit 1
+ fi
+
+ # build underlying sed(1) command
+ sedcmd='sed'
+ if [ ".$opt_e" != . ]; then
+ OIFS="$IFS"; IFS="$ASC_NL"; set -- $opt_e; IFS="$OIFS"
+ for e
+ do
+ sedcmd="$sedcmd -e '$e'"
+ done
+ elif [ ".$opt_f" != . ]; then
+ if [ ! -f $opt_f ]; then
+ echo "$msgprefix:Error: command file \`$opt_f' not found or not a regular file" 1>&2
+ shtool_exit 1
+ fi
+ sedcmd="$sedcmd -f '$opt_f'"
+ else
+ echo "$msgprefix:Error: either -e option(s) or -f option required" 1>&2
+ shtool_exit 1
+ fi
+
+ # determine extension for original file
+ orig=".orig"
+ if [ ".$opt_b" != . ]; then
+ orig="$opt_b"
+ fi
+
+ # apply sed(1) operation(s)
+ if [ ".$files" != . ]; then
+ # apply operation(s) to files
+ substdone=no
+ for file in $files; do
+ test ".$file" = . && continue
+ if [ ! -f $file ]; then
+ echo "$msgprefix:Warning: file \`$file' not found or not a regular file" 1>&2
+ continue
+ fi
+
+ # handle interactive mode
+ if [ ".$opt_i" = .yes ]; then
+ eval "$sedcmd <$file >$file.new"
+ skip=no
+ if cmp $file $file.new >/dev/null 2>&1; then
+ rm -f $file.new
+ skip=yes
+ else
+ (diff -U1 $file $file.new >$tmpfile) 2>/dev/null
+ if [ ".`cat $tmpfile`" = . ]; then
+ (diff -C1 $file $file.new >$tmpfile) 2>/dev/null
+ if [ ".`cat $tmpfile`" = . ]; then
+ echo "$msgprefix:Warning: unable to show difference for file \`$file'" 1>&2
+ cp /dev/null $tmpfile
+ fi
+ fi
+ rm -f $file.new
+ cat $tmpfile
+ echo dummy | awk '{ printf("%s", TEXT); }' TEXT=">>> Apply [Y/n]: "
+ read input
+ if [ ".$input" != .Y ] &&\
+ [ ".$input" != .y ] &&\
+ [ ".$input" != . ]; then
+ skip=yes
+ fi
+ fi
+ if [ ".$skip" = .yes ]; then
+ if [ ".$opt_v" = .yes ]; then
+ echo "file \`$file' -- skipped" 1>&2
+ fi
+ continue
+ fi
+ fi
+
+ # apply sed(1) operation(s)
+ if [ ".$opt_v" = .yes ]; then
+ echo "patching \`$file'" 1>&2
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "\$ cp -p $file $file$orig"
+ echo "\$ chmod u+w $file"
+ echo "\$ $sedcmd <$file$orig >$file"
+ fi
+ if [ ".$opt_n" = .no ]; then
+ cp -p $file $file$orig
+ chmod u+w $file >/dev/null 2>&1 || true
+ eval "$sedcmd <$file$orig >$file"
+ fi
+
+ # optionally fix timestamp
+ if [ ".$opt_s" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "\$ touch -r $file$orig $file"
+ fi
+ if [ ".$opt_n" = .no ]; then
+ touch -r $file$orig $file
+ fi
+ fi
+
+ # optionally check whether any content change actually occurred
+ if [ ".$opt_q" = .no ]; then
+ if cmp $file$orig $file >/dev/null 2>&1; then
+ if [ ".$opt_w" = .yes ]; then
+ echo "$msgprefix:Warning: substitution resulted in no content change on file \"$file\"" 1>&2
+ fi
+ else
+ substdone=yes
+ fi
+ fi
+
+ # optionally remove preserved original file
+ if [ ".$opt_b" = . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "\$ rm -f $file$orig"
+ fi
+ if [ ".$opt_n" = .no ]; then
+ rm -f $file$orig
+ fi
+ fi
+ done
+ if [ ".$opt_q" = .no ] && [ ".$opt_w" = .no ]; then
+ if [ ".$substdone" = .no ]; then
+ if [ ".$files_num" = .1 ]; then
+ echo "$msgprefix:Warning: substitution resulted in no content change on file \"$file\"" 1>&2
+ else
+ echo "$msgprefix:Warning: substitution resulted in no content change on any file" 1>&2
+ fi
+ fi
+ fi
+ else
+ # apply operation(s) to stdin/stdout
+ if [ ".$opt_v" = .yes ]; then
+ echo "patching <stdin>" 1>&2
+ fi
+ if [ ".$opt_t" = .yes ]; then
+ echo "\$ $sedcmd"
+ fi
+ if [ ".$opt_n" = .no ]; then
+ eval "$sedcmd"
+ fi
+ fi
+
+ shtool_exit 0
+ ;;
+
+platform )
+ ##
+ ## platform -- Platform Identification Utility
+ ## Copyright (c) 2003-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ # option post-processing
+ if [ ".$opt_t" != . ]; then
+ case "$opt_t" in
+ binary )
+ # binary package id (OpenPKG RPM)
+ opt_F="%<ap>-%<sp>"
+ opt_L=yes
+ opt_S=""
+ opt_C="+"
+ ;;
+ build )
+ # build time checking (OpenPKG RPM)
+ opt_F="%<at>-%<st>"
+ opt_L=yes
+ opt_S=""
+ opt_C="+"
+ ;;
+ gnu )
+ # GNU config.guess style <arch>-<vendor>-<os><osversion>
+ opt_F="%<at>-unknown-%<st>"
+ opt_L=yes
+ opt_S=""
+ opt_C="+"
+ ;;
+ web )
+ # non-whitespace HTTP Server-header id
+ opt_F="%<sp>-%<ap>"
+ opt_S="/"
+ opt_C="+"
+ ;;
+ summary)
+ # human readable verbose summary information
+ opt_F="Class: %[sc] (%[ac])\\nProduct: %[sp] (%[ap])\\nTechnology: %[st] (%[at])"
+ opt_S=" "
+ opt_C="/"
+ ;;
+ all-in-one )
+ # full-table all-in-one information
+ opt_F=""
+ opt_F="${opt_F}concise architecture class: %<ac>\\n"
+ opt_F="${opt_F}regular architecture class: %{ac}\\n"
+ opt_F="${opt_F}verbose architecture class: %[ac]\\n"
+ opt_F="${opt_F}concise architecture product: %<ap>\\n"
+ opt_F="${opt_F}regular architecture product: %{ap}\\n"
+ opt_F="${opt_F}verbose architecture product: %[ap]\\n"
+ opt_F="${opt_F}concise architecture technology: %<at>\\n"
+ opt_F="${opt_F}regular architecture technology: %{at}\\n"
+ opt_F="${opt_F}verbose architecture technology: %[at]\\n"
+ opt_F="${opt_F}concise system class: %<sc>\\n"
+ opt_F="${opt_F}regular system class: %{sc}\\n"
+ opt_F="${opt_F}verbose system class: %[sc]\\n"
+ opt_F="${opt_F}concise system product: %<sp>\\n"
+ opt_F="${opt_F}regular system product: %{sp}\\n"
+ opt_F="${opt_F}verbose system product: %[sp]\\n"
+ opt_F="${opt_F}concise system technology: %<st>\\n"
+ opt_F="${opt_F}regular system technology: %{st}\\n"
+ opt_F="${opt_F}verbose system technology: %[st]"
+ ;;
+ * )
+ echo "$msgprefix:Error: invalid type \`$opt_t'" 1>&2
+ exit 1
+ ;;
+ esac
+ fi
+
+ # assemble initial platform information
+ UNAME_MACHINE=`(uname -m) 2>/dev/null` ||\
+ UNAME_MACHINE=`(uname -p) 2>/dev/null` ||\
+ UNAME_MACHINE='unknown'
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` ||\
+ UNAME_SYSTEM='unknown'
+ UNAME_RELEASE=`(uname -r) 2>/dev/null` ||\
+ UNAME_RELEASE=`(uname -v) 2>/dev/null` ||\
+ UNAME_RELEASE='unknown'
+
+ UNAME="${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}"
+
+ AC=""; AP=""; AT=""
+ SC=""; SP=""; ST=""
+
+ # dispatch into platform specific sections
+ case "${UNAME}" in
+
+ # FreeBSD
+ *:FreeBSD:* )
+ # determine architecture
+ AC="${UNAME_MACHINE}"
+ case "${AC}" in
+ i386 ) AC="iX86" ;;
+ esac
+ AP="${AC}"
+ AT="${AP}"
+ if [ ".${AT}" = ".iX86" ]; then
+ case "`(/sbin/sysctl -n hw.model) 2>&1`" in
+ *"Xeon"* | *"Pentium Pro"* | *"Cyrix 6x86MX"* | *"Pentium II"* | *"Pentium III"* | *"Pentium 4"* | *"Celeron"* ) AT="i686" ;;
+ *"Pentium"* ) AT="i586" ;; *"i486[SD]X"* | *"Cyrix 486"* | *"Cyrix [56]x86"* | *"Blue Lightning" | *"Cyrix 486S/DX" ) AT="i486" ;;
+ *"i386[SD]X"* | *"NexGen 586"* ) AT="i386" ;;
+ esac
+ fi
+ # determine system
+ r=`echo "${UNAME_RELEASE}" |\
+ sed -e 's;[()];;' -e 's/\(-.*\)$/[\1]/'`
+ ST="FreeBSD ${r}"
+ SP="${ST}"
+ case "${r}" in
+ 1.* ) SC="4.3BSD" ;;
+ * ) SC="4.4BSD" ;;
+ esac
+ ;;
+
+ # NetBSD
+ *:NetBSD:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ AP="${AT}"
+ case "${AP}" in
+ i[3-6]86 ) AP="iX86" ;;
+ esac
+ AC="${AP}"
+ # determine system
+ r=`echo "${UNAME_RELEASE}" | sed -e 's/\([-_].*\)$/[\1]/'`
+ ST="NetBSD ${r}"
+ SP="${ST}"
+ case "${r}" in
+ 0.* ) SC="4.3BSD" ;;
+ * ) SC="4.4BSD" ;;
+ esac
+ ;;
+
+ # OpenBSD
+ *:OpenBSD:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ AP="${AT}"
+ case "${AP}" in
+ i[3-6]86 ) AP="iX86" ;;
+ esac
+ AC="${AP}"
+ # determine system
+ r=`echo "${UNAME_RELEASE}" | sed -e 's/\([-_].*\)$/[\1]/'`
+ ST="OpenBSD ${r}"
+ SP="${ST}"
+ SC="4.4BSD"
+ ;;
+
+ # DragonFly BSD
+ *:DragonFly:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ AP="${AT}"
+ case "${AP}" in
+ i[3-6]86 ) AP="iX86" ;;
+ esac
+ AC="${AP}"
+ # determine system
+ r=`echo "${UNAME_RELEASE}" | sed -e 's/\([-_].*\)$/[\1]/'`
+ ST="DragonFly ${r}"
+ SP="${ST}"
+ SC="4.4BSD"
+ ;;
+
+ # GNU/Linux
+ *:Linux:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ case "${AT}" in
+ ia64 ) AT="IA64" ;;
+ x86_64 ) AT='AMD64' ;;
+ parisc ) AT="HPPA32" ;;
+ parisc64 ) AT="HPPA64" ;;
+ esac
+ AP="${AT}"
+ case "${AP}" in
+ i[3-6]86 ) AP='iX86' ;;
+ esac
+ AC="${AP}"
+ # determine system
+ v_kern=`echo "${UNAME_RELEASE}" |\
+ sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/'`
+ v_libc=`(strings /lib/libc.so.* | grep '^GLIBC_' | sed -e 's/^GLIBC_//' |\
+ env -i sort -n | sed -n -e '$p' | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/') 2>/dev/null`
+ ST="GNU/<Linux >${v_libc}/<${v_kern}>"
+ if [ -f /etc/lsb-release ]; then
+ eval `( . /etc/lsb-release
+ echo "SC=\"LSB${LSB_VERSION}\""
+ if [ ".${DISTRIB_ID}" != . -a ".${DISTRIB_RELEASE}" != . ]; then
+ echo "SP=\"${DISTRIB_ID} ${DISTRIB_RELEASE}\""
+ fi
+ ) 2>/dev/null`
+ fi
+ if [ ".$SP" = . ]; then
+ for tagfile in x \
+ `cd /etc && \
+ /bin/ls *[_-]release *[_-]version 2>/dev/null | env -i sort | \
+ sed -e '/^redhat-release$/d' -e '/^lsb-release$/d'; \
+ echo redhat-release lsb-release`
+ do
+ [ ".${tagfile}" = .x ] && continue
+ [ ! -f "/etc/${tagfile}" ] && continue
+ n=`echo ${tagfile} | sed -e 's/[_-]release$//' -e 's/[_-]version$//'`
+ v=`(grep VERSION /etc/${tagfile}; cat /etc/${tagfile}) | grep '[0-9]' | sed -e 'q' |\
+ sed -e 's/^/#/' \
+ -e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \
+ -e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \
+ -e 's/^#[^0-9]*\([0-9][0-9]*\).*$/\1/' \
+ -e 's/^#.*$//'`
+ case "`util_lower ${n}`" in
+ redhat )
+ if [ ".`egrep '(Red Hat Enterprise Linux|CentOS)' /etc/${tagfile}`" != . ]; then
+ n="<R>ed <H>at <E>nterprise <L>inux"
+ else
+ n="<R>ed <H>at <L>inux"
+ fi
+ ;;
+ debian ) n="Debian[ GNU/Linux]" ;;
+ ubuntu ) n="Ubuntu[ GNU/Linux]" ;;
+ fedora ) n="<Fedora> Core[ GNU/Linux]" ;;
+ suse ) n="[Novell ]SUSE[ Linux]" ;;
+ mandrake*|mandriva ) n="Mandriva[ Linux]" ;;
+ gentoo ) n="Gentoo[ GNU/Linux]" ;;
+ slackware ) n="Slackware[ Linux]" ;;
+ turbolinux ) n="TurboLinux" ;;
+ unitedlinux ) n="UnitedLinux" ;;
+ * ) n="${n}[ GNU/Linux]" ;;
+ esac
+ case "$n" in
+ *"<"*">"* ) SP="$n <$v>" ;;
+ * ) SP="$n $v" ;;
+ esac
+ break
+ done
+ fi
+ [ ".$SP" = . ] && SP="${ST}"
+ [ ".$SC" = . ] && SC="LSB"
+ ;;
+
+ # Sun Solaris
+ *:SunOS:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ case "${AT}" in
+ i86pc )
+ AT="iX86"
+ case "`(/bin/isainfo -k) 2>&1`" in
+ amd64 ) AT="AMD64" ;;
+ esac
+ ;;
+ esac
+ AP="${AT}"
+ case "${AP}" in
+ sun4[cdm] ) AP="SPARC32" ;;
+ sun4[uv] ) AP="SPARC64" ;;
+ sun4* ) AP="SPARC" ;;
+ esac
+ AC="${AP}"
+ case "${AC}" in
+ SPARC* ) AC="SPARC" ;;
+ esac
+ # determine system
+ ST="[Sun ]SunOS ${UNAME_RELEASE}"
+ v=`echo "${UNAME_RELEASE}" |\
+ sed -e 's;^4\.;1.;' \
+ -e 's;^5\.\([0-6]\)[^0-9]*$;2.\1;' \
+ -e 's;^5\.\([0-9][0-9]*\).*;\1;'`
+ SP="[Sun ]Solaris $v"
+ case "${UNAME_RELEASE}" in
+ 4.* ) SC="4.3BSD" ;;
+ 5.* ) SC="SVR4" ;;
+ esac
+ ;;
+
+ # SCO UnixWare
+ *:UnixWare:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ case "${AT}" in
+ i[3-6]86 | ix86at ) AT="iX86" ;;
+ esac
+ AP="${AT}"
+ # determine system
+ v=`/sbin/uname -v`
+ ST="[SCO ]UnixWare ${v}"
+ SP="${ST}"
+ SC="SVR${UNAME_RELEASE}"
+ ;;
+
+ # QNX
+ *:QNX:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ case "${AT}" in
+ x86pc ) AT="iX86" ;;
+ esac
+ AP="${AT}"
+ # determine system
+ v="${UNAME_RELEASE}"
+ ST="QNX[ Neutrino RTOS] ${v}"
+ v=`echo "${v}" | sed -e 's;^\([0-9][0-9]*\.[0-9][0-9]*\).*$;\1;'`
+ SP="QNX[ Neutrino RTOS] ${v}"
+ SC="QNX"
+ ;;
+
+ # SGI IRIX
+ *:IRIX*:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ AP="${AT}"
+ case "${AP}:${UNAME_SYSTEM}" in
+ IP*:IRIX64 ) AP="MIPS64" ;;
+ IP*:* ) AP="MIPS" ;;
+ esac
+ AC="${AP}"
+ # determine system
+ v=`(/bin/uname -R || /bin/uname -r) 2>/dev/null | sed -e 's;[0-9.]* ;;'`
+ ST="[SGI ]IRIX ${v}"
+ v="${UNAME_RELEASE}"
+ SP="[SGI ]IRIX ${v}"
+ SC="4.2BSD/SVR3"
+ ;;
+
+ # HP HP-UX
+ *:HP-UX:* )
+ # determine architecture
+ AT="${UNAME_MACHINE}"
+ case "${AT}" in
+ ia64 ) AT="IA64" ;;
+ 9000/[34]?? ) AT=M68K ;;
+ 9000/[678][0-9][0-9])
+ 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 ) AT="HPPA1.0" ;;
+ 528 ) AT="HPPA1.1" ;;
+ 532 ) AT="HPPA2.0"
+ case "${sc_kernel_bits}" in
+ 32 ) AT="${AT}n" ;;
+ 64 ) AT="${AT}w" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ AP="${AT}"
+ case "${AP}" in
+ HPPA* ) AP="HPPA" ;;
+ esac
+ AC="${AP}"
+ # determine system
+ v=`echo "${UNAME_RELEASE}" | sed -e 's;^[^0-9]*;;'`
+ ST="[HP ]<HP>-<UX ${v}>"
+ SP="${ST}"
+ case "${v}" in
+ 10.* ) SC="SVR4.2" ;;
+ [7-9]* ) SC="SVR4" ;;
+ esac
+ ;;
+
+ # HP Tru64 (OSF1)
+ *:OSF1:* )
+ # determine architecture
+ AP="${UNAME_MACHINE}"
+ case "${AP}" in
+ alpha ) AP="Alpha" ;;
+ esac
+ alpha_type=`(/usr/sbin/psrinfo -v) 2>/dev/null |\
+ sed -n -e 's/^.*The alpha \([^ ][^ ]*\).*processor.*$/\1/p' | sed -e 'q'`
+ AT="${AP}${alpha_type}"
+ AC="${AP}"
+ # determine system
+ v=`echo "${UNAME_RELEASE}" | sed -e 's;^[VTX];;'`
+ ST="[HP ]Tru64 ${v}"
+ SP="${ST}"
+ SC="OSF1"
+ ;;
+
+ # IBM AIX
+ *:AIX:* )
+ # determine architecture
+ cpu_arch=RS6000
+ if [ -x /usr/sbin/lsdev -a -x /usr/sbin/lsattr ]; then
+ cpu_id=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if [ ".`/usr/sbin/lsattr -El ${cpu_id} | grep -i powerpc`" != . ]; then
+ cpu_arch=PPC
+ fi
+ elif [ -d /QOpenSys ]; then
+ # IBM i5/OS (aka OS/400) with PASE (Portable Application Solutions Environment)
+ cpu_arch=PPC
+ fi
+ if [ -x /usr/bin/oslevel ]; then
+ os_level=`/usr/bin/oslevel`
+ else
+ os_level="`uname -v`.`uname -r`"
+ fi
+ os_level=`echo "${os_level}" |\
+ sed -e 's;^\([0-9][0-9]*\.[0-9][0-9]*\)\(\.[0-9][0-9]*\)\(.*\)$;<\1>\2[\3];' \
+ -e 's;^\([0-9][0-9]*\.[0-9][0-9]*\)\(.*\)$;<\1>\2;'`
+ AT="${cpu_arch}"
+ AP="${AT}"
+ AC="${AP}"
+ # determine system
+ ST="[IBM ]<AIX >${os_level}"
+ SP="${ST}"
+ case "${os_level}" in
+ [12]* ) SC="SVR2" ;;
+ * ) SC="SVR4" ;;
+ esac
+ ;;
+
+ # Apple Mac OS X (Darwin)
+ *:Darwin:* )
+ # determine architecture
+ AT="`uname -p`"
+ case "${AT}" in
+ powerpc ) AT="PPC" ;;
+ esac
+ AP="${AT}"
+ case "${AP}" in
+ i?86 ) AP="iX86" ;;
+ esac
+ AC="${AP}"
+ # determine system
+ unset v1; unset v2; unset v3
+ eval `echo "${UNAME_RELEASE}" |\
+ sed -e 's/^/#/' \
+ -e 's/^#\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/v1="\1"; v2="\2"; v3="\3"/' \
+ -e 's/^#\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/v1="\1"; v2="\2"/' \
+ -e 's/^#\([0-9][0-9]*\).*$/v1="\1"/' \
+ -e 's/^#.*$/v1="0"/'`
+ ST="[Apple ]<${UNAME_SYSTEM} ${v1}>${v2+.$v2}${v3+[.$v3]}"
+ SP="$ST"
+ v="`(sw_vers) 2>/dev/null | grep 'ProductVersion:' | sed -e 's/^ProductVersion:[^0-9]*\([0-9][0-9.]*\).*$/\1/'`"
+ if [ ".$v" = . ]; then
+ for name in System Server; do
+ if [ -f /System/Library/CoreServices/${name}Version.plist ]; then
+ v=`(defaults read "/System/Library/CoreServices/${name}Version" "ProductVersion") 2>/dev/null`
+ [ ".$v" != . ] && break
+ fi
+ done
+ fi
+ if [ ".$v" != . ]; then
+ unset v1; unset v2; unset v3
+ eval `echo "${v}" |\
+ sed -e 's/^/#/' \
+ -e 's/^#\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/v1="\1"; v2="\2"; v3="\3"/' \
+ -e 's/^#\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/v1="\1"; v2="\2"/' \
+ -e 's/^#\([0-9][0-9]*\).*$/v1="\1"/' \
+ -e 's/^#.*$/v1="0"/'`
+ SP="[Apple ]Mac OS X ${v1}${v2+.$v2}${v3+[.$v3]}"
+ fi
+ SC="4.4BSD/Mach3.0"
+ ;;
+
+ # Windows/Cygwin
+ *:CYGWIN*:* )
+ # determine architecture
+ AT="`uname -m`"
+ AP="${AT}"
+ case "${AP}" in
+ i?86 ) AP="iX86" ;;
+ esac
+ AC="${AP}"
+ # determine system
+ unset v1; unset v2; unset v3
+ eval `echo "${UNAME_RELEASE}" |\
+ sed -e 's/^/#/' \
+ -e 's/^#\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/v1="\1"; v2="\2"; v3="\3"/' \
+ -e 's/^#\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/v1="\1"; v2="\2"/' \
+ -e 's/^#\([0-9][0-9]*\).*$/v1="\1"/' \
+ -e 's/^#.*$/v1="0"/'`
+ ST="Cygwin ${v1}${v2+.$v2}${v3+[.$v3]}"
+ SP="$ST"
+ SC="Windows"
+ v=`echo "${UNAME_SYSTEM}" | sed -e 's/^CYGWIN_NT-//' |\
+ sed -e 's/^/#/' -e 's/^#\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' -e 's/^#.*$//'`
+ case "$v" in
+ 4.0 ) SC="$SC[ NT]" ;;
+ 5.0 ) SC="$SC[ 2000]" ;;
+ 5.1 ) SC="$SC[ XP]" ;;
+ 6.0 ) SC="$SC[ Vista]" ;;
+ esac
+ ;;
+
+ # TODO ...ADD YOUR NEW PLATFORM CHECK HERE... TODO
+ # *:XXX:* )
+ # ...
+ # ;;
+
+ # ...A STILL UNKNOWN PLATFORM...
+ * )
+ AT=`echo "${UNAME_MACHINE}" | sed -e "s; ;${opt_C};g"`
+ AP="${AT}"
+ AC="${AP}"
+ v=`echo "${UNAME_RELEASE}" |\
+ sed -e 's/^/#/' \
+ -e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \
+ -e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \
+ -e 's/^#[^0-9]*\([0-9][0-9]*\).*$/\1/' \
+ -e 's/^#.*$/?/'`
+ ST="${UNAME_SYSTEM} ${v}"
+ SP="${ST}"
+ SC="${SP}"
+ ;;
+
+ esac
+
+ # provide fallback values
+ [ ".$AT" = . ] && AT="${AP:-${AC}}"
+ [ ".$AP" = . ] && AP="${AT:-${AC}}"
+ [ ".$AC" = . ] && AC="${AP:-${AT}}"
+ [ ".$ST" = . ] && ST="${SP:-${SC}}"
+ [ ".$SP" = . ] && SP="${ST:-${SC}}"
+ [ ".$SC" = . ] && SC="${SP:-${ST}}"
+
+ # support explicit enforced verbose/concise output
+ if [ ".$opt_v" = .yes ]; then
+ opt_F=`echo ":$opt_F" | sed -e 's/^://' -e 's/%\([as][cpt]\)/%[\1]/g'`
+ elif [ ".$opt_c" = .yes ]; then
+ opt_F=`echo ":$opt_F" | sed -e 's/^://' -e 's/%\([as][cpt]\)/%<\1>/g'`
+ fi
+
+ # provide verbose and concise variants
+ AC_V=""; AC_N=""; AC_C=""
+ AP_V=""; AP_N=""; AP_C=""
+ AT_V=""; AT_N=""; AT_C=""
+ SC_V=""; SC_N=""; SC_C=""
+ SP_V=""; SP_N=""; SP_C=""
+ ST_V=""; ST_N=""; ST_C=""
+ for var_lc in at ap ac st sp sc; do
+ case "$opt_F" in
+ *"%[${val_lc}]"* | *"%{${val_lc}}"* | *"%${val_lc}"* | *"%<${val_lc}>"* )
+ var_uc=`util_upper "$var_lc"`
+ eval "val=\"\$${var_uc}\""
+ val_V=""; val_N=""; val_C=""
+ case "$opt_F" in
+ *"%[${var_lc}]"* )
+ val_V=`echo ":$val" | \
+ sed -e 's/^://' \
+ -e 's;\[\([^]]*\)\];\1;g' \
+ -e 's;<\([^>]*\)>;\1;g' \
+ -e "s; ;§§;g" \
+ -e "s;/;%%;g" \
+ -e "s;§§;${opt_S};g" \
+ -e "s;%%;${opt_C};g"`
+ eval "${var_uc}_V=\"\${val_V}\""
+ ;;
+ esac
+ case "$opt_F" in
+ *"%{${var_lc}}"* | *"%${var_lc}"* )
+ val_N=`echo ":$val" | \
+ sed -e 's/^://' \
+ -e 's;\[\([^]]*\)\];;g' \
+ -e 's;<\([^>]*\)>;\1;g' \
+ -e "s; ;§§;g" \
+ -e "s;/;%%;g" \
+ -e "s;§§;${opt_S};g" \
+ -e "s;%%;${opt_C};g"`
+ eval "${var_uc}_N=\"\${val_N}\""
+ ;;
+ esac
+ case "$opt_F" in
+ *"%<${var_lc}>"* )
+ val_C=`echo ":$val" | \
+ sed -e 's/^://' \
+ -e 's;\[\([^]]*\)\];;g' \
+ -e 's;[^<]*<\([^>]*\)>[^<]*;\1;g' \
+ -e "s; ;§§;g" \
+ -e "s;/;%%;g" \
+ -e "s;§§;${opt_S};g" \
+ -e "s;%%;${opt_C};g"`
+ eval "${var_uc}_C=\"\${val_C}\""
+ ;;
+ esac
+ ;;
+ esac
+ done
+
+ # create output string
+ output=`echo ":$opt_F" |\
+ sed -e "s/^://" \
+ -e "s;%\\[ac\\];${AC_V};g" \
+ -e "s;%{ac};${AC_N};g" \
+ -e "s;%ac;${AC_N};g" \
+ -e "s;%<ac>;${AC_C};g" \
+ -e "s;%\\[ap\\];${AP_V};g" \
+ -e "s;%{ap};${AP_N};g" \
+ -e "s;%ap;${AP_N};g" \
+ -e "s;%<ap>;${AP_C};g" \
+ -e "s;%\\[at\\];${AT_V};g" \
+ -e "s;%{at};${AT_N};g" \
+ -e "s;%at;${AT_N};g" \
+ -e "s;%<at>;${AT_C};g" \
+ -e "s;%\\[sc\\];${SC_V};g" \
+ -e "s;%{sc};${SC_N};g" \
+ -e "s;%sc;${SC_N};g" \
+ -e "s;%<sc>;${SC_C};g" \
+ -e "s;%\\[sp\\];${SP_V};g" \
+ -e "s;%{sp};${SP_N};g" \
+ -e "s;%sp;${SP_N};g" \
+ -e "s;%<sp>;${SP_C};g" \
+ -e "s;%\\[st\\];${ST_V};g" \
+ -e "s;%{st};${ST_N};g" \
+ -e "s;%st;${ST_N};g" \
+ -e "s;%<st>;${ST_C};g" \
+ -e 's/\\\\n/^/g' |\
+ tr '^' '\012'`
+
+ # support lower/upper-case mapping
+ if [ ".$opt_L" = .yes ]; then
+ output=`util_lower "$output"`
+ elif [ ".$opt_U" = .yes ]; then
+ output=`util_upper "$output"`
+ fi
+
+ # display output string
+ if [ ".$opt_n" = .yes ]; then
+ echo . | awk '{ printf("%s", output); }' output="$output"
+ else
+ echo "$output"
+ fi
+
+ shtool_exit 0
+ ;;
+
+arx )
+ ##
+ ## arx -- Extended archive command
+ ## Copyright (c) 1999-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ ar_prg="$opt_C"
+ ar_cmd="$1"; shift
+ archive="$1"; shift
+ files="$*"
+
+ # walk through the file list and expand archives members
+ ar_tmpdir=`echo $archive | sed -e 's;[^/]*$;.arx;'`
+ nfiles=''
+ if [ ".$files" != . ]; then
+ for file in $files; do
+ if [ ! -f $file ]; then
+ echo "$msgprefix:Error: input file not found: $file" 1>&2
+ shtool_exit 1
+ fi
+ case $file in
+ *.a )
+ if [ ! -d $ar_tmpdir ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $ar_tmpdir" 1>&2
+ fi
+ mkdir $ar_tmpdir
+ fi
+ case $ar_tmpdir in
+ .arx )
+ from="../$file"
+ ;;
+ * )
+ dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;'`
+ base=`echo $file | sed -e 's;.*/\([^/]*\)$;\1;'`
+ from="`cd $dir; pwd`/$base"
+ ;;
+ esac
+ if [ ".$opt_t" = .yes ]; then
+ echo "(cd $ar_tmpdir && $ar_prg x $from)" 1>&2
+ fi
+ (cd $ar_tmpdir && eval $ar_prg x $from)
+ if [ $? -ne 0 ]; then
+ echo "$msgprefix:Error: member extraction failed for archive: $file" 1>&2
+ shtool_exit 1
+ fi
+ for member in - `eval $ar_prg t $file | sed -e '/_\.SYMDEF/d'`; do
+ [ ".$member" = .- ] && continue
+ nfiles="$nfiles $ar_tmpdir/$member"
+ done
+ ;;
+ * )
+ nfiles="$nfiles $file"
+ ;;
+ esac
+ done
+ fi
+
+ # run the final archive command
+ if [ ".$opt_t" = .yes ]; then
+ echo "$ar_prg $ar_cmd $archive $nfiles" 1>&2
+ fi
+ eval $ar_prg $ar_cmd $archive $nfiles
+ if [ $? -ne 0 ]; then
+ echo "$msgprefix:Error: archive command failed" 1>&2
+ shtool_exit $?
+ fi
+
+ # cleanup and die gracefully
+ if [ -d $ar_tmpdir ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -rf $ar_tmpdir" 1>&2
+ fi
+ rm -rf $ar_tmpdir
+ fi
+
+ shtool_exit 0
+ ;;
+
+slo )
+ ##
+ ## slo -- Separate linker options by library class
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ DIFS="$IFS"
+
+ # parse out -L and -l options from command line
+ DIRS=''
+ LIBS=''
+ ARGV=''
+ optprev=''
+ for opt
+ do
+ # concatenate with previous option if exists
+ if [ ".$optprev" != . ]; then
+ opt="${optprev}${opt}";
+ optprev=''
+ fi
+ # remember options for arg if used stand-alone
+ if [ ".$opt" = ".-L" ] || [ ".$opt" = ".-l" ]; then
+ optprev="$opt"
+ continue;
+ fi
+ # split argument into option plus option argument
+ arg="`echo $opt | cut -c3-`"
+ opt="`echo $opt | cut -c1-2`"
+ # store into containers
+ case $opt in
+ -L) DIRS="$DIRS:$arg" ;;
+ -l) LIBS="$LIBS:$arg" ;;
+ *) ARGV="$ARGV $opt" ;;
+ esac
+ done
+
+ # set linker default directories
+ DIRS_DEFAULT='/lib:/usr/lib'
+ if [ ".$LD_LIBRARY_PATH" != . ]; then
+ DIRS_DEFAULT="$DIRS_DEFAULT:$LD_LIBRARY_PATH"
+ fi
+
+ # sort options by class
+ DIRS_OBJ=''
+ LIBS_OBJ=''
+ DIRS_PIC=''
+ LIBS_PIC=''
+ DIRS_DSO=''
+ LIBS_DSO=''
+
+ # for each library...
+ OIFS="$IFS"; IFS=':'
+ for lib in $LIBS; do
+ [ ".$lib" = . ] && continue
+
+ found='no'
+ found_indefdir='no'
+ found_type=''
+ found_dir=''
+
+ # for each directory...
+ OIFS2="$IFS"; IFS=":$DIFS"
+ for dir in ${DIRS} switch-to-defdirs ${DIRS_DEFAULT}; do
+ [ ".$dir" = . ] && continue
+ [ ".$dir" = .switch-to-defdirs ] && found_indefdir=yes
+ [ ! -d $dir ] && continue
+
+ # search the file
+ OIFS3="$IFS"; IFS="$DIFS"
+ for file in '' `cd $dir && env -i /bin/ls lib${lib}.* 2>/dev/null`; do
+ [ ".$file" = . ] && continue
+ case $file in
+ *.so|*.so.[0-9]*|*.sl|*.sl.[0-9]* )
+ found=yes;
+ found_type=DSO;
+ break
+ ;;
+ *.lo|*.la )
+ found=yes;
+ found_type=PIC
+ ;;
+ *.a )
+ if [ ".$found_type" = . ]; then
+ found=yes
+ found_type=OBJ
+ fi
+ ;;
+ esac
+ done
+ IFS="$OIFS3"
+ if [ ".$found" = .yes ]; then
+ found_dir="$dir"
+ break
+ fi
+ done
+ IFS="$OIFS2"
+
+ if [ ".$found" = .yes ]; then
+ if [ ".$found_indefdir" != .yes ]; then
+ eval "dirlist=\"\${DIRS_${found_type}}:\""
+ case "$dirlist" in
+ *:$found_dir:* ) ;;
+ * ) eval "DIRS_${found_type}=\"\$DIRS_${found_type}:${found_dir}\"" ;;
+ esac
+ eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\""
+ else
+ eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\""
+ fi
+ else
+ LIBS_OBJ="$LIBS_OBJ:$lib"
+ #dirlist="`echo $DIRS $DIRS_DEFAULT | sed -e 's/:/ /g'`"
+ #echo "slo:Warning: library \"$lib\" not found in any of the following dirs:" 2>&1
+ #echo "slo:Warning: $dirlist" 1>&1
+ fi
+ done
+ IFS="$OIFS"
+
+ # also pass-through unused dirs even if it's useless
+ OIFS="$IFS"; IFS=':'
+ for dir in $DIRS; do
+ dirlist="${DIRS_OBJ}:${DIRS_PIC}:${DIRS_DSO}:"
+ case "$dirlist" in
+ *:$dir:* ) ;;
+ * ) DIRS_OBJ="$DIRS_OBJ:$dir" ;;
+ esac
+ done
+ IFS="$OIFS"
+
+ # reassemble the options but separated by type
+ for type in OBJ PIC DSO; do
+ OIFS="$IFS"; IFS=':'
+ eval "libs=\"\$LIBS_${type}\""
+ opts=''
+ for lib in $libs; do
+ [ ".$lib" = . ] && continue
+ opts="$opts -l$lib"
+ done
+ eval "LIBS_${type}=\"$opts\""
+
+ eval "dirs=\"\$DIRS_${type}\""
+ opts=''
+ for dir in $dirs; do
+ [ ".$dir" = . ] && continue
+ opts="$opts -L$dir"
+ done
+ eval "DIRS_${type}=\"$opts\""
+ IFS="$OIFS"
+ done
+
+ # give back results
+ for var in ARGV DIRS_OBJ LIBS_OBJ DIRS_PIC LIBS_PIC DIRS_DSO LIBS_DSO; do
+ eval "val=\"\$${var}\""
+ val="`echo $val | sed -e 's/^ *//'`"
+ echo "${opt_p}${var}=\"${val}\""
+ done
+
+ shtool_exit 0
+ ;;
+
+scpp )
+ ##
+ ## scpp -- Sharing C Pre-Processor
+ ## Copyright (c) 1999-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ srcs="$*"
+ output="${opt_o}.n"
+
+ # find a reasonable Awk
+ awk=''
+ paths=`echo $PATH |\
+ sed -e 's%/*:%:%g' -e 's%/$%%' \
+ -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
+ -e 's/:/ /g'`
+ for name in gawk nawk awk; do
+ for path in $paths; do
+ if [ -r "$path/$name" ]; then
+ awk="$path/$name"
+ break
+ fi
+ done
+ if [ ".$awk" != . ]; then
+ break
+ fi
+ done
+ if [ ".$awk" = . ]; then
+ echo "$msgprefix:Error: cannot find a reasonable Awk" 1>&2
+ shtool_exit 1
+ fi
+
+ # parse source file(s)
+ if [ ".$opt_v" = .yes ]; then
+ echo "Parsing:" | $awk '{ printf("%s", $0); }' 1>&2
+ fi
+ for src in $srcs; do
+ if [ ".$opt_v" = .yes ]; then
+ echo $src | $awk '{ printf(" %s", $0); }' 1>&2
+ fi
+ if [ ".$opt_f" != . ]; then
+ inputcmd="sed"
+ OIFS="$IFS"; IFS="$ASC_NL"; set -- $opt_f; IFS="$OIFS"
+ for e
+ do
+ inputcmd="$inputcmd -e '$e'"
+ done
+ inputcmd="$inputcmd '$src'"
+ else
+ inputcmd="cat '$src'"
+ fi
+ eval $inputcmd |\
+ $awk '
+ BEGIN {
+ ln = 0;
+ fln = 0;
+ level = 0;
+ mode = "";
+ store = "";
+ }
+ {
+ ln++;
+ }
+ /^#if.*/ {
+ level++;
+ }
+ /^#if [a-zA-Z_][a-zA-Z0-9_]* *$/ {
+ if ($2 == define) {
+ mode = "D";
+ printf("D:#line %d \"%s\"\n", ln, src);
+ next;
+ }
+ }
+ /^#endif.*/ {
+ level--;
+ if (mode == "D" && level == 0) {
+ mode = "";
+ next;
+ }
+ }
+ /^[a-zA-Z_][a-zA-Z0-9_].*;.*/ {
+ if ($1 == class) {
+ printf("V:#line %d \"%s\"\n", ln, src);
+ printf("V:%s\n", $0);
+ printf("J:%s\n", $0);
+ next;
+ }
+ }
+ /^[a-zA-Z_][a-zA-Z0-9_].*=.*/ {
+ if ($1 == class) {
+ printf("V:#line %d \"%s\"\n", ln, src);
+ printf("V:%s\n", $0);
+ printf("J:%s\n", $0);
+ next;
+ }
+ }
+ /^[a-zA-Z_][a-zA-Z0-9_]*/ {
+ if ($1 == class) {
+ fln = ln;
+ store = $0;
+ mode = "F";
+ next;
+ }
+ }
+ /^\{ *$/ {
+ if (mode == "F") {
+ printf("F:#line %d \"%s\"\n", fln, src);
+ printf("F:%s;\n", store);
+ printf("I:%s;\n", store);
+ store = "";
+ mode = "";
+ next;
+ }
+ }
+ {
+ if (mode == "D")
+ printf("D:%s\n", $0);
+ else if (mode == "F")
+ store = store " " $0;
+ }
+ ' "src=$src" "define=$opt_D" "class=$opt_C" >>$tmpfile
+ done
+ if [ ".$opt_v" = .yes ]; then
+ echo "" 1>&2
+ fi
+
+ # start generating output header
+ echo "/* $opt_o -- autogenerated from $opt_t, DO NOT EDIT! */" >$output
+ echo "#line 1 \"$opt_t\"" >>$output
+ sed <$opt_t -e "1,/^${opt_M} *\$/p" -e 'd' |\
+ sed -e "/^${opt_M} *\$/d" >>$output
+
+ # merge in the define blocks
+ grep '^D:' $tmpfile | sed -e 's/^D://' >>$output
+
+ # generate standard prolog
+ echo "#line 1 \"_ON_THE_FLY_\"" >>$output
+ echo "" >>$output
+ echo "/* make sure the scpp source extensions are skipped */" >>$output
+ echo "#define $opt_D 0" >>$output
+ echo "#define $opt_C /**/" >>$output
+
+ # generate namespace hiding for variables
+ echo "" >>$output
+ echo "/* move intern variables to hidden namespace */" >>$output
+ grep '^J:' $tmpfile | sed >>$output \
+ -e 's/^J://' \
+ -e 's/ */ /g' \
+ -e 's/^[^=;]*[ *]\([a-zA-Z0-9_]*\)\[\];.*$/#define \1 __\1/' \
+ -e 's/^[^=;]*[ *]\([a-zA-Z0-9_]*\)\[\] =.*$/#define \1 __\1/' \
+ -e 's/^[^=;]*[ *]\([a-zA-Z0-9_]*\);.*$/#define \1 __\1/' \
+ -e 's/^[^=;]*[ *]\([a-zA-Z0-9_]*\) =.*$/#define \1 __\1/'
+
+ # generate namespace hiding for functions
+ echo "" >>$output
+ echo "/* move intern functions to hidden namespace */" >>$output
+ grep '^I:' $tmpfile | sed >>$output \
+ -e 's/^I://' \
+ -e 's/\([ (]\) */\1/g' \
+ -e 's/ *\([),]\)/\1/g' \
+ -e 's/^[^(]*[ *]\([a-zA-Z0-9_]*\)(.*$/#define \1 __\1/'
+
+ # generate prototypes for variables
+ echo "" >>$output
+ echo "/* prototypes for intern variables */" >>$output
+ grep '^V:' $tmpfile | sed >>$output \
+ -e 's/^V://' \
+ -e 's/ */ /g' \
+ -e 's/^\([^=;]*[ *][a-zA-Z0-9_]*\[\]\);.*$/\1;/' \
+ -e 's/^\([^=;]*[ *][a-zA-Z0-9_]*\[\]\) =.*$/\1;/' \
+ -e 's/^\([^=;]*[ *][a-zA-Z0-9_]*\);.*$/\1;/' \
+ -e 's/^\([^=;]*[ *][a-zA-Z0-9_]*\) =.*$/\1;/' \
+ -e 's/ ;/;/g' \
+ -e "s/^$opt_C /extern /"
+
+ # generate prototypes for functions
+ echo "" >>$output
+ echo "/* prototypes for intern functions */" >>$output
+ grep '^F:' $tmpfile | sed >>$output \
+ -e 's/^F://' \
+ -e 's/\([ (]\) */\1/g' \
+ -e 's/ *\([),]\)/\1/g' \
+ -e 's/\([* ]\)[a-zA-Z0-9_]*,/\1,/g' \
+ -e 's/\([* ]\)[a-zA-Z0-9_]*);/\1);/g' \
+ -e 's/(\*[a-zA-Z0-9_]*)(/(*)(/g' \
+ -e 's/\([ (]\) */\1/g' \
+ -e 's/ *\([),]\)/\1/g' \
+ -e "s/^$opt_C /extern /"
+
+ # finish generating output header
+ n=`(echo ''; sed <$opt_t -e "1,/^${opt_M} *\$/p" -e 'd') |\
+ wc -l | sed -e 's;^ *\([0-9]*\) *$;\1;'`
+ echo "#line $n \"$opt_t\"" >>$output
+ sed <$opt_t -e "/^${opt_M} *\$/,\$p" -e 'd' |\
+ sed -e "/^${opt_M} *\$/d" >>$output
+
+ # create final output file
+ if [ -f $opt_o ]; then
+ if [ ".$opt_p" = .yes ]; then
+ grep -v '^#line' $opt_o >$tmpfile.o
+ grep -v '^#line' $output >$tmpfile.n
+ out_old="$tmpfile.o"
+ out_new="$tmpfile.n"
+ else
+ out_old="$opt_o"
+ out_new="$output"
+ fi
+ if cmp -s $out_old $out_new; then
+ :
+ else
+ cp $output $opt_o
+ fi
+ else
+ cp $output $opt_o
+ fi
+ rm -f $output
+ rm -f $tmpfile $tmpfile.* >/dev/null 2>&1
+
+ shtool_exit 0
+ ;;
+
+version )
+ ##
+ ## version -- Maintain a version information file
+ ## Copyright (c) 1994-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ file="$1"
+
+ # determine prefix and name
+ name="$opt_n"
+ prefix="$opt_p"
+
+ # determine current version
+ triple="$opt_s"
+ if [ ".$triple" != . ]; then
+ # use given triple
+ if [ ".`echo $triple | grep '[0-9]*.[0-9]*[sabp.][0-9]*'`" = . ]; then
+ echo "$msgprefix:Error: invalid argument to option \`-s': \`$opt_s'" 1>&2
+ shtool_exit 1
+ fi
+ eval `echo $triple |\
+ sed -e 's%\([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\).*%\
+ ver="\1";rev="\2";typ="\3";lev="\4"%'`
+ tim=calc
+ elif [ -r $file ]; then
+ # determine triple from given file
+ eval `grep 'Version [0-9]*.[0-9]*[sabp.][0-9]* ([0-9]*-[a-zA-Z]*-[0-9]*)' $file |\
+ sed -e 's%.*Version \([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\) (\([0-9]*-[a-zA-Z]*-[0-9]*\)).*%\
+ ver="\1";rev="\2";typ="\3";lev="\4";tim="\5"%' -e 'q'`
+ else
+ # intialise to first version
+ ver=0
+ rev=1
+ typ=.
+ lev=0
+ tim=calc
+ fi
+
+ # determine new version in batch
+ if [ ".$opt_i" != . ]; then
+ case $opt_i in
+ v ) ver=`expr $ver + 1`
+ rev=0
+ lev=0
+ ;;
+ r ) rev=`expr $rev + 1`
+ lev=0
+ ;;
+ l ) lev=`expr $lev + 1`
+ ;;
+ * ) echo "$msgprefix:Error: invalid argument to option \`-i': \`$opt_i'" 1>&2
+ shtool_exit 1
+ ;;
+ esac
+ tim=calc
+ fi
+
+ # determine new version interactively
+ if [ ".$opt_e" = .yes ]; then
+ echo "old version: ${ver}.${rev}${typ}${lev}"
+ while [ 1 ]; do
+ echo dummy | awk '{ printf("new version: "); }'
+ read triple
+ case $triple in
+ [0-9]*.[0-9]*[sabp.][0-9]* )
+ ;;
+ * ) echo "$msgprefix:Error: invalid version string entered: \`$triple'" 1>&2
+ continue
+ ;;
+ esac
+ break
+ done
+ eval `echo $triple |\
+ sed -e 's%^\([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\)$%\
+ ver="\1";rev="\2";typ="\3";lev="\4"%'`
+ tim=calc
+ fi
+
+ # determine hexadecimal and libtool value of version
+ case $typ in
+ a ) typnum=0; levnum=$lev ;;
+ b ) typnum=1; levnum=$lev ;;
+ p | . ) typnum=2; levnum=$lev ;;
+ s ) typnum=15; levnum=255 ;; # snapshots are special
+ esac
+ hex=`echo "$ver:$rev:$typnum:$levnum" |\
+ awk -F: '{ printf("0x%x%02x%1x%02x", $1, $2, $3, $4); }' |\
+ tr 'abcdef' 'ABCDEF'`
+ ltv=`echo "$ver:$rev:$typnum:$levnum" |\
+ awk -F: '{ printf("%d:%d", $1*10 + $2, $3*10 + $4); }'`
+
+ # determine date
+ if [ ".$tim" = .calc ]; then
+ day=`date '+%d'`
+ month=`date '+%m'`
+ year=`date '+%Y' 2>/dev/null`
+ if [ ".$time_year" = . ]; then
+ year=`date '+%y'`
+ case $year in
+ [5-9][0-9]) year="19$year" ;;
+ [0-4][0-9]) year="20$year" ;;
+ esac
+ fi
+ case $month in
+ 1|01) month='Jan' ;;
+ 2|02) month='Feb' ;;
+ 3|03) month='Mar' ;;
+ 4|04) month='Apr' ;;
+ 5|05) month='May' ;;
+ 6|06) month='Jun' ;;
+ 7|07) month='Jul' ;;
+ 8|08) month='Aug' ;;
+ 9|09) month='Sep' ;;
+ 10) month='Oct' ;;
+ 11) month='Nov' ;;
+ 12) month='Dec' ;;
+ esac
+ tim="${day}-${month}-${year}"
+ fi
+
+ # perform result actions
+ mode=show
+ if [ ".$opt_i" != . ]; then
+ mode=edit
+ elif [ ".$opt_e" = .yes ]; then
+ mode=edit
+ elif [ ".$opt_s" != . ]; then
+ mode=edit
+ fi
+ if [ ".$mode" = .show ]; then
+ # just display the current version
+ case $opt_d in
+ short )
+ echo "${ver}.${rev}${typ}${lev}"
+ ;;
+ long )
+ echo "${ver}.${rev}${typ}${lev} ($tim)"
+ ;;
+ libtool )
+ echo "${ltv}"
+ ;;
+ hex )
+ echo "${hex}"
+ ;;
+ * ) echo "$msgprefix:Error: invalid argument to option \`-d': \`$opt_d'" 1>&2
+ shtool_exit 1
+ ;;
+ esac
+ else
+ # update the version file
+
+ # pre-generate various strings
+ triple="${ver}.${rev}${typ}${lev}"
+ vHex="$hex"
+ vShort="${triple}"
+ vLong="${triple} (${tim})"
+ vTeX="This is ${name}, Version ${triple} (${tim})"
+ vGNU="${name} ${triple} (${tim})"
+ vWeb="${name}/${triple}"
+ vSCCS="@(#)${name} ${triple} (${tim})"
+ vRCS="\$Id: ${name} ${triple} (${tim}) \$"
+
+ # determine string out of filename
+ # (do NOT try to optimize this in any way because of portability)
+ filestr=`util_upper "$file" | tr './%+' '____' | sed -e 's/-/_/g'`
+
+ # generate uppercase prefix
+ prefixupper=`util_upper "$prefix"`
+
+ # create the version file according the the selected language
+ echo "new version: ${vLong}"
+
+ cp /dev/null $file
+ case $opt_l in
+ txt )
+ echo >>$file ""
+ echo >>$file " ${file} -- Version Information for ${name} (syntax: Text)"
+ echo >>$file " [automatically generated and maintained by GNU shtool]"
+ echo >>$file ""
+ echo >>$file " $vTeX"
+ echo >>$file ""
+ ;;
+ c )
+ echo >>$file "/*"
+ echo >>$file "** ${file} -- Version Information for ${name} (syntax: C/C++)"
+ echo >>$file "** [automatically generated and maintained by GNU shtool]"
+ echo >>$file "*/"
+ echo >>$file ""
+ echo >>$file "#ifdef _${filestr}_AS_HEADER_"
+ echo >>$file ""
+ echo >>$file "#ifndef _${filestr}_"
+ echo >>$file "#define _${filestr}_"
+ echo >>$file ""
+ echo >>$file "#define ${prefixupper}VERSION ${vHex}"
+ echo >>$file ""
+ echo >>$file "typedef struct {"
+ echo >>$file " const int v_hex;"
+ echo >>$file " const char *v_short;"
+ echo >>$file " const char *v_long;"
+ echo >>$file " const char *v_tex;"
+ echo >>$file " const char *v_gnu;"
+ echo >>$file " const char *v_web;"
+ echo >>$file " const char *v_sccs;"
+ echo >>$file " const char *v_rcs;"
+ echo >>$file "} ${prefix}version_t;"
+ echo >>$file ""
+ echo >>$file "extern ${prefix}version_t ${prefix}version;"
+ echo >>$file ""
+ echo >>$file "#endif /* _${filestr}_ */"
+ echo >>$file ""
+ echo >>$file "#else /* _${filestr}_AS_HEADER_ */"
+ echo >>$file ""
+ echo >>$file "#define _${filestr}_AS_HEADER_"
+ echo >>$file "#include \"${file}\""
+ echo >>$file "#undef _${filestr}_AS_HEADER_"
+ echo >>$file ""
+ echo >>$file "${prefix}version_t ${prefix}version = {"
+ echo >>$file " ${vHex},"
+ echo >>$file " \"${vShort}\","
+ echo >>$file " \"${vLong}\","
+ echo >>$file " \"${vTeX}\","
+ echo >>$file " \"${vGNU}\","
+ echo >>$file " \"${vWeb}\","
+ echo >>$file " \"${vSCCS}\","
+ echo >>$file " \"${vRCS}\""
+ echo >>$file "};"
+ echo >>$file ""
+ echo >>$file "#endif /* _${filestr}_AS_HEADER_ */"
+ echo >>$file ""
+ ;;
+ m4 )
+ echo >>$file "##"
+ echo >>$file "## ${file} -- Version Information for ${name} (syntax: M4)"
+ echo >>$file "## [automatically generated and maintained by GNU shtool]"
+ echo >>$file "##"
+ echo >>$file ""
+ echo >>$file "m4_define([v_hex], [${vHex}])"
+ echo >>$file "m4_define([v_short], [${vShort}])"
+ echo >>$file "m4_define([v_long], [${vLong}])"
+ echo >>$file "m4_define([v_tex], [${vTeX}])"
+ echo >>$file "m4_define([v_gnu], [${vGNU}])"
+ echo >>$file "m4_define([v_web], [${vWeb}])"
+ echo >>$file "m4_define([v_sccs], [${vSCCS}])"
+ echo >>$file "m4_define([v_rcs], [${vRCS}])"
+ echo >>$file ""
+ ;;
+ perl )
+ echo >>$file "##"
+ echo >>$file "## ${file} -- Version Information for ${name} (syntax: Perl)"
+ echo >>$file "## [automatically generated and maintained by GNU shtool]"
+ echo >>$file "##"
+ echo >>$file ""
+ echo >>$file "our \$${prefix}version = {"
+ echo >>$file " 'v_hex' => ${vHex},"
+ echo >>$file " 'v_short' => \"${vShort}\","
+ echo >>$file " 'v_long' => \"${vLong}\","
+ echo >>$file " 'v_tex' => \"${vTeX}\","
+ echo >>$file " 'v_gnu' => \"${vGNU}\","
+ echo >>$file " 'v_web' => \"${vWeb}\","
+ echo >>$file " 'v_sccs' => \"${vSCCS}\","
+ echo >>$file " 'v_rcs' => \"\\${vRCS}/\""
+ echo >>$file "};"
+ echo >>$file ""
+ echo >>$file "1;"
+ echo >>$file ""
+ ;;
+ python )
+ echo >>$file "##"
+ echo >>$file "## ${file} -- Version Information for ${name} (syntax: Python)"
+ echo >>$file "## [automatically generated and maintained by GNU shtool]"
+ echo >>$file "##"
+ echo >>$file ""
+ echo >>$file "class ${prefix}version:"
+ echo >>$file " v_hex = ${vHex}"
+ echo >>$file " v_short = \"${vShort}\""
+ echo >>$file " v_long = \"${vLong}\""
+ echo >>$file " v_tex = \"${vTeX}\""
+ echo >>$file " v_gnu = \"${vGNU}\""
+ echo >>$file " v_web = \"${vWeb}\""
+ echo >>$file " v_sccs = \"${vSCCS}\""
+ echo >>$file " v_rcs = \"${vRCS}\""
+ echo >>$file ""
+ ;;
+ * ) echo "$msgprefix:Error: invalid argument to option \`-l': \`$opt_l'" 1>&2
+ shtool_exit 1
+ ;;
+ esac
+ fi
+
+ shtool_exit 0
+ ;;
+
+path )
+ ##
+ ## path -- Deal with program paths
+ ## Copyright (c) 1998-2008 Ralf S. Engelschall <rse@engelschall.com>
+ ##
+
+ namelist="$*"
+
+ # check whether the test command supports the -x option
+ if [ -x /bin/sh ] 2>/dev/null; then
+ minusx="-x"
+ else
+ minusx="-r"
+ fi
+
+ # split path string
+ paths="`echo $opt_p |\
+ sed -e 's/^:/.:/' \
+ -e 's/::/:.:/g' \
+ -e 's/:$/:./' \
+ -e 's/:/ /g'`"
+
+ # SPECIAL REQUEST
+ # translate forward to reverse path
+ if [ ".$opt_r" = .yes ]; then
+ if [ "x$namelist" = "x." ]; then
+ rp='.'
+ else
+ rp=''
+ for pe in `IFS="$IFS/"; echo $namelist`; do
+ rp="../$rp"
+ done
+ fi
+ echo $rp | sed -e 's:/$::'
+ shtool_exit 0
+ fi
+
+ # SPECIAL REQUEST
+ # strip out directory or base name
+ if [ ".$opt_d" = .yes ]; then
+ echo "$namelist" |\
+ sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'
+ shtool_exit 0
+ fi
+ if [ ".$opt_b" = .yes ]; then
+ echo "$namelist" |\
+ sed -e 's;.*/\([^/]*\)$;\1;'
+ shtool_exit 0
+ fi
+
+ # MAGIC SITUATION
+ # Perl Interpreter (perl)
+ if [ ".$opt_m" = .yes ] && [ ".$namelist" = .perl ]; then
+ rm -f $tmpfile >/dev/null 2>&1
+ touch $tmpfile
+ found=0
+ pc=99
+ for dir in $paths; do
+ dir=`echo $dir | sed -e 's;/*$;;'`
+ nc=99
+ for name in perl perl5 miniperl; do
+ if [ $minusx "$dir/$name" ] && [ ! -d "$dir/$name" ]; then
+ perl="$dir/$name"
+ pv=`$perl -e 'printf("%.3f", $]);'`
+ echo "$pv:$pc:$nc:$perl" >>$tmpfile
+ found=1
+ fi
+ nc=`expr $nc - 1`
+ done
+ pc=`expr $pc - 1`
+ done
+ if [ $found = 1 ]; then
+ perl="`cat $tmpfile | sort -r -u | sed -e 'q' | cut -d: -f4`"
+ rm -f $tmpfile >/dev/null 2>&1
+ echo "$perl"
+ shtool_exit 0
+ fi
+ rm -f $tmpfile >/dev/null 2>&1
+ shtool_exit 1
+ fi
+
+ # MAGIC SITUATION
+ # C pre-processor (cpp)
+ if [ ".$opt_m" = .yes ] && [ ".$namelist" = .cpp ]; then
+ echo >$tmpfile.c "#include <assert.h>"
+ echo >>$tmpfile.c "Syntax Error"
+ # 1. try the standard cc -E approach
+ cpp="${CC-cc} -E"
+ (eval "$cpp $tmpfile.c >/dev/null") 2>$tmpfile.out
+ my_error=`grep -v '^ *+' $tmpfile.out`
+ if [ ".$my_error" != . ]; then
+ # 2. try the cc -E approach and GCC's -traditional-ccp option
+ cpp="${CC-cc} -E -traditional-cpp"
+ (eval "$cpp $tmpfile.c >/dev/null") 2>$tmpfile.out
+ my_error=`grep -v '^ *+' $tmpfile.out`
+ if [ ".$my_error" != . ]; then
+ # 3. try a standalone cpp command in path and lib dirs
+ for path in $paths /lib /usr/lib /usr/local/lib; do
+ path=`echo $path | sed -e 's;/*$;;'`
+ if [ $minusx "$path/cpp" ] && [ ! -d "$path/cpp" ]; then
+ cpp="$path/cpp"
+ break
+ fi
+ done
+ if [ ".$cpp" != . ]; then
+ (eval "$cpp $tmpfile.c >/dev/null") 2>$tmpfile.out
+ my_error=`grep -v '^ *+' $tmpfile.out`
+ if [ ".$my_error" != . ]; then
+ # ok, we gave up...
+ cpp=''
+ fi
+ fi
+ fi
+ fi
+ rm -f $tmpfile >/dev/null 2>&1
+ rm -f $tmpfile.c $tmpfile.out >/dev/null 2>&1
+ if [ ".$cpp" != . ]; then
+ echo "$cpp"
+ shtool_exit 0
+ fi
+ shtool_exit 1
+ fi
+
+ # STANDARD SITUATION
+ # iterate over names
+ for name in $namelist; do
+ # iterate over paths
+ for path in $paths; do
+ path=`echo $path | sed -e 's;/*$;;'`
+ if [ $minusx "$path/$name" ] && [ ! -d "$path/$name" ]; then
+ if [ ".$opt_s" != .yes ]; then
+ echo "$path/$name"
+ fi
+ shtool_exit 0
+ fi
+ done
+ done
+
+ shtool_exit 1
+ ;;
+
+esac
+
+shtool_exit 0
+
diff --git a/autoconf/ylwrap b/autoconf/ylwrap
new file mode 100755
index 0000000..92b2011
--- /dev/null
+++ b/autoconf/ylwrap
@@ -0,0 +1,226 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+
+scriptversion=2010-02-06.18; # UTC
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
+# 2007, 2009, 2010 Free Software Foundation, Inc.
+#
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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>.
+
+case "$1" in
+ '')
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ exit 1
+ ;;
+ --basedir)
+ basedir=$2
+ shift 2
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+ INPUT is the input file
+ OUTPUT is one file PROG generates
+ DESIRED is the file we actually want instead of OUTPUT
+ PROGRAM is program to run
+ ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v|--v*)
+ echo "ylwrap $scriptversion"
+ exit $?
+ ;;
+esac
+
+
+# The input.
+input="$1"
+shift
+case "$input" in
+ [\\/]* | ?:[\\/]*)
+ # Absolute path; do nothing.
+ ;;
+ *)
+ # Relative path. Make it absolute.
+ input="`pwd`/$input"
+ ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+ if test "$1" = "--"; then
+ shift
+ break
+ fi
+ pairlist="$pairlist $1"
+ shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) 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
+trap "ret=130; $do_exit" 2
+trap "ret=141; $do_exit" 13
+trap "ret=143; $do_exit" 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+ 0) "$prog" "$input" ;;
+ *) "$prog" "$@" "$input" ;;
+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
+ 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";;
+ 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`"
+ 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"
+ 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
+ ret=1
+ fi
+ fi
+ shift
+ shift
+ first=no
+ done
+else
+ ret=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# 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-end: "; # UTC"
+# End:
diff --git a/config.hin b/config.hin
new file mode 100644
index 0000000..ab33c1f
--- /dev/null
+++ b/config.hin
@@ -0,0 +1,428 @@
+/* config.hin. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if your machine is big endian. */
+#undef ACC_ABI_BIG_ENDIAN
+
+/* Define to 1 if your machine is little endian. */
+#undef ACC_ABI_LITTLE_ENDIAN
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* Define to 1 if you have the `access' function. */
+#undef HAVE_ACCESS
+
+/* Define to 1 if you have the `alloca' function. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have the <assert.h> header file. */
+#undef HAVE_ASSERT_H
+
+/* Define to 1 if you have the `atexit' function. */
+#undef HAVE_ATEXIT
+
+/* Define to 1 if you have the `atoi' function. */
+#undef HAVE_ATOI
+
+/* Define to 1 if you have the `atol' function. */
+#undef HAVE_ATOL
+
+/* Define to 1 if you have the `chmod' function. */
+#undef HAVE_CHMOD
+
+/* Define to 1 if you have the `chown' function. */
+#undef HAVE_CHOWN
+
+/* Define to 1 if you have the `clock_getcpuclockid' function. */
+#undef HAVE_CLOCK_GETCPUCLOCKID
+
+/* Define to 1 if you have the `clock_getres' function. */
+#undef HAVE_CLOCK_GETRES
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the <conio.h> header file. */
+#undef HAVE_CONIO_H
+
+/* Define to 1 if you have the `ctime' function. */
+#undef HAVE_CTIME
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define to 1 if you have the `difftime' function. */
+#undef HAVE_DIFFTIME
+
+/* Define to 1 if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dos.h> header file. */
+#undef HAVE_DOS_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the `fstat' function. */
+#undef HAVE_FSTAT
+
+/* Define to 1 if you have the `getenv' function. */
+#undef HAVE_GETENV
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getrusage' function. */
+#undef HAVE_GETRUSAGE
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the `gmtime' function. */
+#undef HAVE_GMTIME
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <io.h> header file. */
+#undef HAVE_IO_H
+
+/* Define to 1 if you have the `isatty' function. */
+#undef HAVE_ISATTY
+
+/* Define to 1 if you have the `lzo' library (-llzo). */
+#undef HAVE_LIBLZO
+
+/* Define to 1 if you have the `lzo2' library (-llzo2). */
+#undef HAVE_LIBLZO2
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `localtime' function. */
+#undef HAVE_LOCALTIME
+
+/* Define to 1 if you have the `longjmp' function. */
+#undef HAVE_LONGJMP
+
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
+/* Define to 1 if you have the <lzo1x.h> header file. */
+#undef HAVE_LZO1X_H
+
+/* Define to 1 if you have the <lzoconf.h> header file. */
+#undef HAVE_LZOCONF_H
+
+/* Define to 1 if you have the <lzo/lzo1x.h> header file. */
+#undef HAVE_LZO_LZO1X_H
+
+/* Define to 1 if you have the <lzo/lzoconf.h> header file. */
+#undef HAVE_LZO_LZOCONF_H
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the `memcmp' function. */
+#undef HAVE_MEMCMP
+
+/* Define to 1 if you have the `memcpy' function. */
+#undef HAVE_MEMCPY
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `mkdir' function. */
+#undef HAVE_MKDIR
+
+/* Define to 1 if you have the `mktime' function. */
+#undef HAVE_MKTIME
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `mprotect' function. */
+#undef HAVE_MPROTECT
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* Define to 1 if you have the `qsort' function. */
+#undef HAVE_QSORT
+
+/* Define to 1 if you have the `raise' function. */
+#undef HAVE_RAISE
+
+/* Define to 1 if you have the `rmdir' function. */
+#undef HAVE_RMDIR
+
+/* Define to 1 if you have the `setjmp' function. */
+#undef HAVE_SETJMP
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#undef HAVE_SETJMP_H
+
+/* Define to 1 if you have the <share.h> header file. */
+#undef HAVE_SHARE_H
+
+/* Define to 1 if you have the `signal' function. */
+#undef HAVE_SIGNAL
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the `stricmp' function. */
+#undef HAVE_STRICMP
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strnicmp' function. */
+#undef HAVE_STRNICMP
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/utime.h> header file. */
+#undef HAVE_SYS_UTIME_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `time' function. */
+#undef HAVE_TIME
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the `umask' function. */
+#undef HAVE_UMASK
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `utime' function. */
+#undef HAVE_UTIME
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* 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
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* The size of `dev_t', as computed by sizeof. */
+#undef SIZEOF_DEV_T
+
+/* The size of `double', as computed by sizeof. */
+#undef SIZEOF_DOUBLE
+
+/* The size of `float', as computed by sizeof. */
+#undef SIZEOF_FLOAT
+
+/* The size of `fpos_t', as computed by sizeof. */
+#undef SIZEOF_FPOS_T
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `intmax_t', as computed by sizeof. */
+#undef SIZEOF_INTMAX_T
+
+/* The size of `intptr_t', as computed by sizeof. */
+#undef SIZEOF_INTPTR_T
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `long double', as computed by sizeof. */
+#undef SIZEOF_LONG_DOUBLE
+
+/* The size of `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of `mode_t', as computed by sizeof. */
+#undef SIZEOF_MODE_T
+
+/* The size of `off_t', as computed by sizeof. */
+#undef SIZEOF_OFF_T
+
+/* The size of `ptrdiff_t', as computed by sizeof. */
+#undef SIZEOF_PTRDIFF_T
+
+/* The size of `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* The size of `ssize_t', as computed by sizeof. */
+#undef SIZEOF_SSIZE_T
+
+/* The size of `time_t', as computed by sizeof. */
+#undef SIZEOF_TIME_T
+
+/* The size of `uintmax_t', as computed by sizeof. */
+#undef SIZEOF_UINTMAX_T
+
+/* The size of `uintptr_t', as computed by sizeof. */
+#undef SIZEOF_UINTPTR_T
+
+/* The size of `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
+/* The size of `__int16', as computed by sizeof. */
+#undef SIZEOF___INT16
+
+/* The size of `__int32', as computed by sizeof. */
+#undef SIZEOF___INT32
+
+/* The size of `__int64', as computed by sizeof. */
+#undef SIZEOF___INT64
+
+/* 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
+
+/* Version number of package */
+#undef VERSION
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#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 empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef ptrdiff_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/configure b/configure
new file mode 100755
index 0000000..e841ad2
--- /dev/null
+++ b/configure
@@ -0,0 +1,8150 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.67 for lzop 1.03.
+#
+# Report bugs to <lzop-bugs@oberhumer.com>.
+#
+# Copyright (C) 1996-2010 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.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # 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
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_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 -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+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
+ NULLCMD=:
+ # 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
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+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"
+ 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'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+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+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: lzop-bugs@oberhumer.com about your system, including
+$0: any error possibly output before this message. Then
+$0: install a modern shell, or manually run the script
+$0: under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ 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; }
+
+ # 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).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... 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'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ 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
+
+# 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='lzop'
+PACKAGE_TARNAME='lzop'
+PACKAGE_VERSION='1.03'
+PACKAGE_STRING='lzop 1.03'
+PACKAGE_BUGREPORT='lzop-bugs@oberhumer.com'
+PACKAGE_URL='http://www.oberhumer.com/opensource/lzop/'
+
+ac_unique_file="src/lzop.c"
+ac_default_prefix=/usr/local
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+configure_CFLAGS
+configure_CPPFLAGS
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+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
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+EGREP
+GREP
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_asm
+enable_ansi
+enable_largefile
+enable_dependency_tracking
+enable_silent_rules
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $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}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+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
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+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.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/lzop]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of lzop 1.03:";;
+ esac
+ cat <<\_ACEOF
+
+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
+ --disable-asm disable LZO assembly versions
+ --disable-ansi disable ansi console
+ --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')
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ 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>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <lzop-bugs@oberhumer.com>.
+lzop home page: <http://www.oberhumer.com/opensource/lzop/>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+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
+
+Copyright (C) 2010 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.
+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.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+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_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+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;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+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_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+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;}
+ 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
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+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 :
+ { $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
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## -------------------------------------- ##
+## Report this to lzop-bugs@oberhumer.com ##
+## -------------------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&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 :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+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;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ 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>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # 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;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=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
+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_type
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* 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 $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext 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_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
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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}: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&5
+$as_echo "$as_me: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&6;}
+
+ac_aux_dir=
+for ac_dir in autoconf "$srcdir"/autoconf; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+# 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 :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+if test -z "$ac_abs_top_srcdir"; then
+ ac_builddir=.
+
+case . in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo . | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+fi
+if test -z "$ac_abs_top_srcdir"; then
+ as_fn_error 1 "internal error: ac_abs_top_srcdir is not set"
+fi
+if test -r .Conf.settings1; then
+ . ./.Conf.settings1
+fi
+
+# Check whether --enable-asm was given.
+if test "${enable_asm+set}" = set; then :
+ enableval=$enable_asm;
+fi
+
+# Check whether --enable-ansi was given.
+if test "${enable_ansi+set}" = set; then :
+ enableval=$enable_ansi;
+fi
+
+if test "X$enable_ansi" != Xno; then
+
+$as_echo "#define LZOP_ENABLE_ANSI 1" >>confdefs.h
+
+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
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ 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
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ 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
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ 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
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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 test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ 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
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+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_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ 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
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+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_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+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_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+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; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { 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; }
+ if { ac_try='./conftest$ac_cv_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
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+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_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=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
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+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 how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+
+{ $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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ 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
+# 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
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $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 :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ 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
+# 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
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+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
+
+
+
+ { $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 :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=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
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=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
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+
+$as_echo "#define ACC_ABI_BIG_ENDIAN 1" >>confdefs.h
+;; #(
+ no)
+
+$as_echo "#define ACC_ABI_LITTLE_ENDIAN 1" >>confdefs.h
+ ;; #(
+ universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $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 :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $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 :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # 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 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.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+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='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# 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
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+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
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+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;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# 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.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ 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
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ 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
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ 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
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+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
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$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=_
+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='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='lzop'
+ VERSION='1.03'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+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.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+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 :
+ $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'.
+ 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_CC_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
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ 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 8's {/usr,}/bin/sh.
+ touch 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
+ ;;
+ 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_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+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;;
+esac
+AM_BACKSLASH='\'
+
+ac_config_headers="$ac_config_headers config.h:config.hin"
+
+
+
+# /***********************************************************************
+# // Checks for header files 1)
+# ************************************************************************/
+
+
+{ $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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_time=yes
+else
+ ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+
+for ac_header in 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
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$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
+
+
+if test "X$ac_cv_header_limits_h" != Xyes; then
+ as_fn_error $? "<limits.h> header not found" "$LINENO" 5
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#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
+
+int
+main ()
+{
+
+#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
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ mfx_cv_header_sane_limits_h=yes
+else
+ mfx_cv_header_sane_limits_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mfx_cv_header_sane_limits_h" >&5
+$as_echo "$mfx_cv_header_sane_limits_h" >&6; }
+
+if test "X$mfx_cv_header_sane_limits_h" != Xyes; then
+ as_fn_error $? "your <limits.h> header is broken - for details see config.log" "$LINENO" 5
+fi
+
+
+# /***********************************************************************
+# // Checks for LZO library
+# ************************************************************************/
+
+lzoconf_h=
+if test "X$lzoconf_h" = X; then
+ for ac_header in lzo/lzoconf.h lzo/lzo1x.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$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
+
+ if test "X$ac_cv_header_lzo_lzoconf_h$ac_cv_header_lzo_lzo1x_h" = Xyesyes; then
+ lzoconf_h='lzo/lzoconf.h'
+ fi
+fi
+if test "X$lzoconf_h" = X; then
+ for ac_header in lzoconf.h lzo1x.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$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
+
+ if test "X$ac_cv_header_lzoconf_h$ac_cv_header_lzo1x_h" = Xyesyes; then
+ lzoconf_h='lzoconf.h'
+ fi
+fi
+if test "X$lzoconf_h" = X; then
+ as_fn_error $? "LZO header files not found. Please check your installation or set the environment variable \`CPPFLAGS'." "$LINENO" 5
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for version information in $lzoconf_h..." >&5
+$as_echo_n "checking for version information in $lzoconf_h...... " >&6; }
+lzoconf_h_version=
+if test "X$lzoconf_h_version" = X; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$lzoconf_h>
+#if defined(LZO_VERSION) && (LZO_VERSION >= 0x2000)
+#else
+# error "LZO_VERSION v2"
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ lzoconf_h_version=2
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if test "X$lzoconf_h_version" = X; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$lzoconf_h>
+#if defined(LZO_VERSION) && (LZO_VERSION >= 0x1040)
+#else
+# error "LZO_VERSION v1"
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ lzoconf_h_version=1
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: v$lzoconf_h_version" >&5
+$as_echo "v$lzoconf_h_version" >&6; }
+if test "X$lzoconf_h_version" = X; then
+ as_fn_error $? "your LZO headers are broken - for details see config.log" "$LINENO" 5
+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 :
+ $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 __lzo_init2 ();
+int
+main ()
+{
+return __lzo_init2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_lzo___lzo_init2=yes
+else
+ ac_cv_lib_lzo___lzo_init2=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___lzo_init2" >&5
+$as_echo "$ac_cv_lib_lzo___lzo_init2" >&6; }
+if test "x$ac_cv_lib_lzo___lzo_init2" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBLZO 1
+_ACEOF
+
+ LIBS="-llzo $LIBS"
+
+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 :
+ $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 __lzo_init_v2 ();
+int
+main ()
+{
+return __lzo_init_v2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_lzo2___lzo_init_v2=yes
+else
+ ac_cv_lib_lzo2___lzo_init_v2=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___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 :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBLZO2 1
+_ACEOF
+
+ LIBS="-llzo2 $LIBS"
+
+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
+
+
+# /***********************************************************************
+# // Checks for header files 2)
+# ************************************************************************/
+
+for ac_header in conio.h direct.h dos.h io.h share.h sys/utime.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$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
+
+
+
+# /***********************************************************************
+# // Checks for typedefs and structures
+# ************************************************************************/
+
+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 :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_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 :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ptrdiff_t long
+_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 :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+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 :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_signal=int
+else
+ ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_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 :
+ $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
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat s; s.st_mtim.ST_MTIM_NSEC;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_struct_st_mtim_nsec=$ac_val; break
+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; }
+
+ if test $ac_cv_struct_st_mtim_nsec != no; then
+
+cat >>confdefs.h <<_ACEOF
+#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec
+_ACEOF
+
+ fi
+
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_long_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+$as_echo "$ac_cv_sizeof_long_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type___int16" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (__int16)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof___int16=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int16" >&5
+$as_echo "$ac_cv_sizeof___int16" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF___INT16 $ac_cv_sizeof___int16
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type___int32" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (__int32)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof___int32=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int32" >&5
+$as_echo "$ac_cv_sizeof___int32" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF___INT32 $ac_cv_sizeof___int32
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type___int64" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (__int64)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof___int64=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5
+$as_echo "$ac_cv_sizeof___int64" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF___INT64 $ac_cv_sizeof___int64
+_ACEOF
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_void_p" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_void_p=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_size_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (size_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+$as_echo "$ac_cv_sizeof_size_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_ptrdiff_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (ptrdiff_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_ptrdiff_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ptrdiff_t" >&5
+$as_echo "$ac_cv_sizeof_ptrdiff_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_PTRDIFF_T $ac_cv_sizeof_ptrdiff_t
+_ACEOF
+
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type___int32" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (__int32)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof___int32=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int32" >&5
+$as_echo "$ac_cv_sizeof___int32" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF___INT32 $ac_cv_sizeof___int32
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_intmax_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (intmax_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_intmax_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5
+$as_echo "$ac_cv_sizeof_intmax_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_uintmax_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (uintmax_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_uintmax_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintmax_t" >&5
+$as_echo "$ac_cv_sizeof_uintmax_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_UINTMAX_T $ac_cv_sizeof_uintmax_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_intptr_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (intptr_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_intptr_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intptr_t" >&5
+$as_echo "$ac_cv_sizeof_intptr_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INTPTR_T $ac_cv_sizeof_intptr_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_uintptr_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (uintptr_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_uintptr_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
+$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
+_ACEOF
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_float" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (float)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_float=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
+$as_echo "$ac_cv_sizeof_float" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_FLOAT $ac_cv_sizeof_float
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_double" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (double)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_double=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
+$as_echo "$ac_cv_sizeof_double" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DOUBLE $ac_cv_sizeof_double
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_long_double" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long double)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long_double=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
+$as_echo "$ac_cv_sizeof_long_double" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
+_ACEOF
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_dev_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (dev_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_dev_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_dev_t" >&5
+$as_echo "$ac_cv_sizeof_dev_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DEV_T $ac_cv_sizeof_dev_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_fpos_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (fpos_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_fpos_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
+$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_mode_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (mode_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_mode_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_mode_t" >&5
+$as_echo "$ac_cv_sizeof_mode_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_MODE_T $ac_cv_sizeof_mode_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_off_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (off_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_off_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
+$as_echo "$ac_cv_sizeof_off_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_ssize_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (ssize_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_ssize_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5
+$as_echo "$ac_cv_sizeof_ssize_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# 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 :
+ $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 :
+
+else
+ if test "$ac_cv_type_time_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (time_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+$as_echo "$ac_cv_sizeof_time_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
+_ACEOF
+
+
+
+
+
+# /***********************************************************************
+# // Checks for library functions
+# ************************************************************************/
+
+
+for ac_func in 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
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+if test "X$GCC" = Xyes; then
+case $host_os in
+cygwin* | mingw* | pw32*)
+ test "X$LIBS" != "X" && LIBS="$LIBS "
+ LIBS="${LIBS}-lwinmm" ;;
+*)
+ ;;
+esac
+fi
+
+
+
+# /***********************************************************************
+# // Write output files
+# ************************************************************************/
+
+
+mfx_tmp="-I$srcdir"
+mfx_save_CPPFLAGS=$CPPFLAGS
+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your compiler passes the ACC conformance test" >&5
+$as_echo_n "checking whether your compiler passes the ACC conformance test... " >&6; }
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define ACC_CONFIG_NO_HEADER 1
+#define ACC_WANT_ACC_INCD_H 1
+#include "src/miniacc.h"
+
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
+#include "src/miniacc.h"
+
+#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 "src/miniacc.h"
+}
+
+#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 "src/miniacc.h"
+return r;
+}
+
+int
+main ()
+{
+
+test_acc_compile_time_assert();
+if (test_acc_run_time_assert(1) != 1) return 1;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+
+mfx_tmp=FAILED
+if ac_fn_c_try_compile "$LINENO"; then :
+ mfx_tmp=yes
+fi
+rm -f core conftest.err conftest.$ac_objext
+rm -f conftest.$ac_ext conftest.$ac_objext
+
+CPPFLAGS=$mfx_save_CPPFLAGS
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mfx_tmp" >&5
+$as_echo "$mfx_tmp" >&6; }
+case x$mfx_tmp in
+ xpassed | xyes) ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Your compiler failed the ACC conformance test - for details see " >&5
+$as_echo "$as_me: Your compiler failed the ACC conformance test - for details see " >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: \`config.log'. Please check that log file and consider sending" >&5
+$as_echo "$as_me: \`config.log'. Please check that log file and consider sending" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: a patch or bug-report to <${PACKAGE_BUGREPORT}>." >&5
+$as_echo "$as_me: a patch or bug-report to <${PACKAGE_BUGREPORT}>." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Thanks for your support." >&5
+$as_echo "$as_me: Thanks for your support." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+ as_fn_error $? "ACC conformance test failed. Stop." "$LINENO" 5
+ ;;
+esac
+
+
+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_config_files="$ac_config_files Makefile doc/Makefile src/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\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" &&
+ { $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
+ 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;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+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__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
+fi
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # 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
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_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 -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... 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'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ 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
+
+# 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# 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
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <lzop-bugs@oberhumer.com>.
+lzop home page: <http://www.oberhumer.com/opensource/lzop/>."
+
+_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,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+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
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "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
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+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" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# 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 ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# 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
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$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 `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+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
+
+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"; } &&
+ { $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"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$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
+ { $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" \
+ || 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" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ 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
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # 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
+ # 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.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # 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
+ 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
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+
+cat <<EOF
+
+ lzop configuration summary
+ --------------------------
+ lzop version : ${PACKAGE_VERSION}
+ configured for host : ${host_cpu}-${host_vendor}-${host_os}
+ source code location : ${srcdir}
+ compiler : ${CC}
+ preprocessor flags : ${CPPFLAGS}
+ compiler flags : ${CFLAGS}
+ linker flags : ${LDFLAGS}
+ link libraries : ${LIBS}
+
+
+ ${PACKAGE_NAME} ${PACKAGE_VERSION} configured.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+
+
+Type \`make' to build ${PACKAGE_NAME}. Type \`make install' to install ${PACKAGE_NAME}.
+After installing ${PACKAGE_NAME}, please read the accompanied documentation.
+
+EOF
+
+# vi:ts=4:et
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..7026021
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,246 @@
+#
+# configure.ac -- autoconf configuration for the lzop package
+#
+# This file is part of the lzop file compressor.
+#
+# Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+# All Rights Reserved.
+#
+# lzop and the LZO library are free software; you can redistribute them
+# and/or modify them under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 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; see the file COPYING.
+# If not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Markus F.X.J. Oberhumer
+# <markus@oberhumer.com>
+# http://www.oberhumer.com/opensource/lzop/
+#
+
+
+# /***********************************************************************
+# // Init
+# ************************************************************************/
+
+AC_COPYRIGHT([Copyright (C) 1996-2010 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_MSG_NOTICE([Configuring $PACKAGE_NAME $PACKAGE_VERSION])
+AC_CONFIG_SRCDIR(src/lzop.c)
+AC_CONFIG_AUX_DIR(autoconf)
+AC_PREFIX_DEFAULT(/usr/local)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AM_MAINTAINER_MODE
+
+if test -z "$ac_abs_top_srcdir"; then
+ _AC_SRCDIRS([.])
+fi
+if test -z "$ac_abs_top_srcdir"; then
+ as_fn_error 1 "internal error: ac_abs_top_srcdir is not set"
+fi
+if test -r .Conf.settings1; then
+ . ./.Conf.settings1
+fi
+
+AC_ARG_ENABLE(asm, AS_HELP_STRING(--disable-asm,disable LZO assembly versions))
+AC_ARG_ENABLE(ansi, AS_HELP_STRING(--disable-ansi,disable ansi console))
+if test "X$enable_ansi" != Xno; then
+ AC_DEFINE(LZOP_ENABLE_ANSI,1,[Define to 1 if should be enabled.])
+fi
+
+AC_PROG_CC
+AC_PROG_CPP
+mfx_PROG_CPPFLAGS
+AC_C_CONST
+mfx_ACC_CHECK_ENDIAN
+AC_SYS_LARGEFILE
+
+AM_INIT_AUTOMAKE([1.11.1 foreign])
+AM_SILENT_RULES([no])
+AC_CONFIG_HEADERS([config.h:config.hin])
+
+
+# /***********************************************************************
+# // Checks for header files 1)
+# ************************************************************************/
+
+mfx_ACC_CHECK_HEADERS
+if test "X$ac_cv_header_limits_h" != Xyes; then
+ AC_MSG_ERROR([<limits.h> header not found])
+fi
+mfx_CHECK_HEADER_SANE_LIMITS_H
+if test "X$mfx_cv_header_sane_limits_h" != Xyes; then
+ AC_MSG_ERROR([your <limits.h> header is broken - for details see config.log])
+fi
+
+
+# /***********************************************************************
+# // Checks for LZO library
+# ************************************************************************/
+
+lzoconf_h=
+if test "X$lzoconf_h" = X; then
+ AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h])
+ if test "X$ac_cv_header_lzo_lzoconf_h$ac_cv_header_lzo_lzo1x_h" = Xyesyes; then
+ lzoconf_h='lzo/lzoconf.h'
+ fi
+fi
+if test "X$lzoconf_h" = X; then
+ AC_CHECK_HEADERS([lzoconf.h lzo1x.h])
+ if test "X$ac_cv_header_lzoconf_h$ac_cv_header_lzo1x_h" = Xyesyes; then
+ lzoconf_h='lzoconf.h'
+ fi
+fi
+if test "X$lzoconf_h" = X; then
+ AC_MSG_ERROR([LZO header files not found. Please check your installation or set the environment variable \`CPPFLAGS'.])
+fi
+
+
+AC_MSG_CHECKING([for version information in $lzoconf_h...])
+lzoconf_h_version=
+if test "X$lzoconf_h_version" = X; then
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <$lzoconf_h>
+#if defined(LZO_VERSION) && (LZO_VERSION >= 0x2000)
+#else
+# error "LZO_VERSION v2"
+#endif
+])], [lzoconf_h_version=2], [])
+fi
+if test "X$lzoconf_h_version" = X; then
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <$lzoconf_h>
+#if defined(LZO_VERSION) && (LZO_VERSION >= 0x1040)
+#else
+# error "LZO_VERSION v1"
+#endif
+])], [lzoconf_h_version=1], [])
+fi
+AC_MSG_RESULT([v$lzoconf_h_version])
+if test "X$lzoconf_h_version" = X; then
+ AC_MSG_ERROR([your LZO headers are broken - for details see config.log])
+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
+
+
+# /***********************************************************************
+# // Checks for header files 2)
+# ************************************************************************/
+
+AC_CHECK_HEADERS([conio.h direct.h dos.h io.h share.h sys/utime.h])
+dnl AC_CHECK_HEADERS([linux/kd.h linux/kdev_t.h linux/major.h])
+dnl AC_CHECK_HEADERS([curses.h ncurses.h])
+
+
+# /***********************************************************************
+# // Checks for typedefs and structures
+# ************************************************************************/
+
+AC_TYPE_OFF_T
+AC_CHECK_TYPE(ptrdiff_t,long)
+AC_TYPE_SIZE_T
+AC_TYPE_SIGNAL
+AC_STRUCT_ST_MTIM_NSEC
+
+mfx_ACC_CHECK_SIZEOF
+mfx_CHECK_SIZEOF
+
+
+# /***********************************************************************
+# // Checks for library functions
+# ************************************************************************/
+
+mfx_ACC_CHECK_FUNCS
+mfx_CHECK_LIB_WINMM
+
+
+# /***********************************************************************
+# // Write output files
+# ************************************************************************/
+
+mfx_MINIACC_ACCCHK(["-I$srcdir"],["src/miniacc.h"])
+
+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)
+
+AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile])
+AC_OUTPUT
+
+
+cat <<EOF
+
+ lzop configuration summary
+ --------------------------
+ lzop version : ${PACKAGE_VERSION}
+ configured for host : ${host_cpu}-${host_vendor}-${host_os}
+ source code location : ${srcdir}
+ compiler : ${CC}
+ preprocessor flags : ${CPPFLAGS}
+ compiler flags : ${CFLAGS}
+ linker flags : ${LDFLAGS}
+ link libraries : ${LIBS}
+
+
+ ${PACKAGE_NAME} ${PACKAGE_VERSION} configured.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+
+
+Type \`make' to build ${PACKAGE_NAME}. Type \`make install' to install ${PACKAGE_NAME}.
+After installing ${PACKAGE_NAME}, please read the accompanied documentation.
+
+EOF
+
+# vi:ts=4:et
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..e0c12dc
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,39 @@
+## 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
new file mode 100644
index 0000000..35b7dfc
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,457 @@
+# 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:
diff --git a/doc/lzop.1 b/doc/lzop.1
new file mode 100644
index 0000000..3b035e5
--- /dev/null
+++ b/doc/lzop.1
@@ -0,0 +1,611 @@
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'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
+.\" 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"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "LZOP 1"
+.TH LZOP 1 "2010-11-06" "lzop 1.03" " "
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+lzop \- compress or expand files
+.SH "ABSTRACT"
+.IX Header "ABSTRACT"
+\&\fBlzop\fR is a file compressor very similar to \fBgzip\fR.
+\&\fBlzop\fR favors speed over compression ratio.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBlzop\fR [\ \fIcommand\fR\ ] [\ \fIoptions\fR\ ] [\ \fIfilename\fR\ ...\ \ ]
+.PP
+\&\fBlzop\fR [\fB\-dxlthIVL19\fR] [\fB\-qvcfFnNPkU\fR]
+[\fB\-o\fR\ \fIfile\fR] [\fB\-p\fR[\fIpath\fR]] [\fB\-S\fR\ \fIsuffix\fR]
+[\fIfilename\fR\ ...]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBlzop\fR reduces the size of the named files. Whenever possible,
+each file is compressed into one with the extension
+\&\fB.lzo\fR, while keeping the same ownership modes, access and
+modification times. If no files are specified, or if a
+file name is \*(L"\-\*(R", 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.
+.PP
+If the compressed file name is too long for its file system,
+\&\fBlzop\fR truncates it.
+.PP
+Compressed files can be restored to their original form
+using \fBlzop\ \-d\fR.
+\&\fBlzop\ \-d\fR takes a list of files on its command line and
+decompresses each file whose name ends with \fB.lzo\fR and which
+begins with the correct magic number to an uncompressed
+file without the original extension. \fBlzop\ \-d\fR also recognizes
+the special extension \fB.tzo\fR as shorthand for \fB.tar.lzo\fR.
+When compressing, lzop uses the \fB.tzo\fR extension if necessary
+instead of truncating a file with a \fB.tar\fR extension.
+.PP
+\&\fBlzop\fR stores the original file name, mode and time stamp
+in the compressed file. These can be used when
+decompressing the file with the \fB\-d\fR option. This is useful when
+the compressed file name was truncated or when the time
+stamp was not preserved after a file transfer.
+.PP
+\&\fBlzop\fR 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 \fB\-n\fR, \fB\-N\fR, \fB\-\-no\-mode\fR and \fB\-\-no\-time\fR
+for more information.
+.PP
+\&\fBlzop\fR always keeps original files unchanged unless
+you use the option \fB\-U\fR.
+.PP
+\&\fBlzop\fR uses the \fI\s-1LZO\s0 data compression library\fR 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 \fBgzip\fR, but
+compression ratio is worse.
+.SS "\s-1COMPRESSION\s0 \s-1LEVELS\s0"
+.IX Subsection "COMPRESSION LEVELS"
+lzop offers the following compression levels of the
+\&\s-1LZO1X\s0 algorithm:
+.IP "\-3" 4
+.IX Item "-3"
+the default level offers pretty fast compression.
+\&\-2, \-3, \-4, \-5 and \-6 are currently all equivalent \- this
+may change in a future release.
+.IP "\-1, \-\-fast" 4
+.IX Item "-1, --fast"
+can be even a little bit faster in some cases \- but
+most times you won't notice the difference
+.IP "\-7, \-8, \-9, \-\-best" 4
+.IX Item "-7, -8, -9, --best"
+these compression levels are mainly intended for generating
+pre-compressed data \- especially \fB\-9\fR can be somewhat slow
+.PP
+Decompression is \fIvery\fR fast for all compression levels,
+and decompression speed is not affected by the compression
+level.
+.SH "MAIN COMMAND"
+.IX Header "MAIN COMMAND"
+If no other command is given then lzop defaults to compression
+(using compression level \-3).
+.IP "\-#, \-\-fast, \-\-best" 4
+.IX Item "-#, --fast, --best"
+Regulate the speed of compression using the specified
+digit \fB#\fR, 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.
+.IP "\-d, \-\-decompress, \-\-uncompress" 4
+.IX Item "-d, --decompress, --uncompress"
+Decompress. Each file will be placed into
+same the directory as the compressed file.
+.IP "\-x, \-\-extract" 4
+.IX Item "-x, --extract"
+Extract compressed files to the current working
+directory. This is the same as '\-dPp'.
+.IP "\-t, \-\-test" 4
+.IX Item "-t, --test"
+Test. Check the compressed file integrity.
+.IP "\-l, \-\-list" 4
+.IX Item "-l, --list"
+For each compressed file, list the following
+fields:
+.Sp
+.Vb 5
+\& 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
+.Ve
+.Sp
+In combination with the \-\-verbose option, the following
+fields are also displayed:
+.Sp
+.Vb 1
+\& date & time: time stamp for the uncompressed file
+.Ve
+.Sp
+With \-\-name, the uncompressed name, date and time
+are those stored within the compress file if present.
+.Sp
+With \-\-verbose, the size totals and compression
+ratio for all files is also displayed. With
+\&\-\-quiet, the title and totals lines are not displayed.
+.Sp
+Note that lzop defines compression ratio
+as compressed_size / uncompressed_size.
+.IP "\-\-ls, \-\-ls=\fI\s-1FLAGS\s0\fR" 4
+.IX Item "--ls, --ls=FLAGS"
+List each compressed file in a format similar to \fBls\ \-ln\fR.
+.Sp
+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.
+.IP "\-\-info" 4
+.IX Item "--info"
+For each compressed file, list the internal header fields.
+.IP "\-I, \-\-sysinfo" 4
+.IX Item "-I, --sysinfo"
+Display information about the system and quit.
+.IP "\-L, \-\-license" 4
+.IX Item "-L, --license"
+Display the lzop license and quit.
+.IP "\-h, \-H, \-\-help" 4
+.IX Item "-h, -H, --help"
+Display a help screen and quit.
+.IP "\-V" 4
+.IX Item "-V"
+Version. Display the version number and compilation
+options and quit.
+.IP "\-\-version" 4
+.IX Item "--version"
+Version. Display the version number and quit.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\-c, \-\-stdout, \-\-to\-stdout" 4
+.IX Item "-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.
+.IP "\-o \fI\s-1FILE\s0\fR, \-\-output=\fI\s-1FILE\s0\fR" 4
+.IX Item "-o FILE, --output=FILE"
+Write output to the file \fI\s-1FILE\s0\fR. If there are several
+input files, the output consists of a sequence
+of independently (de)compressed members.
+.IP "\-p, \-p\fI\s-1DIR\s0\fR, \-\-path=\fI\s-1DIR\s0\fR" 4
+.IX Item "-p, -pDIR, --path=DIR"
+Write output files into the directory \fI\s-1DIR\s0\fR instead
+of the directory determined by the input file. If
+\&\fI\s-1DIR\s0\fR is omitted, then write to the current working
+directory.
+.IP "\-f, \-\-force" 4
+.IX Item "-f, --force"
+Force lzop to
+.Sp
+.Vb 4
+\& \- 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
+.Ve
+.Sp
+Using \fB\-f\fR two or more times forces things like
+.Sp
+.Vb 3
+\& \- 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
+.Ve
+.Sp
+Use with care.
+.IP "\-F, \-\-no\-checksum" 4
+.IX Item "-F, --no-checksum"
+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.
+.IP "\-n, \-\-no\-name" 4
+.IX Item "-n, --no-name"
+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.
+.IP "\-N, \-\-name" 4
+.IX Item "-N, --name"
+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 \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.
+When compressing, store the relative (and cleaned) path name.
+This option is mainly useful when using \fBarchive mode\fR \- see
+usage examples below.
+.IP "\-\-no\-mode" 4
+.IX Item "--no-mode"
+When decompressing, do not restore the original
+mode (permissions) saved in the compressed file.
+.IP "\-\-no\-time" 4
+.IX Item "--no-time"
+When decompressing, do not restore the original
+time stamp saved in the compressed file.
+.IP "\-S \fI.suf\fR, \-\-suffix=\fI.suf\fR" 4
+.IX Item "-S .suf, --suffix=.suf"
+Use suffix \fI.suf\fR instead of \fI.lzo\fR. The suffix must
+not contain multiple dots and special characters like '+' or '*',
+and suffixes other than \fI.lzo\fR should be avoided to avoid confusion
+when files are transferred to other systems.
+.IP "\-k, \-\-keep" 4
+.IX Item "-k, --keep"
+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
+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.
+.IP "\-\-no\-warn" 4
+.IX Item "--no-warn"
+Suppress all warnings.
+.IP "\-\-ignore\-warn" 4
+.IX Item "--ignore-warn"
+Suppress all warnings, and never exit with exit status 2.
+.IP "\-q, \-\-quiet, \-\-silent" 4
+.IX Item "-q, --quiet, --silent"
+Suppress all warnings and decrease the verbosity of some
+commands like \fB\-\-list\fR or \fB\-\-test\fR.
+.IP "\-v, \-\-verbose" 4
+.IX Item "-v, --verbose"
+Verbose. Display the name for each file compressed
+or decompressed. Multiple \fB\-v\fR can be used to increase
+the verbosity of some commands like \fB\-\-list\fR or \fB\-\-test\fR.
+.IP "\-\-" 4
+Specifies that this is the end of the options. Any file name
+after \fB\-\-\fR will not be interpreted as an option even if
+it starts with a hyphen.
+.SH "OTHER OPTIONS"
+.IX Header "OTHER OPTIONS"
+.IP "\-\-no\-stdin" 4
+.IX Item "--no-stdin"
+Do not try to read standard input (but a file name \*(L"\-\*(R" will
+still override this option).
+In old versions of \fBlzop\fR, this option was necessary when
+used in cron jobs (which do not have a controlling terminal).
+.IP "\-\-filter=\fI\s-1NUMBER\s0\fR" 4
+.IX Item "--filter=NUMBER"
+Rarely useful.
+Preprocess data with a special \*(L"multimedia\*(R" filter
+before compressing in order to improve compression ratio.
+\&\fI\s-1NUMBER\s0\fR 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.
+.Sp
+You can try \-\-filter=1 with data like 8\-bit sound samples,
+\&\-\-filter=2 with 16\-bit samples or depth\-16 images, etc.
+.Sp
+Un-filtering during decompression is handled automatically.
+.IP "\-C, \-\-checksum" 4
+.IX Item "-C, --checksum"
+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.
+.IP "\-\-no\-color" 4
+.IX Item "--no-color"
+Do not use any color escape sequences.
+.IP "\-\-mono" 4
+.IX Item "--mono"
+Assume a mono \s-1ANSI\s0 terminal. This is the default under \s-1UNIX\s0
+(if console support is compiled in).
+.IP "\-\-color" 4
+.IX Item "--color"
+Assume a color \s-1ANSI\s0 terminal or try full-screen access. This
+is the default under \s-1DOS\s0 and in a Linux virtual console
+(if console support is compiled in).
+.SH "ADVANCED USAGE"
+.IX Header "ADVANCED USAGE"
+lzop allows you to deal with your files in many flexible
+ways. Here are some usage examples:
+.IP "\fBbackup mode\fR" 1
+.IX Item "backup mode"
+.Vb 1
+\& 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
+\& \*(Aq\-\-use\-compress\-program=XXX\*(Aq option.
+.Ve
+.IP "\fBsingle file mode:\fR individually (de)compress each file" 1
+.IX Item "single file mode: individually (de)compress each file"
+.Vb 5
+\& 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
+\&
+\& extract
+\& lzop \-d a.c.lzo \-> restore a.c
+\& lzop \-df a.c.lzo \-> restore a.c, overwrite if already exists
+\& lzop \-d *.lzo
+\&
+\& list
+\& lzop \-l a.c.lzo
+\& lzop \-l *.lzo
+\& lzop \-lv *.lzo \-> be verbose
+\&
+\& test
+\& lzop \-t a.c.lzo
+\& lzop \-tq *.lzo \-> be quiet
+.Ve
+.IP "\fBpipe mode:\fR (de)compress from stdin to stdout" 1
+.IX Item "pipe mode: (de)compress from stdin to stdout"
+.Vb 4
+\& create
+\& lzop < a.c > y.lzo
+\& cat a.c | lzop > y.lzo
+\& 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
+\&
+\& list
+\& lzop \-l < y.lzo
+\& cat y.lzo | lzop \-l
+\& lzop \-d < y.tar.lzo | tar \-tvf \- \-> list a tar file
+\&
+\& test
+\& lzop \-t < y.lzo
+\& cat y.lzo | lzop \-t
+.Ve
+.IP "\fBstdout mode:\fR (de)compress to stdout" 1
+.IX Item "stdout mode: (de)compress to stdout"
+.Vb 2
+\& 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
+\&
+\& list
+\& lzop \-dc y.tar.lzo | tar \-tvf \- \-> list a tar file
+.Ve
+.IP "\fBarchive mode:\fR compress/extract multiple files into a single archive file" 1
+.IX Item "archive mode: compress/extract multiple files into a single archive file"
+.Vb 5
+\& 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
+\&
+\& 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
+\&
+\& list
+\& lzop \-lNv sources.lzo
+\&
+\& test
+\& lzop \-t sources.lzo
+\& lzop \-tvv sources.lzo \-> be very verbose
+.Ve
+.PP
+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 \s-1GNU\s0 tar supports the
+\&\fB\-\-use\-compress\-program=lzop\fR option to invoke lzop transparently.
+lzop is designed as a complement to tar, not as
+a replacement.
+.SH "ENVIRONMENT"
+.IX Header "ENVIRONMENT"
+The environment variable \fB\s-1LZOP\s0\fR 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:
+.PP
+.Vb 3
+\& for sh/ksh/zsh: LZOP="\-1v \-\-name"; export LZOP
+\& for csh/tcsh: setenv LZOP "\-1v \-\-name"
+\& for DOS/Windows: set LZOP=\-1v \-\-name
+.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
+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)
+.PP
+Precompiled binaries for some platforms are available
+from the lzop home page.
+.PP
+.Vb 1
+\& see http://www.oberhumer.com/opensource/lzop/
+.Ve
+.PP
+lzop uses the \s-1LZO\s0 data compression library for compression
+services.
+.PP
+.Vb 1
+\& see http://www.oberhumer.com/opensource/lzo/
+.Ve
+.SH "DIAGNOSTICS"
+.IX Header "DIAGNOSTICS"
+Exit status is normally 0; if an error occurs, exit status
+is 1. If a warning occurs, exit status is 2 (unless
+option \fB\-\-ignore\-warn\fR is in effect).
+.PP
+\&\fBlzop's\fR diagnostics are intended to be self-explanatory.
+.SH "BUGS"
+.IX Header "BUGS"
+No bugs are known. Please report all problems immediately to the author.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Markus Franz Xaver Johannes Oberhumer
+<markus@oberhumer.com>
+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.
+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
+about possible implications.
diff --git a/doc/lzop.html b/doc/lzop.html
new file mode 100644
index 0000000..662e4c9
--- /dev/null
+++ b/doc/lzop.html
@@ -0,0 +1,616 @@
+<?xml version="1.0" ?>
+<!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>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:root@localhost" />
+</head>
+
+<body style="background-color: white">
+
+
+<!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
+<!--
+
+<ul>
+
+ <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>
+
+ <li><a href="#compression_levels">COMPRESSION LEVELS</a></li>
+ </ul>
+
+ <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>
+
+-->
+
+
+</div>
+<!-- INDEX END -->
+
+<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> [&nbsp;<em>command</em>&nbsp;] [&nbsp;<em>options</em>&nbsp;] [&nbsp;<em>filename</em>&nbsp;...&nbsp;&nbsp;]</p>
+<p><strong>lzop</strong> [<strong>-dxlthIVL19</strong>] [<strong>-qvcfFnNPkU</strong>]
+[<strong>-o</strong>&nbsp;<em>file</em>] [<strong>-p</strong>[<em>path</em>]] [<strong>-S</strong>&nbsp;<em>suffix</em>]
+[<em>filename</em>&nbsp;...]</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 &quot;-&quot;, 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&nbsp;-d</strong>.
+<strong>lzop&nbsp;-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&nbsp;-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>
+
+<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>
+</dd>
+<dt><strong><a name="7_8_9_best" class="item">-7, -8, -9, --best</a></strong></dt>
+
+<dd>
+<p>these compression levels are mainly intended for generating
+pre-compressed data - especially <strong>-9</strong> 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>
+<dl>
+<dt><strong><a name="fast_best" class="item">-#, --fast, --best</a></strong></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>
+
+<dd>
+<p>Extract compressed files to the current working
+directory. This is the same as '-dPp'.</p>
+</dd>
+<dt><strong><a name="t_test" class="item">-t, --test</a></strong></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>
+<p>For each compressed file, list the following
+fields:</p>
+<pre>
+ 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 &amp; 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>
+
+<dd>
+<p>List each compressed file in a format similar to <strong>ls&nbsp;-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>
+
+<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>
+<p>Display information about the system and quit.</p>
+</dd>
+<dt><strong><a name="l_license" class="item">-L, --license</a></strong></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>
+<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>
+
+<dd>
+<p>Version. Display the version number and quit.</p>
+</dd>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="c_stdout_to_stdout" class="item">-c, --stdout, --to-stdout</a></strong></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>
+
+<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>
+</dd>
+<dt><strong><a name="f_force" class="item">-f, --force</a></strong></dt>
+
+<dd>
+<p>Force lzop to</p>
+<pre>
+ - 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
+ - try to decompress files that do not have a valid suffix
+ - try to handle compressed files with unknown header flags</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>
+
+<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>
+
+<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>
+
+<dd>
+<p>When decompressing, do not restore the original
+mode (permissions) saved in the compressed file.</p>
+</dd>
+<dt><strong><a name="no_time" class="item">--no-time</a></strong></dt>
+
+<dd>
+<p>When decompressing, do not restore the original
+time stamp saved in the compressed file.</p>
+</dd>
+<dt><strong><a name="s_suf_suffix_suf" class="item">-S <em>.suf</em>, --suffix=<em>.suf</em></a></strong></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>
+</dd>
+<dt><strong><a name="k_keep" class="item">-k, --keep</a></strong></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>
+
+<dd>
+<p>Use a crc32 checksum instead of a adler32 checksum.</p>
+</dd>
+<dt><strong><a name="no_warn" class="item">--no-warn</a></strong></dt>
+
+<dd>
+<p>Suppress all warnings.</p>
+</dd>
+<dt><strong><a name="ignore_warn" class="item">--ignore-warn</a></strong></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>
+
+<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>
+</dd>
+<dt><strong><a name="__" class="item">--</a></strong></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>
+</dd>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="other_options">OTHER OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="no_stdin" class="item">--no-stdin</a></strong></dt>
+
+<dd>
+<p>Do not try to read standard input (but a file name &quot;-&quot; 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>
+
+<dd>
+<p>Rarely useful.
+Preprocess data with a special &quot;multimedia&quot; 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>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>
+
+<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>
+
+<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>
+</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>
+<dl>
+<dt><strong><a name="backup_mode" class="item"><strong>backup mode</strong></a></strong></dt>
+
+<dd>
+<pre>
+ tar --use-compress-program=lzop -cf archive.tar.lzo files..</pre>
+<pre>
+ 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>
+
+<dd>
+<pre>
+ create
+ lzop a.c -&gt; create a.c.lzo
+ lzop a.c b.c -&gt; create a.c.lzo &amp; b.c.lzo
+ lzop -U a.c b.c -&gt; create a.c.lzo &amp; b.c.lzo and delete a.c &amp; b.c
+ lzop *.c</pre>
+<pre>
+ extract
+ lzop -d a.c.lzo -&gt; restore a.c
+ lzop -df a.c.lzo -&gt; restore a.c, overwrite if already exists
+ lzop -d *.lzo</pre>
+<pre>
+ list
+ lzop -l a.c.lzo
+ lzop -l *.lzo
+ lzop -lv *.lzo -&gt; be verbose</pre>
+<pre>
+ test
+ lzop -t a.c.lzo
+ lzop -tq *.lzo -&gt; 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>
+
+<dd>
+<pre>
+ create
+ lzop &lt; a.c &gt; y.lzo
+ cat a.c | lzop &gt; y.lzo
+ tar -cf - *.c | lzop &gt; y.tar.lzo -&gt; create a compressed tar file</pre>
+<pre>
+ extract
+ lzop -d &lt; y.lzo &gt; a.c
+ lzop -d &lt; y.tar.lzo | tar -xvf - -&gt; extract a tar file</pre>
+<pre>
+ list
+ lzop -l &lt; y.lzo
+ cat y.lzo | lzop -l
+ lzop -d &lt; y.tar.lzo | tar -tvf - -&gt; list a tar file</pre>
+<pre>
+ test
+ lzop -t &lt; 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>
+
+<dd>
+<pre>
+ create
+ lzop -c a.c &gt; y.lzo</pre>
+<pre>
+ extract
+ lzop -dc y.lzo &gt; a.c
+ lzop -dc y.tar.lzo | tar -xvf - -&gt; extract a tar file</pre>
+<pre>
+ list
+ lzop -dc y.tar.lzo | tar -tvf - -&gt; 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>
+
+<dd>
+<pre>
+ create
+ lzop a.c b.c -o sources.lzo -&gt; create an archive
+ lzop -P src/*.c -o sources.lzo -&gt; create an archive, store path name
+ lzop -c *.c &gt; sources.lzo -&gt; another way to create an archive
+ lzop -c *.h &gt;&gt; sources.lzo -&gt; add files to archive</pre>
+<pre>
+ extract
+ lzop -dN sources.lzo
+ lzop -x ../src/sources.lzo -&gt; extract to current directory
+ lzop -x -p/tmp &lt; ../src/sources.lzo -&gt; extract to /tmp directory</pre>
+<pre>
+ list
+ lzop -lNv sources.lzo</pre>
+<pre>
+ test
+ lzop -t sources.lzo
+ lzop -tvv sources.lzo -&gt; be very verbose</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=&quot;-1v --name&quot;; export LZOP
+ for csh/tcsh: setenv LZOP &quot;-1v --name&quot;
+ 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>
+<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
+&lt;<a href="mailto:markus@oberhumer.com">markus@oberhumer.com</a>&gt;
+<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>
+
+</body>
+
+</html>
diff --git a/doc/lzop.man b/doc/lzop.man
new file mode 100644
index 0000000..d86ddd9
--- /dev/null
+++ b/doc/lzop.man
@@ -0,0 +1,434 @@
+LZOP(1) LZOP(1)
+
+
+
+NNAAMMEE
+ lzop - compress or expand files
+
+AABBSSTTRRAACCTT
+ llzzoopp is a file compressor very similar to ggzziipp. llzzoopp favors 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 ... ]
+
+ 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 ...]
+
+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
+ 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
+ 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.
+
+ llzzoopp stores 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
+ or when the time stamp was not preserved after a file transfer.
+
+ llzzoopp 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 --nn, --NN, ----nnoo--mmooddee
+ and ----nnoo--ttiimmee for more information.
+
+ llzzoopp always keeps original files unchanged unless you use the option
+ --UU.
+
+ 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.
+ 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.
+
+ CCOOMMPPRREESSSSIIOONN LLEEVVEELLSS
+ lzop offers the following compression levels of the LZO1X algorithm:
+
+ -3 the default level offers pretty fast compression. -2, -3, -4, -5
+ and -6 are currently all equivalent - this may change in a future
+ release.
+
+ -1, --fast
+ can be even a little bit faster in some cases - but most times you
+ 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
+
+ Decompression is _v_e_r_y fast for all compression levels, and
+ decompression speed is not affected by the compression level.
+
+MMAAIINN CCOOMMMMAANNDD
+ 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 ##,
+ 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.
+
+ -d, --decompress, --uncompress
+ Decompress. Each file will be placed into same the directory as the
+ compressed file.
+
+ -x, --extract
+ Extract compressed files to the current working directory. This is
+ the same as ’-dPp’.
+
+ -t, --test
+ Test. Check the compressed file integrity.
+
+ -l, --list
+ For each compressed file, list the following fields:
+
+ 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
+
+ In combination with the --verbose option, the following fields are
+ also displayed:
+
+ date & time: time stamp for the uncompressed file
+
+ With --name, the uncompressed name, date and time are those stored
+ within the compress file if present.
+
+ With --verbose, the size totals and compression ratio for all files
+ is also displayed. With --quiet, the title and totals lines are not
+ displayed.
+
+ 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.
+
+ 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.
+
+ --info
+ For each compressed file, list the internal header fields.
+
+ -I, --sysinfo
+ Display information about the system and quit.
+
+ -L, --license
+ Display the lzop license and quit.
+
+ -h, -H, --help
+ Display a help screen and quit.
+
+ -V Version. Display the version number and compilation options and
+ quit.
+
+ --version
+ Version. Display the version number and quit.
+
+OOPPTTIIOONNSS
+ -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,
+ 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
+ current working directory.
+
+ -f, --force
+ Force lzop to
+
+ - 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
+
+ Using --ff two 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
+ - try to handle compressed files with unknown header flags
+
+ Use with care.
+
+ -F, --no-checksum
+ 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.
+
+ -n, --no-name
+ 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.
+
+ -N, --name
+ 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 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
+ usage examples below.
+
+ --no-mode
+ When decompressing, do not restore the original mode (permissions)
+ saved in the compressed file.
+
+ --no-time
+ 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
+ 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.
+
+ --crc32
+ Use a crc32 checksum instead of a adler32 checksum.
+
+ --no-warn
+ Suppress all warnings.
+
+ --ignore-warn
+ Suppress all warnings, and never exit with exit status 2.
+
+ -q, --quiet, --silent
+ Suppress all warnings and decrease the verbosity of some commands
+ like ----lliisstt or ----tteesstt.
+
+ -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.
+
+ -- 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
+ hyphen.
+
+OOTTHHEERR OOPPTTIIOONNSS
+ --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
+ necessary when used in cron jobs (which do not have a controlling
+ terminal).
+
+ --filter=_N_U_M_B_E_R
+ Rarely useful. Preprocess data with a special "multimedia" filter
+ before compressing in order to improve compression ratio. _N_U_M_B_E_R
+ 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.
+
+ 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.
+
+ -C, --checksum
+ 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.
+
+ --no-color
+ Do not use any color escape sequences.
+
+ --mono
+ Assume a mono ANSI terminal. This is the default under UNIX (if
+ console support is compiled in).
+
+ --color
+ 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).
+
+AADDVVAANNCCEEDD UUSSAAGGEE
+ lzop allows you to deal with your files in many flexible ways. Here are
+ some usage examples:
+
+ bbaacckkuupp mmooddee
+ 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
+ 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
+
+ extract
+ lzop -d a.c.lzo -> restore a.c
+ lzop -df a.c.lzo -> restore a.c, overwrite if already exists
+ lzop -d *.lzo
+
+ list
+ lzop -l a.c.lzo
+ lzop -l *.lzo
+ lzop -lv *.lzo -> be verbose
+
+ test
+ lzop -t a.c.lzo
+ lzop -tq *.lzo -> be quiet
+
+ ppiippee mmooddee:: (de)compress from stdin to stdout
+ create
+ lzop < a.c > y.lzo
+ cat a.c | lzop > y.lzo
+ 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
+
+ list
+ lzop -l < y.lzo
+ cat y.lzo | lzop -l
+ lzop -d < y.tar.lzo | tar -tvf - -> list a tar file
+
+ test
+ lzop -t < y.lzo
+ cat y.lzo | lzop -t
+
+ ssttddoouutt mmooddee:: (de)compress to stdout
+ 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
+
+ list
+ lzop -dc y.tar.lzo | tar -tvf - -> list a tar file
+
+ aarrcchhiivvee mmooddee:: compress/extract multiple files into a single archive
+ file
+ 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
+
+ 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
+
+ list
+ lzop -lNv sources.lzo
+
+ test
+ lzop -t sources.lzo
+ lzop -tvv sources.lzo -> be very verbose
+
+ 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
+ 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
+ lzop. These options are interpreted first and can be overwritten by
+ explicit command line parameters. For example:
+
+ for sh/ksh/zsh: LZOP="-1v --name"; export LZOP
+ for csh/tcsh: setenv LZOP "-1v --name"
+ for DOS/Windows: set LZOP=-1v --name
+
+ 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.
+
+ Not all of the options are valid in the environment variable - lzop
+ will tell you.
+
+SSEEEE AALLSSOO
+ bbzziipp22(1), ggzziipp(1), ttaarr(1)
+
+ Precompiled binaries for some platforms are available from the lzop
+ home page.
+
+ see http://www.oberhumer.com/opensource/lzop/
+
+ lzop uses the LZO data compression library for compression services.
+
+ see http://www.oberhumer.com/opensource/lzo/
+
+DDIIAAGGNNOOSSTTIICCSS
+ 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
+ effect).
+
+ llzzoopp’’ss diagnostics are intended to be self-explanatory.
+
+BBUUGGSS
+ No bugs are known. Please report all problems immediately to the
+ author.
+
+AAUUTTHHOORR
+ 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.
+
+ lzop and the LZO library are distributed under the terms of the GNU
+ General Public License (GPL).
+
+ 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.
+
+
+
+lzop 1.03 2010-11-06 LZOP(1)
diff --git a/doc/lzop.pod b/doc/lzop.pod
new file mode 100644
index 0000000..bef01b3
--- /dev/null
+++ b/doc/lzop.pod
@@ -0,0 +1,565 @@
+=head1 NAME
+
+lzop - compress or expand files
+
+
+
+=head1 ABSTRACT
+
+B<lzop> is a file compressor very similar to B<gzip>.
+B<lzop> favors speed over compression ratio.
+
+
+
+=head1 SYNOPSIS
+
+B<lzop> S<[ I<command> ]> S<[ I<options> ]> S<[ I<filename> ... ]>
+
+B<lzop> S<[B<-dxlthIVL19>]> S<[B<-qvcfFnNPkU>]>
+S<[B<-o> I<file>]> S<[B<-p>[I<path>]]> S<[B<-S> I<suffix>]>
+S<[I<filename> ...]>
+
+
+
+=head1 DESCRIPTION
+
+B<lzop> reduces the size of the named files. Whenever possible,
+each file is compressed into one with the extension
+B<.lzo>, 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,
+B<lzop> truncates it.
+
+Compressed files can be restored to their original form
+using S<B<lzop -d>>.
+S<B<lzop -d>> takes a list of files on its command line and
+decompresses each file whose name ends with B<.lzo> and which
+begins with the correct magic number to an uncompressed
+file without the original extension. S<B<lzop -d>> also recognizes
+the special extension B<.tzo> as shorthand for B<.tar.lzo>.
+When compressing, lzop uses the B<.tzo> extension if necessary
+instead of truncating a file with a B<.tar> extension.
+
+B<lzop> 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> option. This is useful when
+the compressed file name was truncated or when the time
+stamp was not preserved after a file transfer.
+
+B<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 B<-n>, B<-N>, B<--no-mode> and B<--no-time>
+for more information.
+
+B<lzop> always keeps original files unchanged unless
+you use the option B<-U>.
+
+B<lzop> uses the I<LZO data compression library> 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>, but
+compression ratio is worse.
+
+
+
+=head2 COMPRESSION LEVELS
+
+lzop offers the following compression levels of the
+LZO1X algorithm:
+
+=over 4
+
+=item -3
+
+the default level offers pretty fast compression.
+-2, -3, -4, -5 and -6 are currently all equivalent - this
+may change in a future release.
+
+=item -1, --fast
+
+can be even a little bit faster in some cases - but
+most times you won't notice the difference
+
+=item -7, -8, -9, --best
+
+these compression levels are mainly intended for generating
+pre-compressed data - especially B<-9> can be somewhat slow
+
+=back
+
+Decompression is I<very> fast for all compression levels,
+and decompression speed is not affected by the compression
+level.
+
+
+
+=head1 MAIN COMMAND
+
+If no other command is given then lzop defaults to compression
+(using compression level -3).
+
+=over 4
+
+=item -#, --fast, --best
+
+Regulate the speed of compression using the specified
+digit 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.
+
+=item -d, --decompress, --uncompress
+
+Decompress. Each file will be placed into
+same the directory as the compressed file.
+
+=item -x, --extract
+
+Extract compressed files to the current working
+directory. This is the same as '-dPp'.
+
+=item -t, --test
+
+Test. Check the compressed file integrity.
+
+=item -l, --list
+
+For each compressed file, list the following
+fields:
+
+ 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
+
+In combination with the --verbose option, the following
+fields are also displayed:
+
+ date & time: time stamp for the uncompressed file
+
+With --name, the uncompressed name, date and time
+are those stored within the compress file if present.
+
+With --verbose, the size totals and compression
+ratio for all files is also displayed. With
+--quiet, the title and totals lines are not displayed.
+
+Note that lzop defines compression ratio
+as compressed_size / uncompressed_size.
+
+=item --ls, --ls=I<FLAGS>
+
+List each compressed file in a format similar to S<B<ls -ln>>.
+
+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.
+
+=item --info
+
+For each compressed file, list the internal header fields.
+
+=item -I, --sysinfo
+
+Display information about the system and quit.
+
+=item -L, --license
+
+Display the lzop license and quit.
+
+=item -h, -H, --help
+
+Display a help screen and quit.
+
+=item -V
+
+Version. Display the version number and compilation
+options and quit.
+
+=item --version
+
+Version. Display the version number and quit.
+
+=back
+
+
+
+=head1 OPTIONS
+
+=over 4
+
+=item -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.
+
+=item -o I<FILE>, --output=I<FILE>
+
+Write output to the file I<FILE>. If there are several
+input files, the output consists of a sequence
+of independently (de)compressed members.
+
+=item -p, -pI<DIR>, --path=I<DIR>
+
+Write output files into the directory I<DIR> instead
+of the directory determined by the input file. If
+I<DIR> is omitted, then write to the current working
+directory.
+
+=item -f, --force
+
+Force lzop to
+
+ - 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
+
+Using B<-f> two 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
+ - try to handle compressed files with unknown header flags
+
+Use with care.
+
+=item -F, --no-checksum
+
+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.
+
+=item -n, --no-name
+
+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.
+
+=item -N, --name
+
+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.
+
+=item -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> - see
+usage examples below.
+
+=item --no-mode
+
+When decompressing, do not restore the original
+mode (permissions) saved in the compressed file.
+
+=item --no-time
+
+When decompressing, do not restore the original
+time stamp saved in the compressed file.
+
+=item -S I<.suf>, --suffix=I<.suf>
+
+Use suffix I<.suf> instead of I<.lzo>. The suffix must
+not contain multiple dots and special characters like '+' or '*',
+and suffixes other than I<.lzo> should be avoided to avoid confusion
+when files are transferred to other systems.
+
+=item -k, --keep
+
+Do not delete input files. This is the default.
+
+=item -U, --unlink, --delete
+
+Delete input files after succesfull 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.
+
+=item --no-warn
+
+Suppress all warnings.
+
+=item --ignore-warn
+
+Suppress all warnings, and never exit with exit status 2.
+
+=item -q, --quiet, --silent
+
+Suppress all warnings and decrease the verbosity of some
+commands like B<--list> or B<--test>.
+
+=item -v, --verbose
+
+Verbose. Display the name for each file compressed
+or decompressed. Multiple B<-v> can be used to increase
+the verbosity of some commands like B<--list> or B<--test>.
+
+=item --
+
+Specifies that this is the end of the options. Any file name
+after B<--> will not be interpreted as an option even if
+it starts with a hyphen.
+
+=back
+
+
+
+=head1 OTHER OPTIONS
+
+=over 4
+
+=item --no-stdin
+
+Do not try to read standard input (but a file name "-" will
+still override this option).
+In old versions of B<lzop>, this option was necessary when
+used in cron jobs (which do not have a controlling terminal).
+
+=item --filter=I<NUMBER>
+
+Rarely useful.
+Preprocess data with a special "multimedia" filter
+before compressing in order to improve compression ratio.
+I<NUMBER> 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.
+
+You can try S<--filter=1> with data like 8-bit sound samples,
+S<--filter=2> with 16-bit samples or depth-16 images, etc.
+
+Un-filtering during decompression is handled automatically.
+
+=item -C, --checksum
+
+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
+
+Do not use any color escape sequences.
+
+=item --mono
+
+Assume a mono ANSI terminal. This is the default under UNIX
+(if console support is compiled in).
+
+=item --color
+
+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).
+
+
+=back
+
+
+
+=head1 ADVANCED USAGE
+
+lzop allows you to deal with your files in many flexible
+ways. Here are some usage examples:
+
+=over 1
+
+=item B<backup mode>
+
+ 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.
+
+=item B<single file mode:> individually (de)compress each file
+
+ 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
+
+ extract
+ lzop -d a.c.lzo -> restore a.c
+ lzop -df a.c.lzo -> restore a.c, overwrite if already exists
+ lzop -d *.lzo
+
+ list
+ lzop -l a.c.lzo
+ lzop -l *.lzo
+ lzop -lv *.lzo -> be verbose
+
+ test
+ lzop -t a.c.lzo
+ lzop -tq *.lzo -> be quiet
+
+=item B<pipe mode:> (de)compress from stdin to stdout
+
+ create
+ lzop < a.c > y.lzo
+ cat a.c | lzop > y.lzo
+ 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
+
+ list
+ lzop -l < y.lzo
+ cat y.lzo | lzop -l
+ lzop -d < y.tar.lzo | tar -tvf - -> list a tar file
+
+ test
+ lzop -t < y.lzo
+ cat y.lzo | lzop -t
+
+=item B<stdout mode:> (de)compress to stdout
+
+ 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
+
+ list
+ lzop -dc y.tar.lzo | tar -tvf - -> list a tar file
+
+=item B<archive mode:> compress/extract multiple files into a single archive file
+
+ 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
+
+ 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
+
+ list
+ lzop -lNv sources.lzo
+
+ test
+ lzop -t sources.lzo
+ lzop -tvv sources.lzo -> be very verbose
+
+=back
+
+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
+S<B<--use-compress-program=lzop>> option to invoke lzop transparently.
+lzop is designed as a complement to tar, not as
+a replacement.
+
+
+
+=head1 ENVIRONMENT
+
+The environment variable B<LZOP> 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:
+
+ for sh/ksh/zsh: LZOP="-1v --name"; export LZOP
+ for csh/tcsh: setenv LZOP "-1v --name"
+ for DOS/Windows: set LZOP=-1v --name
+
+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.
+
+Not all of the options are valid in the environment variable -
+lzop will tell you.
+
+
+
+=head1 SEE ALSO
+
+B<bzip2>(1), B<gzip>(1), B<tar>(1)
+
+Precompiled binaries for some platforms are available
+from the lzop home page.
+
+ see http://www.oberhumer.com/opensource/lzop/
+
+lzop uses the LZO data compression library for compression
+services.
+
+ see http://www.oberhumer.com/opensource/lzo/
+
+
+
+=head1 DIAGNOSTICS
+
+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> is in effect).
+
+B<lzop's> diagnostics are intended to be self-explanatory.
+
+
+
+=head1 BUGS
+
+No bugs are known. Please report all problems immediately to the author.
+
+
+
+=head1 AUTHOR
+
+Markus Franz Xaver Johannes Oberhumer
+<markus@oberhumer.com>
+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.
+All Rights Reserved.
+
+lzop and the LZO library are distributed under the terms
+of the GNU General Public License (GPL).
+
+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.
+
diff --git a/doc/lzop.ps b/doc/lzop.ps
new file mode 100644
index 0000000..341ad69
--- /dev/null
+++ b/doc/lzop.ps
@@ -0,0 +1,818 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.18.1.4
+%%CreationDate: Mon Nov 1 00:51:10 2010
+%%DocumentNeededResources: font Times-Roman
+%%+ font Times-Bold
+%%+ font Times-Italic
+%%+ font Courier
+%%DocumentSuppliedResources: procset grops 1.18 1
+%%Pages: 6
+%%PageOrder: Ascend
+%%Orientation: Portrait
+%%EndComments
+%%BeginProlog
+%%BeginResource: procset grops 1.18 1
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+/MANUAL{
+statusdict begin/manualfeed true store end
+}bind def
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}bind def
+/DA{
+newpath arcn stroke
+}bind def
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+/Fr{
+setrgbcolor fill
+}bind def
+/Fk{
+setcmykcolor fill
+}bind def
+/Fg{
+setgray fill
+}bind def
+/FL/fill load def
+/LW/setlinewidth load def
+/Cr/setrgbcolor load def
+/Ck/setcmykcolor load def
+/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
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+}bind def
+/PEND{
+clear
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Times-Bold
+%%IncludeResource: font Times-Italic
+%%IncludeResource: font Courier
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
+def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
+/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
+/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
+%%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
+%%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
+%%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
+%%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
+%%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
+%%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
+%%Trailer
+end
+%%EOF
diff --git a/doc/lzop.tex b/doc/lzop.tex
new file mode 100644
index 0000000..430b1b5
--- /dev/null
+++ b/doc/lzop.tex
@@ -0,0 +1,646 @@
+\section{NAME\label{NAME}\index{NAME}}
+
+
+lzop - compress or expand files
+
+\section{ABSTRACT\label{ABSTRACT}\index{ABSTRACT}}
+
+
+\textbf{lzop} is a file compressor very similar to \textbf{gzip}.
+\textbf{lzop} favors speed over compression ratio.
+
+\section{SYNOPSIS\label{SYNOPSIS}\index{SYNOPSIS}}
+
+
+\textbf{lzop} [~\textit{command}~] [~\textit{options}~] [~\textit{filename}~...~~]
+
+
+
+\textbf{lzop} [\textbf{-dxlthIVL19}] [\textbf{-qvcfFnNPkU}]
+[\textbf{-o}~\textit{file}] [\textbf{-p}[\textit{path}]] [\textbf{-S}~\textit{suffix}]
+[\textit{filename}~...]
+
+\section{DESCRIPTION\label{DESCRIPTION}\index{DESCRIPTION}}
+
+
+\textbf{lzop} reduces the size of the named files. Whenever possible,
+each file is compressed into one with the extension
+\textbf{.lzo}, 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,
+\textbf{lzop} truncates it.
+
+
+
+Compressed files can be restored to their original form
+using \textbf{lzop~-d}.
+\textbf{lzop~-d} takes a list of files on its command line and
+decompresses each file whose name ends with \textbf{.lzo} and which
+begins with the correct magic number to an uncompressed
+file without the original extension. \textbf{lzop~-d} also recognizes
+the special extension \textbf{.tzo} as shorthand for \textbf{.tar.lzo}.
+When compressing, lzop uses the \textbf{.tzo} extension if necessary
+instead of truncating a file with a \textbf{.tar} extension.
+
+
+
+\textbf{lzop} stores the original file name, mode and time stamp
+in the compressed file. These can be used when
+decompressing the file with the \textbf{-d} option. This is useful when
+the compressed file name was truncated or when the time
+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}
+for more information.
+
+
+
+\textbf{lzop} always keeps original files unchanged unless
+you use the option \textbf{-U}.
+
+
+
+\textbf{lzop} uses the \textit{LZO data compression library} 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 \textbf{gzip}, but
+compression ratio is worse.
+
+\subsection*{COMPRESSION LEVELS\label{COMPRESSION_LEVELS}\index{COMPRESSION LEVELS}}
+
+
+lzop offers the following compression levels of the
+LZO1X algorithm:
+
+\begin{description}
+
+\item[{-3}] \mbox{}
+
+the default level offers pretty fast compression.
+-2, -3, -4, -5 and -6 are currently all equivalent - this
+may change in a future release.
+
+
+\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{}
+
+these compression levels are mainly intended for generating
+pre-compressed data - especially \textbf{-9} can be somewhat slow
+
+\end{description}
+
+
+Decompression is \textit{very} fast for all compression levels,
+and decompression speed is not affected by the compression
+level.
+
+\section{MAIN COMMAND\label{MAIN_COMMAND}\index{MAIN COMMAND}}
+
+
+If no other command is given then lzop defaults to compression
+(using compression level -3).
+
+\begin{description}
+
+\item[{-\#, --fast, --best}] \mbox{}
+
+Regulate the speed of compression using the specified
+digit \textbf{\#}, 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.
+
+
+\item[{-d, --decompress, --uncompress}] \mbox{}
+
+Decompress. Each file will be placed into
+same the directory as the compressed file.
+
+
+\item[{-x, --extract}] \mbox{}
+
+Extract compressed files to the current working
+directory. This is the same as '-dPp'.
+
+
+\item[{-t, --test}] \mbox{}
+
+Test. Check the compressed file integrity.
+
+
+\item[{-l, --list}] \mbox{}
+
+For each compressed file, list the following
+fields:
+
+\begin{verbatim}
+ 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
+\end{verbatim}
+
+
+In combination with the --verbose option, the following
+fields are also displayed:
+
+\begin{verbatim}
+ date & time: time stamp for the uncompressed file
+\end{verbatim}
+
+
+With --name, the uncompressed name, date and time
+are those stored within the compress file if present.
+
+
+
+With --verbose, the size totals and compression
+ratio for all files is also displayed. With
+--quiet, the title and totals lines are not displayed.
+
+
+
+Note that lzop defines compression ratio
+as compressed\_size / uncompressed\_size.
+
+
+\item[{--ls, --ls=\textit{FLAGS}}] \mbox{}
+
+List each compressed file in a format similar to \textbf{ls~-ln}.
+
+
+
+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.
+
+
+\item[{--info}] \mbox{}
+
+For each compressed file, list the internal header fields.
+
+
+\item[{-I, --sysinfo}] \mbox{}
+
+Display information about the system and quit.
+
+
+\item[{-L, --license}] \mbox{}
+
+Display the lzop license and quit.
+
+
+\item[{-h, -H, --help}] \mbox{}
+
+Display a help screen and quit.
+
+
+\item[{-V}] \mbox{}
+
+Version. Display the version number and compilation
+options and quit.
+
+
+\item[{--version}] \mbox{}
+
+Version. Display the version number and quit.
+
+\end{description}
+\section{OPTIONS\label{OPTIONS}\index{OPTIONS}}
+\begin{description}
+
+\item[{-c, --stdout, --to-stdout}] \mbox{}
+
+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.
+
+
+\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{}
+
+Write output files into the directory \textit{DIR} instead
+of the directory determined by the input file. If
+\textit{DIR} is omitted, then write to the current working
+directory.
+
+
+\item[{-f, --force}] \mbox{}
+
+Force lzop to
+
+\begin{verbatim}
+ - 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
+\end{verbatim}
+
+
+Using \textbf{-f} two or more times forces things like
+
+\begin{verbatim}
+ - 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
+\end{verbatim}
+
+
+Use with care.
+
+
+\item[{-F, --no-checksum}] \mbox{}
+
+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.
+
+
+\item[{-n, --no-name}] \mbox{}
+
+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.
+
+
+\item[{-N, --name}] \mbox{}
+
+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.
+
+
+\item[{-P}] \mbox{}
+
+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 \textbf{archive mode} - see
+usage examples below.
+
+
+\item[{--no-mode}] \mbox{}
+
+When decompressing, do not restore the original
+mode (permissions) saved in the compressed file.
+
+
+\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{}
+
+Use suffix \textit{.suf} instead of \textit{.lzo}. The suffix must
+not contain multiple dots and special characters like '+' or '*',
+and suffixes other than \textit{.lzo} should be avoided to avoid confusion
+when files are transferred to other systems.
+
+
+\item[{-k, --keep}] \mbox{}
+
+Do not delete input files. This is the default.
+
+
+\item[{-U, --unlink, --delete}] \mbox{}
+
+Delete input files after succesfull 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{}
+
+Use a crc32 checksum instead of a adler32 checksum.
+
+
+\item[{--no-warn}] \mbox{}
+
+Suppress all warnings.
+
+
+\item[{--ignore-warn}] \mbox{}
+
+Suppress all warnings, and never exit with exit status 2.
+
+
+\item[{-q, --quiet, --silent}] \mbox{}
+
+Suppress all warnings and decrease the verbosity of some
+commands like \textbf{--list} or \textbf{--test}.
+
+
+\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}.
+
+
+\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
+it starts with a hyphen.
+
+\end{description}
+\section{OTHER OPTIONS\label{OTHER_OPTIONS}\index{OTHER OPTIONS}}
+\begin{description}
+
+\item[{--no-stdin}] \mbox{}
+
+Do not try to read standard input (but a file name "-" will
+still override this option).
+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{}
+
+Rarely useful.
+Preprocess data with a special "multimedia" filter
+before compressing in order to improve compression ratio.
+\textit{NUMBER} 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.
+
+
+
+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{}
+
+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{}
+
+Do not use any color escape sequences.
+
+
+\item[{--mono}] \mbox{}
+
+Assume a mono ANSI terminal. This is the default under UNIX
+(if console support is compiled in).
+
+
+\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
+(if console support is compiled in).
+
+\end{description}
+\section{ADVANCED USAGE\label{ADVANCED_USAGE}\index{ADVANCED USAGE}}
+
+
+lzop allows you to deal with your files in many flexible
+ways. Here are some usage examples:
+
+\begin{description}
+
+\item[{\textbf{backup mode}}] \mbox{}\begin{verbatim}
+ tar --use-compress-program=lzop -cf archive.tar.lzo files..
+\end{verbatim}
+\begin{verbatim}
+ This is the recommended mode for creating backups.
+ Requires GNU tar or a compatible version which accepts the
+ '--use-compress-program=XXX' option.
+\end{verbatim}
+
+\item[{\textbf{single file mode:} individually}] \textbf{(de)compress each file}\begin{verbatim}
+ 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
+\end{verbatim}
+\begin{verbatim}
+ extract
+ lzop -d a.c.lzo -> restore a.c
+ lzop -df a.c.lzo -> restore a.c, overwrite if already exists
+ lzop -d *.lzo
+\end{verbatim}
+\begin{verbatim}
+ list
+ lzop -l a.c.lzo
+ lzop -l *.lzo
+ lzop -lv *.lzo -> be verbose
+\end{verbatim}
+\begin{verbatim}
+ test
+ lzop -t a.c.lzo
+ lzop -tq *.lzo -> be quiet
+\end{verbatim}
+
+\item[{\textbf{pipe mode:} (de)compress from stdin}] \textbf{to stdout}\begin{verbatim}
+ create
+ lzop < a.c > y.lzo
+ cat a.c | lzop > y.lzo
+ tar -cf - *.c | lzop > y.tar.lzo -> create a compressed tar file
+\end{verbatim}
+\begin{verbatim}
+ extract
+ lzop -d < y.lzo > a.c
+ lzop -d < y.tar.lzo | tar -xvf - -> extract a tar file
+\end{verbatim}
+\begin{verbatim}
+ list
+ lzop -l < y.lzo
+ cat y.lzo | lzop -l
+ lzop -d < y.tar.lzo | tar -tvf - -> list a tar file
+\end{verbatim}
+\begin{verbatim}
+ test
+ lzop -t < y.lzo
+ cat y.lzo | lzop -t
+\end{verbatim}
+
+\item[{\textbf{stdout mode:} (de)compress to stdout}] \mbox{}\begin{verbatim}
+ create
+ lzop -c a.c > y.lzo
+\end{verbatim}
+\begin{verbatim}
+ extract
+ lzop -dc y.lzo > a.c
+ lzop -dc y.tar.lzo | tar -xvf - -> extract a tar file
+\end{verbatim}
+\begin{verbatim}
+ list
+ lzop -dc y.tar.lzo | tar -tvf - -> list a tar file
+\end{verbatim}
+
+\item[{\textbf{archive mode:} compress/extract}] \textbf{multiple files into a single archive file}\begin{verbatim}
+ 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
+\end{verbatim}
+\begin{verbatim}
+ 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
+\end{verbatim}
+\begin{verbatim}
+ list
+ lzop -lNv sources.lzo
+\end{verbatim}
+\begin{verbatim}
+ test
+ lzop -t sources.lzo
+ lzop -tvv sources.lzo -> be very verbose
+\end{verbatim}
+\end{description}
+
+
+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.
+lzop is designed as a complement to tar, not as
+a replacement.
+
+\section{ENVIRONMENT\label{ENVIRONMENT}\index{ENVIRONMENT}}
+
+
+The environment variable \textbf{LZOP} 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:
+
+\begin{verbatim}
+ for sh/ksh/zsh: LZOP="-1v --name"; export LZOP
+ for csh/tcsh: setenv LZOP "-1v --name"
+ for DOS/Windows: set LZOP=-1v --name
+\end{verbatim}
+
+
+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.
+
+
+
+Not all of the options are valid in the environment variable -
+lzop will tell you.
+
+\section{SEE ALSO\label{SEE_ALSO}\index{SEE ALSO}}
+
+
+\textbf{bzip2}(1), \textbf{gzip}(1), \textbf{tar}(1)
+
+
+
+Precompiled binaries for some platforms are available
+from the lzop home page.
+
+\begin{verbatim}
+ see http://www.oberhumer.com/opensource/lzop/
+\end{verbatim}
+
+
+lzop uses the LZO data compression library for compression
+services.
+
+\begin{verbatim}
+ see http://www.oberhumer.com/opensource/lzo/
+\end{verbatim}
+\section{DIAGNOSTICS\label{DIAGNOSTICS}\index{DIAGNOSTICS}}
+
+
+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).
+
+
+
+\textbf{lzop's} diagnostics are intended to be self-explanatory.
+
+\section{BUGS\label{BUGS}\index{BUGS}}
+
+
+No bugs are known. Please report all problems immediately to the author.
+
+\section{AUTHOR\label{AUTHOR}\index{AUTHOR}}
+
+
+Markus Franz Xaver Johannes Oberhumer
+$<$markus@oberhumer.com$>$
+http://www.oberhumer.com/opensource/lzop/
+
+\section{COPYRIGHT\label{COPYRIGHT}\index{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 distributed under the terms
+of the GNU General Public License (GPL).
+
+
+
+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.
+
diff --git a/doc/lzop.txt b/doc/lzop.txt
new file mode 100644
index 0000000..9e648ed
--- /dev/null
+++ b/doc/lzop.txt
@@ -0,0 +1,423 @@
+NAME
+ lzop - compress or expand files
+
+ABSTRACT
+ lzop is a file compressor very similar to gzip. lzop favors speed over
+ compression ratio.
+
+SYNOPSIS
+ lzop [ *command* ] [ *options* ] [ *filename* ... ]
+
+ lzop [-dxlthIVL19] [-qvcfFnNPkU] [-o *file*] [-p[*path*]] [-S *suffix*]
+ [*filename* ...]
+
+DESCRIPTION
+ lzop reduces the size of the named files. Whenever possible, each file
+ is compressed into one with the extension .lzo, 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, lzop
+ truncates it.
+
+ Compressed files can be restored to their original form using lzop -d.
+ lzop -d takes a list of files on its command line and decompresses each
+ file whose name ends with .lzo and which begins with the correct magic
+ number to an uncompressed file without the original extension. lzop -d
+ also recognizes the special extension .tzo as shorthand for .tar.lzo.
+ When compressing, lzop uses the .tzo extension if necessary instead of
+ truncating a file with a .tar extension.
+
+ lzop stores the original file name, mode and time stamp in the
+ compressed file. These can be used when decompressing the file with the
+ -d option. This is useful when the compressed file name was truncated or
+ when the time stamp was not preserved after a file transfer.
+
+ 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 -n, -N, --no-mode and
+ --no-time for more information.
+
+ lzop always keeps original files unchanged unless you use the option -U.
+
+ lzop uses the *LZO data compression library* 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
+ gzip, but compression ratio is worse.
+
+ COMPRESSION LEVELS
+ lzop offers the following compression levels of the LZO1X algorithm:
+
+ -3 the default level offers pretty fast compression. -2, -3, -4, -5 and
+ -6 are currently all equivalent - this may change in a future
+ release.
+
+ -1, --fast
+ can be even a little bit faster in some cases - but most times you
+ won't notice the difference
+
+ -7, -8, -9, --best
+ these compression levels are mainly intended for generating
+ pre-compressed data - especially -9 can be somewhat slow
+
+ Decompression is *very* fast for all compression levels, and
+ decompression speed is not affected by the compression level.
+
+MAIN COMMAND
+ 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 #, 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.
+
+ -d, --decompress, --uncompress
+ Decompress. Each file will be placed into same the directory as the
+ compressed file.
+
+ -x, --extract
+ Extract compressed files to the current working directory. This is
+ the same as '-dPp'.
+
+ -t, --test
+ Test. Check the compressed file integrity.
+
+ -l, --list
+ For each compressed file, list the following fields:
+
+ 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
+
+ In combination with the --verbose option, the following fields are
+ also displayed:
+
+ date & time: time stamp for the uncompressed file
+
+ With --name, the uncompressed name, date and time are those stored
+ within the compress file if present.
+
+ With --verbose, the size totals and compression ratio for all files
+ is also displayed. With --quiet, the title and totals lines are not
+ displayed.
+
+ Note that lzop defines compression ratio as compressed_size /
+ uncompressed_size.
+
+ --ls, --ls=*FLAGS*
+ List each compressed file in a format similar to ls -ln.
+
+ 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.
+
+ --info
+ For each compressed file, list the internal header fields.
+
+ -I, --sysinfo
+ Display information about the system and quit.
+
+ -L, --license
+ Display the lzop license and quit.
+
+ -h, -H, --help
+ Display a help screen and quit.
+
+ -V Version. Display the version number and compilation options and
+ quit.
+
+ --version
+ Version. Display the version number and quit.
+
+OPTIONS
+ -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 *FILE*, --output=*FILE*
+ Write output to the file *FILE*. If there are several input files,
+ the output consists of a sequence of independently (de)compressed
+ members.
+
+ -p, -p*DIR*, --path=*DIR*
+ Write output files into the directory *DIR* instead of the directory
+ determined by the input file. If *DIR* is omitted, then write to the
+ current working directory.
+
+ -f, --force
+ Force lzop to
+
+ - 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
+
+ Using -f two 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
+ - try to handle compressed files with unknown header flags
+
+ Use with care.
+
+ -F, --no-checksum
+ 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.
+
+ -n, --no-name
+ 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.
+
+ -N, --name
+ 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 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 archive mode - see
+ usage examples below.
+
+ --no-mode
+ When decompressing, do not restore the original mode (permissions)
+ saved in the compressed file.
+
+ --no-time
+ When decompressing, do not restore the original time stamp saved in
+ the compressed file.
+
+ -S *.suf*, --suffix=*.suf*
+ Use suffix *.suf* instead of *.lzo*. The suffix must not contain
+ multiple dots and special characters like '+' or '*', and suffixes
+ other than *.lzo* 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 gzip and bzip2. Note that
+ explicitly giving -k overrides -U.
+
+ --crc32
+ Use a crc32 checksum instead of a adler32 checksum.
+
+ --no-warn
+ Suppress all warnings.
+
+ --ignore-warn
+ Suppress all warnings, and never exit with exit status 2.
+
+ -q, --quiet, --silent
+ Suppress all warnings and decrease the verbosity of some commands
+ like --list or --test.
+
+ -v, --verbose
+ Verbose. Display the name for each file compressed or decompressed.
+ Multiple -v can be used to increase the verbosity of some commands
+ like --list or --test.
+
+ -- 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
+ hyphen.
+
+OTHER OPTIONS
+ --no-stdin
+ Do not try to read standard input (but a file name "-" will still
+ override this option). In old versions of lzop, this option was
+ necessary when used in cron jobs (which do not have a controlling
+ terminal).
+
+ --filter=*NUMBER*
+ Rarely useful. Preprocess data with a special "multimedia" filter
+ before compressing in order to improve compression ratio. *NUMBER*
+ 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.
+
+ 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.
+
+ -C, --checksum
+ 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.
+
+ --no-color
+ Do not use any color escape sequences.
+
+ --mono
+ Assume a mono ANSI terminal. This is the default under UNIX (if
+ console support is compiled in).
+
+ --color
+ 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).
+
+ADVANCED USAGE
+ lzop allows you to deal with your files in many flexible ways. Here are
+ some usage examples:
+
+ backup mode
+ 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.
+
+ single file mode: individually (de)compress each file
+ 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
+
+ extract
+ lzop -d a.c.lzo -> restore a.c
+ lzop -df a.c.lzo -> restore a.c, overwrite if already exists
+ lzop -d *.lzo
+
+ list
+ lzop -l a.c.lzo
+ lzop -l *.lzo
+ lzop -lv *.lzo -> be verbose
+
+ test
+ lzop -t a.c.lzo
+ lzop -tq *.lzo -> be quiet
+
+ pipe mode: (de)compress from stdin to stdout
+ create
+ lzop < a.c > y.lzo
+ cat a.c | lzop > y.lzo
+ 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
+
+ list
+ lzop -l < y.lzo
+ cat y.lzo | lzop -l
+ lzop -d < y.tar.lzo | tar -tvf - -> list a tar file
+
+ test
+ lzop -t < y.lzo
+ cat y.lzo | lzop -t
+
+ stdout mode: (de)compress to stdout
+ 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
+
+ list
+ lzop -dc y.tar.lzo | tar -tvf - -> list a tar file
+
+ archive mode: compress/extract multiple files into a single archive file
+ 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
+
+ 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
+
+ list
+ lzop -lNv sources.lzo
+
+ test
+ lzop -t sources.lzo
+ lzop -tvv sources.lzo -> be very verbose
+
+ 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 --use-compress-program=lzop option to invoke lzop
+ transparently. lzop is designed as a complement to tar, not as a
+ replacement.
+
+ENVIRONMENT
+ The environment variable LZOP 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:
+
+ for sh/ksh/zsh: LZOP="-1v --name"; export LZOP
+ for csh/tcsh: setenv LZOP "-1v --name"
+ for DOS/Windows: set LZOP=-1v --name
+
+ 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.
+
+ Not all of the options are valid in the environment variable - lzop will
+ tell you.
+
+SEE ALSO
+ bzip2(1), gzip(1), tar(1)
+
+ Precompiled binaries for some platforms are available from the lzop home
+ page.
+
+ see http://www.oberhumer.com/opensource/lzop/
+
+ lzop uses the LZO data compression library for compression services.
+
+ see http://www.oberhumer.com/opensource/lzo/
+
+DIAGNOSTICS
+ Exit status is normally 0; if an error occurs, exit status is 1. If a
+ warning occurs, exit status is 2 (unless option --ignore-warn is in
+ effect).
+
+ lzop's diagnostics are intended to be self-explanatory.
+
+BUGS
+ No bugs are known. Please report all problems immediately to the author.
+
+AUTHOR
+ Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com>
+ 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 distributed under the terms of the GNU
+ General Public License (GPL).
+
+ 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.
+
diff --git a/doc/magic b/doc/magic
new file mode 100644
index 0000000..8ae8ae8
--- /dev/null
+++ b/doc/magic
@@ -0,0 +1,45 @@
+##
+## Magic data for file(1) command.
+## Add this to your /etc/magic or /usr/share/misc/magic files.
+##
+
+
+# lzop from Markus F.X.J. Oberhumer <markus@oberhumer.com>
+0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data
+>9 beshort <0x0940
+>>9 byte&0xf0 =0x00 - version 0.
+>>9 beshort&0x0fff x \b%03x,
+>>13 byte 1 LZO1X-1,
+>>13 byte 2 LZO1X-1(15),
+>>13 byte 3 LZO1X-999,
+## >>22 bedate >0 last modified: %s,
+>>14 byte =0x00 os: MS-DOS
+>>14 byte =0x01 os: Amiga
+>>14 byte =0x02 os: VMS
+>>14 byte =0x03 os: Unix
+>>14 byte =0x05 os: Atari
+>>14 byte =0x06 os: OS/2
+>>14 byte =0x07 os: MacOS
+>>14 byte =0x0A os: Tops/20
+>>14 byte =0x0B os: WinNT
+>>14 byte =0x0E os: Win32
+>9 beshort >0x0939
+>>9 byte&0xf0 =0x00 - version 0.
+>>9 byte&0xf0 =0x10 - version 1.
+>>9 byte&0xf0 =0x20 - version 2.
+>>9 beshort&0x0fff x \b%03x,
+>>15 byte 1 LZO1X-1,
+>>15 byte 2 LZO1X-1(15),
+>>15 byte 3 LZO1X-999,
+## >>25 bedate >0 last modified: %s,
+>>17 byte =0x00 os: MS-DOS
+>>17 byte =0x01 os: Amiga
+>>17 byte =0x02 os: VMS
+>>17 byte =0x03 os: Unix
+>>17 byte =0x05 os: Atari
+>>17 byte =0x06 os: OS/2
+>>17 byte =0x07 os: MacOS
+>>17 byte =0x0A os: Tops/20
+>>17 byte =0x0B os: WinNT
+>>17 byte =0x0E os: Win32
+
diff --git a/packaging/lzop.spec b/packaging/lzop.spec
new file mode 100644
index 0000000..40e3e82
--- /dev/null
+++ b/packaging/lzop.spec
@@ -0,0 +1,41 @@
+Name: lzop
+Version: 1.03
+Release: 1
+License: GPLv2+
+Summary: lzop
+URL: http://www.lzop.org
+Group: Applications/Text
+Source: %{name}-%{version}.tar.gz
+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
+%configure --disable-nls
+make PR_PROGRAM=%{_bindir}/pr
+
+%install
+%make_install
+
+%clean
+rm -rf %{buildroot}
+
+%docs_package
+
+%files
+%defattr(-,root,root,-)
+%doc NEWS README COPYING
+%{_bindir}/*
+%{_mandir}/*/*
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..051db8d
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,16 @@
+## 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
new file mode 100644
index 0000000..ebbd843
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,516 @@
+# 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
new file mode 100644
index 0000000..9a1a099
--- /dev/null
+++ b/src/c_ansic.c
@@ -0,0 +1,90 @@
+/* c_ansic.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_ANSI)
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static int cur_fg = -1;
+
+
+static int init(FILE *f, int o, int now)
+{
+ UNUSED(f);
+ UNUSED(now);
+ if (o == CON_INIT)
+ return CON_INIT; /* do not use by default */
+ if (o < CON_ANSI_COLOR)
+ return CON_INIT; /* do not use by default */
+ return CON_ANSI_COLOR;
+}
+
+
+static int set_fg(FILE *f, int fg)
+{
+ int last_fg = cur_fg;
+
+ if (fg < 0)
+ fputs("\033[0m",f);
+ else
+ {
+ /* try to map colors */
+ static const unsigned char ansi_fg[16] =
+ /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 */
+ { 0, 1, 2, 6, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 11, 15 };
+ int e = ansi_fg[fg & 0xf];
+ if (e < 8)
+ fprintf(f, "\033[0;%dm", 30 + (e & 7));
+ else
+ fprintf(f, "\033[0;1;%dm", 30 + (e & 7));
+ }
+
+ cur_fg = fg;
+ return last_fg;
+}
+
+
+console_t console_ansi_color =
+{
+ init,
+ set_fg,
+ 0,
+ 0
+};
+
+#endif /* USE_ANSI */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/c_ansim.c b/src/c_ansim.c
new file mode 100644
index 0000000..bec1409
--- /dev/null
+++ b/src/c_ansim.c
@@ -0,0 +1,78 @@
+/* c_ansim.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_ANSI)
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static int cur_fg = -1;
+
+
+static int init(FILE *f, int o, int now)
+{
+ UNUSED(f);
+ UNUSED(o);
+ UNUSED(now);
+ return CON_ANSI_MONO;
+}
+
+
+static int set_fg(FILE *f, int fg)
+{
+ int last_fg = cur_fg;
+
+ if (fg < 0)
+ fputs("\033[0m",f);
+ else
+ /* just treat any color as intense */
+ fputs("\033[0;1m",f);
+
+ cur_fg = fg;
+ return last_fg;
+}
+
+
+console_t console_ansi_mono =
+{
+ init,
+ set_fg,
+ 0,
+ 0
+};
+
+#endif /* USE_ANSI */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/c_init.c b/src/c_init.c
new file mode 100644
index 0000000..510d20e
--- /dev/null
+++ b/src/c_init.c
@@ -0,0 +1,169 @@
+/* c_init.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_CONSOLE)
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static console_t * const me = &console_init;
+console_t * con = &console_init;
+
+int con_mode = CON_INIT;
+
+
+static void try_init(console_t *c, FILE *f)
+{
+ int k;
+
+ assert(c);
+ assert(c->init);
+ k = c->init(f,opt_console,con_mode);
+ if (k == CON_INIT)
+ return;
+#if 0
+ if (con_mode != CON_INIT && opt_console != CON_INIT)
+ if (k != opt_console)
+ return;
+#endif
+ if (k > con_mode)
+ {
+ con_mode = k;
+ con = c;
+ con->init = 0;
+ if (!con->set_fg)
+ con->set_fg = console_none.set_fg;
+ if (!con->print0)
+ con->print0 = console_none.print0;
+ if (!con->intro)
+ con->intro = console_none.intro;
+ }
+}
+
+
+static int do_init(FILE *f)
+{
+ assert(con_mode == CON_INIT);
+
+ try_init(&console_none,f);
+ assert(con != me);
+ assert(con == &console_none);
+ assert(con_mode == CON_NONE);
+ if (opt_console == CON_NONE)
+ return con_mode;
+ if (!acc_isatty(STDIN_FILENO) || !acc_isatty(STDOUT_FILENO) || !acc_isatty(STDERR_FILENO))
+ return con_mode;
+
+#if defined(USE_ANSI)
+ try_init(&console_ansi_mono,f);
+ try_init(&console_ansi_color,f);
+#endif
+#if defined(USE_SCREEN)
+ try_init(&console_screen,f);
+#endif
+#if defined(USE_AALIB)
+ try_init(&console_aalib,f);
+#endif
+
+ return con_mode;
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static int init(FILE *f, int o, int now)
+{
+ if (con != me)
+ return con_mode;
+ assert(o == -1);
+ assert(now == -1);
+ UNUSED(o);
+ UNUSED(now);
+ return do_init(f);
+}
+
+
+static int set_fg(FILE *f, int fg)
+{
+ if (con == me)
+ init(f,-1,-1);
+ assert(con != me);
+ return con->set_fg(f,fg);
+}
+
+
+static lzo_bool intro(FILE *f)
+{
+ if (con == me)
+ init(f,-1,-1);
+ assert(con != me);
+ return con->intro(f);
+}
+
+
+console_t console_init =
+{
+ init,
+ set_fg,
+ 0,
+ intro
+};
+
+
+void con_fprintf(FILE *f, const char *format, ...)
+{
+ va_list args;
+ char s[80*25];
+
+ va_start(args,format);
+#if defined(HAVE_VSNPRINTF)
+ vsnprintf(s,sizeof(s),format,args);
+#else
+ vsprintf(s,format,args);
+#endif
+ s[sizeof(s)-1] = 0;
+ va_end(args);
+
+ if (con == me)
+ init(f,-1,-1);
+ assert(con != me);
+ con->print0(f,s);
+}
+
+#endif /* USE_CONSOLE */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/c_none.c b/src/c_none.c
new file mode 100644
index 0000000..6a19f2c
--- /dev/null
+++ b/src/c_none.c
@@ -0,0 +1,96 @@
+/* c_none.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_CONSOLE)
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static int init(FILE *f, int o, int now)
+{
+ UNUSED(f);
+ UNUSED(o);
+ UNUSED(now);
+ return CON_NONE;
+}
+
+
+static int set_fg(FILE *f, int fg)
+{
+ UNUSED(f);
+ UNUSED(fg);
+ return -1;
+}
+
+
+static void print0(FILE *f, const char *s)
+{
+#if 1
+ fputs(s,f);
+#else
+ /* filter out all ANSI sequences */
+ int c;
+ while ((c = *s++) != 0)
+ {
+ if (c == '\033' && *s == ']')
+ {
+ while (*s && *s != 'm')
+ s++;
+ }
+ else
+ fputc(c,f);
+ }
+#endif
+}
+
+
+static lzo_bool intro(FILE *f)
+{
+ UNUSED(f);
+ return 0;
+}
+
+
+console_t console_none =
+{
+ init,
+ set_fg,
+ print0,
+ intro
+};
+
+#endif /* USE_CONSOLE */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/c_screen.c b/src/c_screen.c
new file mode 100644
index 0000000..483531e
--- /dev/null
+++ b/src/c_screen.c
@@ -0,0 +1,213 @@
+/* c_screen.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_SCREEN)
+
+#include "screen.h"
+
+#define mask_fg 0x0f
+#define mask_bg 0xf0
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static screen_t *do_construct(screen_t *s, int fd)
+{
+ if (!s)
+ return NULL;
+ if (s->init(s,fd) != 0)
+ {
+ s->destroy(s);
+ return NULL;
+ }
+ return s;
+}
+
+
+static screen_t *screen = NULL;
+
+static void do_destroy(void)
+{
+ if (screen)
+ {
+ screen->destroy(screen);
+ screen = NULL;
+ }
+}
+
+
+static int mode = -1;
+static int init_fg = -1;
+static int init_bg = -1;
+static int cur_fg = -1;
+static int cur_bg = -1;
+
+
+static int init(FILE *f, int o, int now)
+{
+ int fd = fileno(f);
+
+ UNUSED(now);
+ assert(screen == NULL);
+ atexit(do_destroy);
+#if defined(__DJGPP__)
+ if (!screen)
+ screen = do_construct(screen_djgpp2_construct(),fd);
+#endif
+#if defined(USE_SCREEN_VCSA)
+ if (!screen)
+ screen = do_construct(screen_vcsa_construct(),fd);
+#endif
+#if defined(USE_SCREEN_CURSES)
+ if (!screen && o == CON_SCREEN)
+ screen = do_construct(screen_curses_construct(),fd);
+#endif
+ if (!screen)
+ return CON_INIT;
+ mode = screen->getMode(screen);
+ init_fg = cur_fg = screen->getFg(screen);
+ init_bg = cur_bg = screen->getBg(screen);
+ if (mode == 7)
+ cur_fg = -1;
+ if (screen->getCols(screen) < 80 || screen->getRows(screen) < 24)
+ return CON_INIT;
+ if (cur_fg == (cur_bg >> 4))
+ return CON_INIT;
+ if (cur_bg != BG_BLACK)
+ if (mode != 7)
+ {
+ /* return CON_ANSI_MONO; */ /* we could emulate ANSI mono */
+ return CON_INIT;
+ }
+
+ if (o == CON_SCREEN)
+ return CON_SCREEN;
+ if (o == CON_INIT) /* use by default */
+ return CON_SCREEN;
+ if (o == CON_ANSI_COLOR) /* can emulate ANSI color */
+ return CON_ANSI_COLOR;
+ if (o == CON_ANSI_MONO) /* can emulate ANSI mono */
+ return CON_ANSI_MONO;
+
+ return CON_INIT;
+}
+
+
+static int set_fg(FILE *f, int fg)
+{
+ const int last_fg = cur_fg;
+ int f1 = fg & mask_fg;
+ int f2 = init_fg & mask_fg;
+
+ UNUSED(f);
+ cur_fg = fg;
+ if (mode == 7)
+ {
+ const int b = (init_bg & mask_bg) >> 4;
+ if (fg == -1) /* restore startup fg */
+ f1 = f2;
+ else if (b == 0)
+ f1 = (f2 <= 8) ? 15 : 8;
+ else if (b <= 8)
+ f1 = (f2 == 0) ? 15 : 0;
+ else
+ f1 = (f2 == 0) ? 8 : 0;
+ }
+ else if (con_mode == CON_ANSI_MONO && f1 != f2)
+ {
+ f1 = f2 ^ 0x08;
+ }
+
+ screen->setFg(screen,f1 & mask_fg);
+ return last_fg;
+}
+
+
+static void print0(FILE *f, const char *s)
+{
+ int c_cx, c_cy;
+
+ UNUSED(f);
+ screen->getCursor(screen,&c_cx,&c_cy);
+ while (*s)
+ {
+ while (*s == '\n')
+ {
+ s++;
+ c_cy++;
+ c_cx = 0;
+ }
+ if (c_cy >= screen->getRows(screen))
+ {
+ c_cy -= screen->scrollUp(screen,c_cy-screen->getRows(screen)+1);
+ if (c_cy < 0)
+ c_cy = 0;
+ c_cx = 0;
+ }
+ if (*s)
+ {
+ screen->putChar(screen,*s,c_cx,c_cy);
+ s++;
+ c_cx++;
+ }
+ }
+ screen->setCursor(screen,c_cx,c_cy);
+ screen->refresh(screen);
+}
+
+
+static lzo_bool intro(FILE *f)
+{
+ UNUSED(f);
+#if defined(USE_FRAMES)
+ if (screen->intro)
+ return screen->intro(screen,screen_show_frames);
+#endif
+ return 0;
+}
+
+
+console_t console_screen =
+{
+ init,
+ set_fg,
+ print0,
+ intro
+};
+
+#endif /* USE_SCREEN */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/compress.c b/src/compress.c
new file mode 100644
index 0000000..eaa9407
--- /dev/null
+++ b/src/compress.c
@@ -0,0 +1,398 @@
+/* compress.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+int x_set_method(int m, int l)
+{
+ int r = -1;
+
+#if defined(WITH_LZO)
+ r = lzo_set_method(m,l);
+ if (r >= 0)
+ return r;
+#endif
+#if defined(WITH_NRV)
+ r = nrv_set_method(m,l);
+ if (r >= 0)
+ return r;
+#endif
+#if defined(WITH_ZLIB)
+ r = zlib_set_method(m,l);
+ if (r >= 0)
+ return r;
+#endif
+
+ UNUSED(r);
+ return -1;
+}
+
+
+int x_get_method(header_t *h)
+{
+ int r = -1;
+
+#if defined(WITH_LZO)
+ r = lzo_get_method(h);
+ if (r >= 0)
+ return r;
+#endif
+#if defined(WITH_NRV)
+ r = nrv_get_method(h);
+ if (r >= 0)
+ return r;
+#endif
+#if defined(WITH_ZLIB)
+ r = zlib_get_method(h);
+ if (r >= 0)
+ return 0;
+#endif
+
+ UNUSED(r);
+ return 14;
+}
+
+
+/*************************************************************************
+// memory setup
+**************************************************************************/
+
+lzo_bool x_enter(const header_t *h)
+{
+ if (h == NULL)
+ {
+ lzo_bool ok = 1;
+#if defined(WITH_LZO)
+ ok &= lzo_enter(NULL);
+#endif
+#if defined(WITH_NRV)
+ ok &= nrv_enter(NULL);
+#endif
+#if defined(WITH_ZLIB)
+ ok &= zlib_enter(NULL);
+#endif
+ return ok;
+ }
+
+ switch (h->method)
+ {
+#if defined(WITH_LZO)
+ case M_LZO1X_1:
+ case M_LZO1X_1_15:
+ case M_LZO1X_999:
+ return lzo_enter(h);
+#endif
+#if defined(WITH_NRV)
+ case M_NRV1A:
+ case M_NRV1B:
+ case M_NRV2A:
+ case M_NRV2B:
+ return nrv_enter(h);
+#endif
+#if defined(WITH_ZLIB)
+ case M_ZLIB:
+ return zlib_enter(h);
+#endif
+ }
+ return 0;
+}
+
+
+void x_leave(const header_t *h)
+{
+ if (h == NULL)
+ {
+#if defined(WITH_ZLIB)
+ zlib_leave(NULL);
+#endif
+#if defined(WITH_NRV)
+ nrv_leave(NULL);
+#endif
+#if defined(WITH_LZO)
+ lzo_leave(NULL);
+#endif
+ return;
+ }
+
+ switch (h->method)
+ {
+#if defined(WITH_LZO)
+ case M_LZO1X_1:
+ case M_LZO1X_1_15:
+ case M_LZO1X_999:
+ lzo_leave(h);
+ break;
+#endif
+#if defined(WITH_NRV)
+ case M_NRV1A:
+ case M_NRV1B:
+ case M_NRV2A:
+ case M_NRV2B:
+ nrv_leave(h);
+ break;
+#endif
+#if defined(WITH_ZLIB)
+ case M_ZLIB:
+ zlib_leave(h);
+ break;
+#endif
+ }
+}
+
+
+/*************************************************************************
+// compress a file
+**************************************************************************/
+
+lzo_bool x_compress(file_t *fip, file_t *fop, header_t *h)
+{
+ lzo_bool ok = 0;
+
+ init_compress_header(h,fip,fop);
+ switch (h->method)
+ {
+#if defined(WITH_LZO)
+ case M_LZO1X_1:
+ case M_LZO1X_1_15:
+ case M_LZO1X_999:
+ lzo_init_compress_header(h);
+ break;
+#endif
+#if defined(WITH_NRV)
+ case M_NRV1A:
+ case M_NRV1B:
+ case M_NRV2A:
+ case M_NRV2B:
+ nrv_init_compress_header(h);
+ break;
+#endif
+#if defined(WITH_ZLIB)
+ case M_ZLIB:
+ zlib_init_compress_header(h);
+ break;
+#endif
+ default:
+ fatal(fip,"Internal error");
+ break;
+ }
+
+ if (!x_enter(h))
+ e_memory();
+
+ if (opt_verbose > 1)
+ {
+ if (opt_unlink)
+ fprintf(con_term,"replacing %s with %s", fip->name, fop->name);
+ else
+ fprintf(con_term,"compressing %s into %s", fip->name, fop->name);
+ fflush(con_term);
+ set_err_nl(1);
+ }
+
+ write_header(fop,h);
+
+ fip->bytes_processed = fop->bytes_processed = 0;
+
+ switch (h->method)
+ {
+#if defined(WITH_LZO)
+ case M_LZO1X_1:
+ case M_LZO1X_1_15:
+ case M_LZO1X_999:
+ ok = lzo_compress(fip,fop,h);
+ break;
+#endif
+#if defined(WITH_NRV)
+ case M_NRV1A:
+ case M_NRV1B:
+ case M_NRV2A:
+ case M_NRV2B:
+ ok = nrv_compress(fip,fop,h);
+ break;
+#endif
+#if defined(WITH_ZLIB)
+ case M_ZLIB:
+ ok = zlib_compress(fip,fop,h);
+ break;
+#endif
+ default:
+ fatal(fip,"Internal error");
+ ok = 0;
+ break;
+ }
+
+ if (opt_cmd == CMD_COMPRESS && opt_verbose > 1)
+ {
+ fprintf(con_term, ok ? "\n" : " FAILED\n");
+ fflush(con_term);
+ }
+ set_err_nl(0);
+
+ x_leave(h);
+ return ok;
+}
+
+
+/*************************************************************************
+// decompress a file
+**************************************************************************/
+
+lzo_bool x_decompress(file_t *fip, file_t *fop,
+ const header_t *h, lzo_bool skip)
+{
+ lzo_bool ok = 0;
+
+ if (!x_enter(h))
+ e_memory();
+
+ if (skip)
+ {
+ assert(opt_cmd != CMD_TEST);
+ assert(fop->fd < 0);
+ if (opt_cmd == CMD_DECOMPRESS && opt_verbose > 0)
+ fprintf(con_term,"skipping %s [%s]", fip->name, fop->name);
+ fflush(con_term);
+ set_err_nl(1);
+ }
+ else if (opt_cmd == CMD_DECOMPRESS && opt_verbose > 1)
+ {
+ if (opt_unlink)
+ fprintf(con_term,"restoring %s into %s", fip->name, fop->name);
+ else
+ fprintf(con_term,"decompressing %s into %s", fip->name, fop->name);
+ fflush(con_term);
+ set_err_nl(1);
+ }
+ else if (opt_cmd == CMD_TEST && opt_verbose > 0)
+ {
+ /* note: gzip is quiet by default when testing, lzop is not */
+ if (opt_verbose > 2)
+ fprintf(con_term,"testing %s [%s]", fip->name, fop->name);
+ else
+ fprintf(con_term,"testing %s", fip->name);
+ fflush(con_term);
+ set_err_nl(1);
+ }
+
+ fip->bytes_processed = fop->bytes_processed = 0;
+
+ switch (h->method)
+ {
+#if defined(WITH_LZO)
+ case M_LZO1X_1:
+ case M_LZO1X_1_15:
+ case M_LZO1X_999:
+ ok = lzo_decompress(fip,fop,h,skip);
+ break;
+#endif
+#if defined(WITH_NRV)
+ case M_NRV1A:
+ case M_NRV1B:
+ case M_NRV2A:
+ case M_NRV2B:
+ ok = nrv_decompress(fip,fop,h,skip);
+ break;
+#endif
+#if defined(WITH_ZLIB)
+ case M_ZLIB:
+ ok = zlib_decompress(fip,fop,h,skip);
+ break;
+#endif
+ default:
+ fatal(fip,"Internal error");
+ ok = 0;
+ break;
+ }
+
+ if (skip && opt_cmd == CMD_DECOMPRESS && opt_verbose > 0)
+ {
+ fprintf(con_term, ok ? "\n" : " FAILED\n");
+ fflush(con_term);
+ }
+ else if (opt_cmd == CMD_DECOMPRESS && opt_verbose > 1)
+ {
+ fprintf(con_term, ok ? "\n" : " FAILED\n");
+ fflush(con_term);
+ }
+ else if (opt_cmd == CMD_TEST && opt_verbose > 0)
+ {
+ fprintf(con_term, ok ? " OK\n" : " FAILED\n");
+ fflush(con_term);
+ }
+ set_err_nl(0);
+
+ if (ok && opt_cmd == CMD_TEST)
+ do_test(h,fop->bytes_processed,fip->bytes_processed);
+ if (ok && opt_cmd == CMD_LIST)
+ do_list(h,fop->bytes_processed,fip->bytes_processed);
+ if (ok && opt_cmd == CMD_LS)
+ do_ls(h,fop->bytes_processed,fip->bytes_processed);
+ if (ok && opt_cmd == CMD_INFO)
+ do_info(h,fop->bytes_processed,fip->bytes_processed);
+
+ x_leave(h);
+ return ok;
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void x_filter(lzo_bytep p, lzo_uint l, const header_t *h)
+{
+ unsigned f = (unsigned) h->filter;
+ lzo_bool c = (opt_cmd == CMD_COMPRESS);
+
+ if (f == 0 || l <= 0)
+ return;
+ if (f == 1)
+ {
+ if (c) t_sub1(p,l); else t_add1(p,l);
+ }
+ else if (f <= 16)
+ {
+ if (c) t_sub(p,l,f); else t_add(p,l,f);
+ }
+ else
+ {
+ fatal(NULL,"Invalid filter");
+ }
+}
+
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/conf.h b/src/conf.h
new file mode 100644
index 0000000..6c7e36e
--- /dev/null
+++ b/src/conf.h
@@ -0,0 +1,753 @@
+/* conf.h --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#ifndef __LZOP_CONF_H
+#define __LZOP_CONF_H 1
+
+#if defined(LZOP_HAVE_CONFIG_H)
+# include <config.h>
+#endif
+#if !defined(PACKAGE)
+# define PACKAGE "lzop"
+#endif
+
+#define WITH_LZO 1
+#if defined(WITH_LZO)
+#if defined(HAVE_LZO_LZOCONF_H) && defined(HAVE_LZO_LZO1X_H)
+# include <lzo/lzoconf.h>
+# include <lzo/lzo1x.h>
+#elif defined(HAVE_LZOCONF_H) && defined(HAVE_LZO1X_H)
+# include <lzoconf.h>
+# include <lzo1x.h>
+#elif !defined(LZOP_HAVE_CONFIG_H)
+# include <lzo/lzoconf.h>
+# include <lzo/lzo1x.h>
+#else
+# include <lzoconf.h>
+# include <lzo1x.h>
+#endif
+#if !defined(LZO_VERSION)
+# error "you need the LZO library"
+#elif (LZO_VERSION < 0x1040)
+# error "please upgrade your LZO package"
+#endif
+#endif
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#if defined(LZOP_HAVE_CONFIG_H)
+# define ACC_CONFIG_NO_HEADER 1
+#endif
+#define ACC_WANT_ACC_INCD_H 1
+#define ACC_WANT_ACC_INCE_H 1
+#define ACC_WANT_ACC_LIB_H 1
+#include "miniacc.h"
+#undef ACC_WANT_ACC_INCD_H
+#undef ACC_WANT_ACC_INCE_H
+#undef ACC_WANT_ACC_LIB_H
+
+/* we _always_ compile lzop with assertions on */
+#undef NDEBUG
+#include <assert.h>
+
+#if defined(acc_int64l_t)
+# define lzop_long_t acc_int64l_t
+# define lzop_ulong_t acc_uint64l_t
+#else
+# define lzop_long_t long int
+# define lzop_ulong_t unsigned long int
+#endif
+
+#if (ACC_CC_MSC && (_MSC_VER >= 1400))
+ /* avoid warnings when using "deprecated" POSIX functions */
+# pragma warning(disable: 4996)
+#endif
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#if defined(ACC_OS_EMX)
+# define DOSISH 1
+# define F_OS (_osmode == 0 ? F_OS_FAT : F_OS_OS2)
+# define F_CS (_osmode == 0 ? F_CS_DOS : F_CS_NATIVE)
+#elif (ACC_OS_DOS16 || ACC_OS_DOS32)
+# define DOSISH 1
+# define F_OS F_OS_FAT
+# define F_CS F_CS_DOS
+#elif (ACC_OS_OS216 || ACC_OS_OS2)
+# define DOSISH 1
+# define F_OS F_OS_OS2
+#elif (ACC_OS_TOS)
+# define DOSISH 1
+# define F_OS F_OS_ATARI
+#elif (ACC_OS_WIN16)
+# define DOSISH 1
+# define F_OS F_OS_FAT
+# define F_CS F_CS_WIN16
+#elif (ACC_OS_WIN32 || ACC_OS_WIN64 || ACC_OS_CYGWIN)
+# define DOSISH 1
+# define F_OS F_OS_VFAT
+# define F_CS F_CS_WIN32
+#endif
+
+
+#if defined(DOSISH)
+# define OPT_NAME_DEFAULT 1
+# if !defined(DIR_SEP)
+# define DIR_SEP "/\\"
+# endif
+# if !defined(fn_tolower)
+# define fn_tolower(x) tolower(((unsigned char)(x)))
+# endif
+#endif
+
+#if defined(__BORLANDC__)
+# define SIGTYPEENTRY __cdecl
+# define MODE_T unsigned short
+#elif defined(__DMC__)
+# define SIGTYPEENTRY __cdecl
+#elif defined(_MSC_VER)
+# define SIGTYPEENTRY __cdecl
+# define MODE_T unsigned short
+#elif defined(__WATCOMC__)
+# define MODE_T unsigned short
+#endif
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#ifndef F_OS
+# define F_OS F_OS_UNIX
+#endif
+#ifndef F_CS
+# define F_CS F_CS_NATIVE
+#endif
+
+#ifndef DIR_SEP
+# define DIR_SEP "/"
+#endif
+
+#ifndef fn_tolower
+# define fn_tolower(x) (x)
+#endif
+
+#ifndef OPTIONS_VAR
+# define OPTIONS_VAR "LZOP"
+#endif
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#if defined(__DJGPP__)
+# define NO_SETMODE 1
+# if ((__DJGPP__ * 100 + __DJGPP_MINOR__) < 203)
+# error "need djgpp 2.03 or above"
+# endif
+# include <crt0.h>
+# include <dpmi.h>
+# include <sys/exceptn.h>
+# undef kbhit /* want to be able to call kbhit from libc */
+#endif
+
+#if defined(ACC_OS_TOS)
+# if defined(__MINT__)
+# elif (ACC_CC_PUREC || ACC_CC_TURBOC)
+# include <ext.h>
+# define O_EXCL_BROKEN 1
+# if !defined(S_IFMT)
+# if defined(S_IFREG) && defined(S_IFDIR) && defined(S_IFCHR)
+# define S_IFMT (S_IFREG | S_IFDIR | S_IFCHR)
+# endif
+# endif
+# else
+# error "FIXME"
+# endif
+#endif
+
+#define ADLER32_INIT_VALUE 1
+#define CRC32_INIT_VALUE 0
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#if !defined(PATH_MAX)
+# define PATH_MAX 512
+#elif (PATH_MAX < 512)
+# undef PATH_MAX
+# define PATH_MAX 512
+#endif
+
+
+#ifndef RETSIGTYPE
+# define RETSIGTYPE void
+#endif
+#ifndef SIGTYPEENTRY
+# define SIGTYPEENTRY /*empty*/
+#endif
+
+#if !defined(MODE_T)
+#if defined(SIZEOF_MODE_T) && (SIZEOF_MODE_T > 0)
+# define MODE_T mode_t
+#else
+# define MODE_T int
+#endif
+#endif
+
+
+#if defined(NO_MEMCMP)
+# undef HAVE_MEMCMP
+#endif
+#if !defined(HAVE_MEMCMP)
+# undef memcmp
+# define memcmp lzo_memcmp
+#endif
+#if !defined(HAVE_MEMCPY)
+# undef memcpy
+# define memcpy lzo_memcpy
+#endif
+#if !defined(HAVE_MEMSET)
+# undef memset
+# define memset lzo_memset
+#endif
+
+
+#if !defined(HAVE_STRCASECMP) && defined(HAVE_STRICMP)
+# define strcasecmp stricmp
+#endif
+#if !defined(HAVE_STRNCASECMP) && defined(HAVE_STRNICMP)
+# define strncasecmp strnicmp
+#endif
+
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO (fileno(stdin))
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO (fileno(stdout))
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO (fileno(stderr))
+#endif
+
+#if !defined(S_IFMT) && defined(_S_IFMT)
+# define S_IFMT _S_IFMT
+#endif
+#if !defined(S_IFREG) && defined(_S_IFREG)
+# define S_IFREG _S_IFREG
+#endif
+#if !defined(S_IFDIR) && defined(_S_IFDIR)
+# define S_IFDIR _S_IFDIR
+#endif
+#if !defined(S_IFCHR) && defined(_S_IFCHR)
+# define S_IFCHR _S_IFCHR
+#endif
+
+#if !defined(S_ISREG)
+# if defined(S_IFMT) && defined(S_IFREG)
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+# else
+# error "S_ISREG"
+# endif
+#endif
+#if !defined(S_ISDIR)
+# if defined(S_IFMT) && defined(S_IFDIR)
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# else
+# error "S_ISDIR"
+# endif
+#endif
+#if !defined(S_ISCHR)
+# if defined(S_IFMT) && defined(S_IFCHR)
+# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+# endif
+#endif
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#ifndef SUFFIX_MAX
+#define SUFFIX_MAX 32
+#endif
+
+#define STDIN_NAME "<stdin>"
+#define STDOUT_NAME "<stdout>"
+#define STDERR_NAME "<stderr>"
+#define UNKNOWN_NAME "<unknown>"
+
+
+#define ALIGN_DOWN(a,b) (((a) / (b)) * (b))
+#define ALIGN_UP(a,b) ALIGN_DOWN((a) + ((b) - 1), b)
+
+#undef UNUSED
+#define UNUSED(var) ACC_UNUSED(var)
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+/* exit codes of this program: 0 ok, 1 error, 2 warning */
+#define EXIT_OK 0
+#define EXIT_ERROR 1
+#define EXIT_WARN 2
+
+#define EXIT_USAGE 1
+#define EXIT_FILE_READ 1
+#define EXIT_FILE_WRITE 1
+#define EXIT_MEMORY 1
+#define EXIT_CHECKSUM 1
+#define EXIT_LZO_ERROR 1
+#define EXIT_LZO_INIT 1
+#define EXIT_INTERNAL 1
+
+
+/*************************************************************************
+// options
+**************************************************************************/
+
+enum {
+ CMD_NONE,
+ CMD_COMPRESS,
+ CMD_DECOMPRESS, CMD_TEST, CMD_LIST, CMD_LS, CMD_INFO,
+ CMD_SYSINFO, CMD_LICENSE, CMD_HELP, CMD_INTRO, CMD_VERSION
+};
+
+
+enum {
+ M_LZO1X_1 = 1,
+ M_LZO1X_1_15 = 2,
+ M_LZO1X_999 = 3,
+ M_NRV1A = 0x1a,
+ M_NRV1B = 0x1b,
+ M_NRV2A = 0x2a,
+ M_NRV2B = 0x2b,
+ M_NRV2D = 0x2d,
+ M_ZLIB = 128,
+
+ M_UNUSED
+};
+
+extern int opt_cmd;
+extern int opt_method;
+extern int opt_level;
+
+extern int opt_checksum;
+extern int opt_console;
+extern int opt_crc32;
+extern lzo_bool opt_decompress_safe;
+extern int opt_force;
+extern int opt_name;
+#define MAX_NUM_THREADS 64
+extern int opt_num_threads;
+extern const char *opt_output_name;
+extern lzo_bool opt_optimize;
+extern lzo_bool opt_path;
+extern lzo_bool opt_shortname;
+extern int opt_stdin;
+extern lzo_bool opt_stdout;
+extern char opt_suffix[1+SUFFIX_MAX+1];
+extern lzo_bool opt_unlink;
+extern int opt_verbose;
+
+#define OPT_STDIN_GUESSED 1
+#define OPT_STDIN_REQUESTED 2
+
+
+/*************************************************************************
+// input and output files
+**************************************************************************/
+
+typedef struct
+{
+ int fd;
+#if defined(USE_FOPEN)
+ FILE *file;
+#endif
+ int open_flags;
+ struct stat st;
+#if defined(HAVE_LSTAT)
+ struct stat lst;
+#endif
+ lzo_uint32 f_adler32;
+ lzo_uint32 f_crc32;
+
+ int opt_name;
+ unsigned long part;
+ lzop_ulong_t bytes_read;
+ lzop_ulong_t bytes_written;
+ lzo_bool warn_multipart;
+ lzo_bool warn_unknown_suffix;
+
+ lzop_ulong_t bytes_processed;
+
+#define FILE_T_NAME_LEN ( 2*((PATH_MAX)+1) + SUFFIX_MAX + 1 )
+ char name[ FILE_T_NAME_LEN ];
+}
+file_t;
+
+
+/*************************************************************************
+// lzop file header
+**************************************************************************/
+
+/* header flags */
+#define F_ADLER32_D 0x00000001L
+#define F_ADLER32_C 0x00000002L
+#define F_STDIN 0x00000004L
+#define F_STDOUT 0x00000008L
+#define F_NAME_DEFAULT 0x00000010L
+#define F_DOSISH 0x00000020L
+#define F_H_EXTRA_FIELD 0x00000040L
+#define F_H_GMTDIFF 0x00000080L
+#define F_CRC32_D 0x00000100L
+#define F_CRC32_C 0x00000200L
+#define F_MULTIPART 0x00000400L
+#define F_H_FILTER 0x00000800L
+#define F_H_CRC32 0x00001000L
+#define F_H_PATH 0x00002000L
+#define F_MASK 0x00003FFFL
+
+/* operating system & file system that created the file [mostly unused] */
+#define F_OS_FAT 0x00000000L /* DOS, OS2, Win95 */
+#define F_OS_AMIGA 0x01000000L
+#define F_OS_VMS 0x02000000L
+#define F_OS_UNIX 0x03000000L
+#define F_OS_VM_CMS 0x04000000L
+#define F_OS_ATARI 0x05000000L
+#define F_OS_OS2 0x06000000L /* OS2 */
+#define F_OS_MAC9 0x07000000L
+#define F_OS_Z_SYSTEM 0x08000000L
+#define F_OS_CPM 0x09000000L
+#define F_OS_TOPS20 0x0a000000L
+#define F_OS_NTFS 0x0b000000L /* Win NT/2000/XP */
+#define F_OS_QDOS 0x0c000000L
+#define F_OS_ACORN 0x0d000000L
+#define F_OS_VFAT 0x0e000000L /* Win32 */
+#define F_OS_MFS 0x0f000000L
+#define F_OS_BEOS 0x10000000L
+#define F_OS_TANDEM 0x11000000L
+#define F_OS_SHIFT 24
+#define F_OS_MASK 0xff000000L
+
+/* character set for file name encoding [mostly unused] */
+#define F_CS_NATIVE 0x00000000L
+#define F_CS_LATIN1 0x00100000L
+#define F_CS_DOS 0x00200000L
+#define F_CS_WIN32 0x00300000L
+#define F_CS_WIN16 0x00400000L
+#define F_CS_UTF8 0x00500000L /* filename is UTF-8 encoded */
+#define F_CS_SHIFT 20
+#define F_CS_MASK 0x00f00000L
+
+/* these bits must be zero */
+#define F_RESERVED ((F_MASK | F_OS_MASK | F_CS_MASK) ^ 0xffffffffL)
+
+typedef struct
+{
+ unsigned version;
+ unsigned lib_version;
+ unsigned version_needed_to_extract;
+ unsigned char method;
+ unsigned char level;
+ lzo_uint32 flags;
+ lzo_uint32 filter;
+ lzo_uint32 mode;
+ lzo_uint32 mtime_low;
+ lzo_uint32 mtime_high;
+ lzo_uint32 header_checksum;
+
+ lzo_uint32 extra_field_len;
+ lzo_uint32 extra_field_checksum;
+
+/* info */
+ const char *method_name;
+
+ char name[255+1];
+}
+header_t;
+
+
+/*************************************************************************
+// lzop.c
+**************************************************************************/
+
+void set_err_nl(lzo_bool x);
+void warn(file_t *ft, const char *m);
+void error(file_t *ft, const char *m);
+void fatal(file_t *ft, const char *m);
+void read_error(file_t *ft);
+void write_error(file_t *ft);
+void e_memory(void);
+
+lzo_int read_buf(file_t *ft, lzo_voidp buffer, lzo_int cnt);
+void write_buf(file_t *ft, const lzo_voidp buffer, lzo_int cnt);
+void read32(file_t *ft, lzo_uint32 *v);
+void write32(file_t *ft, lzo_uint32 v);
+
+void init_compress_header(header_t *h, const file_t *fip, const file_t *fop);
+void write_header(file_t *ft, const header_t *h);
+
+void do_test(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len);
+void do_test_total(void);
+void do_info(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len);
+void do_ls(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len);
+void do_list(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len);
+void do_list_total(void);
+
+
+/*************************************************************************
+// compress.c
+**************************************************************************/
+
+lzo_bool x_enter(const header_t *h);
+void x_leave(const header_t *h);
+
+lzo_bool x_compress(file_t *fip, file_t *fop, header_t *h);
+lzo_bool x_decompress(file_t *fip, file_t *fop, const header_t *h, lzo_bool skip);
+
+int x_get_method(header_t *h);
+int x_set_method(int m, int l);
+
+void x_filter(lzo_bytep p, lzo_uint l, const header_t *h);
+
+
+/*************************************************************************
+// p_lzo.c
+**************************************************************************/
+
+#if defined(WITH_LZO)
+
+lzo_bool lzo_enter(const header_t *h);
+void lzo_leave(const header_t *h);
+
+lzo_bool lzo_compress(file_t *fip, file_t *fop, const header_t *h);
+lzo_bool lzo_decompress(file_t *fip, file_t *fop, const header_t *h, lzo_bool skip);
+
+int lzo_get_method(header_t *h);
+int lzo_set_method(int m, int l);
+void lzo_init_compress_header(header_t *h);
+
+#endif
+
+
+/*************************************************************************
+// p_lzo_mt.c
+**************************************************************************/
+
+#if defined(WITH_LZO) && defined(WITH_THREADS)
+
+lzo_bool lzo_threaded_enter(const header_t *h);
+void lzo_threaded_leave(const header_t *h);
+
+lzo_bool lzo_threaded_compress(file_t *fip, file_t *fop, const header_t *h);
+lzo_bool lzo_threaded_decompress(file_t *fip, file_t *fop, const header_t *h, lzo_bool skip);
+
+#endif
+
+
+/*************************************************************************
+// filter.c
+**************************************************************************/
+
+void t_sub1(lzo_bytep p, lzo_uint l);
+void t_add1(lzo_bytep p, lzo_uint l);
+
+void t_sub(lzo_bytep p, lzo_uint l, int n);
+void t_add(lzo_bytep p, lzo_uint l, int n);
+
+void t_mtf(lzo_bytep p, lzo_uint l);
+void t_unmtf(lzo_bytep p, lzo_uint l);
+
+
+/*************************************************************************
+// mblock.c
+**************************************************************************/
+
+typedef struct
+{
+ /* public */
+ lzo_bytep mb_mem;
+ lzo_uint32 mb_size;
+ /* private */
+ 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);
+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
+**************************************************************************/
+
+enum {
+ SUFF_NONE,
+ SUFF_LZO,
+ SUFF_LZOP,
+ SUFF_NRV,
+ SUFF_TAR,
+ SUFF_TNV,
+ SUFF_TZO,
+ SUFF_USER
+};
+
+unsigned fn_baseindex(const char *name);
+const char *fn_basename(const char *name);
+void fn_addslash(char *n, lzo_bool slash);
+char *fn_strlwr(char *n);
+int fn_strcmp(const char *n1, const char *n2);
+lzo_bool fn_is_same_file(const char *n1, const char *n2);
+int fn_has_suffix(const char *name);
+int fn_cleanpath(const char *name, char *newname, size_t size, int flags);
+
+time_t fix_time(time_t t);
+time_t get_mtime(const header_t *h);
+#if defined(HAVE_LOCALTIME)
+void tm2str(char *s, size_t size, const struct tm *tmp);
+#endif
+void time2str(char *s, size_t size, const time_t *t);
+void time2ls(char *s, size_t size, const time_t *t);
+
+lzo_bool file_exists(const char *name);
+
+lzo_uint32 fix_mode_for_header(lzo_uint32 mode);
+MODE_T fix_mode_for_chmod(lzo_uint32 mode);
+MODE_T fix_mode_for_ls(lzo_uint32 mode);
+MODE_T fix_mode_for_open(MODE_T mode);
+
+void mode_string(MODE_T mode, char *str);
+char *maybe_rename_file(const char *original_name);
+
+
+/*************************************************************************
+// other globals
+**************************************************************************/
+
+extern const char *progname;
+extern MODE_T u_mask;
+extern time_t current_time;
+
+void sysinfo(void);
+void license(void);
+void head(void);
+void help(void);
+void usage(void);
+void version(void);
+
+void sysinfo_djgpp(void);
+
+
+/*************************************************************************
+// LZO section
+**************************************************************************/
+
+#if defined(WITH_LZO)
+
+#define USE_LZO1X_1 1
+#if 1
+# define USE_LZO1X_999 1
+#endif
+#if !defined(ACC_OS_DOS16)
+# 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 */
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#include "console.h"
+
+
+#endif /* already included */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/console.h b/src/console.h
new file mode 100644
index 0000000..d55a558
--- /dev/null
+++ b/src/console.h
@@ -0,0 +1,197 @@
+/* console.h --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#undef USE_CONSOLE
+#undef USE_ANSI
+#undef USE_SCREEN
+#undef USE_SCREEN_VCSA
+#undef USE_SCREEN_CURSES
+#undef USE_FRAMES
+
+
+#if 1 && defined(LZOP_ENABLE_ANSI) && !defined(DOSISH)
+# define USE_ANSI 1
+#endif
+
+#if 1 && defined(__linux__) && defined(LZOP_ENABLE_LINUX_CONSOLE)
+# define USE_SCREEN 1
+# define USE_SCREEN_VCSA 1
+# if !defined(HAVE_LINUX_KD_H)
+# undef USE_SCREEN
+# undef USE_SCREEN_VCSA
+# endif
+# if !defined(HAVE_LINUX_KDEV_T_H) || !defined(HAVE_LINUX_MAJOR_H)
+# undef USE_SCREEN
+# undef USE_SCREEN_VCSA
+# endif
+#endif
+
+#if 0 && defined(HAVE_NCURSES_H) && defined(HAVE_LIBNCURSES)
+# define USE_SCREEN 1
+# define USE_SCREEN_CURSES 1
+#endif
+
+#if 0 && defined(__DJGPP__)
+# define USE_SCREEN 1
+#endif
+
+#if 1 && defined(USE_SCREEN)
+# define USE_FRAMES 1
+#endif
+
+
+#if 0 || defined(NO_ANSI)
+# undef USE_ANSI
+#endif
+#if 0 || defined(NO_SCREEN)
+# undef USE_SCREEN
+#endif
+#if 0 || defined(NO_FRAMES) || !defined(USE_SCREEN)
+# undef USE_FRAMES
+#endif
+#if !defined(WITH_LZO)
+# undef USE_FRAMES
+#endif
+
+
+#if 0 || defined(USE_ANSI) || defined(USE_SCREEN)
+# define USE_CONSOLE 1
+#endif
+
+#if 0 || defined(NO_CONSOLE) || !defined(USE_CONSOLE)
+# undef USE_CONSOLE
+# undef USE_ANSI
+# undef USE_SCREEN
+# undef USE_SCREEN_VCSA
+# undef USE_SCREEN_CURSES
+# undef USE_FRAMES
+#endif
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+enum {
+ CON_INIT,
+ CON_NONE,
+ CON_ANSI_MONO,
+ CON_ANSI_COLOR,
+ CON_SCREEN,
+ CON_UNUSED
+};
+
+
+#if defined(USE_CONSOLE)
+
+typedef struct
+{
+ int (*init)(FILE *f, int, int);
+ int (*set_fg)(FILE *f, int fg);
+ void (*print0)(FILE *f, const char *s);
+ lzo_bool (*intro)(FILE *f);
+}
+console_t;
+
+
+#if defined(__GNUC__)
+void con_fprintf(FILE *f, const char *format, ...)
+ __attribute__((format(printf,2,3)));
+#else
+void con_fprintf(FILE *f, const char *format, ...);
+#endif
+
+
+#define FG_BLACK 0x00
+#define FG_BLUE 0x01
+#define FG_GREEN 0x02
+#define FG_CYAN 0x03
+#define FG_RED 0x04
+#define FG_VIOLET 0x05
+#define FG_ORANGE 0x06
+#define FG_LTGRAY 0x07
+#define FG_DKGRAY 0x08
+#define FG_BRTBLUE 0x09
+#define FG_BRTGREEN 0x0a
+#define FG_BRTCYAN 0x0b
+#define FG_BRTRED 0x0c
+#define FG_BRTVIOLET 0x0d
+#define FG_YELLOW 0x0e
+#define FG_WHITE 0x0f
+
+#define BG_BLACK 0x00
+#define BG_BLUE 0x10
+#define BG_GREEN 0x20
+#define BG_CYAN 0x30
+#define BG_RED 0x40
+#define BG_VIOLET 0x50
+#define BG_ORANGE 0x60
+#define BG_WHITE 0x70
+
+#endif /* USE_CONSOLE */
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+extern FILE *con_term;
+
+#if defined(USE_CONSOLE)
+
+extern int con_mode;
+extern console_t *con;
+
+extern console_t console_init;
+extern console_t console_none;
+extern console_t console_ansi_mono;
+extern console_t console_ansi_color;
+extern console_t console_screen;
+
+
+#define con_fg(f,x) con->set_fg(f,x)
+#define con_intro(f) con->intro(f)
+
+#else
+
+#define con_fg(f,x) 0
+#define con_fprintf fprintf
+#define con_intro(f) 0
+
+#endif /* USE_CONSOLE */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/djgpp2.c b/src/djgpp2.c
new file mode 100644
index 0000000..22dd993
--- /dev/null
+++ b/src/djgpp2.c
@@ -0,0 +1,181 @@
+/* djgpp2.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(__DJGPP__)
+
+#include <dpmi.h>
+#include <go32.h>
+
+
+/*************************************************************************
+// init
+**************************************************************************/
+
+/* Minimum stack */
+unsigned _stklen = 65536;
+
+
+/* This is called before 'main'. */
+static void __attribute__((__constructor__))
+djgpp_startup (void)
+{
+ const char *s;
+ static char lfn_y[] = "LFN=y";
+ static char lfn_n[] = "LFN=n";
+
+ s = getenv("LZOP_LFN");
+ if (s == NULL || (s[0] != 'n' && s[0] != 'N'))
+ putenv(lfn_y);
+ else
+ {
+ putenv(lfn_n);
+ _crt0_startup_flags |= _CRT0_FLAG_NO_LFN;
+ }
+
+ _djstat_flags |= _STAT_INODE;
+ _djstat_flags |= _STAT_EXEC_EXT;
+ _djstat_flags |= _STAT_EXEC_MAGIC;
+ _djstat_flags |= _STAT_DIRSIZE;
+ _djstat_flags |= _STAT_ROOT_TIME;
+}
+
+
+/* No need for loading the environment. */
+void __crt0_load_environment_file(char *app_name) { UNUSED(app_name); }
+
+
+/* No need for this function */
+int _is_executable(const char *filename, int fhandle, const char *extension)
+{
+ UNUSED(filename);
+ UNUSED(fhandle);
+ UNUSED(extension);
+ return 0;
+}
+
+
+/*************************************************************************
+// info
+**************************************************************************/
+
+#if 0
+
+typedef struct {
+ unsigned long largest_available_free_block_in_bytes;
+ unsigned long maximum_unlocked_page_allocation_in_pages;
+ unsigned long maximum_locked_page_allocation_in_pages;
+ unsigned long linear_address_space_size_in_pages;
+ unsigned long total_number_of_unlocked_pages;
+ unsigned long total_number_of_free_pages;
+ unsigned long total_number_of_physical_pages;
+ unsigned long free_linear_address_space_in_pages;
+ unsigned long size_of_paging_file_partition_in_pages;
+ unsigned long reserved[3];
+} __dpmi_free_mem_info;
+
+typedef struct {
+ unsigned long available_memory;
+ unsigned long available_pages;
+ unsigned long available_lockable_pages;
+ unsigned long linear_space;
+ unsigned long unlocked_pages;
+ unsigned long available_physical_pages;
+ unsigned long total_physical_pages;
+ unsigned long free_linear_space;
+ unsigned long max_pages_in_paging_file;
+ unsigned long reserved[3];
+} _go32_dpmi_meminfo;
+
+#endif
+
+static void meminfo(void)
+{
+ __dpmi_free_mem_info info;
+ const unsigned long err = (unsigned long) -1;
+ unsigned long ps = 0;
+ unsigned long k;
+
+ if (__dpmi_get_page_size(&ps) != 0 || ps <= 0)
+ return;
+ if (__dpmi_get_free_memory_information(&info) != 0)
+ return;
+
+#if 0
+ k = info.largest_available_free_block_in_bytes;
+ if (k == err)
+ {
+ k = info.maximum_unlocked_page_allocation_in_pages;
+ if (k != err)
+ k *= ps;
+ else
+ k = info.largest_available_free_block_in_bytes;
+ }
+#endif
+
+#if 0
+ k = info.total_number_of_physical_pages;
+ k = info.total_number_of_unlocked_pages;
+#endif
+ k = info.total_number_of_free_pages;
+ if (k != err)
+ {
+ k = (k * ps) / 1024;
+ con_fprintf(con_term,"DPMI physical memory available: %6ld kB\n",k);
+ }
+
+ k = info.maximum_unlocked_page_allocation_in_pages;
+ if (k != err)
+ {
+ k = (k * ps) / 1024;
+ con_fprintf(con_term,"DPMI virtual memory available: %6ld kB\n",k);
+ }
+ con_fprintf(con_term,"\n");
+}
+
+
+void sysinfo_djgpp(void)
+{
+ meminfo();
+
+ if (_USE_LFN)
+ con_fprintf(con_term,"Long filenames are supported.\n");
+ else
+ con_fprintf(con_term,"Long filenames are not supported.\n");
+ con_fprintf(con_term,"\n");
+}
+
+
+#endif /* __DJGPP__ */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/filter.c b/src/filter.c
new file mode 100644
index 0000000..e2023b4
--- /dev/null
+++ b/src/filter.c
@@ -0,0 +1,167 @@
+/* filter.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if (ACC_CC_MSC && (_MSC_VER >= 1000))
+ /* avoid '-W4' warnings */
+# pragma warning(disable: 4244)
+#endif
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void t_sub1(lzo_bytep p, lzo_uint l)
+{
+ unsigned char b = 0;
+
+ if (l > 0) do {
+ *p -= b;
+ b += *p++;
+ } while (--l > 0);
+}
+
+
+void t_add1(lzo_bytep p, lzo_uint l)
+{
+ unsigned char b = 0;
+
+ if (l > 0) do {
+ b += *p;
+ *p++ = b;
+ } while (--l > 0);
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void t_sub(lzo_bytep p, lzo_uint l, int n)
+{
+ unsigned char b[16];
+ int i;
+
+ assert(n > 0 && n <= (int)sizeof(b));
+ if (l <= (lzo_uint)n)
+ return;
+
+ n--;
+ i = n; do b[i] = 0; while (--i >= 0);
+
+ i = n;
+ do {
+ *p -= b[i];
+ b[i] += *p++;
+ if (--i < 0)
+ i = n;
+ } while (--l > 0);
+}
+
+
+void t_add(lzo_bytep p, lzo_uint l, int n)
+{
+ unsigned char b[16];
+ int i;
+
+ assert(n > 0 && n <= (int)sizeof(b));
+ if (l <= (lzo_uint)n)
+ return;
+
+ n--;
+ i = n; do b[i] = 0; while (--i >= 0);
+
+ i = n;
+ do {
+ b[i] += *p;
+ *p++ = b[i];
+ if (--i < 0)
+ i = n;
+ } while (--l > 0);
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void t_mtf(lzo_bytep p, lzo_uint l)
+{
+ unsigned char b[256];
+ unsigned char c;
+ unsigned i;
+
+ if (l <= 1)
+ return;
+
+ i = 256; do { --i; b[i] = (unsigned char) i; } while (i != 0);
+
+ do {
+ c = *p;
+ for (i = 0; c != b[i]; )
+ i++;
+ *p++ = (unsigned char) i;
+ if (i > 0)
+ {
+ do b[i] = b[i-1]; while (--i > 0);
+ b[0] = c;
+ }
+ } while (--l > 0);
+}
+
+
+void t_unmtf(lzo_bytep p, lzo_uint l)
+{
+ unsigned char b[256];
+ unsigned char c;
+ unsigned i;
+
+ if (l <= 1)
+ return;
+
+ i = 256; do { --i; b[i] = (unsigned char) i; } while (i != 0);
+
+ do {
+ i = *p;
+ c = b[i];
+ *p++ = c;
+ if (i > 0)
+ {
+ do b[i] = b[i-1]; while (--i > 0);
+ b[0] = c;
+ }
+ } while (--l > 0);
+}
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/frames.c b/src/frames.c
new file mode 100644
index 0000000..4a065b3
--- /dev/null
+++ b/src/frames.c
@@ -0,0 +1,247 @@
+/* frames.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_FRAMES)
+
+#include "screen.h"
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static void recolor_line(screen_t *screen, int frame, int line,
+ lzo_bytep f, int len, int cy, int col)
+{
+ unsigned char colmap[4];
+ int k;
+
+ UNUSED(screen);
+ UNUSED(frame);
+ UNUSED(line);
+ UNUSED(f);
+ UNUSED(len);
+ UNUSED(cy);
+
+ colmap[0] = 0; /* black background */
+ if (col <= 0x333)
+ {
+ /* palette */
+ static const unsigned char pal[4] = { 0x2, 0x3, 0x5, 0x5 };
+ colmap[1] = pal[ (col >> 8) & 3 ];
+ colmap[2] = pal[ (col >> 4) & 3 ];
+ colmap[3] = pal[ (col >> 0) & 3 ];
+ }
+ else
+ {
+ /* direct colors */
+ colmap[1] = (col >> 16) & 0x07;
+ colmap[2] = (col >> 8) & 0x07;
+ colmap[3] = (col >> 0) & 0x07;
+ }
+
+#if 0
+ for (k = 0; k < len; k += 2)
+ if (f[k+1] != 0)
+ {
+ if (f[k] != ' ')
+ f[k] = '.';
+ f[k+1] = 0x10;
+ }
+ else
+ assert(f[k] == ' ');
+#endif
+
+#if 1
+ for (k = 0; k < len; k += 2)
+ {
+ lzo_bytep p = &f[k+1];
+ if (*p != 0)
+ *p = (colmap[ (*p >> 4) & 3 ] << 4) | colmap[ *p & 3 ];
+ }
+#endif
+
+#if 0
+ f[0*2+0] = f[77*2+0] = line / 10 + '0';
+ f[0*2+1] = f[77*2+1] = 0x07;
+ f[1*2+0] = f[78*2+0] = line % 10 + '0';
+ f[1*2+1] = f[78*2+1] = 0x07;
+#if 1
+ if (line == 18 - 1)
+ {
+ char s[2*80+1];
+ int y = cy - 4;
+
+ sprintf(s," %2d: %2d %2d ", frame, 0, 0);
+ screen->putStringAttr(screen,s,0x70,33,y+1);
+ for (k = 0; k < 79; k++)
+ {
+ screen->putCharAttr(screen,k%10+'0',k%10==0?0x06:0x07,k,y+3);
+ screen->putCharAttr(screen,k%10+'0',k%10==0?0x06:0x07,k,y+3+18+1);
+ }
+#if 1
+ usleep(200*1000);
+#else
+ while (!screen->kbhit(screen))
+ ;
+ while (screen->kbhit(screen))
+ if (getch() == 27)
+ exit(0);
+#endif
+ }
+#endif
+#endif
+}
+
+
+static int random_color(void)
+{
+ static const short c[6] = { 0x012, 0x021, 0x102, 0x120, 0x201, 0x210 };
+ int t;
+ lzo_uint32 seed;
+
+ seed = time(NULL);
+#if 0
+ seed = seed * 69069L + 5;
+ t = (int)(seed >> 16) % 50;
+#else
+ seed = seed * 0x015a4e35L + 1;
+ t = (int)(seed >> 16) % 50;
+#endif
+ return (t < 6 ? c[t] : 0x333);
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#include "frames.h"
+
+void screen_show_frames(screen_t *screen)
+{
+ int i, j, k;
+ lzo_uint out_len = UNCOMPRESSED_SIZE;
+ lzo_bytep frames = NULL;
+ lzo_bytep frames_mem = NULL;
+ int c_cx, c_cy;
+ const int len = 79 * 2; /* size of one line */
+ const int nframes = 19; /* number of frames */
+ const int lines = 18; /* intro */
+ const int total_lines = 24; /* head + help */
+ lzo_bool hit = 0;
+ int col;
+ lzo_uint32 c;
+
+ assert(acc_isatty(STDIN_FILENO));
+ assert(out_len == (lzo_uint) (lines * len * nframes));
+
+#if 0
+ c = lzo_adler32(ADLER32_INIT_VALUE,compressed_frames,COMPRESSED_SIZE);
+ if (c != COMPRESSED_ADLER32)
+ exit(EXIT_ERROR);
+#endif
+
+ frames = frames_mem = (lzo_bytep) malloc(UNCOMPRESSED_SIZE + 3);
+ if (frames == NULL)
+ return;
+
+ if ((lzo1x_decompress_safe(compressed_frames,COMPRESSED_SIZE,
+ frames,&out_len,NULL) != LZO_E_OK)
+ || (out_len != UNCOMPRESSED_SIZE))
+ exit(EXIT_ERROR);
+#if 0
+ c = lzo_adler32(ADLER32_INIT_VALUE,frames,UNCOMPRESSED_SIZE);
+ if (c != UNCOMPRESSED_ADLER32)
+ exit(EXIT_ERROR);
+#endif
+
+ screen->getCursor(screen,&c_cx,&c_cy);
+ c_cy += total_lines;
+ if (c_cy >= screen->getRows(screen))
+ c_cy -= screen->scrollUp(screen,c_cy-screen->getRows(screen)+1);
+ c_cy -= total_lines;
+ if (c_cy < 0)
+ c_cy = 0;
+ c_cx = 0;
+ screen->setCursor(screen,c_cx,c_cy);
+#if 1
+ for (k = 0; k < 4; k++)
+ screen->clearLine(screen,c_cy+k);
+#endif
+ head();
+ screen->getCursor(screen,&c_cx,&c_cy);
+#if 1
+ for (k = 0; k < lines; k++)
+ screen->clearLine(screen,c_cy+k);
+#endif
+ screen->refresh(screen);
+
+ col = random_color();
+ for (i = 0; i < nframes && !hit; i++)
+ {
+ for (j = 0; j < lines; j++)
+ {
+ recolor_line(screen,i,j,frames,len,c_cy,col);
+ screen->updateLineN(screen,frames,c_cy+j,len);
+ frames += len;
+ }
+ screen->refresh(screen);
+
+ if (i == 0)
+ {
+ for (j = 0; !(hit = screen->kbhit(screen)) && j < 10; j++)
+ usleep(120*1000);
+ }
+ else
+ {
+ if (!(hit = screen->kbhit(screen)))
+ usleep(60*1000);
+ }
+ }
+
+ free(frames_mem);
+
+ for (k = 0; k < lines; k++)
+ screen->clearLine(screen,c_cy+k);
+ screen->refresh(screen);
+ help();
+
+ UNUSED(c);
+}
+
+
+#endif /* USE_FRAMES */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/frames.h b/src/frames.h
new file mode 100644
index 0000000..0069ffe
--- /dev/null
+++ b/src/frames.h
@@ -0,0 +1,330 @@
+/* frames.h --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#define UNCOMPRESSED_SIZE 54036u
+#define COMPRESSED_SIZE 3522u
+
+#define UNCOMPRESSED_ADLER32 0x3fe9a878L
+#define COMPRESSED_ADLER32 0x367c5616L
+
+static const unsigned char compressed_frames[3522] = {
+0x13, 0x20, 0x00, 0x20, 0x00, 0x2c, 0x06, 0x00, 0xb2, 0x10, 0x20, 0x24,
+0x15, 0x01, 0x20, 0xa4, 0x00, 0x39, 0x85, 0x00, 0x30, 0x2e, 0x04, 0x00,
+0x34, 0x9e, 0x00, 0xb1, 0x10, 0x05, 0x00, 0xb0, 0x85, 0x00, 0x20, 0x45,
+0x00, 0xb0, 0x3b, 0x76, 0x02, 0xb0, 0x20, 0x61, 0x00, 0xb0, 0x27, 0x05,
+0x00, 0xb1, 0x85, 0x00, 0xb0, 0x29, 0x04, 0x00, 0x2c, 0x02, 0x00, 0xb0,
+0x20, 0x2e, 0x4f, 0x02, 0xb1, 0x30, 0xb0, 0x0c, 0x21, 0x35, 0x05, 0x00,
+0xb0, 0x54, 0x03, 0x2f, 0x95, 0x02, 0x10, 0x2a, 0x04, 0x00, 0x3c, 0x75,
+0x02, 0x20, 0x20, 0x0e, 0x00, 0x00, 0x2a, 0xf5, 0x04, 0xb2, 0x37, 0x54,
+0x02, 0x2e, 0x04, 0x00, 0x2b, 0x84, 0x02, 0x20, 0x0a, 0x75, 0x02, 0xb0,
+0x2d, 0x64, 0x04, 0x34, 0xc4, 0x04, 0x32, 0xdd, 0x04, 0xb1, 0x39, 0x8c,
+0x04, 0x7c, 0x3a, 0x2c, 0x4c, 0x05, 0x29, 0x74, 0x00, 0x2b, 0x76, 0x02,
+0xb1, 0x10, 0x3c, 0x3c, 0x09, 0x74, 0x0e, 0x34, 0x3d, 0x09, 0xb2, 0x4c,
+0x3c, 0x28, 0x02, 0x00, 0xb1, 0x20, 0x2c, 0x44, 0x07, 0x35, 0x65, 0x04,
+0x00, 0x36, 0x04, 0x03, 0x34, 0x74, 0x02, 0x3e, 0x54, 0x0c, 0x3a, 0xa5,
+0x0b, 0xb0, 0x35, 0xb4, 0x09, 0x44, 0x03, 0x29, 0xdc, 0x04, 0x3a, 0x75,
+0x01, 0xb1, 0x30, 0x9c, 0x00, 0x20, 0x0c, 0x74, 0x02, 0x37, 0x5c, 0x01,
+0x35, 0xd4, 0x04, 0xc4, 0x00, 0x20, 0x02, 0xe4, 0x04, 0x35, 0xa4, 0x00,
+0x20, 0x20, 0x75, 0x02, 0xb2, 0x27, 0xe6, 0x09, 0xb1, 0x20, 0x20, 0x06,
+0xcc, 0x01, 0x20, 0x16, 0x74, 0x02, 0x20, 0x11, 0x64, 0x02, 0x34, 0x84,
+0x0e, 0x36, 0xcd, 0x01, 0xb0, 0x20, 0x48, 0x75, 0x02, 0xb2, 0x2b, 0xb4,
+0x0e, 0x36, 0x6c, 0x02, 0x9d, 0x02, 0x30, 0x20, 0x05, 0xf4, 0x04, 0x31,
+0xf4, 0x0c, 0x20, 0x14, 0x75, 0x02, 0xb2, 0x2d, 0x1c, 0x11, 0x30, 0x6d,
+0x02, 0xb2, 0x9c, 0xb4, 0xac, 0x03, 0x2b, 0x34, 0x0e, 0x32, 0xcc, 0x15,
+0xc5, 0xb5, 0x20, 0x3b, 0x54, 0x0c, 0x34, 0xb5, 0x13, 0xb2, 0x54, 0x51,
+0x7c, 0xc9, 0xed, 0x52, 0xb2, 0x33, 0x84, 0x13, 0x28, 0xed, 0x18, 0xb1,
+0x2e, 0x7c, 0x00, 0x2b, 0xd4, 0x0e, 0x28, 0xce, 0x13, 0xb1, 0x30, 0xa4,
+0x9d, 0x30, 0xfd, 0x18, 0xb0, 0x33, 0x46, 0x11, 0xb0, 0x10, 0x28, 0x5c,
+0x1b, 0x28, 0x74, 0x1b, 0x2c, 0xc5, 0x0c, 0xb1, 0x20, 0x16, 0xbd, 0x18,
+0xb0, 0x20, 0x08, 0xad, 0x18, 0xb0, 0x37, 0xac, 0x18, 0x3a, 0x04, 0x00,
+0x4c, 0x28, 0x20, 0x0f, 0x28, 0x1b, 0x2b, 0xed, 0x13, 0xb1, 0x20, 0x04,
+0x64, 0x02, 0x2d, 0xd5, 0x07, 0x10, 0x2e, 0x2c, 0x1b, 0x34, 0x04, 0x00,
+0x74, 0xc8, 0x75, 0x36, 0xb2, 0x20, 0x02, 0x04, 0x00, 0x28, 0x85, 0x07,
+0xb2, 0x31, 0x1c, 0x20, 0x65, 0x39, 0xb0, 0x27, 0x34, 0x07, 0xad, 0x01,
+0xb1, 0x35, 0x34, 0x0a, 0x20, 0x00, 0x00, 0x65, 0x04, 0x00, 0xa4, 0x9b,
+0x3a, 0xac, 0x1d, 0x3c, 0x4c, 0x2e, 0x2a, 0x4d, 0x0c, 0xb0, 0x84, 0x68,
+0x34, 0xcd, 0x2e, 0xb1, 0x2f, 0x04, 0x00, 0x38, 0x44, 0x0c, 0x2e, 0x5c,
+0x13, 0x20, 0x05, 0x54, 0x1d, 0x28, 0x0c, 0x16, 0x38, 0x01, 0x00, 0xb1,
+0x2d, 0x05, 0x2a, 0xb0, 0x3d, 0x36, 0x11, 0xb1, 0x30, 0x32, 0x74, 0x02,
+0x20, 0x07, 0x34, 0x1b, 0x20, 0x0d, 0x25, 0x16, 0xb1, 0x2b, 0xdd, 0x2e,
+0xb0, 0x2d, 0x24, 0x02, 0x28, 0x05, 0x00, 0x20, 0x2d, 0x9c, 0x1b, 0x3a,
+0x64, 0x31, 0x20, 0x05, 0xec, 0x04, 0x2a, 0xdd, 0x1a, 0xb1, 0x33, 0xbc,
+0x33, 0x36, 0x4d, 0x31, 0xb1, 0x3f, 0x8e, 0x1d, 0xb1, 0x30, 0x20, 0x17,
+0xdd, 0x33, 0xb1, 0x35, 0x34, 0x09, 0x2c, 0xec, 0x02, 0x2e, 0x9d, 0x27,
+0xb0, 0x3b, 0x6c, 0x02, 0x3d, 0x74, 0x2f, 0x20, 0x2e, 0x74, 0x2c, 0x30,
+0x7c, 0x18, 0x20, 0x05, 0x74, 0x27, 0x32, 0x9e, 0x00, 0xb2, 0x10, 0x20,
+0x1d, 0xfc, 0x29, 0x20, 0x01, 0xdd, 0x2e, 0xb2, 0x20, 0x08, 0xed, 0x29,
+0xb0, 0x2f, 0xf4, 0x04, 0x20, 0x1f, 0x74, 0x02, 0x28, 0xbe, 0x24, 0xb0,
+0x20, 0x20, 0x0e, 0xcc, 0x06, 0x39, 0x75, 0x02, 0xb1, 0x33, 0x75, 0x02,
+0xb1, 0x20, 0x18, 0x74, 0x2c, 0x37, 0x4c, 0x31, 0x3f, 0x4c, 0x0c, 0x3a,
+0x75, 0x02, 0xb1, 0x20, 0x16, 0x75, 0x02, 0xb1, 0x3f, 0xdd, 0x2e, 0xb2,
+0xf4, 0x79, 0x2b, 0x6c, 0x27, 0x38, 0xe4, 0x15, 0x32, 0x3d, 0x3b, 0xb0,
+0x20, 0x04, 0x4c, 0x0c, 0x2c, 0x0d, 0x19, 0xb1, 0x31, 0x04, 0x11, 0x2a,
+0x74, 0x25, 0x2a, 0x7c, 0x00, 0x75, 0x13, 0xb2, 0x39, 0xc4, 0x44, 0x30,
+0x24, 0x40, 0x2a, 0x7c, 0x0a, 0x2e, 0x74, 0x02, 0x7d, 0x10, 0xb1, 0x2b,
+0x8c, 0x2c, 0x2c, 0x5d, 0x05, 0xb2, 0x3b, 0x74, 0x18, 0x36, 0x6c, 0x2c,
+0x20, 0x09, 0x14, 0x45, 0x20, 0x1b, 0x6d, 0x2c, 0xb0, 0x20, 0x00, 0x00,
+0x00, 0x73, 0x6c, 0x2c, 0x20, 0x83, 0xe4, 0x2e, 0x3c, 0xed, 0x2e, 0xb1,
+0x29, 0xec, 0x2e, 0xe4, 0x72, 0x2c, 0xb4, 0x0e, 0x26, 0xb4, 0x27, 0x32,
+0x94, 0x54, 0x2a, 0xcc, 0x0e, 0x2a, 0xb4, 0x0e, 0x3a, 0xbe, 0x0e, 0xb1,
+0x10, 0x20, 0x07, 0x15, 0x25, 0xb1, 0x20, 0x1a, 0x54, 0x5b, 0x20, 0x01,
+0xdc, 0x2e, 0x34, 0x8d, 0x02, 0xb1, 0x20, 0x08, 0x9d, 0x22, 0xb0, 0x20,
+0x14, 0x1c, 0x16, 0x2c, 0x64, 0x02, 0xe4, 0x26, 0xf5, 0x28, 0x20, 0x3d,
+0x95, 0x20, 0xb0, 0x20, 0x0e, 0xec, 0x2e, 0x2c, 0x54, 0x1d, 0x28, 0x4c,
+0x07, 0x36, 0xbc, 0x33, 0x3e, 0xdc, 0x58, 0x2a, 0xf4, 0x02, 0x31, 0x84,
+0x00, 0x20, 0x0d, 0xdc, 0x5d, 0x3d, 0xd4, 0x07, 0x2e, 0xbc, 0x09, 0x20,
+0x05, 0xf4, 0x29, 0x36, 0x7e, 0x02, 0xb2, 0x10, 0x20, 0x3d, 0xed, 0x58,
+0xb1, 0x20, 0x10, 0xec, 0x29, 0x2a, 0x9e, 0x00, 0xb1, 0x10, 0x20, 0x1f,
+0xec, 0x58, 0x3c, 0x54, 0x5b, 0x20, 0x07, 0x75, 0x02, 0xb1, 0x33, 0xf5,
+0x09, 0xb0, 0x20, 0x24, 0x75, 0x2c, 0xb0, 0x37, 0xac, 0x36, 0x33, 0x95,
+0x64, 0x00, 0x20, 0x08, 0xfc, 0x31, 0x20, 0x16, 0xe4, 0x04, 0x2e, 0x8c,
+0x29, 0x34, 0x74, 0x2c, 0x2c, 0x54, 0x5b, 0x20, 0x0f, 0xe5, 0x09, 0xb2,
+0x20, 0x08, 0x34, 0x3b, 0x2a, 0x3d, 0x0a, 0xb1, 0x2f, 0xdc, 0x3f, 0x2a,
+0x74, 0x45, 0x2a, 0x74, 0x2c, 0x7d, 0x16, 0xb1, 0x3c, 0x0c, 0x27, 0x2d,
+0xb4, 0x3d, 0x2a, 0x64, 0x07, 0x2e, 0x5d, 0x31, 0xb2, 0x27, 0x04, 0x00,
+0x2a, 0x8c, 0x2c, 0x2a, 0xe4, 0x02, 0x20, 0x13, 0x45, 0x16, 0xb1, 0x31,
+0xf4, 0x15, 0x32, 0x9c, 0x42, 0x2e, 0x7d, 0x05, 0xb0, 0x20, 0x08, 0x6c,
+0x2c, 0x24, 0xfc, 0x29, 0x20, 0x17, 0x6c, 0x2c, 0x3e, 0xac, 0x18, 0x34,
+0x5d, 0x05, 0xb0, 0x20, 0x06, 0x6d, 0x2c, 0xb0, 0x25, 0x6c, 0x2c, 0x3c,
+0x7d, 0x2c, 0xb1, 0x2d, 0x74, 0x45, 0x2e, 0xe5, 0x13, 0xb2, 0x29, 0x94,
+0x1d, 0x2c, 0x0c, 0x05, 0x20, 0x00, 0x00, 0x00, 0x1a, 0x6c, 0x2c, 0x20,
+0x7d, 0xd4, 0x2e, 0x28, 0x04, 0x16, 0x38, 0xb5, 0x1d, 0xb2, 0x31, 0x74,
+0x27, 0x2c, 0x14, 0x11, 0x28, 0xe4, 0x2e, 0x32, 0xb5, 0x5d, 0xb0, 0x2d,
+0x04, 0x00, 0x20, 0x01, 0xe4, 0x2e, 0x20, 0x0b, 0x8d, 0x27, 0xb0, 0x20,
+0x24, 0x54, 0x5b, 0x20, 0x07, 0xc4, 0x5d, 0x20, 0x0f, 0x8d, 0x27, 0xb0,
+0x20, 0x06, 0x4c, 0x60, 0x2a, 0x6c, 0x02, 0x2c, 0x85, 0x4c, 0xb1, 0x27,
+0x74, 0x91, 0x2e, 0xe5, 0x2e, 0xb0, 0x20, 0x20, 0x65, 0x31, 0xb1, 0xcc,
+0xfe, 0x32, 0x24, 0x65, 0x3e, 0xc5, 0x5d, 0xb0, 0x20, 0x02, 0xe5, 0x4e,
+0xb2, 0x3f, 0x65, 0x31, 0xb1, 0x20, 0x1c, 0x75, 0x2c, 0xb2, 0x35, 0xc6,
+0x5d, 0xb0, 0x30, 0x20, 0x05, 0x6c, 0x27, 0x2f, 0x04, 0x23, 0x20, 0x3c,
+0x75, 0x2c, 0xb0, 0x20, 0x17, 0xa4, 0x8c, 0x33, 0xe5, 0x04, 0xb0, 0x20,
+0x2e, 0x75, 0x2c, 0xb0, 0x20, 0x10, 0x3c, 0x85, 0x20, 0x25, 0xe4, 0x04,
+0x2a, 0x74, 0x2c, 0x36, 0x74, 0x94, 0x20, 0x01, 0x54, 0x09, 0x3c, 0x4c,
+0x8d, 0x20, 0x15, 0xcd, 0x09, 0xb1, 0x3b, 0xc4, 0x87, 0x6c, 0x64, 0x28,
+0xd5, 0x13, 0xb0, 0x20, 0x02, 0xbd, 0x87, 0xb0, 0x33, 0xec, 0x04, 0x32,
+0xe5, 0x2e, 0xb2, 0x2f, 0x84, 0x2c, 0x26, 0x84, 0x27, 0x3c, 0xe4, 0x58,
+0x32, 0xc4, 0x9b, 0x7d, 0x16, 0xb2, 0x31, 0x4d, 0x87, 0xb0, 0x33, 0x2c,
+0x40, 0x2e, 0x45, 0x36, 0xb1, 0x20, 0x08, 0x6c, 0x2c, 0x74, 0x13, 0x20,
+0x0f, 0xe4, 0x58, 0x28, 0xbd, 0x18, 0xb1, 0x20, 0x06, 0x44, 0x5b, 0x3c,
+0x6c, 0x2c, 0x38, 0x1c, 0x59, 0x5c, 0x28, 0x27, 0x64, 0x71, 0x3e, 0x64,
+0x2c, 0xf4, 0x28, 0x2e, 0x6c, 0x2c, 0x34, 0xbc, 0x04, 0x26, 0x6c, 0x2c,
+0x20, 0x00, 0x00, 0x00, 0xb2, 0x74, 0x2c, 0x20, 0x28, 0x94, 0x2d, 0x3f,
+0x1c, 0xb9, 0x20, 0x15, 0xed, 0x2e, 0xb1, 0x31, 0x64, 0x18, 0x32, 0xfd,
+0x29, 0xb0, 0x31, 0x4c, 0x85, 0x30, 0x96, 0x18, 0xb0, 0x20, 0x30, 0x14,
+0xb9, 0x36, 0xa4, 0x13, 0x20, 0x02, 0x7c, 0x02, 0x20, 0x04, 0xa5, 0x22,
+0xb2, 0x20, 0x08, 0x95, 0x18, 0xb2, 0x20, 0x0c, 0x0c, 0x45, 0x3c, 0xd6,
+0x7b, 0xb2, 0x10, 0x20, 0x05, 0x65, 0x31, 0xb2, 0x2d, 0x54, 0x1d, 0x28,
+0xec, 0x04, 0x38, 0xc4, 0x5d, 0x34, 0x0c, 0x20, 0x3b, 0x04, 0xb9, 0x3b,
+0xed, 0x2e, 0xb0, 0x3b, 0xcc, 0x62, 0x35, 0x84, 0x93, 0x29, 0x9c, 0x7b,
+0x20, 0x0b, 0xf4, 0x29, 0x2a, 0x64, 0x05, 0x37, 0x04, 0x05, 0x20, 0x1e,
+0x65, 0x5b, 0xb1, 0x35, 0x75, 0x2c, 0xb2, 0x20, 0x04, 0x6d, 0x27, 0xb1,
+0x20, 0x0a, 0xc4, 0x62, 0x20, 0x0f, 0x75, 0x2c, 0xb1, 0x29, 0x04, 0x54,
+0x38, 0x54, 0x29, 0x3c, 0x64, 0x09, 0x38, 0x7d, 0x07, 0xb1, 0x20, 0x18,
+0x6d, 0x02, 0xb1, 0x20, 0x02, 0x55, 0x5b, 0xb0, 0x20, 0x0e, 0xf4, 0x04,
+0x20, 0x23, 0xbc, 0x62, 0x3a, 0xc4, 0xc2, 0x2a, 0xf4, 0x58, 0x44, 0x9f,
+0x20, 0x02, 0xc4, 0x3a, 0x38, 0xb4, 0x67, 0x3c, 0xe4, 0x2e, 0x28, 0x85,
+0x2c, 0xb0, 0x39, 0xc4, 0x87, 0x38, 0x05, 0x0f, 0xb2, 0x31, 0x54, 0x5b,
+0x3c, 0x2e, 0xb4, 0xb1, 0x30, 0x38, 0xe4, 0x04, 0x2f, 0xac, 0xa0, 0x20,
+0x24, 0x6c, 0x2c, 0x2e, 0x54, 0x5d, 0x20, 0x27, 0x6d, 0x2c, 0x20, 0x29,
+0x6d, 0x2c, 0xb2, 0x2b, 0x84, 0x18, 0x3a, 0x04, 0x00, 0x38, 0x6d, 0x2c,
+0xb0, 0x37, 0xc5, 0x18, 0xb1, 0x20, 0x00, 0x00, 0x00, 0xfb, 0x6c, 0x2c,
+0x20, 0x7f, 0xdc, 0x2e, 0xac, 0x9e, 0x3e, 0xf4, 0xe7, 0x20, 0x11, 0xec,
+0x2e, 0x2c, 0xd4, 0xcc, 0x34, 0xc5, 0x1d, 0xb2, 0x2d, 0x14, 0xe3, 0x36,
+0x34, 0xe3, 0x2c, 0x75, 0x56, 0xb1, 0x35, 0xb5, 0x73, 0xb1, 0x3e, 0xec,
+0x22, 0x20, 0x0e, 0xad, 0x22, 0xb1, 0x20, 0x10, 0xc5, 0x5d, 0xb0, 0x20,
+0x11, 0x55, 0xa0, 0x00, 0x20, 0x17, 0xf5, 0x58, 0xb1, 0x33, 0xa4, 0xa7,
+0x2a, 0x3c, 0x8a, 0x2c, 0x05, 0x1b, 0xb0, 0x35, 0xcc, 0x5f, 0x2e, 0xe4,
+0x2e, 0x3d, 0x3c, 0xad, 0x20, 0x09, 0x0d, 0x7e, 0x20, 0x20, 0x09, 0x75,
+0x2c, 0xb1, 0x3f, 0xc5, 0x82, 0xb1, 0x20, 0x02, 0x05, 0x05, 0xb1, 0x20,
+0x1c, 0x54, 0x8a, 0x26, 0x4c, 0x25, 0x30, 0x75, 0x2c, 0xb1, 0x20, 0x02,
+0x3d, 0x85, 0xb2, 0x29, 0x2c, 0x79, 0x32, 0x7c, 0x02, 0x20, 0x09, 0xcc,
+0x33, 0x20, 0x0f, 0x35, 0x8a, 0xb2, 0x20, 0x04, 0xe4, 0x06, 0x3a, 0x3c,
+0xb7, 0x20, 0x15, 0xbd, 0x8c, 0xb2, 0x37, 0xa4, 0x09, 0x2b, 0x84, 0x00,
+0x2b, 0x04, 0xb6, 0x39, 0xec, 0x0b, 0x35, 0x74, 0x02, 0x20, 0x03, 0xdc,
+0x04, 0x2c, 0x4d, 0xcd, 0xb2, 0x2f, 0x34, 0xe0, 0x28, 0x4c, 0x54, 0x2e,
+0xc5, 0xc5, 0xb2, 0x2d, 0x55, 0x5b, 0xb0, 0x27, 0x24, 0x6a, 0xec, 0x9f,
+0x2e, 0xad, 0x11, 0xb2, 0x3b, 0x7d, 0xc5, 0xb0, 0x37, 0xac, 0xe0, 0x36,
+0xd4, 0x2e, 0x20, 0x01, 0x6f, 0x2c, 0xb1, 0x30, 0xb0, 0x20, 0x14, 0x6d,
+0x2c, 0xb1, 0x20, 0x08, 0x6c, 0x2c, 0x4c, 0x27, 0x2f, 0x04, 0x45, 0x3c,
+0x65, 0x2c, 0xb0, 0x2f, 0x44, 0x16, 0x34, 0x94, 0x5d, 0x20, 0x75, 0x6c,
+0x2c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0xa4, 0x2e, 0x37, 0x9c, 0xcf,
+0x2e, 0x0d, 0x42, 0x20, 0x2c, 0xfd, 0xe7, 0xb0, 0x31, 0x4c, 0x20, 0x10,
+0x1f, 0xc8, 0x16, 0x20, 0x1f, 0x5d, 0x8a, 0xb0, 0x20, 0x1c, 0xac, 0xb6,
+0x20, 0x05, 0xfc, 0xb8, 0x20, 0x1a, 0x94, 0x27, 0x20, 0x0c, 0xc5, 0x5d,
+0xb1, 0x33, 0xe5, 0xe7, 0xb0, 0x20, 0x0a, 0xc4, 0x5d, 0x36, 0xb4, 0x4c,
+0x38, 0xc6, 0x62, 0xb1, 0x20, 0x30, 0x74, 0x07, 0x32, 0x4c, 0x31, 0x3a,
+0xb4, 0xb1, 0x2a, 0xdc, 0x4c, 0x3e, 0x66, 0x31, 0xb2, 0x10, 0x20, 0x23,
+0xe4, 0xb1, 0x2f, 0xa4, 0x27, 0x3f, 0x74, 0x04, 0x10, 0x1b, 0xfb, 0x14,
+0xb0, 0x10, 0x20, 0x20, 0x16, 0x6c, 0x02, 0x2a, 0x54, 0x5b, 0x20, 0x15,
+0x35, 0x8a, 0xb2, 0x20, 0x0c, 0x2d, 0x8f, 0xb0, 0x20, 0x12, 0xbd, 0xe0,
+0xb1, 0x3f, 0x8e, 0xe5, 0xb1, 0x30, 0x20, 0x13, 0xac, 0x8c, 0x2e, 0x44,
+0x07, 0x38, 0x6c, 0x02, 0x28, 0x8c, 0x0c, 0x2e, 0x75, 0x2c, 0xb0, 0x31,
+0x8c, 0x80, 0xde, 0x03, 0x00, 0xb2, 0x3b, 0x8c, 0x0e, 0x24, 0x75, 0x2c,
+0x20, 0x20, 0x08, 0x25, 0x8f, 0xb1, 0x2f, 0xad, 0xe0, 0xb0, 0x29, 0x04,
+0x0f, 0x30, 0xd4, 0x2e, 0x20, 0x01, 0x5d, 0x11, 0xb2, 0x36, 0xd4, 0xb3,
+0x3c, 0x94, 0xe0, 0x20, 0x0c, 0xc4, 0x87, 0x28, 0x6d, 0x2c, 0xb0, 0x20,
+0x02, 0x54, 0x2c, 0x34, 0x6d, 0x2c, 0xb0, 0x35, 0xe4, 0x13, 0x20, 0x03,
+0xae, 0x71, 0xb2, 0x10, 0x10, 0x3d, 0xa8, 0x2f, 0x20, 0x00, 0x00, 0x00,
+0x00, 0x9d, 0x6c, 0x2c, 0x20, 0x77, 0x54, 0xb9, 0x28, 0x04, 0xa3, 0x38,
+0xb4, 0xd3, 0x32, 0xf5, 0x9d, 0xb0, 0x27, 0x9c, 0x51, 0x32, 0xf4, 0xe7,
+0xe4, 0x00, 0x20, 0x19, 0xad, 0x9d, 0xb1, 0x20, 0x24, 0xed, 0x2e, 0xb1,
+0x20, 0x04, 0x34, 0x8a, 0x20, 0x0f, 0xc5, 0xcc, 0xb2, 0x20, 0x0c, 0xec,
+0x2e, 0x36, 0x45, 0x60, 0xb1, 0x33, 0xdd, 0x2e, 0xb1, 0x35, 0xed, 0xe7,
+0xb0, 0x20, 0x06, 0x85, 0x02, 0xb1, 0x20, 0x06, 0x0c, 0x2a, 0x34, 0x2c,
+0xb9, 0x32, 0x14, 0x8f, 0x3a, 0x54, 0x29, 0x2c, 0x34, 0x80, 0x3d, 0x1c,
+0xe1, 0x2f, 0x9e, 0x27, 0xb2, 0x10, 0x20, 0x1f, 0x55, 0x5b, 0xb2, 0x20,
+0x02, 0x4c, 0x5b, 0x20, 0x01, 0x85, 0x02, 0xb2, 0x33, 0xf4, 0xd8, 0x20,
+0x23, 0x54, 0x5b, 0x20, 0x03, 0xe4, 0x2e, 0x3c, 0xa5, 0xe3, 0xb1, 0x20,
+0x12, 0x64, 0x02, 0x10, 0x07, 0xb0, 0x0c, 0x30, 0xf5, 0x3d, 0xb1, 0x25,
+0xcd, 0x3d, 0xb0, 0x10, 0x24, 0xe8, 0x3b, 0x3e, 0xc5, 0x5d, 0xb1, 0x27,
+0x6d, 0xf9, 0xb1, 0x2d, 0x9c, 0x2c, 0x16, 0x21, 0x0d, 0xb1, 0x20, 0x0e,
+0x6d, 0x2c, 0xb1, 0x20, 0x08, 0x2d, 0xb4, 0xb0, 0x3e, 0x7c, 0xc0, 0x39,
+0xfd, 0x58, 0xb2, 0x31, 0xf5, 0x2b, 0xb0, 0x37, 0x64, 0x2c, 0x2c, 0x24,
+0x6f, 0x38, 0xd4, 0x58, 0x20, 0x75, 0x6e, 0x2c, 0xb2, 0x30, 0x20, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0a, 0x6c, 0x2c, 0x20, 0x21, 0x4c, 0x8a, 0x20,
+0x3d, 0x7c, 0x01, 0x2c, 0x9c, 0x1d, 0x32, 0x05, 0x19, 0xb0, 0x37, 0x8c,
+0x47, 0x32, 0x8d, 0xe5, 0xb1, 0x10, 0x04, 0xd8, 0x16, 0x20, 0x2b, 0xec,
+0x2e, 0x32, 0x25, 0x7e, 0xb2, 0x10, 0x20, 0xe8, 0x16, 0x3c, 0x15, 0xb9,
+0xb0, 0x20, 0x08, 0xac, 0x8c, 0x20, 0x0b, 0xdd, 0x5d, 0xb1, 0x10, 0x04,
+0x78, 0x43, 0x38, 0x3c, 0x8a, 0x2c, 0x7c, 0xe2, 0x28, 0xed, 0xe7, 0xb1,
+0x2b, 0x54, 0x2c, 0x20, 0x05, 0x6d, 0x31, 0xb2, 0x2f, 0x44, 0xaa, 0x20,
+0x09, 0x7c, 0x2c, 0x34, 0x55, 0x5b, 0xb1, 0x3b, 0x54, 0x56, 0x2c, 0xcd,
+0x5d, 0xb1, 0x20, 0x08, 0x9c, 0xbb, 0x20, 0x0b, 0x64, 0x02, 0x28, 0x1c,
+0x2a, 0x32, 0x7c, 0x67, 0x10, 0x23, 0xf8, 0x0c, 0x34, 0x14, 0x03, 0x30,
+0xcd, 0x04, 0xb1, 0x20, 0x04, 0x64, 0x02, 0x2a, 0x7c, 0x2c, 0x34, 0x44,
+0xed, 0x10, 0x01, 0x60, 0x68, 0x3a, 0x6d, 0x04, 0xb0, 0x39, 0xe5, 0x2e,
+0xb1, 0x31, 0xcc, 0x04, 0x30, 0x04, 0x00, 0x2a, 0x34, 0xf7, 0x32, 0xec,
+0x58, 0x34, 0x3d, 0x99, 0xb0, 0x2f, 0x9d, 0xe0, 0xb0, 0x10, 0x06, 0x98,
+0x54, 0x3c, 0xcc, 0x67, 0x20, 0x0c, 0x6d, 0x2c, 0x10, 0x32, 0x6c, 0x2c,
+0x36, 0x04, 0x00, 0x30, 0x6d, 0x2c, 0xb0, 0x39, 0xbc, 0x6c, 0x20, 0x73,
+0x6c, 0x2c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x74, 0x2c, 0x20,
+0x7d, 0x24, 0xb9, 0x20, 0x41, 0xed, 0x2e, 0xb0, 0x10, 0x02, 0x50, 0x86,
+0x30, 0x85, 0x1b, 0xb2, 0x37, 0xe5, 0x1f, 0x20, 0x3d, 0x84, 0x1d, 0x10,
+0x39, 0xf8, 0x27, 0x20, 0x01, 0xed, 0x2e, 0xb0, 0x20, 0x06, 0xad, 0x8c,
+0xb0, 0x10, 0x2c, 0xb0, 0x45, 0x3a, 0x14, 0xed, 0x20, 0x03, 0x14, 0x2a,
+0x30, 0x44, 0x8a, 0x32, 0x55, 0x5b, 0xb0, 0x33, 0x64, 0x24, 0x2c, 0xa4,
+0xac, 0x20, 0x05, 0x8d, 0x02, 0xb1, 0x31, 0x25, 0xd9, 0xb0, 0x20, 0x0e,
+0x64, 0xde, 0x2e, 0x85, 0x56, 0xb0, 0x3d, 0xf5, 0xe7, 0xb1, 0x20, 0x04,
+0x44, 0x8f, 0x32, 0xdc, 0x2e, 0x20, 0x03, 0x7c, 0x2c, 0x28, 0x1c, 0x2a,
+0x35, 0x3c, 0xb4, 0x20, 0x02, 0xbd, 0x5f, 0xb1, 0x3b, 0x7d, 0x02, 0xb2,
+0x20, 0x04, 0x5c, 0x02, 0x2c, 0x54, 0x6a, 0x30, 0xc4, 0x87, 0x30, 0x6c,
+0x3b, 0x10, 0x09, 0xf9, 0x3b, 0xb0, 0x10, 0x04, 0x58, 0x1e, 0x26, 0x74,
+0x36, 0x39, 0x24, 0xb4, 0x20, 0x0e, 0x6c, 0x2c, 0x34, 0xe4, 0x58, 0x38,
+0x1e, 0xc8, 0xb2, 0x20, 0x3c, 0x14, 0xde, 0x20, 0x0b, 0x84, 0x0c, 0x2c,
+0x6c, 0x2c, 0x38, 0x0c, 0x6f, 0x20, 0x27, 0x5c, 0x2c, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xe6, 0x74, 0x2c, 0x20, 0x81, 0xfe, 0xe7, 0xb1, 0x20,
+0x20, 0x3f, 0xad, 0x01, 0xb1, 0x2d, 0x84, 0xd4, 0x10, 0x0f, 0x59, 0xd0,
+0x20, 0x34, 0x1c, 0xa8, 0x29, 0xdd, 0x84, 0xb0, 0x10, 0x08, 0xf8, 0x5b,
+0x10, 0x35, 0x70, 0x2a, 0x20, 0x01, 0x1d, 0xad, 0xb2, 0x3b, 0x4c, 0x51,
+0x10, 0x07, 0x48, 0xb7, 0x34, 0x04, 0xb9, 0x20, 0x0d, 0xe4, 0x2e, 0x14,
+0x01, 0xbc, 0x20, 0x20, 0x04, 0x7c, 0x85, 0x30, 0xe5, 0x35, 0xb1, 0x37,
+0x35, 0x8a, 0xb1, 0x33, 0x0c, 0xb9, 0x20, 0x09, 0x1d, 0x34, 0xb2, 0x33,
+0x54, 0x02, 0x20, 0x0d, 0x7c, 0x2c, 0x10, 0x0b, 0xe1, 0xaa, 0xb0, 0x3d,
+0x65, 0x2c, 0xb2, 0x3d, 0xf4, 0x29, 0x34, 0x15, 0xb9, 0xb1, 0x10, 0x1a,
+0x48, 0xd0, 0x2c, 0x7c, 0x2c, 0x10, 0x0b, 0x80, 0x77, 0x7c, 0x28, 0xec,
+0x24, 0x34, 0xac, 0x09, 0x10, 0x17, 0xf1, 0x1b, 0xb2, 0x10, 0x1c, 0x01,
+0x37, 0xb0, 0xe4, 0x29, 0x33, 0x54, 0xb1, 0x3e, 0x74, 0xf4, 0x3c, 0x3c,
+0x85, 0x20, 0x0b, 0x6d, 0x2c, 0xb2, 0x10, 0x08, 0x80, 0x3e, 0x20, 0x3d,
+0x64, 0x2c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x6c, 0x2c,
+0x20, 0x55, 0x4c, 0xb9, 0x36, 0xed, 0x76, 0xb2, 0x33, 0x5c, 0x22, 0x30,
+0x04, 0xe8, 0x20, 0x35, 0x54, 0x1d, 0x10, 0x18, 0xc0, 0x14, 0x3f, 0x1c,
+0xb9, 0x10, 0x13, 0xd0, 0x16, 0x10, 0x2b, 0x79, 0x19, 0xb2, 0x10, 0x04,
+0x48, 0x8d, 0x3a, 0x05, 0x59, 0xb1, 0x10, 0x08, 0x09, 0x08, 0xb0, 0x2f,
+0x4c, 0x51, 0x3c, 0x0d, 0xb9, 0xb0, 0x10, 0x04, 0x60, 0x08, 0x20, 0x0f,
+0x4c, 0x5b, 0x3c, 0x84, 0x2c, 0x2c, 0xbc, 0x5d, 0x28, 0x7c, 0x2c, 0x31,
+0x44, 0x58, 0x10, 0x0e, 0xa1, 0xd7, 0xb0, 0x10, 0x1c, 0x69, 0x48, 0xb1,
+0x31, 0x3d, 0x02, 0xb1, 0x20, 0x02, 0x6c, 0x27, 0x2a, 0x7d, 0x2c, 0xb1,
+0x10, 0x0c, 0x81, 0x68, 0xb1, 0x3f, 0x64, 0x29, 0x2d, 0x2c, 0xb2, 0x20,
+0x04, 0x44, 0x31, 0x10, 0x0d, 0x18, 0x90, 0x84, 0x16, 0x10, 0x10, 0xd8,
+0xd4, 0x36, 0xc4, 0x67, 0x10, 0x09, 0x60, 0xad, 0x32, 0x7c, 0xef, 0x20,
+0x17, 0x6c, 0x2c, 0x20, 0x2f, 0x8c, 0x2c, 0x20, 0x24, 0xfc, 0xf6, 0x20,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x05, 0x00, 0xb1, 0x27,
+0x34, 0x25, 0x10, 0x0b, 0x79, 0xff, 0xb0, 0x10, 0x0c, 0x20, 0xa1, 0x2c,
+0x8c, 0xe5, 0x20, 0x25, 0xec, 0xe7, 0x2e, 0xac, 0x22, 0x64, 0x00, 0x3c,
+0x6d, 0x5b, 0xb1, 0x10, 0x2e, 0x30, 0xe6, 0x20, 0x11, 0xcc, 0x5d, 0x36,
+0x44, 0x5b, 0x2a, 0xb4, 0x27, 0x10, 0x0d, 0x00, 0x70, 0xc4, 0x11, 0x17,
+0xc2, 0x9e, 0xb1, 0x20, 0x30, 0xd4, 0x58, 0x2a, 0x94, 0x82, 0x2e, 0x3c,
+0x5b, 0x10, 0x17, 0x78, 0xb7, 0x30, 0x8c, 0x04, 0x10, 0x03, 0xb8, 0x0a,
+0x3e, 0x6d, 0x27, 0xb2, 0x29, 0x25, 0x36, 0xb2, 0x10, 0x0a, 0x58, 0x43,
+0x37, 0xec, 0xe4, 0x2f, 0xf5, 0x2e, 0xb0, 0x10, 0x1b, 0x90, 0xd2, 0x10,
+0x06, 0xe9, 0x36, 0xb1, 0x2c, 0xa4, 0x02, 0x10, 0x0a, 0x90, 0x3b, 0x10,
+0x0d, 0x89, 0x4d, 0xb0, 0x85, 0x3c, 0xb2, 0x2f, 0xec, 0xc2, 0x36, 0x0c,
+0xed, 0x3e, 0xb4, 0xc0, 0x20, 0x01, 0x6c, 0x2c, 0x20, 0x0b, 0x6d, 0x98,
+0xb2, 0x18, 0x10, 0x60, 0x0b, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x98, 0x6c, 0x2c, 0x10, 0x2d, 0x30, 0xa1, 0x20, 0x4b, 0xec, 0x2e,
+0x2c, 0x24, 0x25, 0x32, 0x3c, 0xe3, 0x36, 0x1d, 0xb9, 0xb1, 0x10, 0x29,
+0xc8, 0xcf, 0x10, 0x12, 0xa9, 0xa3, 0xb0, 0x10, 0x15, 0x08, 0x61, 0x30,
+0x6c, 0x5b, 0x18, 0x0c, 0x09, 0x58, 0xb1, 0x33, 0x35, 0x8a, 0x20, 0x35,
+0x64, 0xaf, 0x18, 0x17, 0x78, 0x30, 0x32, 0x74, 0xe5, 0x34, 0x5c, 0x56,
+0x38, 0x05, 0x27, 0xb2, 0x10, 0x0b, 0xb0, 0x4a, 0x2f, 0x2c, 0x58, 0x28,
+0x04, 0xe8, 0x10, 0x1f, 0xf8, 0x45, 0x3a, 0x6c, 0x2c, 0x2c, 0xfc, 0x2e,
+0x15, 0xc0, 0x1e, 0x10, 0x0c, 0x20, 0x1e, 0x10, 0x0d, 0x6a, 0x37, 0xb0,
+0x03, 0x2e, 0x44, 0x36, 0x2c, 0x7d, 0x31, 0xb0, 0x20, 0x28, 0x6c, 0x2c,
+0x2a, 0x64, 0x02, 0x10, 0x1d, 0x9a, 0xad, 0xb2, 0x20, 0x20, 0x03, 0x64,
+0x2c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba, 0x6c, 0x2c,
+0x10, 0xb1, 0x28, 0xa1, 0x10, 0x39, 0x20, 0xd0, 0x2a, 0x5c, 0x27, 0x10,
+0x01, 0x18, 0x08, 0x38, 0x4d, 0xb9, 0xb0, 0x10, 0x1e, 0x50, 0x8d, 0x10,
+0x11, 0x90, 0x8a, 0x24, 0xbc, 0x27, 0x18, 0x23, 0xf9, 0x2d, 0x20, 0x35,
+0xe4, 0x2e, 0x2e, 0xdd, 0x5d, 0xb1, 0x18, 0x0a, 0xf2, 0x72, 0xb0, 0x20,
+0x2c, 0x4c, 0x5b, 0x34, 0x1c, 0x56, 0x32, 0xee, 0xdb, 0xb2, 0x30, 0x20,
+0x03, 0x64, 0x02, 0x32, 0x6c, 0x2c, 0x2e, 0x7c, 0x5b, 0x18, 0x0b, 0x68,
+0x41, 0x18, 0x06, 0x63, 0x04, 0x30, 0xb2, 0x23, 0x2e, 0xec, 0x5f, 0x18,
+0x05, 0xc0, 0x61, 0x10, 0x25, 0xf0, 0x45, 0x20, 0x09, 0x6c, 0x2c, 0x2c,
+0x04, 0x00, 0x38, 0x64, 0x94, 0x20, 0x01, 0x5c, 0x2c, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x2c, 0x20, 0xaf, 0xdc, 0xb8,
+0x2e, 0xac, 0x53, 0x10, 0x10, 0x29, 0x08, 0x10, 0x32, 0xd4, 0x24, 0x18,
+0x09, 0x98, 0x3c, 0x20, 0x05, 0x8d, 0x24, 0xb2, 0x10, 0x26, 0xd8, 0x6a,
+0x3f, 0x8c, 0x2c, 0x10, 0x14, 0x91, 0x43, 0xb2, 0x10, 0x0e, 0x58, 0x63,
+0x2c, 0xe4, 0x2e, 0x10, 0x09, 0x58, 0x17, 0x20, 0x05, 0xd4, 0x2e, 0x30,
+0x6c, 0x2c, 0x18, 0x07, 0x48, 0x6e, 0x30, 0x4c, 0x8a, 0x28, 0xdc, 0x87,
+0x2a, 0xa5, 0x8c, 0xb0, 0x2f, 0x9d, 0x58, 0xb0, 0x37, 0x3c, 0xe8, 0x20,
+0x1f, 0x6c, 0x2c, 0x20, 0x01, 0x94, 0xc0, 0x30, 0x6c, 0x2c, 0x10, 0x09,
+0x10, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c,
+0x2c, 0x18, 0xdb, 0xf8, 0x57, 0x10, 0x53, 0x90, 0x2f, 0x10, 0x3b, 0xc8,
+0x11, 0x2c, 0x94, 0xe0, 0x26, 0xcc, 0x27, 0x2a, 0xa4, 0x5b, 0x18, 0x05,
+0x48, 0x73, 0x2c, 0x04, 0x83, 0x10, 0x03, 0x00, 0x08, 0x3a, 0x14, 0x8a,
+0x2c, 0x75, 0x2c, 0xb1, 0x20, 0x14, 0x6c, 0x2c, 0x32, 0xec, 0x2e, 0x2a,
+0x6d, 0x5b, 0xb0, 0x2d, 0xc5, 0x8c, 0xb0, 0x18, 0x12, 0xd9, 0x72, 0xb1,
+0x37, 0xd5, 0x58, 0xb1, 0x20, 0x22, 0x6c, 0x2c, 0x30, 0xdc, 0x04, 0x25,
+0x05, 0x2c, 0x20, 0x2e, 0xbc, 0x85, 0xbc, 0x22, 0xa4, 0x0e, 0x2a, 0xf4,
+0x2e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x2c,
+0x20, 0xc5, 0x74, 0x2c, 0x20, 0x71, 0x6c, 0x2c, 0x10, 0x0d, 0x69, 0x68,
+0xb1, 0x20, 0x10, 0x9c, 0x02, 0x20, 0x0d, 0x1c, 0xb9, 0x28, 0x74, 0x2c,
+0x18, 0x11, 0xd1, 0x81, 0xb0, 0x10, 0x18, 0x98, 0x0a, 0x10, 0x05, 0xf0,
+0xbe, 0x2e, 0x4c, 0xb9, 0x18, 0x0b, 0x29, 0x89, 0xb2, 0x2d, 0x04, 0xb9,
+0x32, 0x0c, 0x8a, 0x10, 0x25, 0xe0, 0x9e, 0x3e, 0x6c, 0x2c, 0x10, 0x03,
+0xe1, 0x14, 0xb1, 0x29, 0xec, 0x87, 0x18, 0x05, 0x00, 0x49, 0x25, 0x24,
+0x8f, 0x31, 0x0d, 0xb9, 0xb0, 0x2b, 0x0d, 0xb9, 0xb1, 0x20, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x2c, 0x20, 0xbe, 0x74, 0x2c,
+0x10, 0x87, 0xa9, 0x11, 0xb0, 0x10, 0x2e, 0xf8, 0x65, 0x10, 0x35, 0x51,
+0x32, 0xb1, 0x27, 0x8c, 0x2a, 0x20, 0x0f, 0x44, 0x5b, 0x2a, 0x8c, 0xe0,
+0x3c, 0x3c, 0x05, 0x10, 0x01, 0xa1, 0x0f, 0xb1, 0x2b, 0x34, 0x8a, 0x3c,
+0x5c, 0x02, 0x20, 0x31, 0x6c, 0x2c, 0x2d, 0x94, 0x8a, 0x31, 0x4e, 0x8a,
+0xb1, 0x20, 0x10, 0x05, 0x11, 0xcb, 0xb0, 0x18, 0x08, 0x30, 0x84, 0x20,
+0x05, 0x6c, 0x2c, 0x11, 0x00, 0x00
+};
diff --git a/src/help.c b/src/help.c
new file mode 100644
index 0000000..7e15bf5
--- /dev/null
+++ b/src/help.c
@@ -0,0 +1,275 @@
+/* help.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+#include "version.h"
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static lzo_bool head_done = 0;
+
+void head(void)
+{
+ FILE *f = con_term;
+ int fg;
+
+ if (head_done)
+ return;
+ head_done = 1;
+
+ fg = con_fg(f,FG_GREEN);
+ con_fprintf(f,
+ " Lempel-Ziv-Oberhumer Packer\n"
+ " Copyright (C) 1996 - 2010\n"
+ "lzop v%-11s Markus Franz Xaver Johannes Oberhumer %20s\n"
+ "\n",
+ LZOP_VERSION_STRING, LZOP_VERSION_DATE);
+ fg = con_fg(f,fg);
+ UNUSED(fg);
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void usage(void)
+{
+ FILE *f = con_term;
+
+ con_fprintf(f,"Usage: %s [-dxlthIVL%s] [-qvcfFnNPkUp] [-o file] [-S suffix] [%sfile..]\n", progname,
+#if defined(USE_LZO1X_1_15) && defined(USE_LZO1X_999)
+ "19",
+#elif defined(USE_LZO1X_1_15)
+ "1",
+#else
+ "",
+#endif
+#if defined(__DJGPP__) || defined(__EMX__)
+ "[@]");
+#else
+ "");
+#endif
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void help(void)
+{
+ FILE *f = con_term;
+ int fg;
+
+#ifdef OPT_NAME_DEFAULT
+ const char *dn = "";
+ const char *dN = " (default)";
+#else
+ const char *dn = " (default)";
+ const char *dN = "";
+#endif
+
+ head();
+ usage();
+
+ con_fprintf(f,"\n");
+ fg = con_fg(f,FG_YELLOW);
+ con_fprintf(f,"Commands:\n");
+ fg = con_fg(f,fg);
+ con_fprintf(f,
+#if defined(USE_LZO1X_1_15) && defined(USE_LZO1X_999)
+" -1 compress faster -9 compress better\n"
+#elif defined(USE_LZO1X_1_15)
+" -1 compress faster\n"
+#endif
+" -d decompress -x extract (same as -dPp)\n"
+" -l list compressed file -I display system information\n"
+" -t test compressed file -V display version number\n"
+" -h give this help -L display software license\n"
+);
+
+ fg = con_fg(f,FG_YELLOW);
+ con_fprintf(f,"Options:\n");
+ fg = con_fg(f,fg);
+
+ con_fprintf(f,
+" -q be quiet -v be verbose\n"
+" -c write on standard output -oFILE write output to 'FILE'\n"
+" -p write output to current dir -pDIR write to path 'DIR'\n"
+" -f force overwrite of output files\n"
+" -n do not restore the original file name%s\n"
+" -N restore the original file name%s\n"
+" -P restore or save the original path and file name\n"
+" -S.suf use suffix .suf on compressed files\n"
+#if 0
+" -F do *not* store or verify checksum of files (a little bit faster)\n"
+#endif
+" -U delete input files after successful operation (like gzip and bzip2)\n"
+" file.. files to (de)compress. If none given, try standard input.\n"
+, dn, dN);
+
+ UNUSED(fg);
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void license(void)
+{
+ FILE *f = con_term;
+
+ head();
+
+con_fprintf(f,
+" lzop and the LZO library are free software; you can redistribute them\n"
+" and/or modify them under the terms of the GNU General Public License as\n"
+" published by the Free Software Foundation; either version 2 of\n"
+" the License, or (at your option) any later version.\n"
+"\n"
+" This program is distributed in the hope that it will be useful,\n"
+" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+" GNU General Public License for more details.\n"
+"\n"
+" 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"
+"\n"
+" Markus F.X.J. Oberhumer\n"
+" <markus@oberhumer.com>\n"
+" http://www.oberhumer.com/opensource/lzop/\n"
+ );
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#ifndef LZOP_BUILD_DATE_TIME
+#define LZOP_BUILD_DATE_TIME __DATE__ " " __TIME__
+#endif
+
+const char lzop_rcsid[] =
+ "\n$" "Id: lzop " LZOP_VERSION_STRING " built " LZOP_BUILD_DATE_TIME " $\n";
+
+LZO_EXTERN(const lzo_bytep) lzo_copyright(void);
+
+void version(void)
+{
+ FILE *f = con_term;
+ char pp[2048];
+ const lzo_bytep qq;
+ char *p, *q, *s;
+ size_t i;
+
+ head();
+
+ con_fprintf(f,
+ "lzop version: v" LZOP_VERSION_STRING ", " LZOP_VERSION_DATE "\n"
+ "lzop build date: " LZOP_BUILD_DATE_TIME "\n");
+
+ for (i = 0, qq = lzo_copyright(); i < sizeof(pp)-1 && *qq; i++, qq++)
+ pp[i] = (char) *qq;
+ pp[i] = 0;
+ p = strstr(pp,"LZO version");
+ if (p == NULL)
+ return;
+ s = strchr(p,'$');
+ if (s == NULL)
+ return;
+ for (q = s; q > p && q[-1] == '\n'; )
+ *--q = 0;
+ q = strchr(s+1,'$');
+ if (q == NULL)
+ return;
+ q[1] = 0;
+ con_fprintf(f,"\n%s\n",p);
+ con_fprintf(f,"\n%s\n",s);
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void sysinfo(void)
+{
+ FILE *f = con_term;
+ int fg = 0;
+ const char *env = NULL;
+
+ head();
+
+#if defined(HAVE_LOCALTIME) && defined(HAVE_GMTIME)
+ {
+ char s[40];
+ time_t t;
+
+ t = time(NULL);
+ tm2str(s, sizeof(s), localtime(&t));
+ con_fprintf(f,"Local time is: %s\n",s);
+ tm2str(s, sizeof(s), gmtime(&t));
+ con_fprintf(f,"GMT time is: %s\n\n",s);
+ }
+#endif
+
+#if defined(OPTIONS_VAR)
+ env = getenv(OPTIONS_VAR);
+ if (env && env[0])
+ con_fprintf(f,"Contents of environment variable %s: '%s'\n\n",
+ OPTIONS_VAR, env);
+ else
+ con_fprintf(f,"Environment variable '%s' is not set.\n\n",
+ OPTIONS_VAR);
+#endif
+
+#if defined(USE_FOPEN)
+ con_fprintf(f,"This version uses stdio for opening files.\n\n");
+#endif
+
+#if defined(__DJGPP__)
+ sysinfo_djgpp();
+#endif
+
+ UNUSED(env);
+ UNUSED(fg);
+}
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/lzop.c b/src/lzop.c
new file mode 100644
index 0000000..5571e89
--- /dev/null
+++ b/src/lzop.c
@@ -0,0 +1,3201 @@
+/* lzop.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+#include "version.h"
+
+
+/*************************************************************************
+// options
+**************************************************************************/
+
+int opt_cmd = CMD_NONE;
+int opt_method = 0;
+int opt_level = 0;
+int opt_filter = 0;
+
+int opt_checksum = -1;
+int opt_console = CON_INIT;
+lzo_bool opt_crc32 = 0;
+lzo_bool opt_decompress_safe = 1;
+lzo_bool opt_file = 0;
+int opt_force = 0;
+lzo_bool opt_ignorewarn = 0;
+lzo_bool opt_keep = 0;
+int opt_num_threads = 1; /* NOT YET IMPLEMENTED */
+#ifdef MAINT
+int opt_noheader = 0;
+#endif
+lzo_bool opt_nowarn = 0;
+const char *opt_ls_flags = "";
+int opt_name = -1;
+const char *opt_output_name = NULL;
+const char *opt_output_path = NULL;
+lzo_bool opt_optimize = 0;
+lzo_bool opt_path = 0;
+lzo_bool opt_restore_mode = 1;
+lzo_bool opt_restore_time = 1;
+lzo_bool opt_shortname = 0;
+int opt_stdin = 0;
+lzo_bool opt_stdout = 0;
+char opt_suffix[1+SUFFIX_MAX+1] = { 0 };
+lzo_bool opt_unlink = 0;
+int opt_verbose = 1;
+
+static int done_output_name = 0;
+static int done_output_path = 0;
+static int done_suffix = 0;
+
+/* invocation options */
+enum {
+ PGM_LZOP,
+ PGM_UNLZOP,
+ PGM_OCAT
+};
+
+int opt_pgm = PGM_LZOP;
+
+
+const char *argv0 = "";
+const char *progname = "";
+MODE_T u_mask = 0700;
+time_t current_time;
+
+FILE *con_term = NULL;
+
+
+static int num_files = -1;
+static int exit_code = EXIT_OK;
+
+static file_t fi;
+static file_t fo;
+
+static unsigned long total_d_files = 0;
+static unsigned long total_c_files = 0;
+static lzop_ulong_t total_d_len = 0;
+static lzop_ulong_t total_c_len = 0;
+
+/* some statistics */
+static lzop_ulong_t total_bytes_written = 0;
+static lzop_ulong_t total_bytes_read = 0;
+
+
+/*************************************************************************
+// exit handlers
+**************************************************************************/
+
+static void do_exit(void)
+{
+ static lzo_bool in_exit = 0;
+
+ if (in_exit)
+ exit(exit_code);
+ in_exit = 1;
+
+ fflush(con_term);
+ fflush(stderr);
+ exit(exit_code);
+}
+
+
+#define EXIT_FATAL 3
+
+static lzo_bool set_eec(int ec, int *eec)
+{
+ if (ec == EXIT_FATAL)
+ {
+ *eec = EXIT_ERROR;
+ return 1;
+ }
+ else if (ec < 0 || ec == EXIT_ERROR)
+ {
+ *eec = EXIT_ERROR;
+ }
+ else if (ec == EXIT_WARN)
+ {
+ if (!opt_ignorewarn)
+ if (*eec == EXIT_OK)
+ *eec = ec;
+ }
+ else if (ec == EXIT_OK)
+ {
+ /* do nothing */
+ }
+ else
+ {
+ assert(0);
+ }
+ return 0;
+}
+
+static lzo_bool set_ec(int ec)
+{
+ return set_eec(ec,&exit_code);
+}
+
+
+void e_exit(int ec)
+{
+ (void) set_ec(ec);
+ do_exit();
+}
+
+
+void e_usage(void)
+{
+ usage();
+ e_exit(EXIT_USAGE);
+}
+
+
+void e_memory(void)
+{
+ head();
+ fflush(con_term);
+ fprintf(stderr,"%s: out of memory\n", argv0);
+ e_exit(EXIT_MEMORY);
+}
+
+
+void e_method(int m)
+{
+ fflush(con_term);
+#if (UINT_MAX < LZO_0xffffffffL)
+ /* 16-bit DOS/Windows */
+ fprintf(stderr,"%s: 16-bit versions are not officially supported\n", argv0);
+#endif
+ fprintf(stderr,"%s: illegal method option -- %c\n", argv0, m & 255);
+ e_usage();
+}
+
+
+#if defined(OPTIONS_VAR)
+void e_envopt(const char *n)
+{
+ fflush(con_term);
+ if (n)
+ fprintf(stderr,"%s: invalid string '%s' in environment variable '%s'\n",
+ argv0, n, OPTIONS_VAR);
+ else
+ fprintf(stderr,"%s: illegal option in environment variable '%s'\n",
+ argv0, OPTIONS_VAR);
+ e_exit(EXIT_USAGE);
+}
+#endif
+
+
+RETSIGTYPE __acc_cdecl_sighandler e_sighandler(acc_signo_t signo)
+{
+ UNUSED(signo);
+ e_exit(EXIT_FATAL);
+}
+
+
+/*************************************************************************
+// error handlers
+**************************************************************************/
+
+static void do_error(file_t *ft, const char *n, const char *msg, int ec, int err)
+{
+ const char *fn;
+ const char *errmsg;
+
+ fflush(con_term);
+ if (!(ec == EXIT_WARN && (opt_nowarn || opt_ignorewarn || opt_verbose == 0)))
+ {
+ fn = ft && ft->name[0] ? ft->name : UNKNOWN_NAME;
+ fprintf(stderr, "%s%s: %s: ", n, progname, fn);
+ if (ec == EXIT_WARN)
+ fprintf(stderr, "warning: ");
+ if (err != 0)
+ {
+ errmsg = strerror(err);
+ if (msg && msg[0])
+ fprintf(stderr, "%s: %s\n", msg, errmsg);
+ else
+ fprintf(stderr, "%s\n", errmsg);
+ }
+ else
+ fprintf(stderr, "%s\n", msg);
+ fflush(stderr);
+ }
+ if (set_ec(ec))
+ do_exit();
+}
+
+
+static const char *err_nl = "";
+void set_err_nl(lzo_bool x)
+{
+ err_nl = x ? "\n" : "";
+}
+
+
+void fatal(file_t *ft, const char *msg)
+{
+ do_error(ft,err_nl,msg,EXIT_FATAL,0);
+}
+
+void error(file_t *ft, const char *msg)
+{
+ do_error(ft,err_nl,msg,EXIT_ERROR,0);
+}
+
+void warn(file_t *ft, const char *msg)
+{
+ do_error(ft,err_nl,msg,EXIT_WARN,0);
+}
+
+void info(file_t *ft, const char *msg)
+{
+ do_error(ft,err_nl,msg,EXIT_OK,0);
+}
+
+void p_fatal(file_t *ft, const char *msg)
+{
+ do_error(ft,err_nl,msg,EXIT_FATAL,errno);
+}
+
+void p_error(file_t *ft, const char *msg)
+{
+ do_error(ft,err_nl,msg,EXIT_ERROR,errno);
+}
+
+void p_warn(file_t *ft, const char *msg)
+{
+ do_error(ft,err_nl,msg,EXIT_WARN,errno);
+}
+
+
+void read_error(file_t *ft)
+{
+ const char *fn = ft && ft->name[0] ? ft->name : UNKNOWN_NAME;
+ const char *errmsg = "unexpected end of file";
+ if (errno != 0)
+ errmsg = strerror(errno);
+ fflush(con_term);
+ fprintf(stderr, "%s%s: %s: %s\n", err_nl, progname, errmsg, fn);
+ e_exit(EXIT_FATAL);
+}
+
+
+void write_error(file_t *ft)
+{
+ const char *fn = ft && ft->name[0] ? ft->name : UNKNOWN_NAME;
+ const char *errmsg = "write error";
+ if (errno != 0)
+ errmsg = strerror(errno);
+ fflush(con_term);
+ fprintf(stderr, "%s%s: %s: %s\n", err_nl, progname, errmsg, fn);
+ e_exit(EXIT_FATAL);
+}
+
+
+/*************************************************************************
+// file_t
+**************************************************************************/
+
+void f_reset(file_t *ft)
+{
+ ft->opt_name = opt_name;
+ ft->part = 0;
+ ft->bytes_read = 0;
+ ft->bytes_written = 0;
+ ft->warn_multipart = 0;
+ ft->warn_unknown_suffix = 0;
+}
+
+
+void f_init(void)
+{
+ memset(&fi,0,sizeof(file_t));
+ memset(&fo,0,sizeof(file_t));
+ fi.fd = -1;
+ fo.fd = -1;
+#if defined(USE_FOPEN)
+ fi.file = NULL;
+ fo.file = NULL;
+#endif
+ f_reset(&fi);
+ f_reset(&fo);
+}
+
+
+int f_open(file_t *ft, lzo_bool r)
+{
+ assert(ft->name[0]);
+ ft->fd = -1;
+#if defined(O_BINARY)
+ ft->open_flags |= O_BINARY;
+#endif
+#if (ACC_OS_WIN32 || ACC_OS_WIN64) && defined(_O_SEQUENTIAL)
+ ft->open_flags |= _O_SEQUENTIAL;
+#endif
+#if defined(USE_FOPEN)
+ ft->file = NULL;
+ if (r)
+ ft->file = fopen(ft->name,"rb");
+ else if (ft->open_flags & O_EXCL)
+ {
+ if (file_exists(ft->name))
+ errno = EEXIST;
+ else
+ ft->file = fopen(ft->name,"wb");
+ }
+ else
+ ft->file = fopen(ft->name,"wb");
+ if (ft->file != NULL)
+ {
+ ft->fd = fileno(ft->file);
+ assert(ft->fd >= 0);
+ }
+#else
+ if (r)
+ ft->fd = open(ft->name, ft->open_flags, 0);
+ else
+ {
+#if defined(O_EXCL_BROKEN)
+ if ((ft->open_flags & O_EXCL) && file_exists(ft->name))
+ errno = EEXIST;
+ else
+#endif
+ ft->fd = open(ft->name, ft->open_flags, ft->st.st_mode);
+ }
+#endif
+ if (ft->fd >= 0 && (ft->fd == STDIN_FILENO || ft->fd == STDOUT_FILENO || ft->fd == STDERR_FILENO))
+ {
+ fatal(ft,"sanity check failed: f_open()");
+ ft->fd = -1;
+ }
+ return ft->fd;
+}
+
+
+int f_close(file_t *ft)
+{
+ int r;
+
+ if (ft->fd < 0)
+ return 0;
+ if (ft->fd == STDIN_FILENO || ft->fd == STDOUT_FILENO || ft->fd == STDERR_FILENO)
+ return 0;
+#if defined(USE_FOPEN)
+ assert(ft->file != NULL);
+ r = fclose(ft->file);
+ ft->file = NULL;
+#else
+ r = close(ft->fd);
+#endif
+ ft->fd = -1;
+ return r;
+}
+
+
+/*************************************************************************
+// read and write
+// handles partial pipe writes and interrupted system calls
+**************************************************************************/
+
+lzo_int read_buf(file_t *ft, lzo_voidp buffer, lzo_int cnt)
+{
+ lzo_int n;
+ long l;
+
+ assert(cnt >= 0 && cnt < LONG_MAX);
+ l = acc_safe_hread(ft->fd, buffer, (long) cnt);
+ n = (lzo_int) l;
+ assert(n >= 0); assert(n == l);
+
+ ft->bytes_read += n;
+ total_bytes_read += n;
+ return n;
+}
+
+
+void write_buf(file_t *ft, const lzo_voidp buffer, lzo_int cnt)
+{
+ lzo_int n;
+ long l;
+
+ assert(cnt >= 0 && cnt < LONG_MAX);
+ if (ft->fd < 0)
+ return;
+ l = acc_safe_hwrite(ft->fd, buffer, (long) cnt);
+ n = (lzo_int) l;
+ assert(n >= 0); assert(n == l);
+
+ ft->bytes_written += n;
+ total_bytes_written += n;
+ if (n != cnt)
+ write_error(ft);
+}
+
+
+/*************************************************************************
+// misc IO
+**************************************************************************/
+
+static unsigned get_be16(const unsigned char *b)
+{
+ unsigned v;
+
+ v = (unsigned) b[1] << 0;
+ v |= (unsigned) b[0] << 8;
+ return v;
+}
+
+static void set_be16(unsigned char *b, unsigned v)
+{
+ b[1] = (unsigned char) (v >> 0);
+ b[0] = (unsigned char) (v >> 8);
+}
+
+
+static lzo_uint32 get_be32(const unsigned char *b)
+{
+ lzo_uint32 v;
+
+ v = (lzo_uint32) b[3] << 0;
+ v |= (lzo_uint32) b[2] << 8;
+ v |= (lzo_uint32) b[1] << 16;
+ v |= (lzo_uint32) b[0] << 24;
+ return v;
+}
+
+static void set_be32(unsigned char *b, lzo_uint32 v)
+{
+ b[3] = (unsigned char) (v >> 0);
+ b[2] = (unsigned char) (v >> 8);
+ b[1] = (unsigned char) (v >> 16);
+ b[0] = (unsigned char) (v >> 24);
+}
+
+
+#if 0 /* NOT USED */
+static void write8(file_t *ft, int v)
+{
+ unsigned char b = (unsigned char) v;
+ write_buf(ft,&b,1);
+}
+#endif
+
+
+void read32(file_t *ft, lzo_uint32 *v)
+{
+ unsigned char b[4];
+ if (read_buf(ft,b,4) != 4)
+ read_error(ft);
+ *v = get_be32(b);
+}
+
+void write32(file_t *ft, lzo_uint32 v)
+{
+ unsigned char b[4];
+ set_be32(b,v);
+ write_buf(ft,b,4);
+}
+
+
+static int f_read8(file_t *ft, unsigned char *b)
+{
+ unsigned char bb;
+ if (read_buf(ft,&bb,1) != 1)
+ read_error(ft);
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,&bb,1);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,&bb,1);
+ if (b)
+ *b = bb;
+ return bb;
+}
+
+static void f_write8(file_t *ft, int v)
+{
+ unsigned char b = (unsigned char) v;
+ write_buf(ft,&b,1);
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,&b,1);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,&b,1);
+}
+
+
+static void f_read16(file_t *ft, unsigned *v)
+{
+ unsigned char b[2];
+ if (read_buf(ft,b,2) != 2)
+ read_error(ft);
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,b,2);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,b,2);
+ *v = get_be16(b);
+}
+
+static void f_write16(file_t *ft, unsigned v)
+{
+ unsigned char b[2];
+ set_be16(b,v);
+ write_buf(ft,b,2);
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,b,2);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,b,2);
+}
+
+
+static void f_read32(file_t *ft, lzo_uint32 *v)
+{
+ unsigned char b[4];
+ if (read_buf(ft,b,4) != 4)
+ read_error(ft);
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,b,4);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,b,4);
+ *v = get_be32(b);
+}
+
+static void f_write32(file_t *ft, lzo_uint32 v)
+{
+ unsigned char b[4];
+ set_be32(b,v);
+ write_buf(ft,b,4);
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,b,4);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,b,4);
+}
+
+
+static void f_write(file_t *ft, const lzo_voidp buf, lzo_int cnt)
+{
+ if (cnt > 0)
+ {
+ write_buf(ft,buf,cnt);
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,(const lzo_bytep)buf,cnt);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,(const lzo_bytep)buf,cnt);
+ }
+}
+
+static lzo_int f_read(file_t *ft, lzo_voidp buf, lzo_int cnt)
+{
+ cnt = read_buf(ft,buf,cnt);
+ if (cnt > 0)
+ {
+ ft->f_adler32 = lzo_adler32(ft->f_adler32,(const lzo_bytep)buf,cnt);
+ ft->f_crc32 = lzo_crc32(ft->f_crc32,(const lzo_bytep)buf,cnt);
+ }
+ return cnt;
+}
+
+
+/***********************************************************************
+// lzop file signature
+************************************************************************/
+
+/*
+ * The first nine bytes of a lzop file always contain the following values:
+ *
+ * 0 1 2 3 4 5 6 7 8
+ * --- --- --- --- --- --- --- --- ---
+ * (hex) 89 4c 5a 4f 00 0d 0a 1a 0a
+ * (decimal) 137 76 90 79 0 13 10 26 10
+ * (C notation - ASCII) \211 L Z O \0 \r \n \032 \n
+ */
+
+static const unsigned char lzop_magic[9] =
+ { 0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a };
+
+static const char * const header_error[] = {
+ "[0]",
+ "not a " PACKAGE " file", /* 1 */
+ "header corrupted (checksum error)", /* 2 */
+ "header corrupted", /* 3 */
+ "header corrupted (DOS -> UNIX conversion ?)", /* 4 */
+ "header corrupted (DOS -> Mac conversion ?)", /* 5 */
+ "header corrupted (UNIX -> Mac conversion ?)", /* 6 */
+ "header corrupted (Mac -> UNIX conversion ?)", /* 7 */
+ "header corrupted (UNIX -> DOS conversion ?)", /* 8 */
+ "header corrupted (end of line conversion ?)", /* 9 */
+ "header corrupted (DOS EOF conversion ?)", /* 10 */
+ "header corrupted (transmitted through a 7-bit channel ?)", /* 11 */
+ "header corrupted (transmitted in text mode ?)", /* 12 */
+ "unknown header flags -- get a newer version of " PACKAGE, /* 13 */
+ "unknown compression method -- get a newer version of " PACKAGE, /* 14 */
+ "unknown compression level -- get a newer version of " PACKAGE, /* 15 */
+ "you need a newer version of " PACKAGE, /* 16 */
+ "compression method not supported -- recompile " PACKAGE, /* 17 */
+ "decompression method not supported -- recompile " PACKAGE, /* 18 */
+ NULL
+};
+
+
+static int check_magic(const unsigned char *magic)
+{
+ const unsigned char *m;
+
+ if (memcmp(magic,lzop_magic,sizeof(lzop_magic)) == 0)
+ return 0;
+
+ /* We have a bad magic signature. Try to figure what possibly
+ * could have gone wrong. */
+
+ /* look at bytes 1-3: "LZO" in hex and local text format */
+ if (memcmp(&magic[1],&lzop_magic[1],3) != 0 &&
+ memcmp(&magic[1],"LZO",3) != 0)
+ return 1;
+
+ /* look at byte 4 */
+ if (magic[4] != lzop_magic[4])
+ return 1;
+
+ /* look at bytes 5-8 */
+ m = &magic[5];
+ if (memcmp(m,"\012\012\032",3) == 0)
+ return 7;
+ if (memcmp(m,"\012\012",2) == 0)
+ return 4;
+ if (memcmp(m,"\012\032",2) == 0)
+ return 4;
+ if (memcmp(m,"\015\012\012",3) == 0)
+ return 10;
+ if (memcmp(m,"\015\012\032\012",4) == 0)
+ return 9;
+ if (memcmp(m,"\015\012\032\015",4) == 0)
+ return 8;
+ if (memcmp(m,"\015\015\012\032",4) == 0)
+ return 8;
+ if (memcmp(m,"\015\015\032",3) == 0)
+ return 6;
+ if (memcmp(m,"\015\032",2) == 0)
+ return 5;
+ if (memcmp(m,&lzop_magic[5],4) != 0)
+ return 12;
+
+ /* look at byte 0 */
+ if (magic[0] == (unsigned char) (lzop_magic[0] & 0x7f))
+ return 11;
+ if (magic[0] != lzop_magic[0])
+ return 12;
+
+ return 3;
+}
+
+
+/*************************************************************************
+// lzop file header
+**************************************************************************/
+
+void init_compress_header(header_t *h, const file_t *fip, const file_t *fop)
+{
+ assert(opt_method > 0);
+ assert(opt_level > 0);
+ assert(fip->st.st_mode == 0 || S_ISREG(fip->st.st_mode));
+
+ memset(h,0,sizeof(header_t));
+
+ h->version = LZOP_VERSION & 0xffff;
+ h->version_needed_to_extract = opt_filter ? 0x0950: 0x0940;
+ h->lib_version = lzo_version() & 0xffff;
+ h->method = (unsigned char) opt_method;
+ h->level = (unsigned char) opt_level;
+ h->filter = opt_filter;
+
+ h->flags = 0;
+ h->flags |= F_OS & F_OS_MASK;
+ h->flags |= F_CS & F_CS_MASK;
+ if (opt_filter)
+ h->flags |= F_H_FILTER;
+ if (fip->fd == STDIN_FILENO)
+ h->flags |= F_STDIN;
+ if (fop->fd == STDOUT_FILENO)
+ h->flags |= F_STDOUT;
+ if (!opt_file && num_files > 1)
+ h->flags |= F_MULTIPART;
+#ifdef OPT_NAME_DEFAULT
+ h->flags |= F_NAME_DEFAULT;
+#endif
+#ifdef DOSISH
+ h->flags |= F_DOSISH;
+#endif
+ if (opt_crc32)
+ {
+ h->flags |= F_H_CRC32;
+ if (h->version_needed_to_extract < 0x1001)
+ h->version_needed_to_extract = 0x1001;
+ }
+
+ h->mode = fix_mode_for_header(fip->st.st_mode);
+
+ if (fip->st.st_mtime)
+ {
+ 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;
+ }
+
+ if (fip->name[0] && fip->fd != STDIN_FILENO)
+ {
+ int r = 0;
+ if (opt_path)
+ {
+ char newname[255+1];
+ r = fn_cleanpath(fip->name, newname, sizeof(newname), 0);
+ if (r > 0 && newname[0] && strlen(newname) <= 255)
+ {
+ strcpy(h->name, newname);
+ h->flags |= F_H_PATH;
+ if (h->version_needed_to_extract < 0x1001)
+ h->version_needed_to_extract = 0x1001;
+ }
+ else
+ r = 0;
+ }
+ if (r == 0)
+ {
+ const char *n = fn_basename(fip->name);
+ if (n[0] && strlen(n) <= 255)
+ strcpy(h->name, n);
+ }
+ }
+}
+
+
+void write_header(file_t *ft, const header_t *h)
+{
+ size_t l;
+
+#ifdef MAINT
+ /* undocumented option '--no-header'. just for testing. */
+ if (opt_noheader > 0)
+ {
+ switch (opt_noheader)
+ {
+ case 1:
+ write32(ft,h->flags);
+ break;
+ case 2:
+ write32(ft,h->flags);
+ write8(ft,h->method);
+ write8(ft,h->level);
+ break;
+ default:
+ /* write no header at all */
+ break;
+ }
+ return;
+ }
+#endif
+
+ write_buf(ft,lzop_magic,sizeof(lzop_magic));
+
+ ft->f_adler32 = ADLER32_INIT_VALUE;
+ ft->f_crc32 = CRC32_INIT_VALUE;
+
+ f_write16(ft,h->version);
+ f_write16(ft,h->lib_version);
+ f_write16(ft,h->version_needed_to_extract);
+ f_write8(ft,h->method);
+ f_write8(ft,h->level);
+ f_write32(ft,h->flags);
+ if (h->flags & F_H_FILTER)
+ f_write32(ft,h->filter);
+ f_write32(ft,h->mode);
+ f_write32(ft,h->mtime_low);
+ f_write32(ft,h->mtime_high);
+
+ l = strlen(h->name);
+ assert(l <= 255);
+ f_write8(ft,(int)l);
+ if (l > 0)
+ f_write(ft,h->name,(int)l);
+
+ if (h->flags & F_H_CRC32)
+ f_write32(ft,ft->f_crc32);
+ else
+ f_write32(ft,ft->f_adler32);
+}
+
+
+static int read_header(file_t *ft, header_t *h)
+{
+ int r;
+ int l;
+ lzo_uint32 checksum;
+
+ memset(h,0,sizeof(header_t));
+ h->version_needed_to_extract = 0x0900; /* first public lzop version */
+ h->level = 0;
+ h->method_name = "unknown";
+
+ ft->f_adler32 = ADLER32_INIT_VALUE;
+ ft->f_crc32 = CRC32_INIT_VALUE;
+
+ f_read16(ft,&h->version);
+ if (h->version < 0x0900)
+ return 3;
+ f_read16(ft,&h->lib_version);
+ if (h->version >= 0x0940)
+ {
+ f_read16(ft,&h->version_needed_to_extract);
+ if (h->version_needed_to_extract > LZOP_VERSION)
+ return 16;
+ if (h->version_needed_to_extract < 0x0900)
+ return 3;
+ }
+ f_read8(ft,&h->method);
+ if (h->version >= 0x0940)
+ f_read8(ft,&h->level);
+ f_read32(ft,&h->flags);
+ if (h->flags & F_H_FILTER)
+ f_read32(ft,&h->filter);
+ f_read32(ft,&h->mode);
+#if 1
+ if (h->flags & F_STDIN) /* do not use mode from stdin compression */
+ h->mode = 0;
+#endif
+ f_read32(ft,&h->mtime_low);
+ if (h->version >= 0x0940)
+ f_read32(ft,&h->mtime_high);
+ if (h->version < 0x0120) {
+ if (h->mtime_low == 0xffffffffUL)
+ h->mtime_low = 0;
+ h->mtime_high = 0;
+ }
+
+ l = f_read8(ft,NULL);
+ if (l > 0) {
+ char name[255+1];
+ if (f_read(ft,name,l) != l)
+ read_error(ft);
+ name[l] = 0;
+ if (fn_cleanpath(name, h->name, 255+1, 1|2) < 0)
+ h->name[0] = 0;
+ }
+
+ checksum = (h->flags & F_H_CRC32) ? ft->f_crc32 : ft->f_adler32;
+ f_read32(ft,&h->header_checksum);
+ if (h->header_checksum != checksum)
+ return 2;
+
+ if (h->method <= 0)
+ return 14;
+ r = x_get_method(h);
+ if (r != 0)
+ return r;
+
+/* check reserved flags */
+ if (h->flags & F_RESERVED)
+ return (opt_force >= 2) ? -13 : 13;
+
+/* skip extra field [not used yet] */
+ if (h->flags & F_H_EXTRA_FIELD)
+ {
+ lzo_uint32 k;
+
+ /* note: the checksum also covers the length */
+ ft->f_adler32 = ADLER32_INIT_VALUE;
+ ft->f_crc32 = CRC32_INIT_VALUE;
+ f_read32(ft,&h->extra_field_len);
+ for (k = 0; k < h->extra_field_len; k++)
+ (void) f_read8(ft,NULL);
+ checksum = (h->flags & F_H_CRC32) ? ft->f_crc32 : ft->f_adler32;
+ f_read32(ft,&h->extra_field_checksum);
+ if (h->extra_field_checksum != checksum)
+ return 3;
+ if (opt_verbose >= 2)
+ info(ft,"ignoring extra field");
+ }
+
+ return 0;
+}
+
+
+/* return 0 for valid magic, -1 for EOF, or positive value for error */
+static int p_magic(file_t *ft)
+{
+ int r;
+ lzo_int l;
+ unsigned char magic[sizeof(lzop_magic)];
+
+ l = read_buf(ft,magic,sizeof(magic));
+ if (ft->part > 0 && l <= 0)
+ return -1;
+ if (l == (lzo_int) sizeof(magic))
+ r = check_magic(magic);
+ else
+ r = 1;
+ assert(r >= 0);
+ if (ft->part > 0 && r == 1)
+ {
+#if 1
+ /* gzip: check for trailing zero bytes */
+ unsigned char b;
+ while (--l >= 0)
+ if (magic[(int)l] != '\0')
+ goto garbage;
+ while (read_buf(ft,&b,1) == 1)
+ if (b != '\0')
+ goto garbage;
+ if (opt_verbose >= 2)
+ warn(ft,"ignoring trailing zero bytes in " PACKAGE " file");
+ return -1;
+garbage:
+#endif
+ warn(ft,"ignoring trailing garbage in " PACKAGE " file");
+ return -1;
+ }
+ if (r != 0)
+ {
+ assert(r > 0 && r <= 18);
+ error(ft,header_error[r]);
+ }
+ return r;
+}
+
+
+static lzo_bool p_header(file_t *ft, header_t *h)
+{
+ int r;
+
+ r = read_header(ft,h);
+ if (r == 0)
+ return 1;
+ if (r < 0)
+ {
+ r = -r;
+ assert(r > 0 && r <= 18);
+ error(ft,header_error[r]);
+ return 1;
+ }
+ else
+ {
+ assert(r > 0 && r <= 18);
+ error(ft,header_error[r]);
+ return 0;
+ }
+}
+
+
+/*************************************************************************
+// test
+**************************************************************************/
+
+void do_test(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len)
+{
+ total_d_files++;
+ total_c_len += c_len;
+ total_d_len += d_len;
+ UNUSED(h);
+}
+
+
+void do_test_total(void)
+{
+ FILE *f;
+
+ if ((total_c_files < 2 && total_d_files < 2) || opt_verbose < 2)
+ return;
+
+ f = stderr;
+ fprintf(f,"%lu file%s successfully tested", total_c_files,
+ total_c_files == 1 ? " was" : "s were");
+ if (total_c_files != total_d_files)
+ fprintf(f," [containing %lu files]", total_d_files);
+ fprintf(f,"\n");
+ fflush(f);
+}
+
+
+/*************************************************************************
+// list a file
+**************************************************************************/
+
+static unsigned long get_ratio(lzop_ulong_t d_len, lzop_ulong_t c_len)
+{
+ unsigned long n1 = 1000L * 1000L;
+ unsigned long n2 = 1;
+ const lzop_ulong_t umax = ~((lzop_ulong_t)0);
+
+ if (d_len <= 0)
+ return c_len <= 0 ? 0ul : n1;
+ while (n1 > 1 && c_len > (umax / n1))
+ {
+ n1 /= 10;
+ n2 *= 10;
+ }
+ return (unsigned long) ((c_len * n1) / (d_len / n2));
+}
+
+
+static void pr_size(FILE *f, lzop_ulong_t a, lzop_ulong_t b, int flags)
+{
+ unsigned long ratio, r1, r2, al, bl;
+
+ ratio = (flags & 1) ? get_ratio(a, b) : get_ratio(b, a);
+ ratio += 500; /* for rounding */
+ r1 = ratio / 10000;
+ r2 = (ratio % 10000) / 1000;
+
+#if (SIZEOF_LONG >= 8) || !defined(acc_int64l_t)
+ al = (unsigned long) a;
+ bl = (unsigned long) b;
+ fprintf(f,"%9lu %9lu %3lu.%01lu%%", al, bl, r1, r2);
+#else
+ al = (unsigned long) (a % 1000000000ul);
+ bl = (unsigned long) (b % 1000000000ul);
+ if (a == al && b == bl)
+ {
+ fprintf(f,"%9lu %9lu %3lu.%01lu%%", al, bl, r1, r2);
+ }
+ else if (a == al)
+ {
+ unsigned long bh = (unsigned long) (b / 1000000000ul);
+ fprintf(f,"%9lu %lu%09lu %3lu.%01lu%%", al, bh, bl, r1, r2);
+ }
+ else if (b == bl)
+ {
+ unsigned long ah = (unsigned long) (a / 1000000000ul);
+ fprintf(f,"%lu%09lu %9lu %3lu.%01lu%%", ah, al, bl, r1, r2);
+ }
+ else
+ {
+ unsigned long ah = (unsigned long) (a / 1000000000ul);
+ unsigned long bh = (unsigned long) (b / 1000000000ul);
+ fprintf(f,"%lu%09lu %lu%09lu %3lu.%01lu%%", ah, al, bh, bl, r1, r2);
+ }
+#endif
+}
+
+
+static char *modestr(lzo_uint32 mode)
+{
+ static char s[10+1];
+
+ mode_string(fix_mode_for_ls(mode),s);
+ s[0] = '-';
+ s[10] = 0;
+ return s;
+}
+
+
+void do_list(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len)
+{
+ FILE *f;
+ char s[40];
+ time_t t;
+
+ f = stdout;
+ s[0] = 0;
+ t = get_mtime(h);
+
+ if (total_d_files == 0 && opt_verbose > 0)
+ {
+ if (opt_verbose >= 3)
+ ((void)0);
+ else if (opt_verbose >= 2)
+ {
+ fprintf(f,"Method Length Packed Ratio ");
+ fprintf(f," Date Time Name\n");
+ fprintf(f,"------ ------ ------ ----- ");
+ fprintf(f," ---- ---- ----\n");
+ }
+ else
+ {
+ fprintf(f,"%-11s ", "method");
+ fprintf(f,"compressed uncompr. ratio");
+ fprintf(f," uncompressed_name\n");
+ }
+ fflush(f);
+ }
+
+ if (opt_verbose >= 3)
+ {
+ fprintf(f,"%-10s", modestr(h->mode));
+ if (t)
+ time2str(s,sizeof(s),&t);
+ fprintf(f," %-19s",s);
+ fprintf(f," %-20s",fi.name);
+ if (fo.name[0])
+ fprintf(f," %s", fo.name);
+ }
+ else if (opt_verbose >= 2)
+ {
+ fprintf(f,"%-11s ", h->method_name);
+ pr_size(f, d_len, c_len, 1);
+ if (t)
+ time2str(s,sizeof(s),&t);
+ s[16] = 0; /* cut off seconds */
+ fprintf(f," %-16s",s);
+ if (fo.name[0])
+ fprintf(f," %s", fo.name);
+ }
+ else
+ {
+ fprintf(f,"%-11s ", h->method_name);
+ pr_size(f, c_len, d_len, 0);
+ if (fo.name[0])
+ fprintf(f," %s", fo.name);
+ }
+
+ fprintf(f,"\n");
+ fflush(f);
+
+ total_d_files++;
+ total_c_len += c_len;
+ total_d_len += d_len;
+}
+
+
+void do_list_total(void)
+{
+ FILE *f;
+
+ if (total_d_files < 2 || opt_verbose == 0)
+ return;
+ if (opt_verbose >= 3)
+ return;
+
+ f = stdout;
+ if (opt_verbose >= 2)
+ {
+ fprintf(f," ------- ------- ----- ");
+ fprintf(f," ----\n");
+ fprintf(f,"%-11s ", "");
+ pr_size(f, total_d_len, total_c_len, 1);
+ fprintf(f," %-16s", "");
+ fprintf(f," %lu files\n", total_d_files);
+ }
+ else
+ {
+ fprintf(f,"%-11s ", "");
+ pr_size(f, total_c_len, total_d_len, 0);
+ fprintf(f," (totals -- %lu files)\n", total_d_files);
+ }
+ fflush(f);
+}
+
+
+/*************************************************************************
+// list a file similar to 'ls -ln'
+**************************************************************************/
+
+void do_ls(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len)
+{
+ FILE *f;
+ char s[40];
+ time_t t;
+ const char *name = fo.name[0] ? fo.name : UNKNOWN_NAME;
+
+ f = stdout;
+ t = get_mtime(h);
+ if (t == 0)
+ time(&t);
+ fprintf(f,"%-10s 1", modestr(h->mode));
+ if (opt_stdin)
+ fprintf(f," %-8s", "user");
+ else
+ fprintf(f," %-8ld", (long) fi.st.st_uid);
+ if (!strchr(opt_ls_flags,'G'))
+ {
+ if (opt_stdin)
+ fprintf(f," %-8s", "group");
+ else
+ fprintf(f," %-8ld", (long) fi.st.st_gid);
+ }
+
+#if (SIZEOF_LONG >= 8) || !defined(acc_int64l_t)
+ fprintf(f," %8lu", (unsigned long) d_len);
+#else
+ {
+ unsigned long d0, d1, d2;
+ d0 = (unsigned long) (d_len % 100000000ul);
+ if (d0 == d_len)
+ fprintf(f," %8lu", d0);
+ else
+ {
+ d1 = (unsigned long) ((d_len / 100000000ul) % 100000000ul);
+ d2 = (unsigned long) ((d_len / 100000000ul) / 100000000ul);
+ if (d2 != 0)
+ fprintf(f,"%lu%08lu%08lu", d2, d1, d0);
+ else
+ fprintf(f,"%lu%08lu", d1, d0);
+ }
+ }
+#endif
+ time2ls(s, sizeof(s), &t);
+ fprintf(f," %-12s",s);
+ if (strchr(opt_ls_flags,'Q'))
+ fprintf(f," \"%s\"", name);
+ else
+ fprintf(f," %s", name);
+ if (strchr(opt_ls_flags,'F'))
+ if (h->mode & 0111)
+ fprintf(f,"*");
+ fprintf(f,"\n");
+ fflush(f);
+
+ UNUSED(c_len);
+}
+
+
+/*************************************************************************
+// header info
+**************************************************************************/
+
+static void print_version(FILE *f, unsigned v)
+{
+ fprintf(f,"%1x.%03x", (v >> 12) & 0xf, v & 0xfff);
+}
+
+
+static void print_os(FILE *f, lzo_uint32 flags)
+{
+ flags = (flags & F_OS_MASK) >> F_OS_SHIFT;
+ fprintf(f,"%2ld", (long) flags);
+}
+
+
+void do_info(const header_t *h, lzop_ulong_t d_len, lzop_ulong_t c_len)
+{
+ int v = opt_verbose;
+ FILE *f;
+
+ f = stdout;
+ opt_verbose = 2;
+ ++total_d_files; /* do not print the list-header */
+ do_list(h,d_len,c_len);
+ --total_d_files;
+ opt_verbose = v;
+
+ fprintf(f," ");
+ print_version(f,h->version);
+ fprintf(f," ");
+ print_version(f,h->lib_version);
+ fprintf(f," ");
+ print_version(f,h->version_needed_to_extract);
+ fprintf(f," Fl: 0x%08lx", (long) h->flags);
+ fprintf(f," Mo: 0%011lo", (long) h->mode);
+ fprintf(f," Me: %d/%d", h->method, h->level);
+ fprintf(f," OS: ");
+ print_os(f,h->flags);
+ if (h->filter)
+ fprintf(f," Fi: %3ld", (long) h->filter);
+ fprintf(f,"\n");
+}
+
+
+/*************************************************************************
+// determine name of output file
+**************************************************************************/
+
+static lzo_bool can_restore_name(file_t *ft, const header_t *h)
+{
+ if (h->name[0] == 0 || ft->opt_name == 0)
+ return 0;
+ else if (ft->opt_name > 0)
+ return 1;
+#ifdef OPT_NAME_DEFAULT
+#if 1
+ else
+ return 1;
+#else
+ /* restore the name by default only when created on such a system */
+ else if ((h->flags & F_NAME_DEFAULT))
+ return 1;
+ else
+ return 0;
+#endif
+#else
+ /* do not restore the name by default */
+ else
+ return 0;
+#endif /* OPT_NAME_DEFAULT */
+}
+
+
+static lzo_bool oname_error(void)
+{
+ if (opt_force >= 2 || opt_cmd == CMD_TEST)
+ {
+ warn(&fi,"can't determine name of output file -- using default");
+ return 1;
+ }
+ if (opt_name != 1)
+ error(&fi,"can't determine name of output file (try option '-N')");
+ else
+ error(&fi,"can't determine name of output file (use option '-o')");
+ strcpy(fo.name,UNKNOWN_NAME);
+ return 0;
+}
+
+
+static lzo_bool p_set_oname(const header_t *h)
+{
+ char *base;
+ char *ext;
+ int suff;
+ size_t l;
+ const char *err_name;
+ const char *s;
+ size_t sl;
+
+ fo.name[0] = 0;
+ if (opt_output_name)
+ {
+ /* name given on command line; perform no additional checks */
+ strcpy(fo.name,opt_output_name);
+ return 1;
+ }
+
+ assert(!opt_stdout);
+ assert(opt_file);
+
+#if defined(NRVP)
+ err_name = (opt_cmd == CMD_COMPRESS) ? "nrvp.nrv" : "nrvp.raw";
+ s = opt_suffix[0] ? opt_suffix : ".nrv";
+#else
+ err_name = (opt_cmd == CMD_COMPRESS) ? "lzop.lzo" : "lzop.raw";
+ s = opt_suffix[0] ? opt_suffix : ".lzo";
+#endif
+
+ sl = strlen(s);
+
+ if (opt_output_path)
+ {
+ strcpy(fo.name,opt_output_path);
+ fn_addslash(fo.name,1);
+ if (!opt_stdin)
+ strcat(fo.name,fn_basename(fi.name));
+ }
+ else if (!opt_stdin)
+ strcpy(fo.name,fi.name);
+ l = strlen(fo.name);
+ if (l >= PATH_MAX)
+ {
+ error(&fo,"name too long (use option '-o')");
+ return 0;
+ }
+ base = fo.name + fn_baseindex(fo.name);
+ suff = fn_has_suffix(base);
+ ext = strchr(base,'.');
+
+ if (opt_cmd == CMD_COMPRESS)
+ {
+ assert(!opt_stdin);
+ assert(base[0]);
+#if defined(DOSISH)
+ if (suff == SUFF_TAR)
+ {
+#if defined(NRVP)
+ strcpy(ext, opt_suffix[0] ? opt_suffix : ".tnv");
+#else
+ strcpy(ext, opt_suffix[0] ? opt_suffix : ".tzo");
+#endif
+ }
+ else
+#endif
+ if (opt_shortname && ext)
+ strcpy(ext,s);
+ else
+ strcat(fo.name,s);
+ }
+ else
+ {
+ lzo_bool u = 0;
+
+ if (can_restore_name(&fi,h))
+ {
+ if (opt_path)
+ strcpy(base,h->name);
+ else
+ strcpy(base,fn_basename(h->name));
+ }
+ else if (opt_stdin)
+ {
+ if (!oname_error())
+ return 0;
+ strcpy(base,err_name);
+ }
+ else if (suff == SUFF_LZO)
+ fo.name[l-4] = 0;
+ else if (suff == SUFF_LZOP)
+ fo.name[l-5] = 0;
+ else if (suff == SUFF_NRV)
+ fo.name[l-4] = 0;
+ else if (suff == SUFF_TZO)
+ strcpy(&fo.name[l-4],".tar");
+ else if (suff == SUFF_USER)
+ fo.name[l-sl] = 0;
+ else
+ {
+ u = 1;
+ if (opt_shortname && ext)
+ strcpy(ext,".raw");
+ else
+ strcat(fo.name,".raw");
+ }
+
+ if (u && opt_cmd == CMD_DECOMPRESS && !opt_stdin)
+ {
+#if 1
+ if (!(opt_force >= 2))
+ {
+ if (fi.warn_unknown_suffix == 0)
+ error(&fi,"unknown suffix -- ignored");
+ fi.warn_unknown_suffix = 1;
+ return 0;
+ }
+#else
+ /* gzip: '--force' doesn't override these checks */
+ if (fi.warn_unknown_suffix == 0)
+ error(&fi,"unknown suffix -- ignored");
+ fi.warn_unknown_suffix = 1;
+ return 0;
+#endif
+ }
+
+ }
+
+ if (strlen(fo.name) >= PATH_MAX)
+ {
+ error(&fo,"name too long (use option '-o')");
+ return 0;
+ }
+#if defined(DOSISH)
+ s = maybe_rename_file(fo.name);
+ if (s == NULL)
+ {
+ if (!oname_error())
+ return 0;
+ strcpy(base,err_name);
+ }
+ else if (s != fo.name)
+ {
+ if (strcmp(s,fo.name) != 0)
+ {
+ warn(&fo,"renaming output file to match OS conventions");
+ strcpy(fo.name,s);
+ }
+ }
+#endif
+
+ UNUSED(ext);
+ return 1;
+}
+
+
+/*************************************************************************
+// stdin/stdout
+**************************************************************************/
+
+static lzo_bool check_stdin(file_t *ft)
+{
+ if (!opt_force && acc_isatty(STDIN_FILENO))
+ {
+ strcpy(ft->name,STDIN_NAME);
+ if (opt_cmd == CMD_COMPRESS)
+ fatal(ft,"uncompressed data not read from a terminal");
+ else
+ fatal(ft,"compressed data not read from a terminal");
+ return 0;
+ }
+ return 1;
+}
+
+
+static lzo_bool check_stdout(file_t *ft)
+{
+ if (!(opt_cmd == CMD_COMPRESS || opt_cmd == CMD_DECOMPRESS))
+ return 1;
+ if (!opt_force && acc_isatty(STDOUT_FILENO))
+ {
+ strcpy(ft->name,STDOUT_NAME);
+ if (opt_cmd == CMD_COMPRESS)
+ fatal(ft,"compressed data not written to a terminal");
+ else
+ fatal(ft,"uncompressed data not written to a terminal");
+ return 0;
+ }
+ return 1;
+}
+
+
+static lzo_bool open_stdin(file_t *ft)
+{
+ static lzo_bool setmode_done = 0;
+
+ assert(ft->fd == -1);
+ f_reset(ft);
+
+ strcpy(ft->name,STDIN_NAME);
+ ft->fd = STDIN_FILENO;
+
+#if !defined(NO_SETMODE)
+ if (!setmode_done)
+ {
+ if (acc_set_binmode(ft->fd, 1) == -1)
+ {
+ p_fatal(ft,"acc_set_binmode(stdin) failed");
+ return 0;
+ }
+ }
+#endif
+ setmode_done = 1;
+
+ ft->st.st_mtime = time(NULL);
+#if 1 && defined(HAVE_FSTAT)
+ {
+ struct stat st;
+ if (fstat(ft->fd, &st) == 0 && S_ISREG(st.st_mode))
+ ft->st = st;
+ }
+#endif
+ ft->st.st_atime = fix_time(ft->st.st_atime);
+ ft->st.st_mtime = fix_time(ft->st.st_mtime);
+ return 1;
+}
+
+
+static lzo_bool open_stdout(file_t *ft)
+{
+ static lzo_bool setmode_done = 0;
+
+ assert(ft->fd == -1);
+ f_reset(ft);
+
+ strcpy(ft->name,STDOUT_NAME);
+ if (!(opt_cmd == CMD_COMPRESS || opt_cmd == CMD_DECOMPRESS))
+ {
+ ft->fd = -2; /* special file-handle for dummy output */
+ return 1;
+ }
+ ft->fd = STDOUT_FILENO;
+
+#if !defined(NO_SETMODE)
+ if (!setmode_done)
+ {
+ if (acc_set_binmode(ft->fd, 1) == -1)
+ {
+ p_fatal(ft,"acc_set_binmode(stdout) failed");
+ return 0;
+ }
+ }
+#endif
+ setmode_done = 1;
+
+ return 1;
+}
+
+
+/*************************************************************************
+// open input file
+**************************************************************************/
+
+lzo_bool p_open_fi(const char *name)
+{
+ int r, saved_errno;
+#if defined(HAVE_LSTAT) && defined(S_ISLNK)
+ int r2;
+#endif
+
+ if (fi.fd != -1)
+ return 1;
+
+ f_reset(&fi);
+
+/* prepare file name */
+ assert(name != NULL);
+ if (strlen(name) >= PATH_MAX)
+ {
+ if (strlen(name) >= sizeof(fi.name))
+ strcpy(fi.name,UNKNOWN_NAME);
+ else
+ strcpy(fi.name,name);
+ error(&fi,"name too long");
+ return 0;
+ }
+ strcpy(fi.name,name);
+ fn_strlwr(fi.name);
+ if (opt_cmd == CMD_COMPRESS)
+ {
+ int suff = fn_has_suffix(fi.name);
+#if 1
+ if (opt_stdout || opt_output_name)
+ suff = SUFF_NONE; /* do not warn */
+#endif
+#if 1
+ if (opt_force >= 2)
+ suff = SUFF_NONE; /* do not warn */
+#else
+ /* gzip: '--force' doesn't override these checks */
+#endif
+ if (suff == SUFF_LZO)
+ {
+ warn(&fi,"already has .lzo suffix -- unchanged");
+ return 0;
+ }
+ else if (suff == SUFF_LZOP)
+ {
+ warn(&fi,"already has .lzop suffix -- unchanged");
+ return 0;
+ }
+ else if (suff == SUFF_NRV)
+ {
+ warn(&fi,"already has .nrv suffix -- unchanged");
+ return 0;
+ }
+ else if (suff == SUFF_TZO)
+ {
+ warn(&fi,"already has .tzo suffix -- unchanged");
+ return 0;
+ }
+ else if (suff == SUFF_USER)
+ {
+ warn(&fi,"already has user suffix -- unchanged");
+ return 0;
+ }
+ }
+
+/* open file */
+ errno = 0;
+ r = stat(fi.name, &fi.st);
+ saved_errno = errno;
+ if (r != 0)
+ memset(&fi.st, 0, sizeof(fi.st));
+#if defined(HAVE_LSTAT) && defined(S_ISLNK)
+ r2 = lstat(fi.name, &fi.lst);
+ if (r2 != 0)
+ memset(&fi.lst, 0, sizeof(fi.lst));
+ if (r2 == 0 && S_ISLNK(fi.lst.st_mode))
+ {
+ if (r != 0)
+ {
+ errno = saved_errno;
+#if 0
+ p_error(&fi,"can't open input file -- dangling symlink");
+#else
+ do_error(&fi,err_nl,"can't open input file: Dangling symlink",EXIT_ERROR,0);
+#endif
+ return 0;
+ }
+ }
+#endif
+ if (r == 0 && !S_ISREG(fi.st.st_mode))
+ {
+ warn(&fi,"not a regular file -- skipped");
+ return 0;
+ }
+ fi.open_flags = O_RDONLY;
+ f_open(&fi,1);
+#if 0 && defined(__DJGPP__)
+ /* try again without LFN */
+ if (fi.fd < 0 && errno == ENOENT && _USE_LFN)
+ {
+ if (!(_crt0_startup_flags & _CRT0_FLAG_NO_LFN))
+ {
+ int k = _crt0_startup_flags;
+ _crt0_startup_flags |= _CRT0_FLAG_NO_LFN;
+ r = stat(fi.name, &fi.st);
+ saved_errno = errno;
+ _crt0_startup_flags = k;
+ if (r == 0 && !S_ISREG(fi.st.st_mode))
+ {
+ warn(&fi,"not a regular file -- skipped");
+ return 0;
+ }
+ f_open(&fi,1);
+ }
+ }
+#endif
+ if (fi.fd < 0)
+ {
+ p_error(&fi,"can't open input file");
+ return 0;
+ }
+ if (r != 0)
+ {
+ errno = saved_errno;
+ p_error(&fi,"can't stat input file");
+ (void) f_close(&fi);
+ return 0;
+ }
+
+ fi.st.st_atime = fix_time(fi.st.st_atime);
+ fi.st.st_mtime = fix_time(fi.st.st_mtime);
+ return 1;
+}
+
+
+/*************************************************************************
+// open output file
+**************************************************************************/
+
+lzo_bool p_open_fo(const header_t *h)
+{
+ if (fo.fd != -1)
+ return 1;
+
+ f_reset(&fo);
+
+ if (!p_set_oname(h))
+ return 0;
+ fn_strlwr(fo.name);
+
+ if (!(opt_cmd == CMD_COMPRESS || opt_cmd == CMD_DECOMPRESS))
+ {
+ fo.fd = opt_output_name ? -2 : -1;
+ return 1;
+ }
+
+ if (fn_is_same_file(fi.name,fo.name))
+ {
+ if (opt_cmd == CMD_COMPRESS)
+ error(&fi,"can't compress to same file");
+ else
+ error(&fi,"can't decompress to same file");
+ return 0;
+ }
+ fo.open_flags = O_CREAT | O_WRONLY;
+ if (opt_force)
+ fo.open_flags |= O_TRUNC;
+ else
+ fo.open_flags |= O_EXCL;
+#if defined(__MINT__)
+ fo.open_flags |= O_TRUNC | O_DENYRW;
+#endif
+ fo.st.st_mode = fix_mode_for_open(fi.st.st_mode);
+ if (opt_cmd == CMD_DECOMPRESS && opt_path && (h->flags & F_H_PATH))
+ {
+ /* create missing directories */
+ char *name;
+ int n = 0;
+ name = fo.name;
+ while (name[n])
+ {
+ while (name[n] && name[n] != '/')
+ n++;
+ if (name[n] == '/')
+ {
+ name[n] = 0;
+ (void) acc_mkdir(name, 0777);
+ name[n] = DIR_SEP[0];
+ n++;
+ }
+ }
+ }
+ f_open(&fo,0);
+ if (fo.fd < 0)
+ {
+ if ((fo.open_flags & O_EXCL) && errno == EEXIST)
+ error(&fo,"already exists; not overwritten");
+ else
+ p_error(&fo,"can't open output file");
+ return 0;
+ }
+
+ return 1;
+}
+
+
+/*************************************************************************
+// close files
+**************************************************************************/
+
+static lzo_bool p_close(int i, int o)
+{
+ int r = 1;
+
+ if (i && f_close(&fi) != 0)
+ {
+ p_error(&fi,"can't close input file");
+ r = 0;
+ }
+ if (o && f_close(&fo) != 0)
+ {
+ p_error(&fo,"can't close output file");
+ r = 0;
+ }
+ return r;
+}
+
+
+/*************************************************************************
+// compress
+**************************************************************************/
+
+static void copy_perms(void)
+{
+#if defined(HAVE_UTIME)
+ /* copy the time stamp */
+ struct utimbuf u;
+ u.actime = fi.st.st_atime;
+ u.modtime = fi.st.st_mtime;
+ if (utime(fo.name,&u) != 0)
+ p_warn(&fo,"can't copy file time");
+#endif
+#if defined(HAVE_CHMOD)
+ /* copy the protection mode */
+ fo.st.st_mode = fi.st.st_mode;
+ if (chmod(fo.name, fo.st.st_mode) != 0)
+ p_warn(&fo,"can't copy file mode");
+#endif
+#if defined(HAVE_CHOWN)
+ /* copy the ownership */
+ if (chown(fo.name, fi.st.st_uid, fi.st.st_gid) != 0) {
+ /* ignore */
+ }
+#endif
+}
+
+
+static lzo_bool do_compress(const char *name, lzo_bool handle_perms)
+{
+ lzo_bool ok = 1;
+ header_t header;
+
+ if (!p_open_fi(name))
+ return 0;
+ if (!p_open_fo(NULL))
+ {
+ if (opt_output_name || opt_stdout)
+ e_exit(EXIT_ERROR);
+ return 0;
+ }
+
+ ok = x_compress(&fi,&fo,&header);
+ if (!ok)
+ return 0;
+
+ if (handle_perms)
+ {
+ if (!p_close(1,1))
+ return 0;
+ copy_perms();
+ }
+
+ return ok;
+}
+
+
+/*************************************************************************
+// decompress
+**************************************************************************/
+
+static void restore_perms(const header_t *h)
+{
+#if defined(HAVE_UTIME)
+ /* restore or copy the time stamp */
+ struct utimbuf u;
+ if (opt_restore_time && (h->mtime_low || h->mtime_high))
+ {
+ u.actime = u.modtime = get_mtime(h);
+ if (u.actime)
+ if (utime(fo.name,&u) != 0)
+ p_warn(&fo,"can't restore file time");
+ }
+ else if (fi.st.st_atime && fi.st.st_mtime)
+ {
+ u.actime = fi.st.st_atime;
+ u.modtime = fi.st.st_mtime;
+ if (utime(fo.name,&u) != 0)
+ p_warn(&fo,"can't copy file time");
+ }
+#endif
+#if defined(HAVE_CHMOD)
+ /* restore or copy the protection mode */
+ if (opt_restore_mode && h->mode)
+ {
+ fo.st.st_mode = fix_mode_for_chmod(h->mode);
+ if (chmod(fo.name, fo.st.st_mode) != 0)
+ p_warn(&fo,"can't restore file mode");
+ }
+ else if (fi.st.st_mode > 0)
+ {
+ fo.st.st_mode = fi.st.st_mode;
+ if (chmod(fo.name, fo.st.st_mode) != 0)
+ p_warn(&fo,"can't copy file mode");
+ }
+#endif
+#if defined(HAVE_CHOWN)
+ /* copy the ownership */
+ if (!opt_stdin)
+ if (chown(fo.name, fi.st.st_uid, fi.st.st_gid) != 0) {
+ /* ignore */
+ }
+#endif
+ UNUSED(h);
+}
+
+
+static lzo_bool warn_multipart(file_t *ft, const header_t *h)
+{
+ if (!((ft->part > 0) || (h->flags & F_MULTIPART)))
+ return 1;
+
+ if (opt_stdin && opt_stdout && opt_cmd == CMD_TEST && can_restore_name(ft,h))
+ return 1;
+ if (opt_stdout || opt_output_name)
+ {
+ if (!ft->warn_multipart)
+ warn(&fi,"this is a multipart archive (try option '-N')");
+ ft->warn_multipart = 1;
+ }
+ else if (opt_file && !can_restore_name(ft,h))
+ {
+ ft->opt_name = 1;
+ if (opt_cmd == CMD_TEST)
+ {
+ if (!ft->warn_multipart)
+ warn(&fi,"this is a multipart archive (try option '-N')");
+ ft->warn_multipart = 1;
+ }
+ else if (can_restore_name(ft,h))
+ {
+ if (!ft->warn_multipart)
+ warn(&fi,"multipart archive -- restoring file names");
+ ft->warn_multipart = 1;
+ }
+ else
+ {
+ error(&fi,"multipart archive, but no filename stored (use option '-o')");
+ return 0;
+ }
+ }
+ return 1;
+}
+
+
+static lzo_bool do_decompress(const char *name, lzo_bool handle_perms)
+{
+ lzo_bool ok = 1;
+ lzo_bool unlink_ok = 1;
+ lzo_bool skip = 0;
+ header_t header;
+ int r;
+
+ if (!p_open_fi(name))
+ return 0;
+
+ for ( ; ok; fi.part++)
+ {
+ r = p_magic(&fi);
+ if (r > 0)
+ return 0;
+ if (fi.part == 0)
+ total_c_files++;
+ if (fi.part > 0 && (opt_file || (r < 0 && handle_perms)))
+ {
+ if (!p_close(0,1))
+ return 0;
+ if (!skip && handle_perms && (opt_file || (r < 0 && fi.part == 1)))
+ restore_perms(&header);
+ }
+ if (r < 0)
+ {
+ assert(fi.part > 0);
+ break;
+ }
+
+ if (!p_header(&fi,&header))
+ {
+ /* use '--info -f -f' to try to list a corrupted header */
+ if (opt_cmd == CMD_INFO && opt_force >= 2)
+ {
+ (void) x_get_method(&header);
+ do_info(&header,0,0);
+ }
+ return 0;
+ }
+
+#if 0
+ /* debug */
+ do_info(&header,0,0);
+#endif
+
+ if (!warn_multipart(&fi,&header))
+ return 0;
+
+ skip = 0;
+ ok = p_open_fo(&header);
+ if (!ok)
+ {
+ unlink_ok = 0;
+ if (opt_output_name || opt_stdout)
+ e_exit(EXIT_ERROR);
+ if (opt_cmd != CMD_TEST)
+ skip = 1;
+ }
+
+ ok = x_decompress(&fi,&fo,&header,skip);
+ }
+
+ return ok && unlink_ok;
+}
+
+
+/*************************************************************************
+// process files
+**************************************************************************/
+
+static lzo_bool do_one_file(const char *name, lzo_bool handle_perms)
+{
+ lzo_bool ok;
+
+ if (opt_cmd == CMD_COMPRESS)
+ ok = do_compress(name,handle_perms);
+ else
+ ok = do_decompress(name,handle_perms);
+
+ if (!p_close(1,0))
+ ok = 0;
+ if (opt_file && !p_close(0,1))
+ ok = 0;
+
+ if (ok && opt_unlink)
+ {
+#if defined(HAVE_CHMOD)
+ (void) chmod(fi.name, 0777);
+#endif
+ if (unlink(fi.name) != 0)
+ p_warn(&fi,"can't unlink file");
+ }
+
+ if (fi.fd == -1)
+ fi.name[0] = 0;
+ if (fo.fd == -1)
+ fo.name[0] = 0;
+
+ return ok;
+}
+
+
+static void do_files(int i, int argc, char *argv[])
+{
+ lzo_bool handle_perms;
+
+ if (opt_cmd == CMD_COMPRESS)
+ handle_perms = !opt_stdin;
+ else if (opt_cmd == CMD_DECOMPRESS)
+ handle_perms = 1;
+ else
+ handle_perms = 0;
+
+ if (opt_stdin)
+ {
+ assert(opt_stdout || opt_output_name || opt_output_path);
+ assert(i == argc);
+ assert(num_files == 0);
+ if (!check_stdin(&fi) || !open_stdin(&fi))
+ return;
+ }
+ if (opt_stdout)
+ {
+ assert(!opt_output_name);
+ if (!check_stdout(&fo) || !open_stdout(&fo))
+ return;
+ handle_perms = 0;
+ }
+ if (opt_output_name)
+ {
+ assert(!opt_stdout);
+ handle_perms &= (num_files == 1);
+ }
+
+ if (opt_stdin)
+ do_one_file(NULL,handle_perms);
+ else
+ {
+ for ( ; i < argc; i++)
+ do_one_file(argv[i],handle_perms);
+ }
+
+ (void) p_close(1,1);
+
+ if (opt_cmd == CMD_LIST)
+ do_list_total();
+ if (opt_cmd == CMD_TEST)
+ do_test_total();
+}
+
+
+/*************************************************************************
+// check options
+**************************************************************************/
+
+static void check_not_both(lzo_bool e1, lzo_bool e2, int c1, int c2)
+{
+ if (e1 && e2)
+ {
+ fprintf(stderr,"%s: ",argv0);
+ fprintf(stderr,"cannot use both '-%c' and '-%c'\n", c1, c2);
+ e_usage();
+ }
+}
+
+
+void check_options(int i, int argc)
+{
+ assert(i <= argc);
+
+ if (opt_keep)
+ opt_unlink = 0;
+ if (!(opt_cmd == CMD_COMPRESS || opt_cmd == CMD_DECOMPRESS))
+ opt_unlink = 0;
+
+ if (opt_stdin == OPT_STDIN_GUESSED && i != argc)
+ opt_stdin = 0;
+ if (opt_stdin)
+ {
+ opt_unlink = 0;
+#if 0
+ /* gzip: always use stdout */
+ opt_stdout = 1;
+#else
+ if (!opt_output_name && !opt_output_path)
+ opt_stdout = 1;
+#endif
+ }
+ if (opt_stdout)
+ {
+ check_not_both(1, opt_output_name != NULL, 'c', 'o');
+ check_not_both(1, opt_output_path != NULL, 'c', 'p');
+ check_not_both(1, opt_suffix[0] != 0, 'c', 'S');
+ opt_output_name = NULL;
+ opt_output_path = NULL;
+ opt_suffix[0] = 0;
+ if (opt_unlink && !opt_force)
+ {
+ fprintf(stderr,"%s: both '-c' and '-U' given (use '-f' to force)\n",argv0);
+ e_usage();
+ }
+ }
+ if (opt_output_name)
+ {
+ check_not_both(1, opt_output_path != NULL, 'o', 'p');
+ check_not_both(1, opt_suffix[0] != 0, 'o', 'S');
+ opt_output_path = NULL;
+ opt_suffix[0] = 0;
+ }
+
+ /* check number of remaining args */
+ if (opt_stdin)
+ {
+ if (opt_cmd == CMD_COMPRESS && opt_output_path)
+ {
+ fprintf(stderr,"%s: cannot use '-p' when compressing stdin\n",argv0);
+ e_usage();
+ }
+
+ /* No more args allowed */
+ if (i != argc)
+ {
+ fprintf(stderr,"%s: no filename allowed when reading from stdin\n",argv0);
+ e_usage();
+ }
+ }
+ else
+ {
+ if (i == argc)
+ {
+ fprintf(stderr,"%s: nothing to do !\n",argv0);
+ e_usage();
+ }
+
+ if (opt_stdout || opt_output_name)
+ {
+#if 1
+ /* Allow multiple files */
+ if (i + 1 != argc)
+ {
+ opt_name = 1;
+ }
+#else
+ /* Exactly one input file */
+ if (i + 1 != argc)
+ {
+ fprintf(stderr,"%s: only one file allowed\n",argv0);
+ e_usage();
+ }
+#endif
+ }
+ }
+
+ opt_file = !opt_stdout && !opt_output_name;
+}
+
+
+/*************************************************************************
+// misc
+**************************************************************************/
+
+void e_help(void)
+{
+ if (opt_pgm == PGM_LZOP)
+ help();
+ else if (opt_pgm == PGM_UNLZOP)
+ help();
+ else if (opt_pgm == PGM_OCAT)
+ {
+ if (opt_stdin)
+ check_stdin(&fi);
+ if (opt_stdout)
+ check_stdout(&fo);
+ usage();
+ }
+ else
+ help();
+ e_exit(EXIT_USAGE);
+}
+
+
+void set_term(FILE *f)
+{
+ if (f)
+ con_term = f;
+ else
+ con_term = acc_isatty(STDOUT_FILENO) ? stdout : stderr;
+}
+
+
+void set_cmd(int cmd)
+{
+ if (cmd == CMD_COMPRESS && (opt_pgm == PGM_UNLZOP || opt_pgm == PGM_OCAT))
+ return;
+#if 0
+ if (opt_cmd != CMD_NONE && cmd != opt_cmd)
+ {
+ fprintf(stderr,"%s: multiple commands given\n",argv0);
+ e_usage();
+ }
+ opt_cmd = cmd;
+#else
+ /* gzip: commands have a certain priority */
+ if (cmd > opt_cmd)
+ opt_cmd = cmd;
+#endif
+}
+
+
+lzo_bool set_method(int m, int l)
+{
+ if (x_set_method(m,l) != 0)
+ return 0;
+ set_cmd(CMD_COMPRESS);
+ return 1;
+}
+
+
+void set_output_name(const char *n, lzo_bool allow_m)
+{
+#if 1
+ if (done_output_name > 0)
+ {
+ fprintf(stderr,"%s: option '-o' more than once given\n",argv0);
+ e_usage();
+ }
+#endif
+ if (!n || !n[0] || (!allow_m && n[0] == '-'))
+ {
+ fprintf(stderr,"%s: missing output name\n",argv0);
+ e_usage();
+ }
+ if (strlen(n) >= PATH_MAX)
+ {
+ fprintf(stderr,"%s: output name too long\n",argv0);
+ e_usage();
+ }
+ opt_output_name = n;
+ done_output_name++;
+}
+
+
+void set_output_path(const char *n, lzo_bool allow_m)
+{
+ int r;
+ struct stat st;
+ file_t f;
+
+#if 1
+ if (done_output_path > 0)
+ {
+ fprintf(stderr,"%s: option '-p' more than once given\n",argv0);
+ e_usage();
+ }
+#endif
+ if (!n || (!allow_m && n[0] == '-'))
+ {
+ fprintf(stderr,"%s: missing path\n",argv0);
+ e_usage();
+ }
+ if (strlen(n) >= PATH_MAX)
+ {
+ fprintf(stderr,"%s: path too long\n",argv0);
+ e_usage();
+ }
+ if (n[0])
+ {
+ r = stat(n, &st);
+ if (r != 0)
+ {
+ strcpy(f.name,n);
+ p_fatal(&f,"invalid path");
+ }
+#if defined(S_ISDIR)
+ if (!S_ISDIR(st.st_mode))
+ {
+ strcpy(f.name,n);
+ fatal(&f,"invalid path - must be a directory");
+ }
+#endif
+ }
+#if defined(HAVE_ACCESS) && defined(W_OK)
+ {
+ const char *p = n[0] ? n : ".";
+ if (access(p,W_OK) != 0)
+ {
+ strcpy(f.name,p);
+ p_fatal(&f,"can't write to path");
+ }
+ }
+#endif
+ opt_output_path = n;
+ done_output_path++;
+}
+
+
+lzo_bool set_suffix(const char *n)
+{
+ size_t l;
+ const char *p;
+ static const char * const invalid_suffixes[] =
+ { "ace", "arc", "arj", "bz", "bz2", "gz", "lha", "lzh",
+#if !defined(NRVP)
+ "nrv", "tnv",
+#endif
+ "rar", "raw", "sz", "tar", "taz", "tbz", "tgz", "tsz",
+ "upx", "Z", "zip", "zoo", NULL };
+ const char * const *is = invalid_suffixes;
+
+#if 1
+ if (done_suffix > 0)
+ {
+ fprintf(stderr,"%s: option '-S' more than once given\n",argv0);
+ e_usage();
+ return 0;
+ }
+#endif
+ while (n && *n == '.')
+ n++;
+
+ if (!n || *n == 0 || *n == '-')
+ return 0;
+#if 1 || defined(DOSISH)
+ if (strchr(n,'.'))
+ return 0;
+#endif
+ for (p = n; *p; p++)
+ if (strchr("+*?=/\\ \t\n\r\a", *p))
+ return 0;
+ for ( ; *is; is++)
+ if (strcasecmp(n,*is) == 0)
+ return 0;
+
+ l = strlen(n);
+ if (l + 1 > SUFFIX_MAX || (opt_shortname && l > 3))
+ {
+ fprintf(stderr,"%s: suffix '%s' is too long\n",argv0,n);
+ e_usage();
+ return 0;
+ }
+
+ opt_suffix[0] = '.';
+ strcpy(opt_suffix + 1, n);
+ done_suffix++;
+ return 1;
+}
+
+
+/*************************************************************************
+// get options
+**************************************************************************/
+
+static
+char* prepare_shortopts(char *buf, const char *n,
+ const struct acc_getopt_longopt_t *longopts)
+{
+ char *o = buf;
+
+ for ( ; n && *n; n++)
+ if (*n != ' ')
+ *o++ = *n;
+ *o = 0;
+ for ( ; longopts && longopts->name; longopts++)
+ {
+ int v = longopts->val;
+ if (v > 0 && v < 256 && strchr(buf,v) == NULL)
+ {
+ *o++ = (char) v;
+ if (longopts->has_arg >= 1)
+ *o++ = ':';
+ if (longopts->has_arg >= 2)
+ *o++ = ':';
+ *o = 0;
+ }
+ }
+ return buf;
+}
+
+
+static int do_option(acc_getopt_p g, int optc)
+{
+#define mfx_optarg g->optarg
+ int i = 0;
+ int m = -1;
+
+ switch (optc)
+ {
+ case 'c':
+ opt_stdout = 1;
+ break;
+ case 'C':
+ opt_checksum = (opt_checksum >= 1) ? opt_checksum + 1 : 1;
+ opt_decompress_safe = 1;
+ break;
+ case 'd':
+ set_cmd(CMD_DECOMPRESS);
+ break;
+ case 'f':
+ opt_force++;
+ break;
+ case 'F':
+ opt_checksum = 0;
+ opt_decompress_safe = 0;
+ break;
+ case 'h':
+ case 'H':
+ case '?':
+ set_cmd(CMD_HELP);
+ break;
+ case 'h'+256:
+ /* according to GNU standards */
+ set_term(stdout);
+ opt_console = CON_NONE;
+ help();
+ e_exit(EXIT_OK);
+ break;
+ case 'i':
+ case 'i'+256:
+ set_cmd(CMD_INFO);
+ break;
+ case 'I':
+ set_cmd(CMD_SYSINFO);
+ break;
+ case 'k':
+ opt_keep = 1;
+ break;
+ case 'l':
+ set_cmd(CMD_LIST);
+ break;
+ case 'L':
+ set_cmd(CMD_LICENSE);
+ break;
+ case 'n':
+ opt_name = 0;
+ opt_path = 0;
+ break;
+ case 'N':
+ opt_name = 1;
+ break;
+ case 'o':
+ set_output_name(mfx_optarg,1);
+ break;
+ case 'p':
+ case 'p'+256:
+ if (mfx_optarg && mfx_optarg[0])
+ set_output_path(mfx_optarg,0);
+ else if (optc == 'p')
+ set_output_path("",0);
+ else
+ set_output_path(NULL,0);
+ break;
+ case 'P':
+ opt_path = 1;
+ opt_name = 1;
+ break;
+ case 'q':
+ opt_verbose = 0;
+ break;
+ case 'S':
+ if (!set_suffix(mfx_optarg))
+ {
+ fprintf(stderr,"%s: invalid suffix '%s'\n",argv0,mfx_optarg);
+ e_usage();
+ }
+ break;
+ case 't':
+ set_cmd(CMD_TEST);
+ break;
+ case 'T':
+ if (!(mfx_optarg && isdigit(mfx_optarg[0])))
+ {
+ fprintf(stderr,"%s: invalid '--threads=' args: '%s'\n",argv0,mfx_optarg);
+ e_usage();
+ }
+ opt_num_threads = atoi(mfx_optarg);
+ if (opt_num_threads < 1 || opt_num_threads > MAX_NUM_THREADS)
+ {
+ fprintf(stderr,"%s: invalid number of threads: %d\n",argv0,opt_num_threads);
+ e_usage();
+ }
+#if !defined(WITH_THREADS)
+ opt_num_threads = 1;
+#endif
+ break;
+ case 'U':
+ opt_unlink = 1;
+ break;
+ case 'v':
+ opt_verbose = (opt_verbose < 2) ? 2 : opt_verbose + 1;
+ break;
+ case 'V':
+ set_cmd(CMD_VERSION);
+ break;
+ case 'V'+256:
+ /* according to GNU standards */
+ set_term(stdout);
+ 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");
+ e_exit(EXIT_OK);
+ break;
+ case 'x':
+ set_cmd(CMD_DECOMPRESS);
+ opt_name = 1;
+ opt_path = 1;
+ opt_restore_mode = 1;
+ opt_restore_time = 1;
+ if (!opt_output_name && !opt_output_path)
+ {
+ set_output_path("",0);
+ --done_output_path;
+ }
+ opt_unlink = 0;
+ break;
+ case 'Z'+256:
+ set_cmd(CMD_LS);
+ if (mfx_optarg && mfx_optarg[0])
+ {
+ opt_ls_flags = mfx_optarg;
+ for (i = 0; opt_ls_flags[i]; i++)
+ if (!strchr("FGQ",opt_ls_flags[i]))
+ {
+ fprintf(stderr,"%s: invalid '--ls' flags: '%s'\n",argv0,mfx_optarg);
+ e_usage();
+ }
+ }
+ break;
+#ifdef MAINT
+ case 520:
+ opt_noheader++;
+ break;
+#endif
+ case 522:
+ opt_stdin = 0;
+ break;
+ case 523:
+ opt_restore_mode = 0;
+ break;
+ case 524:
+ opt_restore_time = 0;
+ break;
+ case 525:
+ opt_nowarn = 1;
+ break;
+ case 526:
+ opt_ignorewarn = 1;
+ break;
+ case 527:
+ opt_crc32 = 1;
+ break;
+
+ case 512:
+ opt_console = CON_NONE;
+ break;
+ case 513:
+ opt_console = CON_ANSI_MONO;
+ break;
+ case 514:
+ opt_console = CON_ANSI_COLOR;
+ break;
+ case 515:
+ set_cmd(CMD_INTRO);
+ break;
+
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (!set_method(0,optc - '0'))
+ e_method(optc);
+ break;
+
+#if defined(WITH_NRV)
+ case 811:
+ if (m < 0) m = M_NRV1A;
+ /* fallthrough */
+ case 812:
+ if (m < 0) m = M_NRV1B;
+ /* fallthrough */
+ case 813:
+ if (m < 0) m = M_NRV2A;
+ /* fallthrough */
+ case 814:
+ if (m < 0) m = M_NRV2B;
+ i = 1;
+ if (mfx_optarg && isdigit(mfx_optarg[0]) && !mfx_optarg[1])
+ i = mfx_optarg[0] - '0';
+ if (!set_method(m,i))
+ e_usage();
+ break;
+#endif
+#if defined(WITH_ZLIB)
+ case 801:
+ i = 6;
+ if (mfx_optarg && mfx_optarg[0] && !mfx_optarg[1])
+ i = mfx_optarg[0] - '0';
+ if (!set_method(M_ZLIB,i))
+ e_usage();
+ break;
+#endif
+
+ case 521:
+ if (!(mfx_optarg && isdigit(mfx_optarg[0])))
+ {
+ fprintf(stderr,"%s: invalid '--filter=' args: '%s'\n",argv0,mfx_optarg);
+ e_usage();
+ }
+ if (strcmp(mfx_optarg,"0") == 0)
+ {
+ opt_filter = 0;
+ break;
+ }
+ opt_filter = atoi(mfx_optarg);
+ if (opt_filter < 1 || opt_filter > 16)
+ {
+ fprintf(stderr,"%s: invalid filter: %d\n",argv0,opt_filter);
+ e_usage();
+ }
+ break;
+
+ case '\0':
+ return -1;
+ case ':':
+ return -2;
+ default:
+ fprintf(stderr,"%s: internal error in getopt (%d)\n",argv0,optc);
+ return -3;
+ }
+
+ UNUSED(i);
+ UNUSED(m);
+ return 0;
+#undef mfx_optarg
+}
+
+
+static void handle_opterr(acc_getopt_p g, const char *f, void *v)
+{
+ struct A { va_list ap; };
+ struct A *a = (struct A *) v;
+ fprintf( stderr, "%s: ", g->progname);
+ if (a)
+ vfprintf(stderr, f, a->ap);
+ else
+ fprintf( stderr, "UNKNOWN GETOPT ERROR");
+ fprintf( stderr, "\n");
+}
+
+
+static int get_options(int argc, char **argv)
+{
+
+static const struct acc_getopt_longopt_t longopts[] =
+{
+ {"best", 0, 0, '9'}, /* compress better */
+ {"decompress", 0, 0, 'd'}, /* decompress */
+ {"fast", 0, 0, '1'}, /* compress faster */
+ {"help", 0, 0, 'h'+256}, /* give help */
+ {"info", 0, 0, 'i'+256},
+ {"license", 0, 0, 'L'}, /* display software license */
+ {"list", 0, 0, 'l'}, /* list .lzo file contents */
+ {"ls", 2, 0, 'Z'+256}, /* list .lzo file contents */
+ {"sysinfo", 0, 0, 'I'},
+ {"test", 0, 0, 't'}, /* test compressed file integrity */
+ {"uncompress", 0, 0, 'd'}, /* decompress */
+ {"version", 0, 0, 'V'+256}, /* display version number */
+#if defined(WITH_NRV)
+ {"nrv1a", 0x22, 0, 811},
+ {"nrv2a", 0x22, 0, 813},
+ {"nrv2b", 0x22, 0, 814},
+#endif
+#if defined(WITH_ZLIB)
+ {"zlib", 0x22, 0, 801},
+#endif
+
+ {"checksum", 0, 0, 'C'},
+ {"crc32", 0x10, 0, 527}, /* use a crc32 checksum instead of adler32 */
+ {"delete", 0, 0, 'U'},
+ {"extract", 0, 0, 'x'},
+ {"filter", 1, 0, 521},
+ {"force", 0, 0, 'f'}, /* force overwrite of output file */
+ {"ignore-warn",0, 0, 526}, /* ignore any warnings */
+ {"keep", 0, 0, 'k'},
+ {"name", 0, 0, 'N'}, /* restore original name */
+ {"no-checksum",0, 0, 'F'},
+#ifdef MAINT
+ {"no-header", 0, 0, 520},
+#endif
+ {"no-mode", 0, 0, 523}, /* don't restore original mode */
+ {"no-name", 0, 0, 'n'}, /* don't restore original name */
+ {"no-stdin", 0, 0, 522},
+ {"no-time", 0, 0, 524}, /* don't restore original time */
+ {"no-warn", 0, 0, 525}, /* do not display any warnings */
+ {"output", 1, 0, 'o'},
+ {"path", 1, 0, 'p'+256},
+ {"quiet", 0, 0, 'q'}, /* quiet mode */
+ {"silent", 0, 0, 'q'}, /* quiet mode */
+ {"stdout", 0, 0, 'c'}, /* write output on standard output */
+ {"suffix", 1, 0, 'S'}, /* use given suffix instead of .lzo */
+ {"threads", 0x21, 0, 'T'}, /* number of threads */
+ {"to-stdout", 0, 0, 'c'}, /* write output on standard output */
+ {"unlink", 0, 0, 'U'},
+ {"verbose", 0, 0, 'v'}, /* verbose mode */
+
+ {"no-color", 0, 0, 512},
+ {"mono", 0, 0, 513},
+ {"color", 0, 0, 514},
+ {"intro", 0, 0, 515},
+
+ { 0, 0, 0, 0 }
+};
+
+ acc_getopt_t mfx_getopt;
+ int optc;
+ int i;
+ char shortopts[128];
+
+ prepare_shortopts(shortopts, "123456789hH?PVp::", longopts),
+ acc_getopt_init(&mfx_getopt, 1, argc, argv);
+ mfx_getopt.progname = argv0;
+ mfx_getopt.opterr = handle_opterr;
+ while ((optc = acc_getopt(&mfx_getopt, shortopts, longopts, NULL)) >= 0)
+ {
+ if (do_option(&mfx_getopt, optc) != 0)
+ e_usage();
+ }
+
+ /* accept "-" as synonym for stdin */
+ for (i = mfx_getopt.optind; i < argc; i++)
+ if (strcmp(argv[i], "-") == 0)
+ opt_stdin = OPT_STDIN_REQUESTED;
+ for (i = mfx_getopt.optind; i < argc; i++)
+ if (strcmp(argv[i], "-") != 0)
+ break;
+ return i;
+}
+
+
+#if defined(OPTIONS_VAR)
+static void get_envoptions(int argc, char **argv)
+{
+
+/* only some options are allowed in the environment variable */
+
+static const struct acc_getopt_longopt_t longopts[] =
+{
+ {"best", 0, 0, '9'}, /* compress better */
+ {"checksum", 0, 0, 'C'},
+ {"crc32", 0x10, 0, 527}, /* use a crc32 checksum instead of adler32 */
+ {"delete", 0, 0, 'U'},
+ {"fast", 0, 0, '1'}, /* compress faster */
+ {"ignore-warn",0, 0, 526}, /* ignore any warnings */
+ {"keep", 0, 0, 'k'},
+ {"name", 0, 0, 'N'}, /* restore original name */
+ {"no-checksum",0, 0, 'F'},
+ {"no-mode", 0, 0, 523}, /* don't restore original mode */
+ {"no-name", 0, 0, 'n'}, /* don't restore original name */
+ {"no-time", 0, 0, 524}, /* don't restore original time */
+ {"no-stdin", 0, 0, 522},
+ {"no-warn", 0, 0, 525}, /* do not display any warnings */
+ {"quiet", 0, 0, 'q'}, /* quiet mode */
+ {"silent", 0, 0, 'q'}, /* quiet mode */
+ {"threads", 0x21, 0, 'T'}, /* number of threads */
+ {"unlink", 0, 0, 'U'},
+ {"verbose", 0, 0, 'v'}, /* verbose mode */
+
+ {"no-color", 0, 0, 512},
+ {"mono", 0, 0, 513},
+ {"color", 0, 0, 514},
+
+ { 0, 0, 0, 0 }
+};
+
+ char *env, *p;
+ int i, optc;
+ int nargc;
+ char **nargv = NULL;
+ static const char sep[] = " \t";
+ acc_getopt_t mfx_getopt;
+ char shortopts[128];
+
+ env = (char *) getenv(OPTIONS_VAR);
+ if (env == NULL || !env[0])
+ return;
+ p = (char *) malloc(strlen(env)+1);
+ if (p == NULL)
+ return;
+ strcpy(p,env);
+ env = p;
+
+ nargc = 1;
+ for (;;)
+ {
+ while (*p && strchr(sep,*p))
+ p++;
+ if (*p == '\0')
+ break;
+ nargc++;
+ while (*p && !strchr(sep,*p))
+ p++;
+ if (*p == '\0')
+ break;
+ p++;
+ }
+
+ if (nargc > 1)
+ nargv = (char **) calloc(nargc+1,sizeof(char *));
+ if (nargv == NULL)
+ {
+ free(env);
+ return;
+ }
+
+ nargv[0] = argv[0];
+ p = env;
+ nargc = 1;
+ for (;;)
+ {
+ while (*p && strchr(sep,*p))
+ p++;
+ if (*p == '\0')
+ break;
+ nargv[nargc++] = p;
+ while (*p && !strchr(sep,*p))
+ p++;
+ if (*p == '\0')
+ break;
+ *p++ = '\0';
+ }
+ nargv[nargc] = NULL;
+
+#if 0
+ /* debug */
+ fprintf(stderr,"%3d\n",nargc);
+ for (i = 0; i <= nargc; i++)
+ fprintf(stderr,"%3d '%s'\n",i,nargv[i]);
+#endif
+
+ for (i = 1; i < nargc; i++)
+ if (nargv[i][0] != '-' || !nargv[i][1] || strcmp(nargv[i],"--") == 0)
+ e_envopt(nargv[i]);
+
+ prepare_shortopts(shortopts, "123456789P", longopts);
+ acc_getopt_init(&mfx_getopt, 1, nargc, nargv);
+ mfx_getopt.progname = argv0;
+ mfx_getopt.opterr = handle_opterr;
+ while ((optc = acc_getopt(&mfx_getopt, shortopts, longopts, NULL)) >= 0)
+ {
+ if (do_option(&mfx_getopt, optc) != 0)
+ e_envopt(NULL);
+ }
+
+ if (mfx_getopt.optind < nargc)
+ e_envopt(nargv[mfx_getopt.optind]);
+
+ free(nargv);
+ free(env);
+ UNUSED(argc);
+
+ if (opt_checksum)
+ opt_checksum = -1; /* reset to default */
+}
+#endif /* defined(OPTIONS_VAR) */
+
+
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#include "miniacc.h"
+#undef ACCCHK_ASSERT
+
+static void sanity_check(void)
+{
+#if (ACC_CC_MSC && ((_MSC_VER) < 700))
+#else
+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
+#include "miniacc.h"
+#endif
+#undef ACCCHK_ASSERT
+#undef ACC_WANT_ACC_CHK_CH
+}
+
+
+/*************************************************************************
+// main entry point
+**************************************************************************/
+
+int __acc_cdecl_main main(int argc, char *argv[])
+{
+ int i;
+ lzo_bool foreground = 0;
+ 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);
+#endif
+ acc_wildargv(&argc, &argv);
+
+
+#if defined(__DJGPP__)
+ opt_shortname = !_USE_LFN;
+#elif (ACC_OS_DOS16 || ACC_OS_WIN16 || ACC_OS_DOS32)
+ opt_shortname = 1;
+#endif
+
+ current_time = fix_time(time(NULL));
+
+ if (!argv[0] || !argv[0][0])
+ argv[0] = default_argv0;
+ argv0 = argv[0];
+ progname = fn_basename(argv0);
+#if defined(DOSISH)
+ if (strcasecmp(progname,"lzop.exe") == 0)
+ progname = default_argv0;
+ else if (strcasecmp(progname,"lzop.ttp") == 0)
+ progname = default_argv0;
+#endif
+
+ /* For compatibility with gzip, use program name as an option. */
+ if (strncasecmp(progname, "un", 2) == 0) /* unlzop */
+ opt_pgm = PGM_UNLZOP;
+#if 0
+ if (progname[0] && strcasecmp(progname+1, "cat") == 0) /* ocat */
+ opt_pgm = PGM_OCAT;
+#endif
+
+ set_term(stderr);
+ opt_stdin = acc_isatty(STDIN_FILENO) ? 0 : OPT_STDIN_GUESSED;
+
+ UNUSED(foreground);
+#ifdef SIGINT
+ foreground = signal(SIGINT, SIG_IGN) != SIG_IGN;
+ if (foreground)
+ (void) signal(SIGINT, e_sighandler);
+#endif
+#ifdef SIGBREAK
+ if (foreground)
+ (void) signal(SIGBREAK, e_sighandler);
+#endif
+#ifdef SIGTERM
+ if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
+ (void) signal(SIGTERM, e_sighandler);
+#endif
+#ifdef SIGHUP
+ if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
+ (void) signal(SIGHUP, e_sighandler);
+#endif
+
+#if defined(HAVE_UMASK)
+ u_mask = (MODE_T) umask(0700);
+ (void) umask(u_mask);
+#endif
+ u_mask &= 0777;
+
+#if defined(WITH_LZO)
+ if (lzo_init() != LZO_E_OK)
+ {
+ head();
+ fprintf(stderr,"lzo_init() failed - check your LZO installation !\n");
+ if (LZO_VERSION != lzo_version())
+ fprintf(stderr,"library version conflict (%x, %x) - check your LZO installation !\n", LZO_VERSION, lzo_version());
+ e_exit(EXIT_LZO_INIT);
+ }
+#if 0
+ if (lzo_version() < LZO_VERSION)
+ {
+ head();
+ fprintf(stderr,"library version conflict (%x, %x) - check your LZO installation !\n", LZO_VERSION, lzo_version());
+ e_exit(EXIT_LZO_INIT);
+ }
+#endif
+#endif
+#if defined(WITH_NRV)
+ if (nrv_init() != NRV_E_OK)
+ {
+ e_exit(EXIT_LZO_INIT);
+ }
+#endif
+
+ ACC_COMPILE_TIME_ASSERT(sizeof(lzo_uint32) >= 4)
+#if defined(SIZEOF_SIZE_T)
+ ACC_COMPILE_TIME_ASSERT(sizeof(size_t) == SIZEOF_SIZE_T)
+#endif
+ ACC_COMPILE_TIME_ASSERT(sizeof(fi.name) >= 2*(PATH_MAX))
+ assert(STDIN_FILENO >= 0);
+ assert(STDOUT_FILENO >= 0);
+ assert(STDERR_FILENO >= 0);
+
+ f_init();
+#if defined(OPTIONS_VAR)
+ get_envoptions(argc,argv);
+#endif
+ assert(cmdline_cmd == CMD_NONE);
+ i = get_options(argc,argv);
+ assert(i <= argc);
+
+ set_term(NULL);
+ cmdline_cmd = opt_cmd;
+ switch (opt_cmd)
+ {
+ case CMD_NONE:
+ /* For compatibility with gzip, use program name as an option. */
+ if (opt_pgm == PGM_UNLZOP)
+ {
+ set_cmd(CMD_DECOMPRESS);
+ break;
+ }
+#if 0
+ if (opt_pgm == PGM_OCAT)
+ {
+ set_cmd(CMD_DECOMPRESS);
+ if (i == argc)
+ opt_stdin = OPT_STDIN_REQUESTED;
+ if (!opt_output_name)
+ opt_stdout = 1;
+ break;
+ }
+#endif
+ /* default - compress */
+ if (!set_method(0,3))
+ e_method('3');
+ break;
+ case CMD_COMPRESS:
+ break;
+ case CMD_DECOMPRESS:
+ break;
+ case CMD_TEST:
+ opt_checksum = 1;
+ opt_decompress_safe = 1;
+ break;
+ case CMD_LIST:
+ break;
+ case CMD_LS:
+ break;
+ case CMD_INFO:
+ break;
+ case CMD_SYSINFO:
+ sysinfo();
+ e_exit(EXIT_OK);
+ break;
+ case CMD_LICENSE:
+ license();
+ e_exit(EXIT_OK);
+ break;
+ case CMD_HELP:
+ help();
+ e_exit(EXIT_OK);
+ break;
+ case CMD_INTRO:
+ opt_console = CON_SCREEN;
+ (void) ((con_intro(con_term) || (help(), 0)));
+ e_exit(EXIT_OK);
+ case CMD_VERSION:
+ version();
+ e_exit(EXIT_OK);
+ break;
+ default:
+ /* ??? */
+ break;
+ }
+
+ if (opt_cmd != CMD_COMPRESS)
+ {
+ opt_method = 0;
+ opt_level = 0;
+ opt_filter = 0;
+ }
+
+ if (!opt_stdin && !opt_stdout && opt_verbose > 0)
+ {
+ if (argc == 1)
+ {
+ /* no arguments */
+ (void) (opt_pgm == PGM_LZOP && con_intro(con_term));
+ e_help();
+ }
+#if 0
+ else if (cmdline_cmd == CMD_NONE && i == argc)
+ {
+ /* no command and no file */
+ e_help();
+ }
+#endif
+ }
+
+ set_term(stderr);
+ check_options(i,argc);
+ num_files = argc - i;
+
+ if (!x_enter(NULL))
+ e_memory();
+
+ do_files(i,argc,argv);
+
+ x_leave(NULL);
+ do_exit();
+ return exit_code;
+}
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/mblock.c b/src/mblock.c
new file mode 100644
index 0000000..09566cd
--- /dev/null
+++ b/src/mblock.c
@@ -0,0 +1,106 @@
+/* mblock.c -- aligned memory blocks (cache issues)
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+static void do_init(mblock_p m, lzo_uint32 size, lzo_uint 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)
+{
+ do_init(m,size,align);
+ if (m->mb_size == 0)
+ return 1;
+
+ m->mb_size_alloc = m->mb_size + m->mb_align - 1;
+ m->mb_mem_alloc = (lzo_bytep) acc_halloc(m->mb_size_alloc);
+ if (m->mb_mem_alloc == NULL)
+ return 0;
+ acc_hmemset(m->mb_mem_alloc, 0, m->mb_size_alloc);
+
+ 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_alloc: %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;
+}
+
+
+void mb_free(mblock_p m)
+{
+ acc_hfree(m->mb_mem_alloc);
+ memset(m,0,sizeof(*m));
+}
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/miniacc.h b/src/miniacc.h
new file mode 100644
index 0000000..9170c23
--- /dev/null
+++ b/src/miniacc.h
@@ -0,0 +1,6921 @@
+/* ACC --- Automatic Compiler Configuration
+
+ 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
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#ifndef __ACC_H_INCLUDED
+#define __ACC_H_INCLUDED 1
+#define ACC_VERSION 20101019L
+#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
+#if defined(__mips__) && defined(__R5900__)
+# if !defined(__LONG_MAX__)
+# define __LONG_MAX__ 9223372036854775807L
+# endif
+#endif
+#if defined(__INTEL_COMPILER) && defined(__linux__)
+# pragma warning(disable: 193)
+#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)
+# pragma warning(disable: 4668)
+# endif
+#endif
+#if defined(__POCC__) && defined(_WIN32)
+# if (__POCC__ >= 400)
+# pragma warn(disable: 2216)
+# endif
+#endif
+#if 0 && defined(__WATCOMC__)
+# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
+# pragma warning 203 9
+# endif
+#endif
+#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
+# pragma option -h
+#endif
+#if (ACC_CFG_NO_CONFIG_HEADER)
+#elif defined(ACC_CFG_CONFIG_HEADER)
+# include ACC_CFG_CONFIG_HEADER
+#else
+#endif
+#if (ACC_CFG_NO_LIMITS_H)
+#elif (ACC_LIBC_NAKED) || (ACC_BROKEN_LIMITS_H)
+#ifndef __ACC_FALLBACK_LIMITS_H_INCLUDED
+#define __ACC_FALLBACK_LIMITS_H_INCLUDED 1
+#undef CHAR_BIT
+#define CHAR_BIT 8
+#ifndef MB_LEN_MAX
+#define MB_LEN_MAX 1
+#endif
+#ifndef __SCHAR_MAX__
+#define __SCHAR_MAX__ 127
+#endif
+#ifndef __SHRT_MAX__
+#define __SHRT_MAX__ 32767
+#endif
+#ifndef __INT_MAX__
+#define __INT_MAX__ 2147483647
+#endif
+#ifndef __LONG_MAX__
+#if defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__)
+#define __LONG_MAX__ 9223372036854775807L
+#else
+#define __LONG_MAX__ 2147483647L
+#endif
+#endif
+#undef SCHAR_MIN
+#undef SCHAR_MAX
+#undef UCHAR_MAX
+#define SCHAR_MIN (-1 - SCHAR_MAX)
+#define SCHAR_MAX (__SCHAR_MAX__)
+#define UCHAR_MAX (SCHAR_MAX * 2 + 1)
+#undef SHRT_MIN
+#undef SHRT_MAX
+#undef USHRT_MAX
+#define SHRT_MIN (-1 - SHRT_MAX)
+#define SHRT_MAX (__SHRT_MAX__)
+#if ((__INT_MAX__) == (__SHRT_MAX__))
+#define USHRT_MAX (SHRT_MAX * 2U + 1U)
+#else
+#define USHRT_MAX (SHRT_MAX * 2 + 1)
+#endif
+#undef INT_MIN
+#undef INT_MAX
+#undef UINT_MAX
+#define INT_MIN (-1 - INT_MAX)
+#define INT_MAX (__INT_MAX__)
+#define UINT_MAX (INT_MAX * 2U + 1U)
+#undef LONG_MIN
+#undef LONG_MAX
+#undef ULONG_MAX
+#define LONG_MIN (-1L - LONG_MAX)
+#define LONG_MAX ((__LONG_MAX__) + 0L)
+#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
+#undef CHAR_MIN
+#undef CHAR_MAX
+#if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED)
+#define CHAR_MIN 0
+#define CHAR_MAX UCHAR_MAX
+#else
+#define CHAR_MIN SCHAR_MIN
+#define CHAR_MAX SCHAR_MAX
+#endif
+#endif
+#else
+# include <limits.h>
+#endif
+#if 0
+#define ACC_0xffffL 0xfffful
+#define ACC_0xffffffffL 0xfffffffful
+#else
+#define ACC_0xffffL 65535ul
+#define ACC_0xffffffffL 4294967295ul
+#endif
+#if (ACC_0xffffL == ACC_0xffffffffL)
+# error "your preprocessor is broken 1"
+#endif
+#if (16ul * 16384ul != 262144ul)
+# error "your preprocessor is broken 2"
+#endif
+#if 0
+#if (32767 >= 4294967295ul)
+# error "your preprocessor is broken 3"
+#endif
+#if (65535u >= 4294967295ul)
+# error "your preprocessor is broken 4"
+#endif
+#endif
+#if (UINT_MAX == ACC_0xffffL)
+#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
+# if !defined(MSDOS)
+# define MSDOS 1
+# endif
+# if !defined(_MSDOS)
+# define _MSDOS 1
+# endif
+#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
+# if (__VERSION == 520) && (MB_LEN_MAX == 1)
+# if !defined(__AZTEC_C__)
+# define __AZTEC_C__ __VERSION
+# endif
+# if !defined(__DOS__)
+# define __DOS__ 1
+# endif
+# endif
+#endif
+#endif
+#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == ACC_0xffffL)
+# define ptrdiff_t long
+# define _PTRDIFF_T_DEFINED 1
+#endif
+#if (UINT_MAX == ACC_0xffffL)
+# undef __ACC_RENAME_A
+# undef __ACC_RENAME_B
+# if defined(__AZTEC_C__) && defined(__DOS__)
+# define __ACC_RENAME_A 1
+# elif defined(_MSC_VER) && defined(MSDOS)
+# if (_MSC_VER < 600)
+# define __ACC_RENAME_A 1
+# elif (_MSC_VER < 700)
+# define __ACC_RENAME_B 1
+# endif
+# elif defined(__TSC__) && defined(__OS2__)
+# define __ACC_RENAME_A 1
+# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
+# define __ACC_RENAME_A 1
+# elif defined(__PACIFIC__) && defined(DOS)
+# if !defined(__far)
+# define __far far
+# endif
+# if !defined(__near)
+# define __near near
+# endif
+# endif
+# if defined(__ACC_RENAME_A)
+# if !defined(__cdecl)
+# define __cdecl cdecl
+# endif
+# if !defined(__far)
+# define __far far
+# endif
+# if !defined(__huge)
+# define __huge huge
+# endif
+# if !defined(__near)
+# define __near near
+# endif
+# if !defined(__pascal)
+# define __pascal pascal
+# endif
+# if !defined(__huge)
+# define __huge huge
+# endif
+# elif defined(__ACC_RENAME_B)
+# if !defined(__cdecl)
+# define __cdecl _cdecl
+# endif
+# if !defined(__far)
+# define __far _far
+# endif
+# if !defined(__huge)
+# define __huge _huge
+# endif
+# if !defined(__near)
+# define __near _near
+# endif
+# if !defined(__pascal)
+# define __pascal _pascal
+# endif
+# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
+# if !defined(__cdecl)
+# define __cdecl cdecl
+# endif
+# if !defined(__pascal)
+# define __pascal pascal
+# endif
+# endif
+# undef __ACC_RENAME_A
+# undef __ACC_RENAME_B
+#endif
+#if (UINT_MAX == ACC_0xffffL)
+#if defined(__AZTEC_C__) && defined(__DOS__)
+# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
+#elif defined(_MSC_VER) && defined(MSDOS)
+# if (_MSC_VER < 600)
+# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
+# endif
+# if (_MSC_VER < 700)
+# define ACC_BROKEN_INTEGRAL_PROMOTION 1
+# define ACC_BROKEN_SIZEOF 1
+# endif
+#elif defined(__PACIFIC__) && defined(DOS)
+# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
+#elif defined(__TURBOC__) && defined(__MSDOS__)
+# if (__TURBOC__ < 0x0150)
+# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
+# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
+# define ACC_BROKEN_INTEGRAL_PROMOTION 1
+# endif
+# if (__TURBOC__ < 0x0200)
+# define ACC_BROKEN_SIZEOF 1
+# endif
+# if (__TURBOC__ < 0x0400) && defined(__cplusplus)
+# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
+# endif
+#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
+# define ACC_BROKEN_CDECL_ALT_SYNTAX 1
+# define ACC_BROKEN_SIZEOF 1
+#endif
+#endif
+#if defined(__WATCOMC__) && (__WATCOMC__ < 900)
+# define ACC_BROKEN_INTEGRAL_CONSTANTS 1
+#endif
+#if defined(_CRAY) && defined(_CRAY1)
+# define ACC_BROKEN_SIGNED_RIGHT_SHIFT 1
+#endif
+#define ACC_PP_STRINGIZE(x) #x
+#define ACC_PP_MACRO_EXPAND(x) ACC_PP_STRINGIZE(x)
+#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_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)
+#if 1
+#define ACC_CPP_STRINGIZE(x) #x
+#define ACC_CPP_MACRO_EXPAND(x) ACC_CPP_STRINGIZE(x)
+#define ACC_CPP_CONCAT2(a,b) a ## b
+#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_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)
+#endif
+#define __ACC_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o))
+#if 1 && defined(__cplusplus)
+# if !defined(__STDC_CONSTANT_MACROS)
+# define __STDC_CONSTANT_MACROS 1
+# endif
+# if !defined(__STDC_LIMIT_MACROS)
+# define __STDC_LIMIT_MACROS 1
+# endif
+#endif
+#if defined(__cplusplus)
+# define ACC_EXTERN_C extern "C"
+#else
+# define ACC_EXTERN_C extern
+#endif
+#if !defined(__ACC_OS_OVERRIDE)
+#if (ACC_OS_FREESTANDING)
+# define ACC_INFO_OS "freestanding"
+#elif (ACC_OS_EMBEDDED)
+# define ACC_INFO_OS "embedded"
+#elif 1 && defined(__IAR_SYSTEMS_ICC__)
+# define ACC_OS_EMBEDDED 1
+# define ACC_INFO_OS "embedded"
+#elif defined(__CYGWIN__) && defined(__GNUC__)
+# define ACC_OS_CYGWIN 1
+# define ACC_INFO_OS "cygwin"
+#elif defined(__EMX__) && defined(__GNUC__)
+# define ACC_OS_EMX 1
+# define ACC_INFO_OS "emx"
+#elif defined(__BEOS__)
+# define ACC_OS_BEOS 1
+# define ACC_INFO_OS "beos"
+#elif defined(__Lynx__)
+# define ACC_OS_LYNXOS 1
+# define ACC_INFO_OS "lynxos"
+#elif defined(__OS400__)
+# define ACC_OS_OS400 1
+# define ACC_INFO_OS "os400"
+#elif defined(__QNX__)
+# define ACC_OS_QNX 1
+# define ACC_INFO_OS "qnx"
+#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
+# define ACC_OS_DOS32 1
+# define ACC_INFO_OS "dos32"
+#elif defined(__BORLANDC__) && defined(__DPMI16__)
+# define ACC_OS_DOS16 1
+# define ACC_INFO_OS "dos16"
+#elif defined(__ZTC__) && defined(DOS386)
+# define ACC_OS_DOS32 1
+# define ACC_INFO_OS "dos32"
+#elif defined(__OS2__) || defined(__OS2V2__)
+# if (UINT_MAX == ACC_0xffffL)
+# define ACC_OS_OS216 1
+# define ACC_INFO_OS "os216"
+# elif (UINT_MAX == ACC_0xffffffffL)
+# define ACC_OS_OS2 1
+# define ACC_INFO_OS "os2"
+# else
+# error "check your limits.h header"
+# endif
+#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
+# define ACC_OS_WIN64 1
+# define ACC_INFO_OS "win64"
+#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
+# define ACC_OS_WIN32 1
+# define ACC_INFO_OS "win32"
+#elif defined(__MWERKS__) && defined(__INTEL__)
+# define ACC_OS_WIN32 1
+# define ACC_INFO_OS "win32"
+#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
+# if (UINT_MAX == ACC_0xffffL)
+# define ACC_OS_WIN16 1
+# define ACC_INFO_OS "win16"
+# elif (UINT_MAX == ACC_0xffffffffL)
+# define ACC_OS_WIN32 1
+# define ACC_INFO_OS "win32"
+# else
+# error "check your limits.h header"
+# endif
+#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
+# if (UINT_MAX == ACC_0xffffL)
+# define ACC_OS_DOS16 1
+# define ACC_INFO_OS "dos16"
+# elif (UINT_MAX == ACC_0xffffffffL)
+# define ACC_OS_DOS32 1
+# define ACC_INFO_OS "dos32"
+# else
+# error "check your limits.h header"
+# endif
+#elif defined(__WATCOMC__)
+# if defined(__NT__) && (UINT_MAX == ACC_0xffffL)
+# define ACC_OS_DOS16 1
+# define ACC_INFO_OS "dos16"
+# elif defined(__NT__) && (__WATCOMC__ < 1100)
+# define ACC_OS_WIN32 1
+# define ACC_INFO_OS "win32"
+# elif defined(__linux__) || defined(__LINUX__)
+# define ACC_OS_POSIX 1
+# define ACC_INFO_OS "posix"
+# else
+# error "please specify a target using the -bt compiler option"
+# endif
+#elif defined(__palmos__)
+# define ACC_OS_PALMOS 1
+# define ACC_INFO_OS "palmos"
+#elif defined(__TOS__) || defined(__atarist__)
+# define ACC_OS_TOS 1
+# define ACC_INFO_OS "tos"
+#elif defined(macintosh) && !defined(__ppc__)
+# 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__))
+# 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__))
+# define ACC_OS_CONSOLE 1
+# define ACC_OS_CONSOLE_PSP 1
+# define ACC_INFO_OS "console"
+# define ACC_INFO_OS_CONSOLE "psp"
+#else
+# define ACC_OS_POSIX 1
+# define ACC_INFO_OS "posix"
+#endif
+#if (ACC_OS_POSIX)
+# if defined(_AIX) || defined(__AIX__) || defined(__aix__)
+# define ACC_OS_POSIX_AIX 1
+# define ACC_INFO_OS_POSIX "aix"
+# elif defined(__FreeBSD__)
+# define ACC_OS_POSIX_FREEBSD 1
+# define ACC_INFO_OS_POSIX "freebsd"
+# elif defined(__hpux__) || defined(__hpux)
+# define ACC_OS_POSIX_HPUX 1
+# define ACC_INFO_OS_POSIX "hpux"
+# elif defined(__INTERIX)
+# define ACC_OS_POSIX_INTERIX 1
+# define ACC_INFO_OS_POSIX "interix"
+# elif defined(__IRIX__) || defined(__irix__)
+# define ACC_OS_POSIX_IRIX 1
+# define ACC_INFO_OS_POSIX "irix"
+# 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(__minix__) || defined(__minix)
+# define ACC_OS_POSIX_MINIX 1
+# define ACC_INFO_OS_POSIX "minix"
+# elif defined(__NetBSD__)
+# define ACC_OS_POSIX_NETBSD 1
+# define ACC_INFO_OS_POSIX "netbsd"
+# elif defined(__OpenBSD__)
+# define ACC_OS_POSIX_OPENBSD 1
+# define ACC_INFO_OS_POSIX "openbsd"
+# elif defined(__osf__)
+# define ACC_OS_POSIX_OSF 1
+# define ACC_INFO_OS_POSIX "osf"
+# elif defined(__solaris__) || defined(__sun)
+# if defined(__SVR4) || defined(__svr4__)
+# define ACC_OS_POSIX_SOLARIS 1
+# define ACC_INFO_OS_POSIX "solaris"
+# else
+# define ACC_OS_POSIX_SUNOS 1
+# define ACC_INFO_OS_POSIX "sunos"
+# endif
+# elif defined(__ultrix__) || defined(__ultrix)
+# define ACC_OS_POSIX_ULTRIX 1
+# define ACC_INFO_OS_POSIX "ultrix"
+# elif defined(_UNICOS)
+# define ACC_OS_POSIX_UNICOS 1
+# define ACC_INFO_OS_POSIX "unicos"
+# else
+# define ACC_OS_POSIX_UNKNOWN 1
+# define ACC_INFO_OS_POSIX "unknown"
+# endif
+#endif
+#endif
+#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
+# if (UINT_MAX != ACC_0xffffL)
+# error "this should not happen"
+# endif
+# if (ULONG_MAX != ACC_0xffffffffL)
+# error "this should not happen"
+# 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"
+# endif
+# if (ULONG_MAX != ACC_0xffffffffL)
+# error "this should not happen"
+# endif
+#endif
+#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
+# define ACC_CC_CILLY 1
+# define ACC_INFO_CC "Cilly"
+# if defined(__CILLY__)
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__CILLY__)
+# else
+# define ACC_INFO_CCVER "unknown"
+# endif
+#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
+# define ACC_CC_SDCC 1
+# 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_INFO_CC "Pathscale C"
+# define ACC_INFO_CCVER __PATHSCALE__
+#elif defined(__INTEL_COMPILER)
+# define ACC_CC_INTELC 1
+# 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
+# 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__)
+# if defined(__GNUC_PATCHLEVEL__)
+# define ACC_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
+# else
+# define ACC_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
+# endif
+# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
+# define ACC_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__)
+# else
+# define ACC_CC_CLANG_CLANG 0x020700L
+# 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__)
+# else
+# define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 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(__AZTEC_C__)
+# define ACC_CC_AZTECC 1
+# define ACC_INFO_CC "Aztec C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__AZTEC_C__)
+#elif defined(__CODEGEARC__)
+# define ACC_CC_CODEGEARC 1
+# define ACC_INFO_CC "CodeGear C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__CODEGEARC__)
+#elif defined(__BORLANDC__)
+# define ACC_CC_BORLANDC 1
+# define ACC_INFO_CC "Borland C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__BORLANDC__)
+#elif defined(_CRAYC) && defined(_RELEASE)
+# define ACC_CC_CRAYC 1
+# define ACC_INFO_CC "Cray C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_RELEASE)
+#elif defined(__DMC__) && defined(__SC__)
+# define ACC_CC_DMC 1
+# define ACC_INFO_CC "Digital Mars C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DMC__)
+#elif defined(__DECC)
+# define ACC_CC_DECC 1
+# define ACC_INFO_CC "DEC C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DECC)
+#elif defined(__HIGHC__)
+# define ACC_CC_HIGHC 1
+# define ACC_INFO_CC "MetaWare High C"
+# define ACC_INFO_CCVER "unknown"
+#elif defined(__IAR_SYSTEMS_ICC__)
+# define ACC_CC_IARC 1
+# define ACC_INFO_CC "IAR C"
+# if defined(__VER__)
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__VER__)
+# else
+# define ACC_INFO_CCVER "unknown"
+# endif
+#elif defined(__IBMC__)
+# define ACC_CC_IBMC 1
+# define ACC_INFO_CC "IBM C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMC__)
+#elif defined(__KEIL__) && defined(__C166__)
+# define ACC_CC_KEILC 1
+# define ACC_INFO_CC "Keil C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__C166__)
+#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
+# define ACC_CC_LCCWIN32 1
+# define ACC_INFO_CC "lcc-win32"
+# define ACC_INFO_CCVER "unknown"
+#elif defined(__LCC__)
+# define ACC_CC_LCC 1
+# define ACC_INFO_CC "lcc"
+# if defined(__LCC_VERSION__)
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__LCC_VERSION__)
+# 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
+# define ACC_INFO_CC "Metrowerks C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__MWERKS__)
+#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
+# define ACC_CC_NDPC 1
+# define ACC_INFO_CC "Microway NDP C"
+# define ACC_INFO_CCVER "unknown"
+#elif defined(__PACIFIC__)
+# define ACC_CC_PACIFICC 1
+# define ACC_INFO_CC "Pacific C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PACIFIC__)
+#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
+# define ACC_CC_PGI 1
+# define ACC_INFO_CC "Portland Group PGI C"
+# define ACC_INFO_CCVER "unknown"
+#elif defined(__PUREC__) && defined(__TOS__)
+# define ACC_CC_PUREC 1
+# define ACC_INFO_CC "Pure C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PUREC__)
+#elif defined(__SC__) && defined(__ZTC__)
+# define ACC_CC_SYMANTECC 1
+# define ACC_INFO_CC "Symantec C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SC__)
+#elif defined(__SUNPRO_C)
+# define ACC_INFO_CC "SunPro C"
+# if ((__SUNPRO_C)+0 > 0)
+# define ACC_CC_SUNPROC __SUNPRO_C
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_C)
+# else
+# define ACC_CC_SUNPROC 1
+# define ACC_INFO_CCVER "unknown"
+# endif
+#elif defined(__SUNPRO_CC)
+# define ACC_INFO_CC "SunPro C"
+# if ((__SUNPRO_CC)+0 > 0)
+# define ACC_CC_SUNPROC __SUNPRO_CC
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_CC)
+# else
+# define ACC_CC_SUNPROC 1
+# define ACC_INFO_CCVER "unknown"
+# endif
+#elif defined(__TINYC__)
+# define ACC_CC_TINYC 1
+# define ACC_INFO_CC "Tiny C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TINYC__)
+#elif defined(__TSC__)
+# define ACC_CC_TOPSPEEDC 1
+# define ACC_INFO_CC "TopSpeed C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TSC__)
+#elif defined(__WATCOMC__)
+# define ACC_CC_WATCOMC 1
+# define ACC_INFO_CC "Watcom C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__WATCOMC__)
+#elif defined(__TURBOC__)
+# define ACC_CC_TURBOC 1
+# define ACC_INFO_CC "Turbo C"
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TURBOC__)
+#elif defined(__ZTC__)
+# define ACC_CC_ZORTECHC 1
+# define ACC_INFO_CC "Zortech C"
+# if (__ZTC__ == 0x310)
+# define ACC_INFO_CCVER "0x310"
+# else
+# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ZTC__)
+# endif
+#else
+# define ACC_CC_UNKNOWN 1
+# define ACC_INFO_CC "unknown"
+# define ACC_INFO_CCVER "unknown"
+#endif
+#if 0 && (ACC_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
+# error "ACC_CC_MSC: _MSC_FULL_VER is not defined"
+#endif
+#if !defined(__ACC_ARCH_OVERRIDE) && !(ACC_ARCH_GENERIC) && defined(_CRAY)
+# if (UINT_MAX > ACC_0xffffffffL) && defined(_CRAY)
+# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
+# define ACC_ARCH_CRAY_MPP 1
+# elif defined(_CRAY1)
+# define ACC_ARCH_CRAY_PVP 1
+# endif
+# endif
+#endif
+#if !defined(__ACC_ARCH_OVERRIDE)
+#if (ACC_ARCH_GENERIC)
+# 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(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
+# define ACC_ARCH_ALPHA 1
+# define ACC_INFO_ARCH "alpha"
+#elif (ACC_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
+# define ACC_ARCH_ALPHA 1
+# define ACC_INFO_ARCH "alpha"
+#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))
+# define ACC_ARCH_ARM 1
+# define ACC_ARCH_ARM_THUMB 1
+# define ACC_INFO_ARCH "arm_thumb"
+#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
+# define ACC_INFO_ARCH "avr"
+#elif defined(__avr32__) || defined(__AVR32__)
+# define ACC_ARCH_AVR32 1
+# define ACC_INFO_ARCH "avr32"
+#elif defined(__bfin__)
+# define ACC_ARCH_BLACKFIN 1
+# define ACC_INFO_ARCH "blackfin"
+#elif (UINT_MAX == ACC_0xffffL) && defined(__C166__)
+# define ACC_ARCH_C166 1
+# define ACC_INFO_ARCH "c166"
+#elif defined(__cris__)
+# define ACC_ARCH_CRIS 1
+# define ACC_INFO_ARCH "cris"
+#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
+# define ACC_ARCH_EZ80 1
+# define ACC_INFO_ARCH "ez80"
+#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
+# define ACC_ARCH_H8300 1
+# define ACC_INFO_ARCH "h8300"
+#elif defined(__hppa__) || defined(__hppa)
+# define ACC_ARCH_HPPA 1
+# define ACC_INFO_ARCH "hppa"
+#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
+# define ACC_ARCH_I386 1
+# define ACC_ARCH_IA32 1
+# define ACC_INFO_ARCH "i386"
+#elif (ACC_CC_ZORTECHC && defined(__I86__))
+# define ACC_ARCH_I386 1
+# define ACC_ARCH_IA32 1
+# define ACC_INFO_ARCH "i386"
+#elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
+# define ACC_ARCH_I386 1
+# define ACC_ARCH_IA32 1
+# define ACC_INFO_ARCH "i386"
+#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
+# define ACC_ARCH_IA64 1
+# define ACC_INFO_ARCH "ia64"
+#elif (UINT_MAX == ACC_0xffffL) && defined(__m32c__)
+# define ACC_ARCH_M16C 1
+# define ACC_INFO_ARCH "m16c"
+#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
+# define ACC_ARCH_M16C 1
+# define ACC_INFO_ARCH "m16c"
+#elif defined(__m32r__)
+# define ACC_ARCH_M32R 1
+# define ACC_INFO_ARCH "m32r"
+#elif (ACC_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
+# define ACC_ARCH_M68K 1
+# define ACC_INFO_ARCH "m68k"
+#elif (UINT_MAX == ACC_0xffffL) && defined(__C251__)
+# define ACC_ARCH_MCS251 1
+# define ACC_INFO_ARCH "mcs251"
+#elif (UINT_MAX == ACC_0xffffL) && defined(__C51__)
+# define ACC_ARCH_MCS51 1
+# define ACC_INFO_ARCH "mcs51"
+#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
+# define ACC_ARCH_MCS51 1
+# define ACC_INFO_ARCH "mcs51"
+#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
+# define ACC_ARCH_MIPS 1
+# define ACC_INFO_ARCH "mips"
+#elif (UINT_MAX == ACC_0xffffL) && defined(__MSP430__)
+# define ACC_ARCH_MSP430 1
+# define ACC_INFO_ARCH "msp430"
+#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
+# define ACC_ARCH_MSP430 1
+# define ACC_INFO_ARCH "msp430"
+#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(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
+# define ACC_ARCH_S390 1
+# define ACC_INFO_ARCH "s390"
+#elif defined(__sh__) || defined(_M_SH)
+# define ACC_ARCH_SH 1
+# define ACC_INFO_ARCH "sh"
+#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
+# define ACC_ARCH_SPARC 1
+# define ACC_INFO_ARCH "sparc"
+#elif defined(__SPU__)
+# define ACC_ARCH_SPU 1
+# define ACC_INFO_ARCH "spu"
+#elif (UINT_MAX == ACC_0xffffL) && defined(__z80)
+# define ACC_ARCH_Z80 1
+# define ACC_INFO_ARCH "z80"
+#elif (ACC_ARCH_CRAY_PVP)
+# if defined(_CRAYSV1)
+# define ACC_ARCH_CRAY_SV1 1
+# define ACC_INFO_ARCH "cray_sv1"
+# elif (_ADDR64)
+# define ACC_ARCH_CRAY_T90 1
+# define ACC_INFO_ARCH "cray_t90"
+# elif (_ADDR32)
+# define ACC_ARCH_CRAY_YMP 1
+# define ACC_INFO_ARCH "cray_ymp"
+# else
+# define ACC_ARCH_CRAY_XMP 1
+# define ACC_INFO_ARCH "cray_xmp"
+# endif
+#else
+# define ACC_ARCH_UNKNOWN 1
+# define ACC_INFO_ARCH "unknown"
+#endif
+#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"
+#endif
+#if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN64)
+# error "FIXME - missing 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"
+#endif
+#if (ACC_ARCH_I086PM) && !(ACC_ARCH_I086)
+# error "this should not happen"
+#endif
+#if (ACC_ARCH_I086)
+# if (UINT_MAX != ACC_0xffffL)
+# error "this should not happen"
+# endif
+# if (ULONG_MAX != ACC_0xffffffffL)
+# error "this should not happen"
+# endif
+#endif
+#if (ACC_ARCH_I386)
+# if (UINT_MAX != ACC_0xffffL) && defined(__i386_int16__)
+# error "this should not happen"
+# endif
+# if (UINT_MAX != ACC_0xffffffffL) && !defined(__i386_int16__)
+# error "this should not happen"
+# endif
+# if (ULONG_MAX != ACC_0xffffffffL)
+# error "this should not happen"
+# endif
+#endif
+#if !defined(__ACC_MM_OVERRIDE)
+#if (ACC_ARCH_I086)
+#if (UINT_MAX != ACC_0xffffL)
+# error "this should not happen"
+#endif
+#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
+# define ACC_MM_TINY 1
+#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
+# define ACC_MM_HUGE 1
+#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
+# define ACC_MM_SMALL 1
+#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
+# define ACC_MM_MEDIUM 1
+#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
+# define ACC_MM_COMPACT 1
+#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
+# define ACC_MM_LARGE 1
+#elif (ACC_CC_AZTECC)
+# if defined(_LARGE_CODE) && defined(_LARGE_DATA)
+# define ACC_MM_LARGE 1
+# elif defined(_LARGE_CODE)
+# define ACC_MM_MEDIUM 1
+# elif defined(_LARGE_DATA)
+# define ACC_MM_COMPACT 1
+# else
+# define ACC_MM_SMALL 1
+# endif
+#elif (ACC_CC_ZORTECHC && defined(__VCM__))
+# define ACC_MM_LARGE 1
+#else
+# error "unknown memory model"
+#endif
+#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
+#define ACC_HAVE_MM_HUGE_PTR 1
+#define ACC_HAVE_MM_HUGE_ARRAY 1
+#if (ACC_MM_TINY)
+# undef ACC_HAVE_MM_HUGE_ARRAY
+#endif
+#if (ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_ZORTECHC)
+# undef ACC_HAVE_MM_HUGE_PTR
+# undef ACC_HAVE_MM_HUGE_ARRAY
+#elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
+# undef ACC_HAVE_MM_HUGE_ARRAY
+#elif (ACC_CC_MSC && defined(_QC))
+# undef ACC_HAVE_MM_HUGE_ARRAY
+# if (_MSC_VER < 600)
+# undef ACC_HAVE_MM_HUGE_PTR
+# endif
+#elif (ACC_CC_TURBOC && (__TURBOC__ < 0x0295))
+# undef ACC_HAVE_MM_HUGE_ARRAY
+#endif
+#if (ACC_ARCH_I086PM) && !(ACC_HAVE_MM_HUGE_PTR)
+# if (ACC_OS_DOS16)
+# error "this should not happen"
+# elif (ACC_CC_ZORTECHC)
+# else
+# error "this should not happen"
+# endif
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
+ extern void __near __cdecl _AHSHIFT(void);
+# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
+#elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
+ extern void __near __cdecl _AHSHIFT(void);
+# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
+#elif (ACC_CC_MSC || ACC_CC_TOPSPEEDC)
+ extern void __near __cdecl _AHSHIFT(void);
+# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
+#elif (ACC_CC_TURBOC && (__TURBOC__ >= 0x0295))
+ extern void __near __cdecl _AHSHIFT(void);
+# define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
+#elif ((ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_TURBOC) && ACC_OS_DOS16)
+# define ACC_MM_AHSHIFT 12
+#elif (ACC_CC_WATCOMC)
+ extern unsigned char _HShift;
+# define ACC_MM_AHSHIFT ((unsigned) _HShift)
+#else
+# error "FIXME - implement ACC_MM_AHSHIFT"
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif
+#elif (ACC_ARCH_C166)
+#if !defined(__MODEL__)
+# error "FIXME - C166 __MODEL__"
+#elif ((__MODEL__) == 0)
+# define ACC_MM_SMALL 1
+#elif ((__MODEL__) == 1)
+# define ACC_MM_SMALL 1
+#elif ((__MODEL__) == 2)
+# define ACC_MM_LARGE 1
+#elif ((__MODEL__) == 3)
+# define ACC_MM_TINY 1
+#elif ((__MODEL__) == 4)
+# define ACC_MM_XTINY 1
+#elif ((__MODEL__) == 5)
+# define ACC_MM_XSMALL 1
+#else
+# error "FIXME - C166 __MODEL__"
+#endif
+#elif (ACC_ARCH_MCS251)
+#if !defined(__MODEL__)
+# error "FIXME - MCS251 __MODEL__"
+#elif ((__MODEL__) == 0)
+# define ACC_MM_SMALL 1
+#elif ((__MODEL__) == 2)
+# define ACC_MM_LARGE 1
+#elif ((__MODEL__) == 3)
+# define ACC_MM_TINY 1
+#elif ((__MODEL__) == 4)
+# define ACC_MM_XTINY 1
+#elif ((__MODEL__) == 5)
+# define ACC_MM_XSMALL 1
+#else
+# error "FIXME - MCS251 __MODEL__"
+#endif
+#elif (ACC_ARCH_MCS51)
+#if !defined(__MODEL__)
+# error "FIXME - MCS51 __MODEL__"
+#elif ((__MODEL__) == 1)
+# define ACC_MM_SMALL 1
+#elif ((__MODEL__) == 2)
+# define ACC_MM_LARGE 1
+#elif ((__MODEL__) == 3)
+# define ACC_MM_TINY 1
+#elif ((__MODEL__) == 4)
+# define ACC_MM_XTINY 1
+#elif ((__MODEL__) == 5)
+# define ACC_MM_XSMALL 1
+#else
+# error "FIXME - MCS51 __MODEL__"
+#endif
+#elif (ACC_ARCH_CRAY_PVP)
+# define ACC_MM_PVP 1
+#else
+# define ACC_MM_FLAT 1
+#endif
+#if (ACC_MM_COMPACT)
+# define ACC_INFO_MM "compact"
+#elif (ACC_MM_FLAT)
+# define ACC_INFO_MM "flat"
+#elif (ACC_MM_HUGE)
+# define ACC_INFO_MM "huge"
+#elif (ACC_MM_LARGE)
+# define ACC_INFO_MM "large"
+#elif (ACC_MM_MEDIUM)
+# define ACC_INFO_MM "medium"
+#elif (ACC_MM_PVP)
+# define ACC_INFO_MM "pvp"
+#elif (ACC_MM_SMALL)
+# define ACC_INFO_MM "small"
+#elif (ACC_MM_TINY)
+# define ACC_INFO_MM "tiny"
+#else
+# error "unknown memory model"
+#endif
+#endif
+#if defined(SIZEOF_SHORT)
+# define ACC_SIZEOF_SHORT (SIZEOF_SHORT)
+#endif
+#if defined(SIZEOF_INT)
+# define ACC_SIZEOF_INT (SIZEOF_INT)
+#endif
+#if defined(SIZEOF_LONG)
+# define ACC_SIZEOF_LONG (SIZEOF_LONG)
+#endif
+#if defined(SIZEOF_LONG_LONG)
+# define ACC_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
+#endif
+#if defined(SIZEOF___INT16)
+# define ACC_SIZEOF___INT16 (SIZEOF___INT16)
+#endif
+#if defined(SIZEOF___INT32)
+# define ACC_SIZEOF___INT32 (SIZEOF___INT32)
+#endif
+#if defined(SIZEOF___INT64)
+# define ACC_SIZEOF___INT64 (SIZEOF___INT64)
+#endif
+#if defined(SIZEOF_VOID_P)
+# define ACC_SIZEOF_VOID_P (SIZEOF_VOID_P)
+#endif
+#if defined(SIZEOF_SIZE_T)
+# define ACC_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
+#endif
+#if defined(SIZEOF_PTRDIFF_T)
+# define ACC_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
+#endif
+#define __ACC_LSR(x,b) (((x)+0ul) >> (b))
+#if !defined(ACC_SIZEOF_SHORT)
+# if (ACC_ARCH_CRAY_PVP)
+# define ACC_SIZEOF_SHORT 8
+# elif (USHRT_MAX == ACC_0xffffL)
+# define ACC_SIZEOF_SHORT 2
+# elif (__ACC_LSR(USHRT_MAX,7) == 1)
+# define ACC_SIZEOF_SHORT 1
+# elif (__ACC_LSR(USHRT_MAX,15) == 1)
+# define ACC_SIZEOF_SHORT 2
+# elif (__ACC_LSR(USHRT_MAX,31) == 1)
+# define ACC_SIZEOF_SHORT 4
+# elif (__ACC_LSR(USHRT_MAX,63) == 1)
+# define ACC_SIZEOF_SHORT 8
+# elif (__ACC_LSR(USHRT_MAX,127) == 1)
+# define ACC_SIZEOF_SHORT 16
+# else
+# error "ACC_SIZEOF_SHORT"
+# endif
+#endif
+#if !defined(ACC_SIZEOF_INT)
+# if (ACC_ARCH_CRAY_PVP)
+# define ACC_SIZEOF_INT 8
+# elif (UINT_MAX == ACC_0xffffL)
+# define ACC_SIZEOF_INT 2
+# elif (UINT_MAX == ACC_0xffffffffL)
+# define ACC_SIZEOF_INT 4
+# elif (__ACC_LSR(UINT_MAX,7) == 1)
+# define ACC_SIZEOF_INT 1
+# elif (__ACC_LSR(UINT_MAX,15) == 1)
+# define ACC_SIZEOF_INT 2
+# elif (__ACC_LSR(UINT_MAX,31) == 1)
+# define ACC_SIZEOF_INT 4
+# elif (__ACC_LSR(UINT_MAX,63) == 1)
+# define ACC_SIZEOF_INT 8
+# elif (__ACC_LSR(UINT_MAX,127) == 1)
+# define ACC_SIZEOF_INT 16
+# else
+# error "ACC_SIZEOF_INT"
+# endif
+#endif
+#if !defined(ACC_SIZEOF_LONG)
+# if (ULONG_MAX == ACC_0xffffffffL)
+# define ACC_SIZEOF_LONG 4
+# elif (__ACC_LSR(ULONG_MAX,7) == 1)
+# define ACC_SIZEOF_LONG 1
+# elif (__ACC_LSR(ULONG_MAX,15) == 1)
+# define ACC_SIZEOF_LONG 2
+# elif (__ACC_LSR(ULONG_MAX,31) == 1)
+# define ACC_SIZEOF_LONG 4
+# elif (__ACC_LSR(ULONG_MAX,63) == 1)
+# define ACC_SIZEOF_LONG 8
+# elif (__ACC_LSR(ULONG_MAX,127) == 1)
+# define ACC_SIZEOF_LONG 16
+# else
+# error "ACC_SIZEOF_LONG"
+# endif
+#endif
+#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)
+# define ACC_SIZEOF_LONG_LONG ACC_SIZEOF_LONG
+# elif (__ACC_LSR(__LONG_LONG_MAX__,30) == 1)
+# define ACC_SIZEOF_LONG_LONG 4
+# endif
+# endif
+# endif
+#endif
+#endif
+#if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
+#if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
+#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)
+# 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
+#elif (ACC_OS_WIN64 || defined(_WIN64))
+# define ACC_SIZEOF___INT64 8
+#elif (ACC_ARCH_I386 && (ACC_CC_DMC))
+# define ACC_SIZEOF_LONG_LONG 8
+#elif (ACC_ARCH_I386 && (ACC_CC_SYMANTECC && (__SC__ >= 0x700)))
+# define ACC_SIZEOF_LONG_LONG 8
+#elif (ACC_ARCH_I386 && (ACC_CC_INTELC && defined(__linux__)))
+# define ACC_SIZEOF_LONG_LONG 8
+#elif (ACC_ARCH_I386 && (ACC_CC_MWERKS || ACC_CC_PELLESC || ACC_CC_PGI || ACC_CC_SUNPROC))
+# define ACC_SIZEOF_LONG_LONG 8
+#elif (ACC_ARCH_I386 && (ACC_CC_INTELC || ACC_CC_MSC))
+# define ACC_SIZEOF___INT64 8
+#elif ((ACC_OS_WIN32 || defined(_WIN32)) && (ACC_CC_MSC))
+# define ACC_SIZEOF___INT64 8
+#elif (ACC_ARCH_I386 && (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
+# 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))
+# 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)
+# define ACC_SIZEOF_LONG_LONG 8
+#elif (ACC_CC_SDCC) && (ACC_SIZEOF_INT == 2)
+#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define ACC_SIZEOF_LONG_LONG 8
+#endif
+#endif
+#endif
+#if defined(__cplusplus) && (ACC_CC_GNUC)
+# if (ACC_CC_GNUC < 0x020800ul)
+# undef ACC_SIZEOF_LONG_LONG
+# endif
+#endif
+#if (ACC_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
+# 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
+# else
+# error "ACC_MM"
+# endif
+#elif (ACC_ARCH_AVR || ACC_ARCH_Z80)
+# define __ACC_WORDSIZE 1
+# 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
+# else
+# define __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_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_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
+#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
+#endif
+#if !defined(ACC_SIZEOF_SIZE_T)
+#if (ACC_ARCH_I086 || ACC_ARCH_M16C)
+# define ACC_SIZEOF_SIZE_T 2
+#else
+# define ACC_SIZEOF_SIZE_T ACC_SIZEOF_VOID_P
+#endif
+#endif
+#if !defined(ACC_SIZEOF_PTRDIFF_T)
+#if (ACC_ARCH_I086)
+# if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM || ACC_MM_HUGE)
+# define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_VOID_P
+# elif (ACC_MM_COMPACT || ACC_MM_LARGE)
+# if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
+# define ACC_SIZEOF_PTRDIFF_T 4
+# else
+# define ACC_SIZEOF_PTRDIFF_T 2
+# endif
+# else
+# error "ACC_MM"
+# endif
+#else
+# define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_SIZE_T
+#endif
+#endif
+#if (ACC_ABI_NEUTRAL_ENDIAN)
+# undef ACC_ABI_BIG_ENDIAN
+# undef ACC_ABI_LITTLE_ENDIAN
+#elif !(ACC_ABI_BIG_ENDIAN) && !(ACC_ABI_LITTLE_ENDIAN)
+#if (ACC_ARCH_ALPHA) && (ACC_ARCH_CRAY_MPP)
+# 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)
+# define ACC_ABI_LITTLE_ENDIAN 1
+#elif (ACC_ARCH_AVR32 || ACC_ARCH_M68K || ACC_ARCH_S390)
+# define ACC_ABI_BIG_ENDIAN 1
+#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
+# if (__LITTLE_ENDIAN__ == 1)
+# define ACC_ABI_LITTLE_ENDIAN 1
+# else
+# define ACC_ABI_BIG_ENDIAN 1
+# endif
+#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
+# 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(__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_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
+# define ACC_ABI_BIG_ENDIAN 1
+#elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
+# define ACC_ABI_LITTLE_ENDIAN 1
+#endif
+#endif
+#if (ACC_ABI_BIG_ENDIAN) && (ACC_ABI_LITTLE_ENDIAN)
+# error "this should not happen"
+#endif
+#if (ACC_ABI_BIG_ENDIAN)
+# define ACC_INFO_ABI_ENDIAN "be"
+#elif (ACC_ABI_LITTLE_ENDIAN)
+# define ACC_INFO_ABI_ENDIAN "le"
+#elif (ACC_ABI_NEUTRAL_ENDIAN)
+# define ACC_INFO_ABI_ENDIAN "neutral"
+#endif
+#if (ACC_SIZEOF_INT == 1 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
+# define ACC_ABI_I8LP16 1
+# define ACC_INFO_ABI_PM "i8lp16"
+#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 == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4)
+# define ACC_ABI_ILP32 1
+# define ACC_INFO_ABI_PM "ilp32"
+#elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 8 && ACC_SIZEOF_SIZE_T == 8)
+# define ACC_ABI_LLP64 1
+# define ACC_INFO_ABI_PM "llp64"
+#elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
+# define ACC_ABI_LP64 1
+# define ACC_INFO_ABI_PM "lp64"
+#elif (ACC_SIZEOF_INT == 8 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
+# define ACC_ABI_ILP64 1
+# define ACC_INFO_ABI_PM "ilp64"
+#elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 4)
+# define ACC_ABI_IP32L64 1
+# define ACC_INFO_ABI_PM "ip32l64"
+#endif
+#if !defined(__ACC_LIBC_OVERRIDE)
+#if (ACC_LIBC_NAKED)
+# define ACC_INFO_LIBC "naked"
+#elif (ACC_LIBC_FREESTANDING)
+# define ACC_INFO_LIBC "freestanding"
+#elif (ACC_LIBC_MOSTLY_FREESTANDING)
+# define ACC_INFO_LIBC "mfreestanding"
+#elif (ACC_LIBC_ISOC90)
+# define ACC_INFO_LIBC "isoc90"
+#elif (ACC_LIBC_ISOC99)
+# define ACC_INFO_LIBC "isoc99"
+#elif defined(__dietlibc__)
+# define ACC_LIBC_DIETLIBC 1
+# define ACC_INFO_LIBC "dietlibc"
+#elif defined(_NEWLIB_VERSION)
+# define ACC_LIBC_NEWLIB 1
+# 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__)
+# else
+# define ACC_LIBC_UCLIBC 0x00090bL
+# endif
+# define ACC_INFO_LIBC "uclibc"
+#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
+# define ACC_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100)
+# define ACC_INFO_LIBC "glibc"
+#elif (ACC_CC_MWERKS) && defined(__MSL__)
+# define ACC_LIBC_MSL __MSL__
+# define ACC_INFO_LIBC "msl"
+#elif 1 && defined(__IAR_SYSTEMS_ICC__)
+# define ACC_LIBC_ISOC90 1
+# define ACC_INFO_LIBC "isoc90"
+#else
+# define ACC_LIBC_DEFAULT 1
+# 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__))
+#endif
+#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)
+# 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)
+# 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)
+# 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
+# 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_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)))))
+# 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)];
+# 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)];}
+# 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
+# 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 (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
+# 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
+#elif (ACC_ARCH_M68K)
+# 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
+# endif
+#elif (ACC_ARCH_MIPS)
+# 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
+# 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
+# endif
+#elif (ACC_ARCH_SH)
+# define ACC_OPT_PREFER_POSTINC 1
+# define ACC_OPT_PREFER_PREDEC 1
+#endif
+#ifndef ACC_CFG_NO_INLINE_ASM
+#if (ACC_CC_LLVM)
+# define ACC_CFG_NO_INLINE_ASM 1
+#endif
+#endif
+#ifndef ACC_CFG_NO_UNALIGNED
+#if (ACC_ABI_NEUTRAL_ENDIAN) || (ACC_ARCH_GENERIC)
+# define ACC_CFG_NO_UNALIGNED 1
+#endif
+#endif
+#if (ACC_CFG_NO_UNALIGNED)
+# undef ACC_OPT_UNALIGNED16
+# 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 ""
+#elif defined(ACC_INFO_MM)
+# define __ACC_INFOSTR_MM "." ACC_INFO_MM
+#else
+# define __ACC_INFOSTR_MM ""
+#endif
+#if defined(__ACC_INFOSTR_PM)
+#elif defined(ACC_INFO_ABI_PM)
+# define __ACC_INFOSTR_PM "." ACC_INFO_ABI_PM
+#else
+# define __ACC_INFOSTR_PM ""
+#endif
+#if defined(__ACC_INFOSTR_ENDIAN)
+#elif defined(ACC_INFO_ABI_ENDIAN)
+# define __ACC_INFOSTR_ENDIAN "." ACC_INFO_ABI_ENDIAN
+#else
+# define __ACC_INFOSTR_ENDIAN ""
+#endif
+#if defined(__ACC_INFOSTR_OSNAME)
+#elif defined(ACC_INFO_OS_CONSOLE)
+# define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_CONSOLE
+#elif defined(ACC_INFO_OS_POSIX)
+# define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_POSIX
+#else
+# define __ACC_INFOSTR_OSNAME ACC_INFO_OS
+#endif
+#if defined(__ACC_INFOSTR_LIBC)
+#elif defined(ACC_INFO_LIBC)
+# define __ACC_INFOSTR_LIBC "." ACC_INFO_LIBC
+#else
+# define __ACC_INFOSTR_LIBC ""
+#endif
+#if defined(__ACC_INFOSTR_CCVER)
+#elif defined(ACC_INFO_CCVER)
+# define __ACC_INFOSTR_CCVER " " ACC_INFO_CCVER
+#else
+# define __ACC_INFOSTR_CCVER ""
+#endif
+#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_NO_CONFIG_HEADER)
+#elif defined(ACC_CFG_CONFIG_HEADER)
+#else
+#if !(ACC_CFG_AUTO_NO_HEADERS)
+#if (ACC_LIBC_NAKED)
+#elif (ACC_LIBC_FREESTANDING)
+# define HAVE_LIMITS_H 1
+# define HAVE_STDARG_H 1
+# define HAVE_STDDEF_H 1
+#elif (ACC_LIBC_MOSTLY_FREESTANDING)
+# define HAVE_LIMITS_H 1
+# define HAVE_SETJMP_H 1
+# define HAVE_STDARG_H 1
+# define HAVE_STDDEF_H 1
+# define HAVE_STDIO_H 1
+# define HAVE_STRING_H 1
+#else
+#define STDC_HEADERS 1
+#define HAVE_ASSERT_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_DIRENT_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FLOAT_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_SETJMP_H 1
+#define HAVE_SIGNAL_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_STDIO_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_TIME_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UTIME_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#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)
+# 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)
+# undef HAVE_SYS_TIME_H
+# undef HAVE_SYS_TYPES_H
+# elif (ACC_OS_POSIX_SOLARIS || ACC_OS_POSIX_SUNOS)
+# define HAVE_ALLOCA_H 1
+# endif
+# if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
+# define HAVE_STRINGS_H 1
+# define HAVE_SYS_MMAN_H 1
+# define HAVE_SYS_RESOURCE_H 1
+# define HAVE_SYS_WAIT_H 1
+# endif
+# if (ACC_LIBC_NEWLIB)
+# undef HAVE_STRINGS_H
+# endif
+#elif (ACC_OS_CYGWIN)
+# define HAVE_IO_H 1
+#elif (ACC_OS_EMX)
+# define HAVE_ALLOCA_H 1
+# define HAVE_IO_H 1
+#elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
+# if !defined(__MINT__)
+# undef HAVE_MALLOC_H
+# endif
+#elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
+# undef HAVE_DIRENT_H
+# undef HAVE_FCNTL_H
+# undef HAVE_MALLOC_H
+# undef HAVE_MEMORY_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_STAT_H
+# undef HAVE_SYS_TIME_H
+# undef HAVE_SYS_TYPES_H
+#endif
+#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
+#define HAVE_CONIO_H 1
+#define HAVE_DIRECT_H 1
+#define HAVE_DOS_H 1
+#define HAVE_IO_H 1
+#define HAVE_SHARE_H 1
+#if (ACC_CC_AZTECC)
+# undef HAVE_CONIO_H
+# undef HAVE_DIRECT_H
+# undef HAVE_DIRENT_H
+# undef HAVE_MALLOC_H
+# undef HAVE_SHARE_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_STAT_H
+# undef HAVE_SYS_TIME_H
+# undef HAVE_SYS_TYPES_H
+#elif (ACC_CC_BORLANDC)
+# undef HAVE_UNISTD_H
+# undef HAVE_SYS_TIME_H
+# if (ACC_OS_WIN32 || ACC_OS_WIN64)
+# undef HAVE_DIRENT_H
+# endif
+# if (__BORLANDC__ < 0x0400)
+# undef HAVE_DIRENT_H
+# undef HAVE_UTIME_H
+# endif
+#elif (ACC_CC_DMC)
+# undef HAVE_DIRENT_H
+# undef HAVE_UNISTD_H
+# define HAVE_SYS_DIRENT_H 1
+#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
+# define HAVE_ALLOCA_H 1
+# undef HAVE_DIRENT_H
+# undef HAVE_UNISTD_H
+#elif (ACC_CC_IBMC && ACC_OS_OS2)
+# undef HAVE_DOS_H
+# undef HAVE_DIRENT_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_TIME_H
+# define HAVE_SYS_UTIME_H 1
+#elif (ACC_CC_INTELC || ACC_CC_MSC)
+# undef HAVE_DIRENT_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_TIME_H
+# define HAVE_SYS_UTIME_H 1
+#elif (ACC_CC_LCCWIN32)
+# undef HAVE_DIRENT_H
+# undef HAVE_DOS_H
+# undef HAVE_UNISTD_H
+# undef HAVE_SYS_TIME_H
+#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
+# undef HAVE_UTIME_H
+# define HAVE_SYS_UTIME_H 1
+#elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
+# define HAVE_ALLOCA_H 1
+# undef HAVE_DOS_H
+# undef HAVE_SHARE_H
+# undef HAVE_SYS_TIME_H
+#elif (ACC_CC_NDPC)
+# undef HAVE_DIRENT_H
+# undef HAVE_DOS_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_TIME_H
+#elif (ACC_CC_PACIFICC)
+# undef HAVE_DIRECT_H
+# undef HAVE_DIRENT_H
+# undef HAVE_FCNTL_H
+# undef HAVE_IO_H
+# undef HAVE_MALLOC_H
+# undef HAVE_MEMORY_H
+# undef HAVE_SHARE_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_STAT_H
+# undef HAVE_SYS_TIME_H
+# undef HAVE_SYS_TYPES_H
+#elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
+# undef HAVE_DIRENT_H
+# undef HAVE_DOS_H
+# undef HAVE_MALLOC_H
+# undef HAVE_SHARE_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_TIME_H
+# if (__POCC__ < 280)
+# else
+# define HAVE_SYS_UTIME_H 1
+# endif
+#elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
+# undef HAVE_UTIME_H
+# define HAVE_SYS_UTIME_H 1
+#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
+#elif (ACC_CC_SYMANTECC)
+# undef HAVE_DIRENT_H
+# undef HAVE_UNISTD_H
+# if (__SC__ < 0x700)
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_TIME_H
+# endif
+#elif (ACC_CC_TOPSPEEDC)
+# undef HAVE_DIRENT_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_STAT_H
+# undef HAVE_SYS_TIME_H
+# undef HAVE_SYS_TYPES_H
+#elif (ACC_CC_TURBOC)
+# undef HAVE_UNISTD_H
+# undef HAVE_SYS_TIME_H
+# undef HAVE_SYS_TYPES_H
+# if (ACC_OS_WIN32 || ACC_OS_WIN64)
+# undef HAVE_DIRENT_H
+# endif
+# if (__TURBOC__ < 0x0200)
+# undef HAVE_SIGNAL_H
+# endif
+# if (__TURBOC__ < 0x0400)
+# undef HAVE_DIRECT_H
+# undef HAVE_DIRENT_H
+# undef HAVE_MALLOC_H
+# undef HAVE_MEMORY_H
+# undef HAVE_UTIME_H
+# endif
+#elif (ACC_CC_WATCOMC)
+# undef HAVE_DIRENT_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_TIME_H
+# define HAVE_SYS_UTIME_H 1
+# if (__WATCOMC__ < 950)
+# undef HAVE_UNISTD_H
+# endif
+#elif (ACC_CC_ZORTECHC)
+# undef HAVE_DIRENT_H
+# undef HAVE_MEMORY_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_TIME_H
+#endif
+#endif
+#if (ACC_OS_CONSOLE)
+# undef HAVE_DIRENT_H
+#endif
+#if (ACC_OS_EMBEDDED)
+# undef HAVE_DIRENT_H
+#endif
+#if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
+# undef HAVE_DIRENT_H
+# undef HAVE_FCNTL_H
+# undef HAVE_MALLOC_H
+# undef HAVE_UNISTD_H
+# undef HAVE_UTIME_H
+# undef HAVE_SYS_STAT_H
+# undef HAVE_SYS_TIME_H
+# undef HAVE_SYS_TYPES_H
+#endif
+#if (ACC_LIBC_GLIBC >= 0x020100ul)
+# define HAVE_STDINT_H 1
+#elif (ACC_LIBC_DIETLIBC)
+# undef HAVE_STDINT_H
+#elif (ACC_LIBC_UCLIBC)
+# define HAVE_STDINT_H 1
+#elif (ACC_CC_BORLANDC) && (__BORLANDC__ >= 0x560)
+# undef HAVE_STDINT_H
+#elif (ACC_CC_DMC) && (__DMC__ >= 0x825)
+# define HAVE_STDINT_H 1
+#endif
+#if (HAVE_SYS_TIME_H && HAVE_TIME_H)
+# define TIME_WITH_SYS_TIME 1
+#endif
+#endif
+#endif
+#if !(ACC_CFG_AUTO_NO_FUNCTIONS)
+#if (ACC_LIBC_NAKED)
+#elif (ACC_LIBC_FREESTANDING)
+#elif (ACC_LIBC_MOSTLY_FREESTANDING)
+# define HAVE_LONGJMP 1
+# define HAVE_MEMCMP 1
+# define HAVE_MEMCPY 1
+# define HAVE_MEMMOVE 1
+# define HAVE_MEMSET 1
+# define HAVE_SETJMP 1
+#else
+#define HAVE_ACCESS 1
+#define HAVE_ALLOCA 1
+#define HAVE_ATEXIT 1
+#define HAVE_ATOI 1
+#define HAVE_ATOL 1
+#define HAVE_CHMOD 1
+#define HAVE_CHOWN 1
+#define HAVE_CTIME 1
+#define HAVE_DIFFTIME 1
+#define HAVE_FILENO 1
+#define HAVE_FSTAT 1
+#define HAVE_GETENV 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_GMTIME 1
+#define HAVE_ISATTY 1
+#define HAVE_LOCALTIME 1
+#define HAVE_LONGJMP 1
+#define HAVE_LSTAT 1
+#define HAVE_MEMCMP 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMSET 1
+#define HAVE_MKDIR 1
+#define HAVE_MKTIME 1
+#define HAVE_QSORT 1
+#define HAVE_RAISE 1
+#define HAVE_RMDIR 1
+#define HAVE_SETJMP 1
+#define HAVE_SIGNAL 1
+#define HAVE_SNPRINTF 1
+#define HAVE_STAT 1
+#define HAVE_STRCHR 1
+#define HAVE_STRDUP 1
+#define HAVE_STRERROR 1
+#define HAVE_STRFTIME 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_TIME 1
+#define HAVE_UMASK 1
+#define HAVE_UTIME 1
+#define HAVE_VSNPRINTF 1
+#if (ACC_OS_BEOS || ACC_OS_CYGWIN || ACC_OS_POSIX || ACC_OS_QNX || ACC_OS_VMS)
+# define HAVE_STRCASECMP 1
+# define HAVE_STRNCASECMP 1
+#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
+# define HAVE_STRCASECMP 1
+# define HAVE_STRNCASECMP 1
+#else
+# define HAVE_STRICMP 1
+# define HAVE_STRNICMP 1
+#endif
+#if (ACC_OS_POSIX)
+# if (ACC_OS_POSIX_AIX)
+# define HAVE_GETRUSAGE 1
+# elif (ACC_OS_POSIX_MACOSX && ACC_LIBC_MSL)
+# undef HAVE_CHOWN
+# undef HAVE_LSTAT
+# elif (ACC_OS_POSIX_UNICOS)
+# undef HAVE_ALLOCA
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# endif
+# if (ACC_CC_TINYC)
+# undef HAVE_ALLOCA
+# endif
+# if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
+# define HAVE_GETRUSAGE 1
+# define HAVE_GETPAGESIZE 1
+# define HAVE_MMAP 1
+# define HAVE_MPROTECT 1
+# define HAVE_MUNMAP 1
+# endif
+#elif (ACC_OS_CYGWIN)
+# if (ACC_CC_GNUC < 0x025a00ul)
+# undef HAVE_GETTIMEOFDAY
+# undef HAVE_LSTAT
+# endif
+# if (ACC_CC_GNUC < 0x025f00ul)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# endif
+#elif (ACC_OS_EMX)
+# undef HAVE_CHOWN
+# undef HAVE_LSTAT
+#elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
+# if !defined(__MINT__)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# endif
+#elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
+# undef HAVE_ALLOCA
+# undef HAVE_ACCESS
+# undef HAVE_CHMOD
+# undef HAVE_CHOWN
+# undef HAVE_FSTAT
+# undef HAVE_GETTIMEOFDAY
+# undef HAVE_LSTAT
+# undef HAVE_SNPRINTF
+# undef HAVE_UMASK
+# undef HAVE_UTIME
+# undef HAVE_VSNPRINTF
+#endif
+#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
+#undef HAVE_CHOWN
+#undef HAVE_GETTIMEOFDAY
+#undef HAVE_LSTAT
+#undef HAVE_UMASK
+#if (ACC_CC_AZTECC)
+# undef HAVE_ALLOCA
+# undef HAVE_DIFFTIME
+# undef HAVE_FSTAT
+# undef HAVE_STRDUP
+# undef HAVE_SNPRINTF
+# undef HAVE_UTIME
+# undef HAVE_VSNPRINTF
+#elif (ACC_CC_BORLANDC)
+# if (__BORLANDC__ < 0x0400)
+# undef HAVE_ALLOCA
+# undef HAVE_UTIME
+# endif
+# if ((__BORLANDC__ < 0x0410) && ACC_OS_WIN16)
+# undef HAVE_ALLOCA
+# endif
+# if (__BORLANDC__ < 0x0550)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# endif
+#elif (ACC_CC_DMC)
+# if (ACC_OS_WIN16)
+# undef HAVE_ALLOCA
+# endif
+# define snprintf _snprintf
+# define vsnprintf _vsnprintf
+#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+#elif (ACC_CC_IBMC)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+#elif (ACC_CC_INTELC)
+# ifndef snprintf
+# define snprintf _snprintf
+# endif
+# ifndef vsnprintf
+# define vsnprintf _vsnprintf
+# endif
+#elif (ACC_CC_LCCWIN32)
+# define utime _utime
+#elif (ACC_CC_MSC)
+# if (_MSC_VER < 600)
+# undef HAVE_STRFTIME
+# endif
+# if (_MSC_VER < 700)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# elif (_MSC_VER < 1500)
+# ifndef snprintf
+# define snprintf _snprintf
+# endif
+# ifndef vsnprintf
+# define vsnprintf _vsnprintf
+# endif
+# else
+# ifndef snprintf
+# define snprintf _snprintf
+# endif
+# endif
+# if ((_MSC_VER < 800) && ACC_OS_WIN16)
+# undef HAVE_ALLOCA
+# endif
+# if (ACC_ARCH_I086) && defined(__cplusplus)
+# undef HAVE_LONGJMP
+# undef HAVE_SETJMP
+# endif
+#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
+# if (ACC_CC_GNUC < 0x025f00ul)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# else
+# define snprintf _snprintf
+# define vsnprintf _vsnprintf
+# endif
+#elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
+# if (__MSL__ < 0x8000ul)
+# undef HAVE_CHMOD
+# endif
+#elif (ACC_CC_NDPC)
+# undef HAVE_ALLOCA
+# undef HAVE_SNPRINTF
+# undef HAVE_STRNICMP
+# undef HAVE_UTIME
+# undef HAVE_VSNPRINTF
+# if defined(__cplusplus)
+# undef HAVE_STAT
+# endif
+#elif (ACC_CC_PACIFICC)
+# undef HAVE_ACCESS
+# undef HAVE_ALLOCA
+# undef HAVE_CHMOD
+# undef HAVE_DIFFTIME
+# undef HAVE_FSTAT
+# undef HAVE_MKTIME
+# undef HAVE_RAISE
+# undef HAVE_SNPRINTF
+# undef HAVE_STRFTIME
+# undef HAVE_UTIME
+# undef HAVE_VSNPRINTF
+#elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
+# if (__POCC__ < 280)
+# define alloca _alloca
+# undef HAVE_UTIME
+# endif
+#elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
+# define snprintf _snprintf
+# define vsnprintf _vsnprintf
+#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+#elif (ACC_CC_SYMANTECC)
+# if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
+# undef HAVE_ALLOCA
+# endif
+# if (__SC__ < 0x600)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# else
+# define snprintf _snprintf
+# define vsnprintf _vsnprintf
+# endif
+# if (__SC__ < 0x700)
+# undef HAVE_DIFFTIME
+# undef HAVE_UTIME
+# endif
+#elif (ACC_CC_TOPSPEEDC)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+#elif (ACC_CC_TURBOC)
+# undef HAVE_ALLOCA
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# if (__TURBOC__ < 0x0200)
+# undef HAVE_RAISE
+# undef HAVE_SIGNAL
+# endif
+# if (__TURBOC__ < 0x0295)
+# undef HAVE_MKTIME
+# undef HAVE_STRFTIME
+# endif
+# if (__TURBOC__ < 0x0400)
+# undef HAVE_UTIME
+# endif
+#elif (ACC_CC_WATCOMC)
+# if (__WATCOMC__ < 1100)
+# undef HAVE_SNPRINTF
+# undef HAVE_VSNPRINTF
+# elif (__WATCOMC__ < 1200)
+# define snprintf _snprintf
+# define vsnprintf _vsnprintf
+# endif
+#elif (ACC_CC_ZORTECHC)
+# if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
+# undef HAVE_ALLOCA
+# endif
+# undef HAVE_DIFFTIME
+# undef HAVE_SNPRINTF
+# undef HAVE_UTIME
+# undef HAVE_VSNPRINTF
+#endif
+#endif
+#if (ACC_OS_CONSOLE)
+# undef HAVE_ACCESS
+# undef HAVE_CHMOD
+# undef HAVE_CHOWN
+# undef HAVE_GETTIMEOFDAY
+# undef HAVE_LSTAT
+# undef HAVE_TIME
+# undef HAVE_UMASK
+# undef HAVE_UTIME
+#endif
+#if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
+# undef HAVE_ACCESS
+# undef HAVE_CHMOD
+# undef HAVE_CHOWN
+# undef HAVE_FSTAT
+# undef HAVE_GETTIMEOFDAY
+# undef HAVE_LSTAT
+# undef HAVE_STAT
+# undef HAVE_UMASK
+# undef HAVE_UTIME
+# if 1
+# undef HAVE_ALLOCA
+# undef HAVE_ISATTY
+# undef HAVE_MKDIR
+# undef HAVE_RMDIR
+# undef HAVE_STRDUP
+# undef HAVE_STRICMP
+# undef HAVE_STRNICMP
+# endif
+#endif
+#endif
+#endif
+#if !(ACC_CFG_AUTO_NO_SIZES)
+#if !defined(SIZEOF_SHORT) && defined(ACC_SIZEOF_SHORT)
+# define SIZEOF_SHORT ACC_SIZEOF_SHORT
+#endif
+#if !defined(SIZEOF_INT) && defined(ACC_SIZEOF_INT)
+# define SIZEOF_INT ACC_SIZEOF_INT
+#endif
+#if !defined(SIZEOF_LONG) && defined(ACC_SIZEOF_LONG)
+# define SIZEOF_LONG ACC_SIZEOF_LONG
+#endif
+#if !defined(SIZEOF_LONG_LONG) && defined(ACC_SIZEOF_LONG_LONG)
+# define SIZEOF_LONG_LONG ACC_SIZEOF_LONG_LONG
+#endif
+#if !defined(SIZEOF___INT32) && defined(ACC_SIZEOF___INT32)
+# define SIZEOF___INT32 ACC_SIZEOF___INT32
+#endif
+#if !defined(SIZEOF___INT64) && defined(ACC_SIZEOF___INT64)
+# define SIZEOF___INT64 ACC_SIZEOF___INT64
+#endif
+#if !defined(SIZEOF_VOID_P) && defined(ACC_SIZEOF_VOID_P)
+# define SIZEOF_VOID_P ACC_SIZEOF_VOID_P
+#endif
+#if !defined(SIZEOF_SIZE_T) && defined(ACC_SIZEOF_SIZE_T)
+# define SIZEOF_SIZE_T ACC_SIZEOF_SIZE_T
+#endif
+#if !defined(SIZEOF_PTRDIFF_T) && defined(ACC_SIZEOF_PTRDIFF_T)
+# define SIZEOF_PTRDIFF_T ACC_SIZEOF_PTRDIFF_T
+#endif
+#endif
+#if (HAVE_SIGNAL) && !defined(RETSIGTYPE)
+# 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 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
+# define acc_signo_t acc_int32e_t
+#endif
+#if !defined(acc_signo_t)
+# 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_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
+#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
+#elif (ACC_CC_INTELC) && defined(_WIN32)
+#elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
+#elif (ACC_CC_LLVM)
+#elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
+#if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
+ typedef struct { __acc_ua_volatile acc_uint16e_t v __attribute__((__packed__)); } __acc_ua16_t;
+# define __acc_ua16_t __acc_ua16_t
+#endif
+#if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
+ typedef struct { __acc_ua_volatile acc_uint32e_t v __attribute__((__packed__)); } __acc_ua32_t;
+# define __acc_ua32_t __acc_ua32_t
+#endif
+#if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
+ typedef struct { __acc_ua_volatile acc_uint64l_t v __attribute__((__packed__)); } __acc_ua64_t;
+# define __acc_ua64_t __acc_ua64_t
+#endif
+#endif
+#if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
+#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))
+#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)
+#elif (ACC_ABI_LITTLE_ENDIAN)
+# 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 !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;
+ unsigned long v;
+ __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+ return v;
+}
+#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;
+ __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)
+#endif
+#endif
+#endif
+#if !defined(ACC_UA_COPY16)
+# define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
+#endif
+#endif
+#if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
+#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))
+#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)
+#elif (ACC_ABI_LITTLE_ENDIAN)
+# 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 !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;
+ unsigned long v;
+ __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+ return v;
+}
+#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;
+ __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)
+#endif
+#endif
+#endif
+#if !defined(ACC_UA_COPY32)
+# define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
+#endif
+#endif
+#if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
+#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))
+#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)
+#elif (ACC_ABI_LITTLE_ENDIAN)
+# define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
+# define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
+#endif
+#if !defined(ACC_UA_COPY64)
+# define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
+#endif
+#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"
+# 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
+#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 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
+# define acc_signo_t acc_int32e_t
+#endif
+#if !defined(acc_signo_t)
+# 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_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
+#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
+#elif (ACC_CC_INTELC) && defined(_WIN32)
+#elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
+#elif (ACC_CC_LLVM)
+#elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
+#if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
+ typedef struct { __acc_ua_volatile acc_uint16e_t v __attribute__((__packed__)); } __acc_ua16_t;
+# define __acc_ua16_t __acc_ua16_t
+#endif
+#if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
+ typedef struct { __acc_ua_volatile acc_uint32e_t v __attribute__((__packed__)); } __acc_ua32_t;
+# define __acc_ua32_t __acc_ua32_t
+#endif
+#if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
+ typedef struct { __acc_ua_volatile acc_uint64l_t v __attribute__((__packed__)); } __acc_ua64_t;
+# define __acc_ua64_t __acc_ua64_t
+#endif
+#endif
+#if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
+#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))
+#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)
+#elif (ACC_ABI_LITTLE_ENDIAN)
+# 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 !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;
+ unsigned long v;
+ __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+ return v;
+}
+#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;
+ __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)
+#endif
+#endif
+#endif
+#if !defined(ACC_UA_COPY16)
+# define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
+#endif
+#endif
+#if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
+#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))
+#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)
+#elif (ACC_ABI_LITTLE_ENDIAN)
+# 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 !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;
+ unsigned long v;
+ __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+ return v;
+}
+#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;
+ __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)
+#endif
+#endif
+#endif
+#if !defined(ACC_UA_COPY32)
+# define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
+#endif
+#endif
+#if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
+#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))
+#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)
+#elif (ACC_ABI_LITTLE_ENDIAN)
+# define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
+# define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
+#endif
+#if !defined(ACC_UA_COPY64)
+# define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
+#endif
+#endif
+# endif
+#endif
+#if defined(ACC_WANT_ACC_INCD_H)
+# undef ACC_WANT_ACC_INCD_H
+#ifndef __ACC_INCD_H_INCLUDED
+#define __ACC_INCD_H_INCLUDED 1
+#if (ACC_LIBC_NAKED)
+#ifndef __ACC_FALLBACK_STDDEF_H_INCLUDED
+#define __ACC_FALLBACK_STDDEF_H_INCLUDED 1
+#if defined(__PTRDIFF_TYPE__)
+typedef __PTRDIFF_TYPE__ acc_fallback_ptrdiff_t;
+#elif defined(__MIPS_PSX2__)
+typedef int acc_fallback_ptrdiff_t;
+#else
+typedef long acc_fallback_ptrdiff_t;
+#endif
+#if defined(__SIZE_TYPE__)
+typedef __SIZE_TYPE__ acc_fallback_size_t;
+#elif defined(__MIPS_PSX2__)
+typedef unsigned int acc_fallback_size_t;
+#else
+typedef unsigned long acc_fallback_size_t;
+#endif
+#if !defined(ptrdiff_t)
+typedef acc_fallback_ptrdiff_t ptrdiff_t;
+#ifndef _PTRDIFF_T_DEFINED
+#define _PTRDIFF_T_DEFINED 1
+#endif
+#endif
+#if !defined(size_t)
+typedef acc_fallback_size_t size_t;
+#ifndef _SIZE_T_DEFINED
+#define _SIZE_T_DEFINED 1
+#endif
+#endif
+#if !defined(__cplusplus) && !defined(wchar_t)
+typedef unsigned short wchar_t;
+#ifndef _WCHAR_T_DEFINED
+#define _WCHAR_T_DEFINED 1
+#endif
+#endif
+#ifndef NULL
+#if defined(__cplusplus) && defined(__GNUC__) && (__GNUC__ >= 4)
+#define NULL __null
+#elif defined(__cplusplus)
+#define NULL 0
+#else
+#define NULL ((void*)0)
+#endif
+#endif
+#ifndef offsetof
+#define offsetof(s,m) ((size_t)((ptrdiff_t)&(((s*)0)->m)))
+#endif
+#endif
+#elif (ACC_LIBC_FREESTANDING)
+# if HAVE_STDDEF_H
+# include <stddef.h>
+# endif
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#elif (ACC_LIBC_MOSTLY_FREESTANDING)
+# if HAVE_STDIO_H
+# include <stdio.h>
+# endif
+# if HAVE_STDDEF_H
+# include <stddef.h>
+# endif
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#else
+#include <stdio.h>
+#if (HAVE_TIME_H) && defined(__MSL__) && defined(__cplusplus)
+# include <time.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# 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 <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#endif
+#endif
+#endif
+#if defined(ACC_WANT_ACC_INCE_H)
+# undef ACC_WANT_ACC_INCE_H
+#ifndef __ACC_INCE_H_INCLUDED
+#define __ACC_INCE_H_INCLUDED 1
+#if (ACC_LIBC_NAKED)
+#elif (ACC_LIBC_FREESTANDING)
+#elif (ACC_LIBC_MOSTLY_FREESTANDING)
+# if (HAVE_SETJMP_H)
+# include <setjmp.h>
+# endif
+#else
+#if (HAVE_STDARG_H)
+# include <stdarg.h>
+#endif
+#if (HAVE_CTYPE_H)
+# include <ctype.h>
+#endif
+#if (HAVE_ERRNO_H)
+# include <errno.h>
+#endif
+#if (HAVE_MALLOC_H)
+# include <malloc.h>
+#endif
+#if (HAVE_ALLOCA_H)
+# include <alloca.h>
+#endif
+#if (HAVE_FCNTL_H)
+# include <fcntl.h>
+#endif
+#if (HAVE_DIRENT_H)
+# include <dirent.h>
+#endif
+#if (HAVE_SETJMP_H)
+# include <setjmp.h>
+#endif
+#if (HAVE_SIGNAL_H)
+# include <signal.h>
+#endif
+#if (TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+# include <time.h>
+#elif (HAVE_TIME_H)
+# include <time.h>
+#endif
+#if (HAVE_UTIME_H)
+# include <utime.h>
+#elif (HAVE_SYS_UTIME_H)
+# include <sys/utime.h>
+#endif
+#if (HAVE_IO_H)
+# include <io.h>
+#endif
+#if (HAVE_DOS_H)
+# include <dos.h>
+#endif
+#if (HAVE_DIRECT_H)
+# include <direct.h>
+#endif
+#if (HAVE_SHARE_H)
+# include <share.h>
+#endif
+#if (ACC_CC_NDPC)
+# include <os.h>
+#endif
+#if defined(__TOS__) && (defined(__PUREC__) || defined(__TURBOC__))
+# include <ext.h>
+#endif
+#endif
+#endif
+#endif
+#if defined(ACC_WANT_ACC_INCI_H)
+# undef ACC_WANT_ACC_INCI_H
+#ifndef __ACC_INCI_H_INCLUDED
+#define __ACC_INCI_H_INCLUDED 1
+#if (ACC_LIBC_NAKED)
+#elif (ACC_LIBC_FREESTANDING)
+#elif (ACC_LIBC_MOSTLY_FREESTANDING)
+#else
+#if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
+# include <tos.h>
+#elif (ACC_HAVE_WINDOWS_H)
+# if 1 && !defined(WIN32_LEAN_AND_MEAN)
+# define WIN32_LEAN_AND_MEAN 1
+# endif
+# if 1 && !defined(_WIN32_WINNT)
+# define _WIN32_WINNT 0x0400
+# endif
+# include <windows.h>
+# if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
+# include <dir.h>
+# endif
+#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_WIN16)
+# if (ACC_CC_AZTECC)
+# include <model.h>
+# include <stat.h>
+# elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
+# include <alloc.h>
+# include <dir.h>
+# elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+# include <sys/exceptn.h>
+# elif (ACC_CC_PACIFICC)
+# include <unixio.h>
+# include <stat.h>
+# include <sys.h>
+# elif (ACC_CC_WATCOMC)
+# include <i86.h>
+# endif
+#elif (ACC_OS_OS216)
+# if (ACC_CC_WATCOMC)
+# include <i86.h>
+# endif
+#endif
+#if (HAVE_SYS_MMAN_H)
+# include <sys/mman.h>
+#endif
+#if (HAVE_SYS_RESOURCE_H)
+# include <sys/resource.h>
+#endif
+#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
+# if defined(FP_OFF)
+# define ACC_PTR_FP_OFF(x) FP_OFF(x)
+# elif defined(_FP_OFF)
+# define ACC_PTR_FP_OFF(x) _FP_OFF(x)
+# else
+# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
+# endif
+# if defined(FP_SEG)
+# define ACC_PTR_FP_SEG(x) FP_SEG(x)
+# elif defined(_FP_SEG)
+# define ACC_PTR_FP_SEG(x) _FP_SEG(x)
+# else
+# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
+# endif
+# if defined(MK_FP)
+# define ACC_PTR_MK_FP(s,o) MK_FP(s,o)
+# elif defined(_MK_FP)
+# define ACC_PTR_MK_FP(s,o) _MK_FP(s,o)
+# else
+# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
+# endif
+# if 0
+# undef ACC_PTR_FP_OFF
+# undef ACC_PTR_FP_SEG
+# undef ACC_PTR_MK_FP
+# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
+# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
+# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
+# endif
+#endif
+#endif
+#endif
+#endif
+#if defined(ACC_WANT_ACC_LIB_H)
+# undef ACC_WANT_ACC_LIB_H
+#ifndef __ACC_LIB_H_INCLUDED
+#define __ACC_LIB_H_INCLUDED 1
+#if !defined(__ACCLIB_FUNCNAME)
+# define __ACCLIB_FUNCNAME(f) f
+#endif
+#if !defined(ACCLIB_EXTERN)
+# define ACCLIB_EXTERN(r,f) extern r __ACCLIB_FUNCNAME(f)
+#endif
+#if !defined(ACCLIB_EXTERN_NOINLINE)
+# if defined(__acc_noinline)
+# define ACCLIB_EXTERN_NOINLINE(r,f) extern __acc_noinline r __ACCLIB_FUNCNAME(f)
+# else
+# 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
+# define acclib_handle_t long
+# define acclib_uhandle_t unsigned long
+#endif
+#if 0
+ACCLIB_EXTERN(int, acc_ascii_digit) (int);
+ACCLIB_EXTERN(int, acc_ascii_islower) (int);
+ACCLIB_EXTERN(int, acc_ascii_isupper) (int);
+ACCLIB_EXTERN(int, acc_ascii_tolower) (int);
+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))
+#ifndef acc_hsize_t
+#if (ACC_HAVE_MM_HUGE_PTR)
+# define acc_hsize_t unsigned long
+# define acc_hvoid_p void __huge *
+# define acc_hchar_p char __huge *
+# define acc_hchar_pp char __huge * __huge *
+# define acc_hbyte_p unsigned char __huge *
+#else
+# define acc_hsize_t size_t
+# define acc_hvoid_p void *
+# define acc_hchar_p char *
+# define acc_hchar_pp char **
+# define acc_hbyte_p unsigned char *
+#endif
+#endif
+ACCLIB_EXTERN(acc_hvoid_p, acc_halloc) (acc_hsize_t);
+ACCLIB_EXTERN(void, acc_hfree) (acc_hvoid_p);
+#if (ACC_OS_DOS16 || ACC_OS_OS216)
+ACCLIB_EXTERN(void __far*, acc_dos_alloc) (unsigned long);
+ACCLIB_EXTERN(int, acc_dos_free) (void __far*);
+#endif
+ACCLIB_EXTERN(int, acc_hmemcmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_hmemset) (acc_hvoid_p, int, acc_hsize_t);
+ACCLIB_EXTERN(acc_hsize_t, acc_hstrlen) (const acc_hchar_p);
+ACCLIB_EXTERN(int, acc_hstrcmp) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(int, acc_hstrncmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
+ACCLIB_EXTERN(int, acc_ascii_hstricmp) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(int, acc_ascii_hstrnicmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
+ACCLIB_EXTERN(int, acc_ascii_hmemicmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrstr) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstristr) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemimem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrcpy) (acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrcat) (acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
+ACCLIB_EXTERN(int, acc_hstrscpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
+ACCLIB_EXTERN(int, acc_hstrscat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrccpy) (acc_hchar_p, const acc_hchar_p, int);
+ACCLIB_EXTERN(acc_hvoid_p, acc_hmemccpy) (acc_hvoid_p, const acc_hvoid_p, int, acc_hsize_t);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrchr) (const acc_hchar_p, int);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrrchr) (const acc_hchar_p, int);
+ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrichr) (const acc_hchar_p, int);
+ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrrichr) (const acc_hchar_p, int);
+ACCLIB_EXTERN(acc_hvoid_p, acc_hmemchr) (const acc_hvoid_p, int, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_hmemrchr) (const acc_hvoid_p, int, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemichr) (const acc_hvoid_p, int, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemrichr) (const acc_hvoid_p, int, acc_hsize_t);
+ACCLIB_EXTERN(acc_hsize_t, acc_hstrspn) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hsize_t, acc_hstrrspn) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hsize_t, acc_hstrcspn) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hsize_t, acc_hstrrcspn) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrpbrk) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrrpbrk) (const acc_hchar_p, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrsep) (acc_hchar_pp, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_hstrrsep) (acc_hchar_pp, const acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrlwr) (acc_hchar_p);
+ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrupr) (acc_hchar_p);
+ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemlwr) (acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemupr) (acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hsize_t, acc_hfread) (void *, acc_hvoid_p, acc_hsize_t);
+ACCLIB_EXTERN(acc_hsize_t, acc_hfwrite) (void *, const acc_hvoid_p, acc_hsize_t);
+#if (ACC_HAVE_MM_HUGE_PTR)
+ACCLIB_EXTERN(long, acc_hread) (int, acc_hvoid_p, long);
+ACCLIB_EXTERN(long, acc_hwrite) (int, const acc_hvoid_p, long);
+#endif
+ACCLIB_EXTERN(long, acc_safe_hread) (int, acc_hvoid_p, long);
+ACCLIB_EXTERN(long, acc_safe_hwrite) (int, const acc_hvoid_p, long);
+ACCLIB_EXTERN(unsigned, acc_ua_get_be16) (const acc_hvoid_p);
+ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_be24) (const acc_hvoid_p);
+ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_be32) (const acc_hvoid_p);
+ACCLIB_EXTERN(void, acc_ua_set_be16) (acc_hvoid_p, unsigned);
+ACCLIB_EXTERN(void, acc_ua_set_be24) (acc_hvoid_p, acc_uint32l_t);
+ACCLIB_EXTERN(void, acc_ua_set_be32) (acc_hvoid_p, acc_uint32l_t);
+ACCLIB_EXTERN(unsigned, acc_ua_get_le16) (const acc_hvoid_p);
+ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_le24) (const acc_hvoid_p);
+ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_le32) (const acc_hvoid_p);
+ACCLIB_EXTERN(void, acc_ua_set_le16) (acc_hvoid_p, unsigned);
+ACCLIB_EXTERN(void, acc_ua_set_le24) (acc_hvoid_p, acc_uint32l_t);
+ACCLIB_EXTERN(void, acc_ua_set_le32) (acc_hvoid_p, acc_uint32l_t);
+#if defined(acc_int64l_t)
+ACCLIB_EXTERN(acc_uint64l_t, acc_ua_get_be64) (const acc_hvoid_p);
+ACCLIB_EXTERN(void, acc_ua_set_be64) (acc_hvoid_p, acc_uint64l_t);
+ACCLIB_EXTERN(acc_uint64l_t, acc_ua_get_le64) (const acc_hvoid_p);
+ACCLIB_EXTERN(void, acc_ua_set_le64) (acc_hvoid_p, acc_uint64l_t);
+#endif
+ACCLIB_EXTERN_NOINLINE(short, acc_vget_short) (short, int);
+ACCLIB_EXTERN_NOINLINE(int, acc_vget_int) (int, int);
+ACCLIB_EXTERN_NOINLINE(long, acc_vget_long) (long, int);
+#if defined(acc_int64l_t)
+ACCLIB_EXTERN_NOINLINE(acc_int64l_t, acc_vget_acc_int64l_t) (acc_int64l_t, int);
+#endif
+ACCLIB_EXTERN_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t, int);
+#if !(ACC_CFG_NO_FLOAT)
+ACCLIB_EXTERN_NOINLINE(float, acc_vget_float) (float, int);
+#endif
+#if !(ACC_CFG_NO_DOUBLE)
+ACCLIB_EXTERN_NOINLINE(double, acc_vget_double) (double, int);
+#endif
+ACCLIB_EXTERN_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_p) (acc_hvoid_p, int);
+ACCLIB_EXTERN_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p, int);
+#if !defined(ACC_FN_PATH_MAX)
+#if (ACC_OS_DOS16 || ACC_OS_WIN16)
+# define ACC_FN_PATH_MAX 143
+#elif (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN32 || ACC_OS_WIN64)
+# define ACC_FN_PATH_MAX 259
+#elif (ACC_OS_TOS)
+# define ACC_FN_PATH_MAX 259
+#endif
+#endif
+#if !defined(ACC_FN_PATH_MAX)
+# define ACC_FN_PATH_MAX 1023
+#endif
+#if !defined(ACC_FN_NAME_MAX)
+#if (ACC_OS_DOS16 || ACC_OS_WIN16)
+# define ACC_FN_NAME_MAX 12
+#elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
+# define ACC_FN_NAME_MAX 12
+#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+#elif (ACC_OS_DOS32)
+# define ACC_FN_NAME_MAX 12
+#endif
+#endif
+#if !defined(ACC_FN_NAME_MAX)
+# define ACC_FN_NAME_MAX ACC_FN_PATH_MAX
+#endif
+#define ACC_FNMATCH_NOESCAPE 1
+#define ACC_FNMATCH_PATHNAME 2
+#define ACC_FNMATCH_PATHSTAR 4
+#define ACC_FNMATCH_PERIOD 8
+#define ACC_FNMATCH_ASCII_CASEFOLD 16
+ACCLIB_EXTERN(int, acc_fnmatch) (const acc_hchar_p, const acc_hchar_p, int);
+#undef __ACCLIB_USE_OPENDIR
+#if (HAVE_DIRENT_H || ACC_CC_WATCOMC)
+# define __ACCLIB_USE_OPENDIR 1
+# if (ACC_OS_DOS32 && defined(__BORLANDC__))
+# elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+# elif (ACC_OS_OS2 || ACC_OS_OS216)
+# elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
+# elif (ACC_OS_WIN32 && !(ACC_HAVE_WINDOWS_H))
+# elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
+# undef __ACCLIB_USE_OPENDIR
+# endif
+#endif
+typedef struct
+{
+#if defined(__ACCLIB_USE_OPENDIR)
+ void* u_dirp;
+# if (ACC_CC_WATCOMC)
+ unsigned short f_time;
+ unsigned short f_date;
+ unsigned long f_size;
+# endif
+ char f_name[ACC_FN_NAME_MAX+1];
+#elif (ACC_OS_WIN32 || ACC_OS_WIN64)
+ acclib_handle_t u_handle;
+ unsigned f_attr;
+ unsigned f_size_low;
+ unsigned f_size_high;
+ char f_name[ACC_FN_NAME_MAX+1];
+#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_TOS || ACC_OS_WIN16)
+ char u_dta[21];
+ unsigned char f_attr;
+ unsigned short f_time;
+ unsigned short f_date;
+ unsigned short f_size_low;
+ unsigned short f_size_high;
+ char f_name[ACC_FN_NAME_MAX+1];
+ char u_dirp;
+#else
+ void* u_dirp;
+ char f_name[ACC_FN_NAME_MAX+1];
+#endif
+} acc_dir_t;
+#ifndef acc_dir_p
+#define acc_dir_p acc_dir_t *
+#endif
+ACCLIB_EXTERN(int, acc_opendir) (acc_dir_p, const char*);
+ACCLIB_EXTERN(int, acc_readdir) (acc_dir_p);
+ACCLIB_EXTERN(int, acc_closedir) (acc_dir_p);
+#if (ACC_CC_GNUC) && (defined(__CYGWIN__) || defined(__MINGW32__))
+# define acc_alloca(x) __builtin_alloca((x))
+#elif (ACC_CC_GNUC) && (ACC_OS_CONSOLE_PS2)
+# 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))))
+#endif
+#if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+# define acc_stackavail() stackavail()
+#elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0410))
+# define acc_stackavail() stackavail()
+#elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0400))
+# if (ACC_OS_WIN16) && (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
+# else
+# define acc_stackavail() stackavail()
+# endif
+#elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_DMC || ACC_CC_SYMANTECC))
+# define acc_stackavail() stackavail()
+#elif ((ACC_ARCH_I086) && ACC_CC_MSC && (_MSC_VER >= 700))
+# define acc_stackavail() _stackavail()
+#elif ((ACC_ARCH_I086) && ACC_CC_MSC)
+# define acc_stackavail() stackavail()
+#elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && ACC_CC_TURBOC && (__TURBOC__ >= 0x0450))
+# define acc_stackavail() stackavail()
+#elif (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ >= 0x0400))
+ ACC_EXTERN_C size_t __cdecl stackavail(void);
+# define acc_stackavail() stackavail()
+#elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_WATCOMC))
+# define acc_stackavail() stackavail()
+#elif (ACC_ARCH_I086 && ACC_CC_ZORTECHC)
+# define acc_stackavail() _chkstack()
+#endif
+ACCLIB_EXTERN(acclib_handle_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);
+ACCLIB_EXTERN(int, acc_rmdir) (const char*);
+ACCLIB_EXTERN(int, acc_response) (int*, char***);
+ACCLIB_EXTERN(int, acc_set_binmode) (int, int);
+#if defined(acc_int32e_t)
+ACCLIB_EXTERN(acc_int32e_t, acc_muldiv32s) (acc_int32e_t, acc_int32e_t, acc_int32e_t);
+ACCLIB_EXTERN(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t, acc_uint32e_t, acc_uint32e_t);
+#endif
+ACCLIB_EXTERN(void, acc_wildargv) (int*, char***);
+ACCLIB_EXTERN_NOINLINE(void, acc_debug_break) (void);
+ACCLIB_EXTERN_NOINLINE(void, acc_debug_nop) (void);
+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;
+typedef struct acc_pclock_handle_t acc_pclock_handle_t;
+typedef struct acc_pclock_t acc_pclock_t;
+#ifndef acc_pclock_handle_p
+#define acc_pclock_handle_p acc_pclock_handle_t *
+#endif
+#ifndef acc_pclock_p
+#define acc_pclock_p acc_pclock_t *
+#endif
+#define ACC_PCLOCK_REALTIME 0
+#define ACC_PCLOCK_MONOTONIC 1
+#define ACC_PCLOCK_PROCESS_CPUTIME_ID 2
+#define ACC_PCLOCK_THREAD_CPUTIME_ID 3
+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);
+#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)
+ acc_int64l_t tv_sec;
+#else
+ acc_int32l_t tv_sec_high;
+ acc_uint32l_t tv_sec_low;
+#endif
+ acc_uint32l_t tv_nsec;
+};
+ACCLIB_EXTERN(int, acc_pclock_open) (acc_pclock_handle_p, int);
+ACCLIB_EXTERN(int, acc_pclock_open_default) (acc_pclock_handle_p);
+ACCLIB_EXTERN(int, acc_pclock_close) (acc_pclock_handle_p);
+ACCLIB_EXTERN(void, acc_pclock_read) (acc_pclock_handle_p, acc_pclock_p);
+#if !(ACC_CFG_NO_DOUBLE)
+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
+#define acc_getopt_p acc_getopt_t *
+#endif
+struct acc_getopt_longopt_t;
+typedef struct acc_getopt_longopt_t acc_getopt_longopt_t;
+#ifndef acc_getopt_longopt_p
+#define acc_getopt_longopt_p acc_getopt_longopt_t *
+#endif
+struct acc_getopt_longopt_t {
+ const char* name;
+ int has_arg;
+ int* flag;
+ int val;
+};
+struct acc_getopt_t {
+ void *user;
+ const char *progname;
+ int bad_option;
+ char *optarg;
+ void (*opterr)(acc_getopt_p, const char*, void *);
+ int optind;
+ int optopt;
+ int errcount;
+ int argc; char** argv;
+ int eof; int shortpos;
+ int pending_rotate_first, pending_rotate_middle;
+};
+enum { ACC_GETOPT_NO_ARG, ACC_GETOPT_REQUIRED_ARG, ACC_GETOPT_OPTIONAL_ARG, ACC_GETOPT_EXACT_ARG = 0x10 };
+enum { ACC_GETOPT_PERMUTE, ACC_GETOPT_RETURN_IN_ORDER, ACC_GETOPT_REQUIRE_ORDER };
+ACCLIB_EXTERN(void, acc_getopt_init) (acc_getopt_p g,
+ int start_argc, int argc, char** argv);
+ACCLIB_EXTERN(int, acc_getopt) (acc_getopt_p g,
+ const char* shortopts,
+ const acc_getopt_longopt_p longopts,
+ int* longind);
+typedef struct {
+ acc_uint32l_t seed;
+} acc_rand31_t;
+#ifndef acc_rand31_p
+#define acc_rand31_p acc_rand31_t *
+#endif
+ACCLIB_EXTERN(void, acc_srand31) (acc_rand31_p, acc_uint32l_t);
+ACCLIB_EXTERN(acc_uint32l_t, acc_rand31) (acc_rand31_p);
+#if defined(acc_int64l_t)
+typedef struct {
+ acc_uint64l_t seed;
+} acc_rand48_t;
+#ifndef acc_rand48_p
+#define acc_rand48_p acc_rand48_t *
+#endif
+ACCLIB_EXTERN(void, acc_srand48) (acc_rand48_p, acc_uint32l_t);
+ACCLIB_EXTERN(acc_uint32l_t, acc_rand48) (acc_rand48_p);
+ACCLIB_EXTERN(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p);
+#endif
+#if defined(acc_int64l_t)
+typedef struct {
+ acc_uint64l_t seed;
+} acc_rand64_t;
+#ifndef acc_rand64_p
+#define acc_rand64_p acc_rand64_t *
+#endif
+ACCLIB_EXTERN(void, acc_srand64) (acc_rand64_p, acc_uint64l_t);
+ACCLIB_EXTERN(acc_uint32l_t, acc_rand64) (acc_rand64_p);
+ACCLIB_EXTERN(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p);
+#endif
+typedef struct {
+ unsigned n;
+ acc_uint32l_t s[624];
+} acc_randmt_t;
+#ifndef acc_randmt_p
+#define acc_randmt_p acc_randmt_t *
+#endif
+ACCLIB_EXTERN(void, acc_srandmt) (acc_randmt_p, acc_uint32l_t);
+ACCLIB_EXTERN(acc_uint32l_t, acc_randmt) (acc_randmt_p);
+ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p);
+#if defined(acc_int64l_t)
+typedef struct {
+ unsigned n;
+ acc_uint64l_t s[312];
+} acc_randmt64_t;
+#ifndef acc_randmt64_p
+#define acc_randmt64_p acc_randmt64_t *
+#endif
+ACCLIB_EXTERN(void, acc_srandmt64) (acc_randmt64_p, acc_uint64l_t);
+ACCLIB_EXTERN(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p);
+#endif
+#define ACC_SPAWN_P_WAIT 0
+#define ACC_SPAWN_P_NOWAIT 1
+ACCLIB_EXTERN(int, acc_spawnv) (int mode, const char* fn, const char* const * argv);
+ACCLIB_EXTERN(int, acc_spawnvp) (int mode, const char* fn, const char* const * argv);
+ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * argv, const char * const envp);
+#endif
+#endif
+#if defined(ACC_WANT_ACC_CXX_H)
+# undef ACC_WANT_ACC_CXX_H
+#ifndef __ACC_CXX_H_INCLUDED
+#define __ACC_CXX_H_INCLUDED 1
+#if defined(__cplusplus)
+#if defined(ACC_CXX_NOTHROW)
+#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
+#elif (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
+#elif (ACC_CC_HIGHC)
+#elif (ACC_CC_MSC && (_MSC_VER < 1100))
+#elif (ACC_CC_NDPC)
+#elif (ACC_CC_TURBOC)
+#elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND))
+#elif (ACC_CC_ZORTECHC)
+#else
+# define ACC_CXX_NOTHROW throw()
+#endif
+#if !defined(ACC_CXX_NOTHROW)
+# define ACC_CXX_NOTHROW /*empty*/
+#endif
+#if defined(__ACC_CXX_DO_NEW)
+#elif (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; }
+#else
+# define __ACC_CXX_DO_NEW ;
+#endif
+#if defined(__ACC_CXX_DO_DELETE)
+#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
+# define __ACC_CXX_DO_DELETE { }
+#else
+# define __ACC_CXX_DO_DELETE ACC_CXX_NOTHROW { }
+#endif
+#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
+#elif (ACC_CC_MSC && ACC_MM_HUGE)
+# define ACC_CXX_DISABLE_NEW_DELETE private:
+#elif (ACC_CC_MSC && (_MSC_VER < 1100))
+#elif (ACC_CC_NDPC)
+#elif (ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
+#elif (ACC_CC_TURBOC)
+#elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
+#else
+# define __ACC_CXX_HAVE_ARRAY_NEW 1
+#endif
+#if (__ACC_CXX_HAVE_ARRAY_NEW)
+# define __ACC_CXX_HAVE_PLACEMENT_NEW 1
+#endif
+#if (__ACC_CXX_HAVE_PLACEMENT_NEW)
+# if (ACC_CC_GNUC >= 0x030000ul)
+# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
+# elif (ACC_CC_INTELC)
+# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
+# elif (ACC_CC_MSC && (_MSC_VER >= 1200))
+# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
+# elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
+# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
+# elif (ACC_CC_PGI)
+# define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
+# endif
+#endif
+#if defined(ACC_CXX_DISABLE_NEW_DELETE)
+#elif defined(new) || defined(delete)
+# define ACC_CXX_DISABLE_NEW_DELETE private:
+#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025b00ul))
+# define ACC_CXX_DISABLE_NEW_DELETE private:
+#elif (ACC_CC_HIGHC)
+# define ACC_CXX_DISABLE_NEW_DELETE private:
+#elif !(__ACC_CXX_HAVE_ARRAY_NEW)
+# define ACC_CXX_DISABLE_NEW_DELETE \
+ protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
+ protected: static void* operator new(size_t) __ACC_CXX_DO_NEW \
+ private:
+#else
+# define ACC_CXX_DISABLE_NEW_DELETE \
+ protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
+ static void operator delete[](void*) __ACC_CXX_DO_DELETE \
+ private: static void* operator new(size_t) __ACC_CXX_DO_NEW \
+ static void* operator new[](size_t) __ACC_CXX_DO_NEW
+#endif
+#if defined(ACC_CXX_TRIGGER_FUNCTION)
+#else
+# define ACC_CXX_TRIGGER_FUNCTION \
+ protected: virtual const void* acc_cxx_trigger_function() const; \
+ private:
+#endif
+#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; }
+#endif
+#endif
+#endif
+#endif
+#if defined(ACC_WANT_ACC_CHK_CH)
+# undef ACC_WANT_ACC_CHK_CH
+#if !defined(ACCCHK_ASSERT)
+# define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
+#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) )
+#endif
+#if !defined(ACCCHK_ASSERT_IS_SIGNED_T)
+# define ACCCHK_ASSERT_IS_SIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,<)
+#endif
+#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 )
+# else
+# define ACCCHK_ASSERT_IS_UNSIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,>)
+# endif
+#endif
+#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
+#if (ACC_0xffffffffL - ACC_UINT32_C(4294967294) != 1)
+# error "preprocessor error 1"
+#endif
+#if (ACC_0xffffffffL - ACC_UINT32_C(0xfffffffd) != 2)
+# error "preprocessor error 2"
+#endif
+#define ACCCHK_VAL 1
+#define ACCCHK_TMP1 ACCCHK_VAL
+#undef ACCCHK_VAL
+#define ACCCHK_VAL 2
+#define ACCCHK_TMP2 ACCCHK_VAL
+#if (ACCCHK_TMP1 != 2)
+# error "preprocessor error 3a"
+#endif
+#if (ACCCHK_TMP2 != 2)
+# error "preprocessor error 3b"
+#endif
+#undef ACCCHK_VAL
+#if (ACCCHK_TMP2)
+# error "preprocessor error 3c"
+#endif
+#if (ACCCHK_TMP2 + 0 != 0)
+# error "preprocessor error 3d"
+#endif
+#undef ACCCHK_TMP1
+#undef ACCCHK_TMP2
+#if 0 || defined(ACCCHK_CFG_PEDANTIC)
+# if (ACC_ARCH_MIPS) && defined(_MIPS_SZINT)
+ ACCCHK_ASSERT((_MIPS_SZINT) == 8 * sizeof(int))
+# endif
+# if (ACC_ARCH_MIPS) && defined(_MIPS_SZLONG)
+ ACCCHK_ASSERT((_MIPS_SZLONG) == 8 * sizeof(long))
+# endif
+# if (ACC_ARCH_MIPS) && defined(_MIPS_SZPTR)
+ ACCCHK_ASSERT((_MIPS_SZPTR) == 8 * sizeof(void *))
+# 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(1,15) == 32767)
+ ACCCHK_ASSERT(__ACC_MASK_GEN(1u,16) == 0xffffU)
+#else
+ ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,16) == 0xffffUL)
+#endif
+#if (SIZEOF_INT >= 4)
+ ACCCHK_ASSERT(__ACC_MASK_GEN(1,31) == 2147483647)
+ ACCCHK_ASSERT(__ACC_MASK_GEN(1u,32) == 0xffffffffU)
+#endif
+#if (SIZEOF_LONG >= 4)
+ ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,32) == 0xffffffffUL)
+#endif
+#if (SIZEOF_LONG >= 8)
+ ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,64) == 0xffffffffffffffffUL)
+#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)
+#endif
+#if !(ACC_BROKEN_SIGNED_RIGHT_SHIFT)
+ ACCCHK_ASSERT(((-1) >> 7) == -1)
+#endif
+ ACCCHK_ASSERT(((1) >> 7) == 0)
+ 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)
+ ACCCHK_ASSERT((~0l & ~0u) == 0xffffU)
+ ACCCHK_ASSERT((~0ul & ~0u) == 0xffffU)
+#elif (SIZEOF_INT == 4)
+ ACCCHK_ASSERT((~0l & ~0u) == 0xffffffffU)
+ ACCCHK_ASSERT((~0ul & ~0u) == 0xffffffffU)
+#endif
+ ACCCHK_ASSERT_IS_SIGNED_T(signed char)
+ ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned char)
+ ACCCHK_ASSERT(sizeof(signed char) == sizeof(char))
+ ACCCHK_ASSERT(sizeof(unsigned char) == sizeof(char))
+ ACCCHK_ASSERT(sizeof(char) == 1)
+#if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
+#else
+ ACCCHK_ASSERT(sizeof(char) == sizeof((char)0))
+#endif
+#if defined(__cplusplus)
+ ACCCHK_ASSERT(sizeof('\0') == sizeof(char))
+#else
+# if (ACC_CC_DMC)
+# else
+ ACCCHK_ASSERT(sizeof('\0') == sizeof(int))
+# endif
+#endif
+#if defined(__acc_alignof)
+ ACCCHK_ASSERT(__acc_alignof(char) == 1)
+ ACCCHK_ASSERT(__acc_alignof(signed char) == 1)
+ ACCCHK_ASSERT(__acc_alignof(unsigned char) == 1)
+#if defined(acc_int16e_t)
+ ACCCHK_ASSERT(__acc_alignof(acc_int16e_t) >= 1)
+ ACCCHK_ASSERT(__acc_alignof(acc_int16e_t) <= 2)
+#endif
+#if defined(acc_int32e_t)
+ ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) >= 1)
+ ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) <= 4)
+#endif
+#endif
+ ACCCHK_ASSERT_IS_SIGNED_T(short)
+ ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned short)
+ ACCCHK_ASSERT(sizeof(short) == sizeof(unsigned short))
+#if !(ACC_ABI_I8LP16)
+ ACCCHK_ASSERT(sizeof(short) >= 2)
+#endif
+ ACCCHK_ASSERT(sizeof(short) >= sizeof(char))
+#if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
+#else
+ ACCCHK_ASSERT(sizeof(short) == sizeof((short)0))
+#endif
+#if (SIZEOF_SHORT > 0)
+ ACCCHK_ASSERT(sizeof(short) == SIZEOF_SHORT)
+#endif
+ ACCCHK_ASSERT_IS_SIGNED_T(int)
+ ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned int)
+ ACCCHK_ASSERT(sizeof(int) == sizeof(unsigned int))
+#if !(ACC_ABI_I8LP16)
+ ACCCHK_ASSERT(sizeof(int) >= 2)
+#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)
+#endif
+ ACCCHK_ASSERT(sizeof(0) == sizeof(int))
+ ACCCHK_ASSERT_IS_SIGNED_T(long)
+ ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned long)
+ ACCCHK_ASSERT(sizeof(long) == sizeof(unsigned long))
+#if !(ACC_ABI_I8LP16)
+ ACCCHK_ASSERT(sizeof(long) >= 4)
+#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)
+#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)
+#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))
+# if (ACC_HAVE_MM_HUGE_PTR)
+ ACCCHK_ASSERT(4 == sizeof((char __huge*)0 - (char __huge*)0))
+# endif
+#endif
+#if (SIZEOF_PTRDIFF_T > 0)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == 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)
+#endif
+#if (ACC_HAVE_MM_HUGE_PTR)
+ ACCCHK_ASSERT(4 == sizeof(void __huge*))
+ ACCCHK_ASSERT(4 == sizeof(char __huge*))
+#endif
+#if (ACC_ABI_I8LP16)
+ ACCCHK_ASSERT((((1u << 7) + 1) >> 7) == 1)
+ ACCCHK_ASSERT((((1ul << 15) + 1) >> 15) == 1)
+#else
+ ACCCHK_ASSERT((((1u << 15) + 1) >> 15) == 1)
+ ACCCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1)
+#endif
+#if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
+#elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
+#else
+ ACCCHK_ASSERT((1 << (8*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((1l << (8*SIZEOF_LONG-1)) < 0)
+#endif
+ ACCCHK_ASSERT((1ul << (8*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_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)
+#endif
+ ACCCHK_ASSERT( (acc_int16e_t) (1 + ~(acc_int16e_t)0) == 0)
+#if defined(ACCCHK_CFG_PEDANTIC)
+ ACCCHK_ASSERT( (acc_uint16e_t)(1 + ~(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_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_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)
+#if defined(ACCCHK_CFG_PEDANTIC)
+ ACCCHK_ASSERT( (acc_uint32e_t)(1 + ~(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_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_IS_UNSIGNED_T(acc_uint32l_t)
+ ACCCHK_ASSERT(((( (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))
+#endif
+ 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_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_IS_UNSIGNED_T(acc_uint32f_t)
+ ACCCHK_ASSERT(((( (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_uint64e_t) == 8)
+ ACCCHK_ASSERT(sizeof(acc_int64e_t) == sizeof(acc_uint64e_t))
+ ACCCHK_ASSERT_IS_SIGNED_T(acc_int64e_t)
+#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
+#else
+ ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64e_t)
+#endif
+#endif
+#if defined(acc_int64l_t)
+#if defined(acc_int64e_t)
+ 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_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_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_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))
+#else
+ ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > 0)
+#endif
+ ACCCHK_ASSERT(ACC_INT64_C(-9223372036854775807) - 1 < 0)
+ ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483629) == 721)
+ ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483647) == 1)
+ 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_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) == sizeof(acc_uintptr_t))
+#if defined(acc_word_t)
+ ACCCHK_ASSERT(ACC_WORDSIZE == 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) == sizeof(acc_sword_t))
+#endif
+#if defined(ACC_INT16_C)
+ ACCCHK_ASSERT(sizeof(ACC_INT16_C(0)) >= 2)
+ ACCCHK_ASSERT(sizeof(ACC_UINT16_C(0)) >= 2)
+ ACCCHK_ASSERT((ACC_UINT16_C(0xffff) >> 15) == 1)
+#endif
+#if defined(ACC_INT32_C)
+ ACCCHK_ASSERT(sizeof(ACC_INT32_C(0)) >= 4)
+ ACCCHK_ASSERT(sizeof(ACC_UINT32_C(0)) >= 4)
+ ACCCHK_ASSERT((ACC_UINT32_C(0xffffffff) >> 31) == 1)
+#endif
+#if defined(ACC_INT64_C)
+#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0560))
+#else
+ ACCCHK_ASSERT(sizeof(ACC_INT64_C(0)) >= 8)
+ ACCCHK_ASSERT(sizeof(ACC_UINT64_C(0)) >= 8)
+#endif
+ 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_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
+# else
+ ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0u) == 0xffffffffu)
+# endif
+#endif
+#if (SIZEOF_LONG == 4)
+# if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
+# else
+ ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0ul) == 0xfffffffful)
+# endif
+#endif
+#endif
+#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
+ ACCCHK_ASSERT(sizeof(void*) == 2)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == 2)
+#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
+ ACCCHK_ASSERT(sizeof(void*) == 4)
+#endif
+#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_COMPACT)
+ ACCCHK_ASSERT(sizeof(void (*)(void)) == 2)
+#elif (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE)
+ ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
+#endif
+#if (ACC_ABI_ILP32)
+ ACCCHK_ASSERT(sizeof(int) == 4)
+ ACCCHK_ASSERT(sizeof(long) == 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 *))
+#endif
+#if (ACC_ABI_ILP64)
+ ACCCHK_ASSERT(sizeof(int) == 8)
+ ACCCHK_ASSERT(sizeof(long) == 8)
+ ACCCHK_ASSERT(sizeof(void*) == 8)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
+ ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
+ ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
+#endif
+#if (ACC_ABI_IP32L64)
+ ACCCHK_ASSERT(sizeof(int) == 4)
+ ACCCHK_ASSERT(sizeof(long) == 8)
+ 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 *))
+#endif
+#if (ACC_ABI_LLP64)
+ ACCCHK_ASSERT(sizeof(int) == 4)
+ ACCCHK_ASSERT(sizeof(long) == 4)
+ ACCCHK_ASSERT(sizeof(void*) == 8)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
+ ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
+ ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
+#endif
+#if (ACC_ABI_LP32)
+ ACCCHK_ASSERT(sizeof(int) == 2)
+ ACCCHK_ASSERT(sizeof(long) == 4)
+ ACCCHK_ASSERT(sizeof(void*) == 4)
+ ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
+#endif
+#if (ACC_ABI_LP64)
+ ACCCHK_ASSERT(sizeof(int) == 4)
+ ACCCHK_ASSERT(sizeof(long) == 8)
+ ACCCHK_ASSERT(sizeof(void*) == 8)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
+ ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
+ ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
+#endif
+#if (ACC_ARCH_I086)
+ ACCCHK_ASSERT(sizeof(size_t) == 2)
+ ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
+#elif (ACC_ARCH_I386 || ACC_ARCH_M68K)
+ ACCCHK_ASSERT(sizeof(size_t) == 4)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
+ ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
+#endif
+#if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32)
+ ACCCHK_ASSERT(sizeof(size_t) == 4)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
+ ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
+#elif (ACC_OS_WIN64)
+ ACCCHK_ASSERT(sizeof(size_t) == 8)
+ ACCCHK_ASSERT(sizeof(ptrdiff_t) == 8)
+ ACCCHK_ASSERT(sizeof(void (*)(void)) == 8)
+#endif
+#if (ACC_CC_NDPC)
+#elif (SIZEOF_INT > 1)
+ ACCCHK_ASSERT( (int) ((unsigned char) ((signed char) -1)) == 255)
+#endif
+#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( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
+#endif
+#if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
+# pragma option pop
+#endif
+#endif
+#if defined(ACC_WANT_ACCLIB_UA)
+# undef ACC_WANT_ACCLIB_UA
+#define __ACCLIB_UA_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+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);
+#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);
+}
+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);
+#endif
+}
+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);
+#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);
+}
+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);
+#endif
+}
+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);
+#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);
+}
+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);
+#endif
+}
+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);
+#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);
+}
+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);
+#endif
+}
+#if defined(acc_int64l_t)
+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;
+ 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);
+#else
+ const acc_hbyte_p b = (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);
+ 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);
+#endif
+}
+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_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);
+#endif
+}
+#endif
+#if defined(acc_int64l_t)
+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;
+ 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);
+#else
+ const acc_hbyte_p b = (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);
+ 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);
+#endif
+}
+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_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);
+#endif
+}
+#endif
+#endif
+#if defined(ACC_WANT_ACCLIB_VGET)
+# undef ACC_WANT_ACCLIB_VGET
+#define __ACCLIB_VGET_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+#if !defined(ACCLIB_PUBLIC_NOINLINE)
+# if !defined(__acc_noinline)
+# define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
+# elif (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
+# define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
+# else
+# define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
+# endif
+#endif
+#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;
+#else
+extern void* volatile __acc_vget_ptr;
+void* volatile __acc_vget_ptr = (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; \
+ } \
+ return v;
+#endif
+ACCLIB_PUBLIC_NOINLINE(short, acc_vget_short) (short v, int expr)
+{
+ __ACCLIB_VGET_BODY(short)
+}
+ACCLIB_PUBLIC_NOINLINE(int, acc_vget_int) (int v, int expr)
+{
+ __ACCLIB_VGET_BODY(int)
+}
+ACCLIB_PUBLIC_NOINLINE(long, acc_vget_long) (long v, int expr)
+{
+ __ACCLIB_VGET_BODY(long)
+}
+#if defined(acc_int64l_t)
+ACCLIB_PUBLIC_NOINLINE(acc_int64l_t, acc_vget_acc_int64l_t) (acc_int64l_t v, int expr)
+{
+ __ACCLIB_VGET_BODY(acc_int64l_t)
+}
+#endif
+ACCLIB_PUBLIC_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t v, int expr)
+{
+ __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)
+{
+ __ACCLIB_VGET_BODY(double)
+}
+#endif
+ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_p) (acc_hvoid_p v, int expr)
+{
+ __ACCLIB_VGET_BODY(acc_hvoid_p)
+}
+#if (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) && !defined(__cplusplus)
+ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p vv, int expr)
+{
+ acc_hvoid_p v = (acc_hvoid_p) vv;
+ __ACCLIB_VGET_BODY(acc_hvoid_p)
+}
+#else
+ACCLIB_PUBLIC_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p v, int expr)
+{
+ __ACCLIB_VGET_BODY(const acc_hvoid_p)
+}
+#endif
+#endif
+#if defined(ACC_WANT_ACCLIB_HMEMCPY)
+# undef ACC_WANT_ACCLIB_HMEMCPY
+#define __ACCLIB_HMEMCPY_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+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;
+ if __acc_likely(len > 0) do
+ {
+ int d = *p1 - *p2;
+ if (d != 0)
+ return d;
+ p1++; p2++;
+ } while __acc_likely(--len > 0);
+ return 0;
+#else
+ return memcmp(s1, s2, len);
+#endif
+}
+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;
+ if (!(len > 0) || p1 == p2)
+ return dest;
+ do
+ *p1++ = *p2++;
+ while __acc_likely(--len > 0);
+ return dest;
+#else
+ return memcpy(dest, src, len);
+#endif
+}
+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;
+ if (!(len > 0) || p1 == p2)
+ return dest;
+ if (p1 < p2)
+ {
+ do
+ *p1++ = *p2++;
+ while __acc_likely(--len > 0);
+ }
+ else
+ {
+ p1 += len;
+ p2 += len;
+ do
+ *--p1 = *--p2;
+ while __acc_likely(--len > 0);
+ }
+ return dest;
+#else
+ return memmove(dest, src, len);
+#endif
+}
+ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemset) (acc_hvoid_p s, int c, acc_hsize_t len)
+{
+#if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET)
+ acc_hbyte_p p = (acc_hbyte_p) s;
+ if __acc_likely(len > 0) do
+ *p++ = (unsigned char) c;
+ while __acc_likely(--len > 0);
+ return s;
+#else
+ return memset(s, c, len);
+#endif
+}
+#endif
+#if defined(ACC_WANT_ACCLIB_RAND)
+# undef ACC_WANT_ACCLIB_RAND
+#define __ACCLIB_RAND_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+ACCLIB_PUBLIC(void, acc_srand31) (acc_rand31_p r, acc_uint32l_t seed)
+{
+ r->seed = seed & ACC_UINT32_C(0xffffffff);
+}
+ACCLIB_PUBLIC(acc_uint32l_t, acc_rand31) (acc_rand31_p r)
+{
+ r->seed = r->seed * ACC_UINT32_C(1103515245) + 12345;
+ r->seed &= ACC_UINT32_C(0x7fffffff);
+ return r->seed;
+}
+#if defined(acc_int64l_t)
+ACCLIB_PUBLIC(void, acc_srand48) (acc_rand48_p r, acc_uint32l_t seed)
+{
+ r->seed = seed & ACC_UINT32_C(0xffffffff);
+ r->seed <<= 16; r->seed |= 0x330e;
+}
+ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48) (acc_rand48_p r)
+{
+ r->seed = r->seed * ACC_UINT64_C(25214903917) + 11;
+ r->seed &= ACC_UINT64_C(0xffffffffffff);
+ return (acc_uint32l_t) (r->seed >> 17);
+}
+ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p r)
+{
+ r->seed = r->seed * ACC_UINT64_C(25214903917) + 11;
+ r->seed &= ACC_UINT64_C(0xffffffffffff);
+ return (acc_uint32l_t) (r->seed >> 16);
+}
+#endif
+#if defined(acc_int64l_t)
+ACCLIB_PUBLIC(void, acc_srand64) (acc_rand64_p r, acc_uint64l_t seed)
+{
+ r->seed = seed & ACC_UINT64_C(0xffffffffffffffff);
+}
+ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64) (acc_rand64_p r)
+{
+ 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);
+}
+ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p r)
+{
+ 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);
+}
+#endif
+ACCLIB_PUBLIC(void, acc_srandmt) (acc_randmt_p r, acc_uint32l_t seed)
+{
+ unsigned i = 0;
+ do {
+ r->s[i++] = (seed &= ACC_UINT32_C(0xffffffff));
+ seed ^= seed >> 30;
+ seed = seed * ACC_UINT32_C(0x6c078965) + i;
+ } while (i != 624);
+ r->n = i;
+}
+ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt) (acc_randmt_p r)
+{
+ return (__ACCLIB_FUNCNAME(acc_randmt_r32)(r)) >> 1;
+}
+ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p r)
+{
+ acc_uint32l_t v;
+ if __acc_unlikely(r->n == 624) {
+ unsigned i = 0, j;
+ r->n = 0;
+ do {
+ j = i - 623; if ((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;
+ 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++];
+ v ^= v >> 11; v ^= (v & ACC_UINT32_C(0x013a58ad)) << 7;
+ v ^= (v & ACC_UINT32_C(0x0001df8c)) << 15; v ^= v >> 18;
+ return v;
+}
+#if defined(acc_int64l_t)
+ACCLIB_PUBLIC(void, acc_srandmt64) (acc_randmt64_p r, acc_uint64l_t seed)
+{
+ unsigned i = 0;
+ do {
+ r->s[i++] = (seed &= ACC_UINT64_C(0xffffffffffffffff));
+ seed ^= seed >> 62;
+ seed = seed * ACC_UINT64_C(0x5851f42d4c957f2d) + i;
+ } while (i != 312);
+ r->n = i;
+}
+#if 0
+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;
+}
+#endif
+ACCLIB_PUBLIC(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p r)
+{
+ acc_uint64l_t v;
+ if __acc_unlikely(r->n == 312) {
+ unsigned i = 0, j;
+ r->n = 0;
+ do {
+ j = i - 311; if ((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;
+ 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++];
+ v ^= (v & ACC_UINT64_C(0xaaaaaaaaa0000000)) >> 29;
+ v ^= (v & ACC_UINT64_C(0x38eb3ffff6d3)) << 17;
+ v ^= (v & ACC_UINT64_C(0x7ffbf77)) << 37;
+ return v ^ (v >> 43);
+}
+#endif
+#endif
+#if defined(ACC_WANT_ACCLIB_RDTSC)
+# undef ACC_WANT_ACCLIB_RDTSC
+#define __ACCLIB_RDTSC_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+#if defined(acc_int32e_t)
+#if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
+# pragma warn(push)
+# 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"
+#elif (ACC_ARCH_AMD64)
+# define __ACCLIB_RDTSC_REGS : : "r" (t) : "cc", "memory", "rax", "rdx"
+#elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
+# define __ACCLIB_RDTSC_REGS : : "r" (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"
+#endif
+#endif
+ACCLIB_PUBLIC(int, acc_tsc_read) (acc_uint32e_t* t)
+{
+#if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
+ __asm__ __volatile__(
+ "clc \n" ".byte 0x0f,0x31\n"
+ "movl %%eax,(%0)\n" "movl %%edx,4(%0)\n"
+ __ACCLIB_RDTSC_REGS
+ );
+ return 0;
+#elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
+ ACC_UNUSED(t);
+ __asm {
+ mov ecx, t
+ clc
+# if (ACC_CC_MSC && (_MSC_VER < 1200))
+ _emit 0x0f
+ _emit 0x31
+# else
+ rdtsc
+# endif
+ mov [ecx], eax
+ mov [ecx+4], edx
+ }
+ return 0;
+#else
+ t[0] = t[1] = 0; return -1;
+#endif
+}
+#if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
+# pragma warn(pop)
+#endif
+#endif
+#endif
+#if defined(ACC_WANT_ACCLIB_DOSALLOC)
+# undef ACC_WANT_ACCLIB_DOSALLOC
+#define __ACCLIB_DOSALLOC_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+#if (ACC_OS_OS216)
+ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
+ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
+#endif
+#if (ACC_OS_DOS16 || ACC_OS_WIN16)
+#if !(ACC_CC_AZTECC)
+ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
+{
+ void __far* p = 0;
+ union REGS ri, ro;
+ if ((long)size <= 0)
+ return p;
+ size = (size + 15) >> 4;
+ if (size > 0xffffu)
+ return p;
+ ri.x.ax = 0x4800;
+ ri.x.bx = (unsigned short) size;
+ int86(0x21, &ri, &ro);
+ if ((ro.x.cflag & 1) == 0)
+ p = (void __far*) ACC_PTR_MK_FP(ro.x.ax, 0);
+ return p;
+}
+ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
+{
+ union REGS ri, ro;
+ struct SREGS rs;
+ if (!p)
+ return 0;
+ if (ACC_PTR_FP_OFF(p) != 0)
+ return -1;
+ segread(&rs);
+ ri.x.ax = 0x4900;
+ rs.es = ACC_PTR_FP_SEG(p);
+ int86x(0x21, &ri, &ro, &rs);
+ if (ro.x.cflag & 1)
+ return -1;
+ return 0;
+}
+#endif
+#endif
+#if (ACC_OS_OS216)
+ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
+{
+ void __far* p = 0;
+ unsigned short sel = 0;
+ if ((long)size <= 0)
+ return p;
+ if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
+ p = (void __far*) ACC_PTR_MK_FP(sel, 0);
+ return p;
+}
+ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
+{
+ if (!p)
+ return 0;
+ if (ACC_PTR_FP_OFF(p) != 0)
+ return -1;
+ if (DosFreeSeg(ACC_PTR_FP_SEG(p)) != 0)
+ return -1;
+ return 0;
+}
+#endif
+#endif
+#if defined(ACC_WANT_ACCLIB_GETOPT)
+# undef ACC_WANT_ACCLIB_GETOPT
+#define __ACCLIB_GETOPT_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+ACCLIB_PUBLIC(void, acc_getopt_init) (acc_getopt_p g,
+ int start_argc, int argc, char** argv)
+{
+ memset(g, 0, sizeof(*g));
+ g->optind = start_argc;
+ g->argc = argc; g->argv = argv;
+ g->optopt = -1;
+}
+static int __ACCLIB_FUNCNAME(acc_getopt_rotate) (char** p, int first, int middle, int last)
+{
+ int i = middle, n = middle - first;
+ if (first >= middle || middle >= last) return 0;
+ for (;;)
+ {
+ char* t = p[first]; p[first] = p[i]; p[i] = t;
+ if (++first == middle)
+ {
+ if (++i == last) break;
+ middle = i;
+ }
+ else if (++i == last)
+ i = middle;
+ }
+ return n;
+}
+static int __ACCLIB_FUNCNAME(acc_getopt_perror) (acc_getopt_p g, int ret, const char* f, ...)
+{
+ if (g->opterr)
+ {
+#if (HAVE_STDARG_H)
+ struct { va_list ap; } s;
+ va_start(s.ap, f);
+ g->opterr(g, f, &s);
+ va_end(s.ap);
+#else
+ g->opterr(g, f, NULL);
+#endif
+ }
+ ++g->errcount;
+ return ret;
+}
+ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
+ const char* shortopts,
+ const acc_getopt_longopt_p longopts,
+ int* longind)
+{
+#define pe __ACCLIB_FUNCNAME(acc_getopt_perror)
+ int ordering = ACC_GETOPT_PERMUTE;
+ int missing_arg_ret = g->bad_option;
+ char* a;
+ if (shortopts)
+ {
+ if (*shortopts == '-' || *shortopts == '+')
+ ordering = *shortopts++ == '-' ? ACC_GETOPT_RETURN_IN_ORDER : ACC_GETOPT_REQUIRE_ORDER;
+ if (*shortopts == ':')
+ missing_arg_ret = *shortopts++;
+ }
+ g->optarg = NULL;
+ if (g->optopt == -1)
+ g->optopt = g->bad_option;
+ if (longind)
+ *longind = -1;
+ if (g->eof)
+ return -1;
+ if (g->shortpos)
+ goto acc_label_next_shortopt;
+ g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind);
+ g->pending_rotate_first = g->pending_rotate_middle = g->optind;
+ if (ordering == ACC_GETOPT_PERMUTE)
+ {
+ while (g->optind < g->argc && !(g->argv[g->optind][0] == '-' && g->argv[g->optind][1]))
+ ++g->optind;
+ g->pending_rotate_middle = g->optind;
+ }
+ if (g->optind >= g->argc)
+ {
+ g->optind = g->pending_rotate_first;
+ goto acc_label_eof;
+ }
+ a = g->argv[g->optind];
+ if (a[0] == '-' && a[1] == '-')
+ {
+ size_t l = 0;
+ const acc_getopt_longopt_p o;
+ const acc_getopt_longopt_p o1 = NULL;
+ const acc_getopt_longopt_p o2 = NULL;
+ int need_exact = 0;
+ ++g->optind;
+ if (!a[2])
+ goto acc_label_eof;
+ for (a += 2; a[l] && a[l] != '=' && a[l] != '#'; )
+ ++l;
+ for (o = longopts; l && o && o->name; ++o)
+ {
+ if (strncmp(a, o->name, l) != 0)
+ continue;
+ if (!o->name[l])
+ goto acc_label_found_o;
+ need_exact |= o->has_arg & ACC_GETOPT_EXACT_ARG;
+ if (o1) o2 = o;
+ else o1 = o;
+ }
+ if (!o1 || need_exact)
+ return pe(g, g->bad_option, "unrecognized option '--%s'", a);
+ if (o2)
+ return pe(g, g->bad_option, "option '--%s' is ambiguous (could be '--%s' or '--%s')", a, o1->name, o2->name);
+ o = o1;
+ acc_label_found_o:
+ a += l;
+ switch (o->has_arg & 0x2f)
+ {
+ case ACC_GETOPT_OPTIONAL_ARG:
+ if (a[0])
+ g->optarg = a + 1;
+ break;
+ case ACC_GETOPT_REQUIRED_ARG:
+ if (a[0])
+ g->optarg = a + 1;
+ else if (g->optind < g->argc)
+ g->optarg = g->argv[g->optind++];
+ if (!g->optarg)
+ return pe(g, missing_arg_ret, "option '--%s' requires an argument", o->name);
+ break;
+ case ACC_GETOPT_REQUIRED_ARG | 0x20:
+ if (a[0] && a[1])
+ g->optarg = a + 1;
+ if (!g->optarg)
+ return pe(g, missing_arg_ret, "option '--%s=' requires an argument", o->name);
+ break;
+ default:
+ if (a[0])
+ return pe(g, g->bad_option, "option '--%s' doesn't allow an argument", o->name);
+ break;
+ }
+ if (longind)
+ *longind = (int) (o - longopts);
+ if (o->flag)
+ {
+ *o->flag = o->val;
+ return 0;
+ }
+ return o->val;
+ }
+ if (a[0] == '-' && a[1])
+ {
+ unsigned char c;
+ const char* s;
+ acc_label_next_shortopt:
+ a = g->argv[g->optind] + ++g->shortpos;
+ c = (unsigned char) *a++; s = NULL;
+ if (c != ':' && shortopts)
+ s = strchr(shortopts, c);
+ if (!s || s[1] != ':')
+ {
+ if (!a[0])
+ ++g->optind, g->shortpos = 0;
+ if (!s)
+ {
+ g->optopt = c;
+ return pe(g, g->bad_option, "invalid option '-%c'", c);
+ }
+ }
+ else
+ {
+ ++g->optind, g->shortpos = 0;
+ if (a[0])
+ g->optarg = a;
+ else if (s[2] != ':')
+ {
+ if (g->optind < g->argc)
+ g->optarg = g->argv[g->optind++];
+ else
+ {
+ g->optopt = c;
+ return pe(g, missing_arg_ret, "option '-%c' requires an argument", c);
+ }
+ }
+ }
+ return c;
+ }
+ if (ordering == ACC_GETOPT_RETURN_IN_ORDER)
+ {
+ ++g->optind;
+ g->optarg = a;
+ return 1;
+ }
+acc_label_eof:
+ g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind);
+ g->pending_rotate_first = g->pending_rotate_middle = g->optind;
+ g->eof = 1;
+ return -1;
+#undef pe
+}
+#endif
+#if defined(ACC_WANT_ACCLIB_HALLOC)
+# undef ACC_WANT_ACCLIB_HALLOC
+#define __ACCLIB_HALLOC_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+#if (ACC_HAVE_MM_HUGE_PTR)
+#if 1 && (ACC_OS_DOS16 && defined(BLX286))
+# define __ACCLIB_HALLOC_USE_DAH 1
+#elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
+# define __ACCLIB_HALLOC_USE_DAH 1
+#elif 1 && (ACC_OS_OS216)
+# define __ACCLIB_HALLOC_USE_DAH 1
+#elif 1 && (ACC_OS_WIN16)
+# define __ACCLIB_HALLOC_USE_GA 1
+#elif 1 && (ACC_OS_DOS16) && (ACC_CC_BORLANDC) && defined(__DPMI16__)
+# define __ACCLIB_HALLOC_USE_GA 1
+#endif
+#endif
+#if (__ACCLIB_HALLOC_USE_DAH)
+#if 0 && (ACC_OS_OS216)
+#include <os2.h>
+#else
+ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
+ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
+#endif
+#endif
+#if (__ACCLIB_HALLOC_USE_GA)
+#if 0
+#define STRICT 1
+#include <windows.h>
+#else
+ACC_EXTERN_C const void __near* __far __pascal GlobalAlloc(unsigned, unsigned long);
+ACC_EXTERN_C const void __near* __far __pascal GlobalFree(const void __near*);
+ACC_EXTERN_C unsigned long __far __pascal GlobalHandle(unsigned);
+ACC_EXTERN_C void __far* __far __pascal GlobalLock(const void __near*);
+ACC_EXTERN_C int __far __pascal GlobalUnlock(const void __near*);
+#endif
+#endif
+ACCLIB_PUBLIC(acc_hvoid_p, acc_halloc) (acc_hsize_t size)
+{
+ acc_hvoid_p 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);
+#else
+ if ((long)size <= 0)
+ return p;
+{
+#if (__ACCLIB_HALLOC_USE_DAH)
+ unsigned short sel = 0;
+ if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
+ p = (acc_hvoid_p) ACC_PTR_MK_FP(sel, 0);
+#elif (__ACCLIB_HALLOC_USE_GA)
+ const void __near* h = GlobalAlloc(2, size);
+ if (h) {
+ p = GlobalLock(h);
+ if (p && ACC_PTR_FP_OFF(p) != 0) {
+ GlobalUnlock(h);
+ p = 0;
+ }
+ if (!p)
+ GlobalFree(h);
+ }
+#elif (ACC_CC_MSC && (_MSC_VER >= 700))
+ p = _halloc(size, 1);
+#elif (ACC_CC_MSC || ACC_CC_WATCOMC)
+ p = halloc(size, 1);
+#elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
+ p = farmalloc(size);
+#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
+ p = farmalloc(size);
+#elif (ACC_CC_AZTECC)
+ p = lmalloc(size);
+#else
+ if (size < (size_t) -1)
+ p = malloc((size_t) size);
+#endif
+}
+#endif
+ return p;
+}
+ACCLIB_PUBLIC(void, acc_hfree) (acc_hvoid_p p)
+{
+ if (!p)
+ return;
+#if 0 && defined(__palmos__)
+ MemPtrFree(p);
+#elif !(ACC_HAVE_MM_HUGE_PTR)
+ free(p);
+#else
+#if (__ACCLIB_HALLOC_USE_DAH)
+ if (ACC_PTR_FP_OFF(p) == 0)
+ DosFreeSeg((unsigned short) ACC_PTR_FP_SEG(p));
+#elif (__ACCLIB_HALLOC_USE_GA)
+ if (ACC_PTR_FP_OFF(p) == 0) {
+ const void __near* h = (const void __near*) (unsigned) GlobalHandle(ACC_PTR_FP_SEG(p));
+ if (h) {
+ GlobalUnlock(h);
+ GlobalFree(h);
+ }
+ }
+#elif (ACC_CC_MSC && (_MSC_VER >= 700))
+ _hfree(p);
+#elif (ACC_CC_MSC || ACC_CC_WATCOMC)
+ hfree(p);
+#elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
+ farfree((void __far*) p);
+#elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
+ farfree((void __far*) p);
+#elif (ACC_CC_AZTECC)
+ lfree(p);
+#else
+ free(p);
+#endif
+#endif
+}
+#endif
+#if defined(ACC_WANT_ACCLIB_HFREAD)
+# undef ACC_WANT_ACCLIB_HFREAD
+#define __ACCLIB_HFREAD_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (void* vfp, acc_hvoid_p buf, acc_hsize_t size)
+{
+ FILE* fp = (FILE *) vfp;
+#if (ACC_HAVE_MM_HUGE_PTR)
+#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
+#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
+ unsigned char tmp[512];
+ acc_hsize_t l = 0;
+ while (l < size)
+ {
+ size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
+ n = fread(tmp, 1, n, fp);
+ if (n == 0)
+ break;
+ __ACCLIB_FUNCNAME(acc_hmemcpy)((acc_hbyte_p)buf + l, tmp, (acc_hsize_t)n);
+ l += n;
+ }
+ return l;
+#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
+ acc_hbyte_p b = (acc_hbyte_p) buf;
+ acc_hsize_t l = 0;
+ while (l < size)
+ {
+ size_t n;
+ n = ACC_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
+ if ((acc_hsize_t) n > size - l)
+ n = (size_t) (size - l);
+ n = fread((void __far*)b, 1, n, fp);
+ if (n == 0)
+ break;
+ b += n; l += n;
+ }
+ return l;
+#else
+# error "unknown memory model"
+#endif
+#else
+ return fread(buf, 1, size, fp);
+#endif
+}
+ACCLIB_PUBLIC(acc_hsize_t, acc_hfwrite) (void* vfp, const acc_hvoid_p buf, acc_hsize_t size)
+{
+ FILE* fp = (FILE *) vfp;
+#if (ACC_HAVE_MM_HUGE_PTR)
+#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
+#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
+ unsigned char tmp[512];
+ acc_hsize_t l = 0;
+ while (l < size)
+ {
+ size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
+ __ACCLIB_FUNCNAME(acc_hmemcpy)(tmp, (const acc_hbyte_p)buf + l, (acc_hsize_t)n);
+ n = fwrite(tmp, 1, n, fp);
+ if (n == 0)
+ break;
+ l += n;
+ }
+ return l;
+#elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
+ const acc_hbyte_p b = (const acc_hbyte_p) buf;
+ acc_hsize_t l = 0;
+ while (l < size)
+ {
+ size_t n;
+ n = ACC_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
+ if ((acc_hsize_t) n > size - l)
+ n = (size_t) (size - l);
+ n = fwrite((void __far*)b, 1, n, fp);
+ if (n == 0)
+ break;
+ b += n; l += n;
+ }
+ return l;
+#else
+# error "unknown memory model"
+#endif
+#else
+ return fwrite(buf, 1, size, fp);
+#endif
+}
+#endif
+#if defined(ACC_WANT_ACCLIB_HSREAD)
+# undef ACC_WANT_ACCLIB_HSREAD
+#define __ACCLIB_HSREAD_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+ACCLIB_PUBLIC(long, acc_safe_hread) (int fd, acc_hvoid_p buf, long size)
+{
+ acc_hbyte_p b = (acc_hbyte_p) buf;
+ long l = 0;
+ int saved_errno;
+ saved_errno = errno;
+ while (l < size)
+ {
+ long n = size - l;
+#if (ACC_HAVE_MM_HUGE_PTR)
+# define __ACCLIB_REQUIRE_HREAD_CH 1
+ errno = 0; n = acc_hread(fd, b, n);
+#elif (ACC_OS_DOS32) && defined(__DJGPP__)
+ errno = 0; n = _read(fd, b, n);
+#else
+ errno = 0; n = read(fd, b, n);
+#endif
+ if (n == 0)
+ break;
+ if (n < 0) {
+#if defined(EAGAIN)
+ if (errno == (EAGAIN)) continue;
+#endif
+#if defined(EINTR)
+ if (errno == (EINTR)) continue;
+#endif
+ if (errno == 0) errno = 1;
+ return l;
+ }
+ b += n; l += n;
+ }
+ errno = saved_errno;
+ return l;
+}
+ACCLIB_PUBLIC(long, acc_safe_hwrite) (int fd, const acc_hvoid_p buf, long size)
+{
+ const acc_hbyte_p b = (const acc_hbyte_p) buf;
+ long l = 0;
+ int saved_errno;
+ saved_errno = errno;
+ while (l < size)
+ {
+ long n = size - l;
+#if (ACC_HAVE_MM_HUGE_PTR)
+# define __ACCLIB_REQUIRE_HREAD_CH 1
+ errno = 0; n = acc_hwrite(fd, b, n);
+#elif (ACC_OS_DOS32) && defined(__DJGPP__)
+ errno = 0; n = _write(fd, b, n);
+#else
+ errno = 0; n = write(fd, b, n);
+#endif
+ if (n == 0)
+ break;
+ if (n < 0) {
+#if defined(EAGAIN)
+ if (errno == (EAGAIN)) continue;
+#endif
+#if defined(EINTR)
+ if (errno == (EINTR)) continue;
+#endif
+ if (errno == 0) errno = 1;
+ return l;
+ }
+ b += n; l += n;
+ }
+ errno = saved_errno;
+ return l;
+}
+#endif
+#if defined(ACC_WANT_ACCLIB_PCLOCK)
+# undef ACC_WANT_ACCLIB_PCLOCK
+#define __ACCLIB_PCLOCK_CH_INCLUDED 1
+#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)
+#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)
+{
+ long r;
+ __asm__ __volatile__("syscall\n" : "=a" (r) : "0" (228), "D" (clockid), "S" (ts) : __ACC_ASM_CLOBBER);
+ return r;
+}
+#endif
+#if 0 && (ACC_OS_POSIX_LINUX && ACC_ARCH_I386 && ACC_ASM_SYNTAX_GNUC)
+#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)
+{
+ long r;
+ __asm__ __volatile__("int $0x80\n" : "=a" (r) : "0" (265), "b" (clockid), "c" (ts) : __ACC_ASM_CLOBBER);
+ return r;
+}
+#endif
+#if 0 && defined(acc_pclock_syscall_clock_gettime)
+#ifndef acc_pclock_read_clock_gettime_r_syscall
+#define acc_pclock_read_clock_gettime_r_syscall acc_pclock_read_clock_gettime_r_syscall
+#endif
+static int acc_pclock_read_clock_gettime_r_syscall(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct timespec ts;
+ if (acc_pclock_syscall_clock_gettime(0, &ts) != 0)
+ return -1;
+ c->tv_sec = ts.tv_sec;
+ c->tv_nsec = ts.tv_nsec;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if (HAVE_GETTIMEOFDAY)
+#ifndef acc_pclock_read_gettimeofday
+#define acc_pclock_read_gettimeofday acc_pclock_read_gettimeofday
+#endif
+static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct timeval tv;
+ if (gettimeofday(&tv, 0) != 0)
+ return -1;
+#if defined(acc_int64l_t)
+ c->tv_sec = tv.tv_sec;
+#else
+ c->tv_sec_high = 0;
+ c->tv_sec_low = tv.tv_sec;
+#endif
+ c->tv_nsec = (acc_uint32l_t) (tv.tv_usec * 1000u);
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if defined(CLOCKS_PER_SEC)
+#ifndef acc_pclock_read_clock
+#define acc_pclock_read_clock acc_pclock_read_clock
+#endif
+static int acc_pclock_read_clock(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ clock_t ticks;
+ double secs;
+#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);
+#else
+ ticks = clock();
+ secs = (double)ticks / (CLOCKS_PER_SEC);
+ c->tv_sec_high = 0;
+ c->tv_sec_low = (acc_uint32l_t) (secs + 0.5);
+ c->tv_nsec = 0;
+#endif
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if 1 && defined(acc_pclock_syscall_clock_gettime)
+#ifndef acc_pclock_read_clock_gettime_m_syscall
+#define acc_pclock_read_clock_gettime_m_syscall acc_pclock_read_clock_gettime_m_syscall
+#endif
+static int acc_pclock_read_clock_gettime_m_syscall(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct timespec ts;
+ if (acc_pclock_syscall_clock_gettime(1, &ts) != 0)
+ return -1;
+ c->tv_sec = ts.tv_sec;
+ c->tv_nsec = ts.tv_nsec;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) && defined(UCLOCKS_PER_SEC)
+#ifndef acc_pclock_read_uclock
+#define acc_pclock_read_uclock acc_pclock_read_uclock
+#endif
+static int acc_pclock_read_uclock(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ acc_uint64l_t ticks;
+ double secs;
+ acc_uint64l_t nsecs;
+ ticks = uclock();
+ secs = (double)ticks / (UCLOCKS_PER_SEC);
+ 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_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
+static int acc_pclock_read_clock_gettime_p_libc(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct timespec ts;
+ if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) != 0)
+ return -1;
+ c->tv_sec = ts.tv_sec;
+ c->tv_nsec = ts.tv_nsec;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if 1 && defined(acc_pclock_syscall_clock_gettime)
+#ifndef acc_pclock_read_clock_gettime_p_syscall
+#define acc_pclock_read_clock_gettime_p_syscall acc_pclock_read_clock_gettime_p_syscall
+#endif
+static int acc_pclock_read_clock_gettime_p_syscall(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct timespec ts;
+ if (acc_pclock_syscall_clock_gettime(2, &ts) != 0)
+ return -1;
+ c->tv_sec = ts.tv_sec;
+ c->tv_nsec = ts.tv_nsec;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
+#ifndef acc_pclock_read_getprocesstimes
+#define acc_pclock_read_getprocesstimes acc_pclock_read_getprocesstimes
+#endif
+static int acc_pclock_read_getprocesstimes(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ FILETIME ct, et, kt, ut;
+ acc_uint64l_t ticks;
+ if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut) == 0)
+ return -1;
+ ticks = ((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;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if (HAVE_GETRUSAGE) && defined(RUSAGE_SELF)
+#ifndef acc_pclock_read_getrusage
+#define acc_pclock_read_getrusage acc_pclock_read_getrusage
+#endif
+static int acc_pclock_read_getrusage(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct rusage ru;
+ if (getrusage(RUSAGE_SELF, &ru) != 0)
+ return -1;
+#if defined(acc_int64l_t)
+ c->tv_sec = ru.ru_utime.tv_sec;
+#else
+ 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);
+ 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)
+#ifndef acc_pclock_read_clock_gettime_t_libc
+#define acc_pclock_read_clock_gettime_t_libc acc_pclock_read_clock_gettime_t_libc
+#endif
+static int acc_pclock_read_clock_gettime_t_libc(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct timespec ts;
+ if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0)
+ return -1;
+ c->tv_sec = ts.tv_sec;
+ c->tv_nsec = ts.tv_nsec;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if 1 && defined(acc_pclock_syscall_clock_gettime)
+#ifndef acc_pclock_read_clock_gettime_t_syscall
+#define acc_pclock_read_clock_gettime_t_syscall acc_pclock_read_clock_gettime_t_syscall
+#endif
+static int acc_pclock_read_clock_gettime_t_syscall(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ struct timespec ts;
+ if (acc_pclock_syscall_clock_gettime(3, &ts) != 0)
+ return -1;
+ c->tv_sec = ts.tv_sec;
+ c->tv_nsec = ts.tv_nsec;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+#if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
+#ifndef acc_pclock_read_getthreadtimes
+#define acc_pclock_read_getthreadtimes acc_pclock_read_getthreadtimes
+#endif
+static int acc_pclock_read_getthreadtimes(acc_pclock_handle_p h, acc_pclock_p c)
+{
+ FILETIME ct, et, kt, ut;
+ acc_uint64l_t ticks;
+ if (GetThreadTimes(GetCurrentThread(), &ct, &et, &kt, &ut) == 0)
+ return -1;
+ ticks = ((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;
+ ACC_UNUSED(h); return 0;
+}
+#endif
+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->mode = -1;
+ h->read_error = 2;
+ h->name = NULL;
+ h->gettime = 0;
+#if defined(acc_int64l_t)
+ h->ticks_base = 0;
+#endif
+ switch (mode)
+ {
+ case ACC_PCLOCK_REALTIME:
+# if defined(acc_pclock_read_clock_gettime_r_syscall)
+ if (acc_pclock_read_clock_gettime_r_syscall(h, &c) == 0) {
+ h->gettime = acc_pclock_read_clock_gettime_r_syscall;
+ h->name = "CLOCK_REALTIME/syscall";
+ break;
+ }
+# endif
+# if defined(acc_pclock_read_gettimeofday)
+ if (acc_pclock_read_gettimeofday(h, &c) == 0) {
+ h->gettime = acc_pclock_read_gettimeofday;
+ h->name = "gettimeofday";
+ break;
+ }
+# endif
+ break;
+ case ACC_PCLOCK_MONOTONIC:
+# if defined(acc_pclock_read_clock_gettime_m_syscall)
+ if (acc_pclock_read_clock_gettime_m_syscall(h, &c) == 0) {
+ h->gettime = acc_pclock_read_clock_gettime_m_syscall;
+ h->name = "CLOCK_MONOTONIC/syscall";
+ break;
+ }
+# endif
+# if defined(acc_pclock_read_uclock)
+ if (acc_pclock_read_uclock(h, &c) == 0) {
+ h->gettime = acc_pclock_read_uclock;
+ h->name = "uclock";
+ break;
+ }
+# endif
+# if defined(acc_pclock_read_clock)
+ if (acc_pclock_read_clock(h, &c) == 0) {
+ h->gettime = acc_pclock_read_clock;
+ h->name = "clock";
+ break;
+ }
+# 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;
+ h->name = "GetProcessTimes";
+ break;
+ }
+# endif
+# if defined(acc_pclock_read_clock_gettime_p_syscall)
+ if (acc_pclock_read_clock_gettime_p_syscall(h, &c) == 0) {
+ h->gettime = acc_pclock_read_clock_gettime_p_syscall;
+ h->name = "CLOCK_PROCESS_CPUTIME_ID/syscall";
+ break;
+ }
+# endif
+# if defined(acc_pclock_read_clock_gettime_p_libc)
+ if (acc_pclock_read_clock_gettime_p_libc(h, &c) == 0) {
+ h->gettime = acc_pclock_read_clock_gettime_p_libc;
+ h->name = "CLOCK_PROCESS_CPUTIME_ID/libc";
+ break;
+ }
+# endif
+# if defined(acc_pclock_read_getrusage)
+ if (acc_pclock_read_getrusage(h, &c) == 0) {
+ h->gettime = acc_pclock_read_getrusage;
+ h->name = "getrusage";
+ break;
+ }
+# endif
+ break;
+ case ACC_PCLOCK_THREAD_CPUTIME_ID:
+# if defined(acc_pclock_read_getthreadtimes)
+ if (acc_pclock_read_getthreadtimes(h, &c) == 0) {
+ h->gettime = acc_pclock_read_getthreadtimes;
+ h->name = "GetThreadTimes";
+ }
+# endif
+# if defined(acc_pclock_read_clock_gettime_t_syscall)
+ if (acc_pclock_read_clock_gettime_t_syscall(h, &c) == 0) {
+ h->gettime = acc_pclock_read_clock_gettime_t_syscall;
+ h->name = "CLOCK_THREAD_CPUTIME_ID/syscall";
+ break;
+ }
+# endif
+# if defined(acc_pclock_read_clock_gettime_t_libc)
+ if (acc_pclock_read_clock_gettime_t_libc(h, &c) == 0) {
+ h->gettime = acc_pclock_read_clock_gettime_t_libc;
+ h->name = "CLOCK_THREAD_CPUTIME_ID/libc";
+ break;
+ }
+# endif
+ break;
+ }
+ if (!h->gettime)
+ return -1;
+ if (!h->h)
+ h->h = (acclib_handle_t) 1;
+ h->mode = mode;
+ h->read_error = 0;
+ if (!h->name)
+ h->name = "unknown";
+ for (i = 0; i < 10; i++) {
+ __ACCLIB_FUNCNAME(acc_pclock_read)(h, &c);
+ }
+ return 0;
+}
+ACCLIB_PUBLIC(int, acc_pclock_open_default) (acc_pclock_handle_p h)
+{
+ if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_PROCESS_CPUTIME_ID) == 0)
+ return 0;
+ if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_MONOTONIC) == 0)
+ return 0;
+ if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_REALTIME) == 0)
+ return 0;
+ if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_THREAD_CPUTIME_ID) == 0)
+ return 0;
+ return -1;
+}
+ACCLIB_PUBLIC(int, acc_pclock_close) (acc_pclock_handle_p h)
+{
+ h->h = (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
+ return 0;
+}
+ACCLIB_PUBLIC(void, acc_pclock_read) (acc_pclock_handle_p h, acc_pclock_p c)
+{
+ if (h->gettime) {
+ if (h->gettime(h, c) == 0)
+ return;
+ }
+ h->read_error = 1;
+#if defined(acc_int64l_t)
+ c->tv_sec = 0;
+#else
+ c->tv_sec_high = 0;
+ c->tv_sec_low = 0;
+#endif
+ c->tv_nsec = 0;
+}
+#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)
+{
+ double tstop, tstart;
+ if (!h->h) {
+ h->mode = -1;
+ return 0.0;
+ }
+#if defined(acc_int64l_t)
+ tstop = stop->tv_sec + stop->tv_nsec / 1000000000.0;
+ tstart = start->tv_sec + start->tv_nsec / 1000000000.0;
+#else
+ 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)
+{
+ 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
+#define __ACCLIB_MISC_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+#if !defined(ACCLIB_PUBLIC_NOINLINE)
+# if !defined(__acc_noinline)
+# define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
+# elif (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
+# define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
+# else
+# define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
+# endif
+#endif
+#if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
+# pragma warn(push)
+# pragma warn(disable:2007)
+#endif
+ACCLIB_PUBLIC(const char *, acc_getenv) (const char *s)
+{
+#if (HAVE_GETENV)
+ return getenv(s);
+#else
+ ACC_UNUSED(s); return (const char *) 0;
+#endif
+}
+ACCLIB_PUBLIC(acclib_handle_t, acc_get_osfhandle) (int fd)
+{
+ if (fd < 0)
+ return -1;
+#if (ACC_OS_CYGWIN)
+ return get_osfhandle(fd);
+#elif (ACC_OS_EMX && defined(__RSXNT__))
+ return -1;
+#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
+ return -1;
+#elif (ACC_OS_WIN32 || ACC_OS_WIN64)
+# if (ACC_CC_PELLESC && (__POCC__ < 280))
+ return -1;
+# elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
+ return -1;
+# elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
+ return _os_handle(fd);
+# else
+ return _get_osfhandle(fd);
+# endif
+#else
+ return fd;
+#endif
+}
+ACCLIB_PUBLIC(int, acc_set_binmode) (int fd, int binary)
+{
+#if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
+ FILE* fp; int old_binary;
+ if (fd == STDIN_FILENO) fp = stdin;
+ else if (fd == STDOUT_FILENO) fp = stdout;
+ else if (fd == STDERR_FILENO) fp = stderr;
+ else return -1;
+ old_binary = fp->__mode.__binary;
+ __set_binmode(fp, binary ? 1 : 0);
+ return old_binary ? 1 : 0;
+#elif (ACC_ARCH_M68K && ACC_OS_TOS)
+ ACC_UNUSED(fd); ACC_UNUSED(binary);
+ return -1;
+#elif (ACC_OS_DOS16 && (ACC_CC_AZTECC || ACC_CC_PACIFICC))
+ ACC_UNUSED(fd); ACC_UNUSED(binary);
+ return -1;
+#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+ int r; unsigned old_flags = __djgpp_hwint_flags;
+ ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
+ ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
+ if (fd < 0) return -1;
+ r = setmode(fd, binary ? O_BINARY : O_TEXT);
+ if ((old_flags & 1u) != (__djgpp_hwint_flags & 1u))
+ __djgpp_set_ctrl_c(!(old_flags & 1));
+ if (r == -1) return -1;
+ return (r & O_TEXT) ? 0 : 1;
+#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
+ if (fd < 0) return -1;
+ ACC_UNUSED(binary);
+ return 1;
+#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
+ FILE* fp; int r;
+ if (fd == fileno(stdin)) fp = stdin;
+ else if (fd == fileno(stdout)) fp = stdout;
+ else if (fd == fileno(stderr)) fp = stderr;
+ else return -1;
+ r = _setmode(fp, binary ? _BINARY : _TEXT);
+ if (r == -1) return -1;
+ return (r & _BINARY) ? 1 : 0;
+#elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
+ ACC_UNUSED(fd); ACC_UNUSED(binary);
+ return -1;
+#elif (ACC_OS_CYGWIN && (ACC_CC_GNUC < 0x025a00ul))
+ ACC_UNUSED(fd); ACC_UNUSED(binary);
+ return -1;
+#elif (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
+ int r;
+#if !(ACC_CC_ZORTECHC)
+ ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
+#endif
+ ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
+ if (fd < 0) return -1;
+ r = setmode(fd, binary ? O_BINARY : O_TEXT);
+ if (r == -1) return -1;
+ return (r & O_TEXT) ? 0 : 1;
+#else
+ if (fd < 0) return -1;
+ ACC_UNUSED(binary);
+ return 1;
+#endif
+}
+ACCLIB_PUBLIC(int, acc_isatty) (int fd)
+{
+ if (fd < 0)
+ return 0;
+#if (ACC_OS_DOS16 && !(ACC_CC_AZTECC))
+ {
+ union REGS ri, ro;
+ ri.x.ax = 0x4400; ri.x.bx = fd;
+ int86(0x21, &ri, &ro);
+ if ((ro.x.cflag & 1) == 0)
+ if ((ro.x.ax & 0x83) != 0x83)
+ return 0;
+ }
+#elif (ACC_OS_DOS32 && ACC_CC_WATCOMC)
+ {
+ union REGS ri, ro;
+ ri.w.ax = 0x4400; ri.w.bx = (unsigned short) fd;
+ int386(0x21, &ri, &ro);
+ if ((ro.w.cflag & 1) == 0)
+ if ((ro.w.ax & 0x83) != 0x83)
+ return 0;
+ }
+#elif (ACC_HAVE_WINDOWS_H)
+ {
+ acclib_handle_t h = __ACCLIB_FUNCNAME(acc_get_osfhandle)(fd);
+ if ((HANDLE)h != INVALID_HANDLE_VALUE)
+ {
+ DWORD d = 0;
+ if (GetConsoleMode((HANDLE)h, &d) == 0)
+ return 0;
+ }
+ }
+#endif
+#if (HAVE_ISATTY)
+ return (isatty(fd)) ? 1 : 0;
+#else
+ return 0;
+#endif
+}
+ACCLIB_PUBLIC(int, acc_mkdir) (const char* name, unsigned mode)
+{
+#if !(HAVE_MKDIR)
+ ACC_UNUSED(name); ACC_UNUSED(mode);
+ return -1;
+#elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
+ ACC_UNUSED(mode);
+ return Dcreate(name);
+#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
+ 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_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);
+#else
+ return mkdir(name, mode);
+#endif
+}
+ACCLIB_PUBLIC(int, acc_rmdir) (const char* name)
+{
+#if !(HAVE_RMDIR)
+ ACC_UNUSED(name);
+ return -1;
+#elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC))
+ return rmdir((char *) name);
+#else
+ return rmdir(name);
+#endif
+}
+#if defined(acc_int32e_t)
+ACCLIB_PUBLIC(acc_int32e_t, acc_muldiv32s) (acc_int32e_t a, acc_int32e_t b, acc_int32e_t x)
+{
+ acc_int32e_t r = 0;
+ if __acc_likely(x != 0)
+ {
+#if defined(acc_int64l_t)
+ r = (acc_int32e_t) (((acc_int64l_t) a * b) / x);
+#else
+ ACC_UNUSED(a); ACC_UNUSED(b);
+#endif
+ }
+ return r;
+}
+ACCLIB_PUBLIC(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t a, acc_uint32e_t b, acc_uint32e_t x)
+{
+ acc_uint32e_t r = 0;
+ if __acc_likely(x != 0)
+ {
+#if defined(acc_int64l_t)
+ r = (acc_uint32e_t) (((acc_uint64l_t) a * b) / x);
+#else
+ ACC_UNUSED(a); ACC_UNUSED(b);
+#endif
+ }
+ 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
+ACCLIB_PUBLIC_NOINLINE(void, acc_debug_break) (void)
+{
+#if (ACC_OS_WIN16)
+ DebugBreak();
+#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);
+#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;
+#endif
+}
+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;
+#elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
+ unsigned long r;
+ __asm {
+ pushf
+ pop eax
+ mov r,eax
+ }
+ return (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);
+ } else {
+ __asm__ __volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : : __ACC_ASM_CLOBBER);
+ }
+ r = 0;
+#elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
+ if (v) {
+ __asm__ __volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER);
+ } else {
+ __asm__ __volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER);
+ }
+ r = 0;
+#elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
+ if (v) { __asm {
+ pushf
+ or dword ptr [esp],262144
+ popf
+ }} else { __asm {
+ pushf
+ and dword ptr [esp],-262145
+ popf
+ }}
+ r = 0;
+#else
+ r = -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");
+ if (p) {
+ if (p[0] == 0) r = 0;
+ else if ((p[0] >= '0' && p[0] <= '9') && p[1] == 0) r = p[0] - '0';
+ else r = 1;
+ }
+#endif
+ return r;
+}
+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;
+#else
+ return 0;
+#endif
+}
+#if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
+# pragma warn(pop)
+#endif
+#endif
+#if defined(ACC_WANT_ACCLIB_WILDARGV)
+# undef ACC_WANT_ACCLIB_WILDARGV
+#define __ACCLIB_WILDARGV_CH_INCLUDED 1
+#if !defined(ACCLIB_PUBLIC)
+# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
+#endif
+#if (ACC_OS_DOS16 || ACC_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);
+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)
+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(); }
+#endif
+#endif
+#if (ACC_OS_EMX)
+#define __ACCLIB_HAVE_ACC_WILDARGV 1
+ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
+{
+ if (argc && argv) {
+ _response(argc, argv);
+ _wildcard(argc, argv);
+ }
+}
+#endif
+#if (ACC_OS_CONSOLE_PSP) && defined(__PSPSDK_DEBUG__)
+#define __ACCLIB_HAVE_ACC_WILDARGV 1
+ACC_EXTERN_C int acc_psp_init_module(int*, char***, int);
+ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
+{
+ acc_psp_init_module(argc, argv, -1);
+}
+#endif
+#if !(__ACCLIB_HAVE_ACC_WILDARGV)
+#define __ACCLIB_HAVE_ACC_WILDARGV 1
+ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
+{
+#if 1 && (ACC_ARCH_I086PM)
+ if (ACC_MM_AHSHIFT != 3) { exit(1); }
+#elif 1 && (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
+ __binmode(1);
+ if (isatty(1)) __set_binmode(stdout, 0);
+ if (isatty(2)) __set_binmode(stderr, 0);
+#endif
+ ACC_UNUSED(argc); ACC_UNUSED(argv);
+}
+#endif
+#endif
+
+/* vim:set ts=4 et: */
diff --git a/src/p_lzo.c b/src/p_lzo.c
new file mode 100644
index 0000000..bacb28d
--- /dev/null
+++ b/src/p_lzo.c
@@ -0,0 +1,595 @@
+/* p_lzo.c -- LZO compression
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+
+#if defined(WITH_LZO)
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+int lzo_set_method(int m, int level)
+{
+ int l = level & 0xff;
+
+ if (m != 0 || l < 1 || l > 9)
+ return -1; /* not a LZO method */
+
+#if defined(USE_LZO1X_1_15)
+ if (l == 1)
+ m = M_LZO1X_1_15;
+ else
+#endif
+#if defined(USE_LZO1X_1)
+ if (l <= 6)
+ {
+ m = M_LZO1X_1;
+ l = 5;
+ }
+#endif
+#if defined(USE_LZO1X_999)
+ if (l >= 7 && l <= 9)
+ {
+ m = M_LZO1X_999;
+ }
+#endif
+
+ if (m == 0)
+ return 1; /* error */
+
+ opt_method = m;
+ opt_level = l;
+ return 0;
+}
+
+
+int lzo_get_method(header_t *h)
+{
+/* check method */
+ if (h->method == M_LZO1X_1)
+ {
+ h->method_name = "LZO1X-1";
+ if (h->level == 0)
+ h->level = 3;
+ }
+ else if (h->method == M_LZO1X_1_15)
+ {
+ h->method_name = "LZO1X-1(15)";
+ if (h->level == 0)
+ h->level = 1;
+ }
+ else if (h->method == M_LZO1X_999)
+ {
+ static char s[11+1] = "LZO1X-999 ";
+ s[9] = 0;
+ if (h->level == 0)
+ h->level = 9;
+ else if (h->version >= 0x0950 && h->lib_version >= 0x1020)
+ {
+ s[9] = '/';
+ s[10] = (char) (h->level + '0');
+ }
+ h->method_name = s;
+ }
+ else
+ return -1; /* not a LZO method */
+
+/* check compression level */
+ if (h->level < 1 || h->level > 9)
+ return 15;
+
+ return 0;
+}
+
+
+void lzo_init_compress_header(header_t *h)
+{
+ if (opt_checksum)
+ {
+ if (opt_crc32)
+ {
+ h->flags |= F_CRC32_D;
+ if (opt_checksum >= 2)
+ h->flags |= F_CRC32_C;
+ }
+ else
+ {
+ h->flags |= F_ADLER32_D;
+ if (opt_checksum >= 2)
+ h->flags |= F_ADLER32_C;
+ }
+ }
+}
+
+
+/*************************************************************************
+// memory setup
+**************************************************************************/
+
+#if defined(ACC_OS_DOS16) && !defined(ACC_ARCH_I086PM)
+# define BLOCK_SIZE (128*1024l)
+#else
+# define BLOCK_SIZE (256*1024l)
+#endif
+#define MAX_BLOCK_SIZE (64*1024l*1024l) /* DO NOT CHANGE */
+
+#if defined(USE_LZO1X_999)
+# define WRK_LEN LZO1X_999_MEM_COMPRESS
+#elif defined(USE_LZO1X_1_15)
+# define WRK_LEN LZO1X_1_15_MEM_COMPRESS
+#elif defined(USE_LZO1X_1)
+# define WRK_LEN LZO1X_1_MEM_COMPRESS
+#else
+# error
+#endif
+
+
+#if 1
+# define ALIGN_SIZE 4096
+#else
+# define ALIGN_SIZE 1
+#endif
+
+/* LZO may expand uncompressible data by a small amount */
+#define MAX_COMPRESSED_SIZE(x) ((x) + (x) / 16 + 64 + 3)
+
+
+static mblock_t blocks[2];
+static mblock_t wrkmem;
+
+
+static void free_mem(void)
+{
+ mb_free(&wrkmem);
+ mb_free(&blocks[1]);
+ mb_free(&blocks[0]);
+}
+
+
+static lzo_bool alloc_mem(lzo_uint32 s1, lzo_uint32 s2, lzo_uint32 w)
+{
+ lzo_bool r = 1;
+
+ r &= mb_alloc(&blocks[0], s1, ALIGN_SIZE);
+ r &= mb_alloc(&blocks[1], s2, ALIGN_SIZE);
+ r &= mb_alloc(&wrkmem, w, ALIGN_SIZE);
+ if (!r)
+ free_mem();
+ return r;
+}
+
+
+/*************************************************************************
+// enter / leave
+**************************************************************************/
+
+/* maybe make this an option ? */
+static const lzo_uint block_size = BLOCK_SIZE;
+
+lzo_bool lzo_enter(const header_t *h)
+{
+ int r;
+ lzo_uint32 wrk_len;
+
+#if defined(WITH_THREADS)
+ if (opt_num_threads > 1)
+ return lzo_threaded_enter(h);
+#endif
+
+ if (h != NULL)
+ {
+ r = 1;
+ if ((h->flags & F_ADLER32_C) && !(h->flags & F_ADLER32_D))
+ { r = 0; assert(h->flags & F_ADLER32_D); }
+ if ((h->flags & F_CRC32_C) && !(h->flags & F_CRC32_D))
+ { r = 0; assert(h->flags & F_CRC32_D); }
+ return r;
+ }
+
+#if 0
+ fprintf(stderr,"%lu %lu %u\n", BLOCK_SIZE, MAX_BLOCK_SIZE, ALIGN_SIZE);
+#endif
+ assert(block_size <= BLOCK_SIZE);
+ assert(block_size <= MAX_BLOCK_SIZE);
+ assert(block_size >= 16*1024);
+
+ if (opt_method == M_LZO1X_1)
+ wrk_len = LZO1X_1_MEM_COMPRESS;
+ else if (opt_method == M_LZO1X_1_15)
+ wrk_len = LZO1X_1_15_MEM_COMPRESS;
+ else if (opt_method == M_LZO1X_999)
+ wrk_len = LZO1X_999_MEM_COMPRESS;
+ else
+ wrk_len = 0;
+ assert(wrk_len <= WRK_LEN);
+
+ if (opt_method == M_LZO1X_999)
+ {
+ if (opt_checksum < 1)
+ opt_checksum = 1; /* always compute a checksum */
+ if (opt_cmd == CMD_COMPRESS)
+ opt_optimize = 1;
+ }
+
+ switch (opt_cmd)
+ {
+ case CMD_COMPRESS:
+ r = alloc_mem(block_size, MAX_COMPRESSED_SIZE(block_size), wrk_len);
+ break;
+ case CMD_DECOMPRESS:
+ case CMD_TEST:
+ r = alloc_mem(0, MAX_COMPRESSED_SIZE(block_size), 0);
+ break;
+ case CMD_LIST:
+ case CMD_LS:
+ case CMD_INFO:
+ r = alloc_mem(0, block_size, 0);
+ break;
+ default:
+ r = alloc_mem(0, 0, 0);
+ break;
+ }
+
+ return r;
+}
+
+
+void lzo_leave(const header_t *h)
+{
+#if defined(WITH_THREADS)
+ if (opt_num_threads > 1) {
+ lzo_threaded_leave(h);
+ return;
+ }
+#endif
+ if (h == NULL)
+ free_mem();
+}
+
+
+/*************************************************************************
+// compress a file
+**************************************************************************/
+
+lzo_bool lzo_compress(file_t *fip, file_t *fop, const header_t *h)
+{
+ int r = LZO_E_OK;
+ lzo_bytep const b1 = blocks[0].mb_mem;
+ lzo_bytep const b2 = blocks[1].mb_mem;
+ lzo_uint32 src_len = 0;
+ lzo_uint dst_len = 0;
+ lzo_uint32 c_adler32 = ADLER32_INIT_VALUE, d_adler32 = ADLER32_INIT_VALUE;
+ lzo_uint32 c_crc32 = CRC32_INIT_VALUE, d_crc32 = CRC32_INIT_VALUE;
+ lzo_int l;
+ lzo_bool ok = 1;
+
+#if defined(WITH_THREADS)
+ if (opt_num_threads > 1)
+ return lzo_threaded_compress(fip, fop, h, skip);
+#endif
+
+ for (;;)
+ {
+ /* read a block */
+ l = read_buf(fip, b1, block_size);
+ src_len = (l > 0 ? l : 0);
+
+ /* write uncompressed block size */
+ write32(fop,src_len);
+
+ /* exit if last block */
+ if (src_len == 0)
+ break;
+
+ /* compute checksum of uncompressed block */
+ if (h->flags & F_ADLER32_D)
+ d_adler32 = lzo_adler32(ADLER32_INIT_VALUE,b1,src_len);
+ if (h->flags & F_CRC32_D)
+ d_crc32 = lzo_crc32(CRC32_INIT_VALUE,b1,src_len);
+
+ x_filter(b1,src_len,h);
+
+ /* compress */
+ if (h->method == M_LZO1X_1)
+ r = lzo1x_1_compress(b1, src_len, b2, &dst_len, wrkmem.mb_mem);
+#if defined(USE_LZO1X_1_15)
+ else if (h->method == M_LZO1X_1_15)
+ r = lzo1x_1_15_compress(b1, src_len,
+ b2, &dst_len, wrkmem.mb_mem);
+#endif
+#if defined(USE_LZO1X_999)
+ else if (h->method == M_LZO1X_999)
+ r = lzo1x_999_compress_level(b1, src_len,
+ b2, &dst_len, wrkmem.mb_mem,
+ NULL, 0, 0, h->level);
+#endif
+ else
+ fatal(fip,"Internal error");
+
+#if 0
+ fprintf(stderr, "%ld %ld %ld\n", (long)src_len, (long)dst_len, (long)block2.size);
+#endif
+ assert(dst_len <= blocks[1].mb_size);
+ if (r != LZO_E_OK)
+ fatal(fip,"Internal error - compression failed");
+
+ /* optimize */
+ if (opt_optimize && dst_len < src_len)
+ {
+ lzo_uint new_len = src_len;
+ r = lzo1x_optimize(b2, dst_len, b1, &new_len, NULL);
+ if (r != LZO_E_OK || new_len != src_len)
+ fatal(fip,"Internal error - optimization failed");
+ }
+
+ /* write compressed block size */
+ if (dst_len < src_len)
+ write32(fop,dst_len);
+ else
+ write32(fop,src_len);
+
+ /* write checksum of uncompressed block */
+ if (h->flags & F_ADLER32_D)
+ write32(fop,d_adler32);
+ if (h->flags & F_CRC32_D)
+ write32(fop,d_crc32);
+
+ /* write checksum of compressed block */
+ if (dst_len < src_len && (h->flags & F_ADLER32_C))
+ {
+ c_adler32 = lzo_adler32(ADLER32_INIT_VALUE,b2,dst_len);
+ write32(fop,c_adler32);
+ }
+ if (dst_len < src_len && (h->flags & F_CRC32_C))
+ {
+ c_crc32 = lzo_crc32(CRC32_INIT_VALUE,b2,dst_len);
+ write32(fop,c_crc32);
+ }
+
+ /* write compressed block data */
+ if (dst_len < src_len)
+ write_buf(fop,b2,dst_len);
+ else
+ write_buf(fop,b1,src_len);
+ }
+
+ return ok;
+}
+
+
+/*************************************************************************
+// decompress a file
+**************************************************************************/
+
+lzo_bool lzo_decompress(file_t *fip, file_t *fop,
+ const header_t *h, lzo_bool skip)
+{
+ int r;
+ lzo_uint32 src_len, dst_len;
+ lzo_uint32 c_adler32 = ADLER32_INIT_VALUE, d_adler32 = ADLER32_INIT_VALUE;
+ lzo_uint32 c_crc32 = CRC32_INIT_VALUE, d_crc32 = CRC32_INIT_VALUE;
+ lzo_bool ok = 1;
+ lzo_bool use_seek;
+ mblock_t * const block = &blocks[1];
+ lzo_bytep b1;
+ lzo_bytep const b2 = block->mb_mem;
+
+#if defined(WITH_THREADS)
+ if (opt_num_threads > 1)
+ return lzo_threaded_decompress(fip, fop, h, skip);
+#endif
+
+ use_seek = skip || opt_cmd == CMD_LIST || opt_cmd == CMD_LS ||
+ opt_cmd == CMD_INFO;
+
+ for (;;)
+ {
+ lzo_bytep dst;
+
+ /* read uncompressed block size */
+ read32(fip,&dst_len);
+
+ /* exit if last block */
+ if (dst_len == 0)
+ break;
+
+ /* error if split file */
+ if (dst_len == 0xffffffffUL)
+ {
+ /* should not happen - not yet implemented */
+ error(fip,"this file is a split " PACKAGE " file");
+ ok = 0; break;
+ }
+
+ if (dst_len > MAX_BLOCK_SIZE)
+ {
+ error(fip, PACKAGE " file corrupted");
+ ok = 0; break;
+ }
+
+ /* read compressed block size */
+ read32(fip,&src_len);
+ if (src_len <= 0 || src_len > dst_len)
+ {
+ error(fip, PACKAGE " file corrupted");
+ ok = 0; break;
+ }
+
+ if (dst_len > BLOCK_SIZE)
+ {
+ fatal(fip,"block size too small -- recompile " PACKAGE);
+ ok = 0; break;
+ }
+ if (dst_len > block_size)
+ {
+ /* should not happen - not yet implemented */
+ fatal(fip,"block size too small -- use option '--blocksize'");
+ ok = 0; break;
+ }
+ assert(block->mb_size >= src_len);
+
+ /* read checksum of uncompressed block */
+ if (h->flags & F_ADLER32_D)
+ read32(fip,&d_adler32);
+ if (h->flags & F_CRC32_D)
+ read32(fip,&d_crc32);
+
+ /* read checksum of compressed block */
+ if (h->flags & F_ADLER32_C)
+ {
+ if (src_len < dst_len)
+ read32(fip,&c_adler32);
+ else
+ {
+ assert(h->flags & F_ADLER32_D);
+ c_adler32 = d_adler32;
+ }
+ }
+ if (h->flags & F_CRC32_C)
+ {
+ if (src_len < dst_len)
+ read32(fip,&c_crc32);
+ else
+ {
+ assert(h->flags & F_CRC32_D);
+ c_crc32 = d_crc32;
+ }
+ }
+
+ /* read the block */
+ b1 = block->mb_mem + block->mb_size - src_len;
+ if (use_seek && fip->fd != STDIN_FILENO)
+ {
+ if (lseek(fip->fd, src_len, SEEK_CUR) == -1)
+ read_error(fip);
+ }
+ else
+ {
+ if (read_buf(fip, b1, src_len) != (lzo_int) src_len)
+ read_error(fip);
+ }
+
+ fip->bytes_processed += src_len;
+ if (use_seek)
+ {
+ fop->bytes_processed += dst_len;
+ continue;
+ }
+ assert(block->mb_size >= MAX_COMPRESSED_SIZE(dst_len));
+
+ /* verify checksum of compressed block */
+ if (opt_checksum && (h->flags & F_ADLER32_C))
+ {
+ lzo_uint32 c;
+ c = lzo_adler32(ADLER32_INIT_VALUE,b1,src_len);
+ if (c != c_adler32)
+ {
+ error(fip,"Checksum error (" PACKAGE " file corrupted)");
+ ok = 0; break;
+ }
+ }
+ if (opt_checksum && (h->flags & F_CRC32_C))
+ {
+ lzo_uint32 c;
+ c = lzo_crc32(CRC32_INIT_VALUE,b1,src_len);
+ if (c != c_crc32)
+ {
+ error(fip,"Checksum error (" PACKAGE " file corrupted)");
+ ok = 0; break;
+ }
+ }
+
+ if (src_len < dst_len)
+ {
+ lzo_uint d = dst_len;
+
+ /* decompress */
+ if (opt_decompress_safe)
+ r = lzo1x_decompress_safe(b1,src_len,b2,&d,NULL);
+ else
+ r = lzo1x_decompress(b1,src_len,b2,&d,NULL);
+
+ if (r != LZO_E_OK || dst_len != d)
+ {
+ error(fip,"Compressed data violation");
+#if 0
+ fprintf(stderr,"%d %ld %ld\n", r, (long)dst_len, (long)d);
+#endif
+ ok = 0; break;
+ }
+ dst = b2;
+ }
+ else
+ {
+ assert(dst_len == src_len);
+ dst = b1;
+ }
+
+ x_filter(dst,dst_len,h);
+
+ /* verify checksum of uncompressed block */
+ if (opt_checksum && (h->flags & F_ADLER32_D))
+ {
+ lzo_uint32 c;
+ c = lzo_adler32(ADLER32_INIT_VALUE,dst,dst_len);
+ if (c != d_adler32)
+ {
+ error(fip,"Checksum error");
+ ok = 0; break;
+ }
+ }
+ if (opt_checksum && (h->flags & F_CRC32_D))
+ {
+ lzo_uint32 c;
+ c = lzo_crc32(CRC32_INIT_VALUE,dst,dst_len);
+ if (c != d_crc32)
+ {
+ error(fip,"Checksum error");
+ ok = 0; break;
+ }
+ }
+
+ /* write uncompressed block data */
+ write_buf(fop,dst,dst_len);
+ fop->bytes_processed += dst_len;
+ }
+
+ return ok;
+}
+
+
+#endif /* WITH_LZO */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/s_curses.c b/src/s_curses.c
new file mode 100644
index 0000000..0809b8a
--- /dev/null
+++ b/src/s_curses.c
@@ -0,0 +1,412 @@
+/* s_curses.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_SCREEN) && defined(USE_SCREEN_CURSES)
+
+#include "screen.h"
+
+#define this local_this
+
+#define mask_fg 0x0f
+#define mask_bg 0xf0
+
+
+/*************************************************************************
+// direct screen access
+**************************************************************************/
+
+#include <termios.h>
+#include <ncurses.h>
+#undef refresh
+#undef clear
+
+
+struct screen_data_t
+{
+ WINDOW *w;
+ int mode;
+ int page;
+ int cols;
+ int rows;
+ int cursor_x;
+ int cursor_y;
+ unsigned char attr;
+ unsigned char init_attr;
+ chtype empty_cell;
+};
+
+
+
+static void s_refresh(screen_t *this)
+{
+ wrefresh(this->data->w);
+}
+
+
+static __inline__
+chtype make_cell(screen_t *this, int ch, int attr)
+{
+ int fg = attr & mask_fg;
+ chtype c = ch & 0xff;
+ if (fg < 8)
+ c |= COLOR_PAIR((fg + 0));
+ else
+ c |= COLOR_PAIR(((fg & 7) + 0)) | A_BOLD;
+ return c;
+}
+
+
+static int getMode(const screen_t *this)
+{
+ return this->data->mode;
+}
+
+
+static int getPage(const screen_t *this)
+{
+ return this->data->page;
+}
+
+
+static int getRows(const screen_t *this)
+{
+ return this->data->rows;
+}
+
+
+static int getCols(const screen_t *this)
+{
+ return this->data->cols;
+}
+
+
+static int getFg(const screen_t *this)
+{
+ return this->data->attr & mask_fg;
+}
+
+
+static int getBg(const screen_t *this)
+{
+ return this->data->attr & mask_bg;
+}
+
+
+static void setFg(screen_t *this, int fg)
+{
+ this->data->attr = (this->data->attr & mask_bg) | (fg & mask_fg);
+}
+
+
+static void setBg(screen_t *this, int bg)
+{
+ this->data->attr = (this->data->attr & mask_fg) | (bg & mask_bg);
+}
+
+
+/* private */
+static __inline__ int gotoxy(screen_t *this, int x, int y)
+{
+ if (wmove(this->data->w, this->data->w->_begy+y,
+ this->data->w->_begx+x) != ERR)
+ return 0;
+ return -1;
+}
+
+
+static void setCursor(screen_t *this, int x, int y)
+{
+ if (gotoxy(this,x,y) == 0)
+ {
+ this->data->cursor_x = x;
+ this->data->cursor_y = y;
+ }
+}
+
+
+static void getCursor(const screen_t *this, int *x, int *y)
+{
+ if (x)
+ *x = this->data->cursor_x;
+ if (y)
+ *y = this->data->cursor_y;
+}
+
+
+static void putCharAttr(screen_t *this, int ch, int attr, int x, int y)
+{
+ if (gotoxy(this,x,y) == 0)
+ waddch(this->data->w,make_cell(this,ch,attr));
+}
+
+
+static void putChar(screen_t *this, int ch, int x, int y)
+{
+ putCharAttr(this,ch,this->data->attr,x,y);
+}
+
+
+static void putStringAttr(screen_t *this, const char *s, int attr, int x, int y)
+{
+ while (*s)
+ putCharAttr(this,*s++,attr,x++,y);
+}
+
+
+static void putString(screen_t *this, const char *s, int x, int y)
+{
+ putStringAttr(this,s,this->data->attr,x,y);
+}
+
+
+static int init(screen_t *this, int fd)
+{
+ int fg, bg;
+
+ if (!this || !this->data)
+ return -1;
+
+ this->data->mode = -1;
+ this->data->page = 0;
+
+ if (fd < 0 || !acc_isatty(fd))
+ return -1;
+
+ this->data->w = initscr();
+ if (!this->data->w)
+ return -1;
+ (void) noecho();
+
+ this->data->cols = this->data->w->_maxx - this->data->w->_begx + 1;
+ this->data->rows = this->data->w->_maxy - this->data->w->_begy + 1;
+ this->data->cursor_x = this->data->w->_curx;
+ this->data->cursor_y = this->data->w->_cury;
+
+ this->data->empty_cell = ' ';
+
+ if (has_colors())
+ start_color();
+ fg = (this->data->w->_attrs);
+ bg = (this->data->w->_bkgd);
+ fg = PAIR_NUMBER(this->data->w->_attrs);
+ bg = PAIR_NUMBER(this->data->w->_bkgd);
+ if (has_colors() && COLORS >= 8 && COLOR_PAIRS >= 8)
+ this->data->mode = 3;
+ else
+ this->data->mode = 7;
+
+ if (this->data->mode == 3)
+ {
+ int i = 0;
+ init_pair(i++, COLOR_BLACK, bg);
+ init_pair(i++, COLOR_BLUE, bg);
+ init_pair(i++, COLOR_GREEN, bg);
+ init_pair(i++, COLOR_CYAN, bg);
+ init_pair(i++, COLOR_RED, bg);
+ init_pair(i++, COLOR_MAGENTA, bg);
+ init_pair(i++, COLOR_YELLOW, bg);
+ init_pair(i++, COLOR_WHITE, bg);
+ }
+
+ this->data->attr = (bg << 4) | fg;
+ this->data->attr = 0x07;
+
+ return 0;
+}
+
+
+static void finalize(screen_t *this)
+{
+#if 0
+ if (this->data->w)
+ (void) endwin();
+#endif
+ UNUSED(this);
+}
+
+
+static void updateLineN(screen_t *this, const void *line, int y, int len)
+{
+ if (len > 0 && len <= 2*this->data->cols)
+ {
+ int x;
+ const unsigned char *l = line;
+
+ for (x = 0; x < len / 2; x++, l += 2)
+ {
+#if 1
+ if ((l[1] & mask_bg) != BG_BLACK)
+ putCharAttr(this,'#',l[1] >> 4,x,y);
+ else
+ putCharAttr(this,l[0],l[1],x,y);
+#else
+ putCharAttr(this,l[0],l[1],x,y);
+#endif
+ }
+ }
+}
+
+
+static void clearLine(screen_t *this, int y)
+{
+ int x;
+
+ for (x = 0; x < this->data->cols; x++)
+ if (gotoxy(this,x,y) == 0)
+ waddch(this->data->w,this->data->empty_cell);
+}
+
+
+static void s_clear(screen_t *this)
+{
+ int y;
+
+ for (y = 0; y < this->data->rows; y++)
+ clearLine(this,y);
+}
+
+
+static int scrollUp(screen_t *this, int lines)
+{
+ if (lines <= 0)
+ return 0;
+ if (lines >= this->data->rows)
+ s_clear(this);
+ else
+ wscrl(this->data->w,lines);
+ return lines;
+}
+
+
+static int getCursorShape(const screen_t *this)
+{
+ UNUSED(this);
+ return 0;
+}
+
+
+static void setCursorShape(screen_t *this, int shape)
+{
+ UNUSED(this);
+ UNUSED(shape);
+}
+
+
+static int kbhit(screen_t *this)
+{
+ const int fd = STDIN_FILENO;
+ const unsigned long usec = 0;
+ struct timeval tv;
+ fd_set fds;
+
+ UNUSED(this);
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
+ tv.tv_sec = usec / 1000000;
+ tv.tv_usec = usec % 1000000;
+ return (select(fd + 1, &fds, NULL, NULL, &tv) > 0);
+}
+
+
+static int intro(screen_t *this, void (*show_frames)(screen_t *) )
+{
+ int shape;
+ struct termios term_old, term_new;
+ int term_r;
+
+ term_r = tcgetattr(STDIN_FILENO, &term_old);
+ if (term_r == 0)
+ {
+ term_new = term_old;
+ term_new.c_lflag &= ~(ISIG | ICANON | ECHO);
+ tcsetattr(STDIN_FILENO, TCSANOW, &term_new);
+ }
+
+ shape = getCursorShape(this);
+ setCursorShape(this,0x2000);
+ show_frames(this);
+ if (this->data->rows > 24)
+ setCursor(this,this->data->cursor_x,this->data->cursor_y+1);
+ setCursorShape(this,shape);
+ s_refresh(this);
+
+ if (term_r == 0)
+ tcsetattr(STDIN_FILENO, TCSANOW, &term_old);
+
+ return 1;
+}
+
+
+static const screen_t driver =
+{
+ sobject_destroy,
+ finalize,
+ init,
+ s_refresh,
+ getMode,
+ getPage,
+ getRows,
+ getCols,
+ getFg,
+ getBg,
+ getCursor,
+ getCursorShape,
+ setFg,
+ setBg,
+ setCursor,
+ setCursorShape,
+ putChar,
+ putCharAttr,
+ putString,
+ putStringAttr,
+ s_clear,
+ clearLine,
+ updateLineN,
+ scrollUp,
+ kbhit,
+ intro,
+ (struct screen_data_t *) 0
+};
+
+
+/* public constructor */
+screen_t *screen_curses_construct(void)
+{
+ return sobject_construct(&driver,sizeof(*driver.data));
+}
+
+
+#endif /* defined(USE_SCREEN) && defined(USE_SCREEN_CURSES) */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/s_djgpp2.c b/src/s_djgpp2.c
new file mode 100644
index 0000000..328d7d7
--- /dev/null
+++ b/src/s_djgpp2.c
@@ -0,0 +1,378 @@
+/* s_djgpp2.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_SCREEN) && defined(__DJGPP__)
+
+#include "screen.h"
+
+#define this local_this
+
+#define mask_fg 0x0f
+#define mask_bg 0xf0
+
+
+/*************************************************************************
+// direct screen access
+**************************************************************************/
+
+#include <dos.h>
+#if 0
+#include <conio.h>
+#endif
+#include <dpmi.h>
+#include <go32.h>
+#include <sys/exceptn.h>
+#include <sys/farptr.h>
+#include <sys/movedata.h>
+#define dossel _go32_info_block.selector_for_linear_memory
+#define co80 _go32_info_block.linear_address_of_primary_screen
+#undef kbhit
+
+
+struct screen_data_t
+{
+ int cols;
+ int rows;
+ int cursor_x;
+ int cursor_y;
+ unsigned char attr;
+ unsigned char init_attr;
+ unsigned char empty_attr;
+ unsigned short empty_cell;
+};
+
+
+
+static void refresh(screen_t *this)
+{
+ UNUSED(this);
+}
+
+
+static __inline__
+unsigned short make_cell(screen_t *this, int ch, int attr)
+{
+ UNUSED(this);
+ return ((attr & 0xff) << 8) | (ch & 0xff);
+}
+
+
+static int getMode(const screen_t *this)
+{
+ UNUSED(this);
+ return ScreenMode();
+}
+
+
+static int getPage(const screen_t *this)
+{
+ UNUSED(this);
+ return _farpeekb(dossel, 0x462);
+}
+
+
+static int getRows(const screen_t *this)
+{
+ return this->data->rows;
+}
+
+
+static int getCols(const screen_t *this)
+{
+ return this->data->cols;
+}
+
+
+static int getFg(const screen_t *this)
+{
+ return this->data->attr & mask_fg;
+}
+
+
+static int getBg(const screen_t *this)
+{
+ return this->data->attr & mask_bg;
+}
+
+
+static void setFg(screen_t *this, int fg)
+{
+ this->data->attr = (this->data->attr & mask_bg) | (fg & mask_fg);
+}
+
+
+static void setBg(screen_t *this, int bg)
+{
+ this->data->attr = (this->data->attr & mask_fg) | (bg & mask_bg);
+}
+
+
+static void setCursor(screen_t *this, int x, int y)
+{
+ if (x >= 0 && y >= 0 && x < this->data->cols && y < this->data->rows)
+ {
+ ScreenSetCursor(y,x);
+ this->data->cursor_x = x;
+ this->data->cursor_y = y;
+ }
+}
+
+
+static void getCursor(const screen_t *this, int *x, int *y)
+{
+ if (x)
+ *x = this->data->cursor_x;
+ if (y)
+ *y = this->data->cursor_y;
+}
+
+
+static void putCharAttr(screen_t *this, int ch, int attr, int x, int y)
+{
+ UNUSED(this);
+ ScreenPutChar(ch,attr,x,y);
+}
+
+
+static void putChar(screen_t *this, int ch, int x, int y)
+{
+ ScreenPutChar(ch,this->data->attr,x,y);
+}
+
+
+static void putStringAttr(screen_t *this, const char *s, int attr, int x, int y)
+{
+ UNUSED(this);
+ ScreenPutString(s,attr,x,y);
+}
+
+
+static void putString(screen_t *this, const char *s, int x, int y)
+{
+ ScreenPutString(s,this->data->attr,x,y);
+}
+
+
+/* private */
+static void getChar(screen_t *this, int *ch, int *attr, int x, int y)
+{
+ UNUSED(this);
+ ScreenGetChar(ch,attr,x,y);
+}
+
+
+static int init(screen_t *this, int fd)
+{
+ int mode;
+ int attr;
+
+#if 0
+ /* force linkage of conio.o */
+ (void) _conio_kbhit();
+#endif
+
+ if (!this || !this->data)
+ return -1;
+ if (fd < 0 || !acc_isatty(fd))
+ return -1;
+
+ mode = getMode(this);
+ if (mode != 2 && mode != 3 && mode != 7)
+ return -1;
+ if (getPage(this) != 0)
+ return -1;
+ this->data->rows = ScreenRows();
+ this->data->cols = ScreenCols();
+ ScreenGetCursor(&this->data->cursor_y,&this->data->cursor_x);
+ getChar(this,NULL,&attr,this->data->cursor_x,this->data->cursor_y);
+ this->data->init_attr = attr;
+ if (mode == 2 || mode == 3)
+ {
+ /* Does it normally blink when bg has its 3rd bit set? */
+ int b_mask = (_farpeekb(dossel, 0x465) & 0x20) ? 0x70 : 0xf0;
+ attr = attr & (0x0f | b_mask);
+ }
+ this->data->attr = attr;
+ this->data->empty_attr = attr;
+ this->data->empty_cell = make_cell(this,' ',attr);
+
+ return 0;
+}
+
+
+static void updateLineN(screen_t *this, const void *line, int y, int len)
+{
+ if (y >= 0 && y < this->data->rows && len > 0 && len <= 2*this->data->cols)
+ movedata(_my_ds(),(unsigned)line,dossel,co80+y*this->data->cols*2,len);
+}
+
+
+static void clearLine(screen_t *this, int y)
+{
+ if (y >= 0 && y < this->data->rows)
+ {
+ unsigned sp = co80 + y * this->data->cols * 2;
+ unsigned short a = this->data->empty_cell;
+ int i = this->data->cols;
+
+ _farsetsel(dossel);
+ do {
+ _farnspokew(sp, a);
+ sp += 2;
+ } while (--i);
+ }
+}
+
+
+static void clear(screen_t *this)
+{
+ unsigned char attr = ScreenAttrib;
+ ScreenAttrib = this->data->empty_attr;
+ ScreenClear();
+ ScreenAttrib = attr;
+}
+
+
+static int scrollUp(screen_t *this, int lines)
+{
+ int sr = this->data->rows;
+ int sc = this->data->cols;
+ int y;
+
+ if (lines <= 0)
+ return 0;
+ if (lines >= sr)
+ clear(this);
+ else
+ {
+ movedata(dossel,co80+lines*sc*2,dossel,co80,(sr-lines)*sc*2);
+ for (y = sr - lines; y < sr; y++)
+ clearLine(this,y);
+ }
+ return lines;
+}
+
+
+static int getCursorShape(const screen_t *this)
+{
+ UNUSED(this);
+ return _farpeekw(dossel, 0x460);
+}
+
+
+static void setCursorShape(screen_t *this, int shape)
+{
+ __dpmi_regs r;
+
+ r.h.ah = 0x01;
+ r.h.al = getMode(this);
+ r.x.cx = shape & 0x7f1f;
+ __dpmi_int(0x10, &r);
+}
+
+
+static int s_kbhit(screen_t *this)
+{
+ UNUSED(this);
+ return kbhit();
+}
+
+
+static int intro(screen_t *this, void (*show_frames)(screen_t *) )
+{
+ int shape;
+ unsigned short old_flags = __djgpp_hwint_flags;
+
+ if ((this->data->init_attr & mask_bg) != BG_BLACK)
+ return 0;
+
+ __djgpp_hwint_flags |= 3;
+ while (kbhit())
+ (void) getkey();
+
+ shape = getCursorShape(this);
+ setCursorShape(this,0x2000);
+ show_frames(this);
+ setCursorShape(this,shape);
+
+ while (kbhit())
+ (void) getkey();
+ __djgpp_hwint_flags = old_flags;
+
+ return 1;
+}
+
+
+static const screen_t driver =
+{
+ sobject_destroy,
+ 0, /* finalize, */
+ init,
+ refresh,
+ getMode,
+ getPage,
+ getRows,
+ getCols,
+ getFg,
+ getBg,
+ getCursor,
+ getCursorShape,
+ setFg,
+ setBg,
+ setCursor,
+ setCursorShape,
+ putChar,
+ putCharAttr,
+ putString,
+ putStringAttr,
+ clear,
+ clearLine,
+ updateLineN,
+ scrollUp,
+ s_kbhit,
+ intro,
+ (struct screen_data_t *) 0
+};
+
+
+/* public constructor */
+screen_t *screen_djgpp2_construct(void)
+{
+ return sobject_construct(&driver,sizeof(*driver.data));
+}
+
+
+#endif /* defined(USE_SCREEN) && defined(__DJGPP__) */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/s_object.c b/src/s_object.c
new file mode 100644
index 0000000..4970cf0
--- /dev/null
+++ b/src/s_object.c
@@ -0,0 +1,87 @@
+/* s_object.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_SCREEN)
+
+#define this local_this
+
+#include "screen.h"
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+void sobject_destroy(screen_t *this)
+{
+ if (!this)
+ return;
+ if (this->data)
+ {
+ if (this->finalize)
+ this->finalize(this);
+ free(this->data);
+ this->data = NULL;
+ }
+ free(this);
+}
+
+
+screen_t *sobject_construct(const screen_t *c, size_t data_size)
+{
+ screen_t *this;
+
+ /* allocate object */
+ this = (screen_t *) malloc(sizeof(*this));
+ if (!this)
+ return NULL;
+
+ /* copy function table */
+ *this = *c;
+
+ /* initialize instance variables */
+ this->data = (struct screen_data_t *) malloc(data_size);
+ if (!this->data)
+ {
+ free(this);
+ return NULL;
+ }
+ memset(this->data,0,data_size);
+
+ return this;
+}
+
+#endif /* defined(USE_SCREEN) */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/s_vcsa.c b/src/s_vcsa.c
new file mode 100644
index 0000000..b04dfe1
--- /dev/null
+++ b/src/s_vcsa.c
@@ -0,0 +1,488 @@
+/* s_vcsa.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+#if defined(USE_SCREEN) && defined(USE_SCREEN_VCSA)
+
+#include "screen.h"
+
+#define this local_this
+
+#define mask_fg 0x0f
+#define mask_bg 0xf0
+
+
+/*************************************************************************
+// direct screen access ( /dev/vcsaNN )
+**************************************************************************/
+
+#include <sys/ioctl.h>
+#include <termios.h>
+#if defined(__linux__)
+# include <linux/kd.h>
+# include <linux/kdev_t.h>
+# include <linux/major.h>
+#endif
+
+
+struct screen_data_t
+{
+ int fd;
+ int mode;
+ int page;
+ int cols;
+ int rows;
+ int cursor_x;
+ int cursor_y;
+ unsigned char attr;
+ unsigned char init_attr;
+ unsigned char map[256];
+ unsigned short empty_line[256];
+};
+
+
+
+static void refresh(screen_t *this)
+{
+ UNUSED(this);
+}
+
+
+static __inline__
+unsigned short make_cell(screen_t *this, int ch, int attr)
+{
+ return ((attr & 0xff) << 8) | (this->data->map[ch & 0xff] & 0xff);
+}
+
+
+static int getMode(const screen_t *this)
+{
+ return this->data->mode;
+}
+
+
+static int getPage(const screen_t *this)
+{
+ return this->data->page;
+}
+
+
+static int getRows(const screen_t *this)
+{
+ return this->data->rows;
+}
+
+
+static int getCols(const screen_t *this)
+{
+ return this->data->cols;
+}
+
+
+static int getFg(const screen_t *this)
+{
+ return this->data->attr & mask_fg;
+}
+
+
+static int getBg(const screen_t *this)
+{
+ return this->data->attr & mask_bg;
+}
+
+
+static void setFg(screen_t *this, int fg)
+{
+ this->data->attr = (this->data->attr & mask_bg) | (fg & mask_fg);
+}
+
+
+static void setBg(screen_t *this, int bg)
+{
+ this->data->attr = (this->data->attr & mask_fg) | (bg & mask_bg);
+}
+
+
+/* private */
+static int gotoxy(screen_t *this, int x, int y)
+{
+ if (x >= 0 && y >= 0 && x < this->data->cols && y < this->data->rows)
+ {
+ if (lseek(this->data->fd, 4 + (x + y * this->data->cols) * 2, SEEK_SET) != -1)
+ {
+ return 0;
+ }
+ }
+ return -1;
+}
+
+
+static void setCursor(screen_t *this, int x, int y)
+{
+ if (gotoxy(this,x,y) == 0)
+ {
+ unsigned char b[2] = { x, y };
+ if (lseek(this->data->fd, 2, SEEK_SET) != -1)
+ write(this->data->fd, b, 2);
+ this->data->cursor_x = x;
+ this->data->cursor_y = y;
+ }
+}
+
+
+static void getCursor(const screen_t *this, int *x, int *y)
+{
+ if (x)
+ *x = this->data->cursor_x;
+ if (y)
+ *y = this->data->cursor_y;
+}
+
+
+static void putCharAttr(screen_t *this, int ch, int attr, int x, int y)
+{
+ unsigned short a = make_cell(this,ch,attr);
+
+ if (gotoxy(this,x,y) == 0)
+ write(this->data->fd, &a, 2);
+}
+
+
+static void putChar(screen_t *this, int ch, int x, int y)
+{
+ putCharAttr(this,ch,this->data->attr,x,y);
+}
+
+
+static void putStringAttr(screen_t *this, const char *s, int attr, int x, int y)
+{
+ while (*s)
+ putCharAttr(this,*s++,attr,x++,y);
+}
+
+
+static void putString(screen_t *this, const char *s, int x, int y)
+{
+ putStringAttr(this,s,this->data->attr,x,y);
+}
+
+
+/* private */
+static void getChar(screen_t *this, int *ch, int *attr, int x, int y)
+{
+ unsigned short a;
+
+ if (gotoxy(this,x,y) == 0 && read(this->data->fd, &a, 2) == 2)
+ {
+ if (ch)
+ *ch = a & 0xff;
+ if (attr)
+ *attr = (a >> 8) & 0xff;
+ }
+}
+
+
+/* private */
+static int init_scrnmap(screen_t *this, int fd)
+{
+ int scrnmap_done = 0;
+ int i;
+
+#if 1 && defined(GIO_UNISCRNMAP) && defined(E_TABSZ)
+ if (!scrnmap_done)
+ {
+ unsigned short scrnmap[E_TABSZ];
+ if (ioctl(fd, GIO_UNISCRNMAP, scrnmap) == 0)
+ {
+ for (i = 0; i < E_TABSZ; i++)
+ this->data->map[scrnmap[i] & 0xff] = i;
+ scrnmap_done = 1;
+ }
+ }
+#endif
+#if 1 && defined(GIO_SCRNMAP) && defined(E_TABSZ)
+ if (!scrnmap_done)
+ {
+ unsigned char scrnmap[E_TABSZ];
+ if (ioctl(fd, GIO_SCRNMAP, scrnmap) == 0)
+ {
+ for (i = 0; i < E_TABSZ; i++)
+ this->data->map[scrnmap[i] & 0xff] = i;
+ scrnmap_done = 1;
+ }
+ }
+#endif
+
+ return scrnmap_done;
+}
+
+
+static int init(screen_t *this, int fd)
+{
+ struct stat st;
+
+ if (!this || !this->data)
+ return -1;
+
+ this->data->fd = -1;
+ this->data->mode = -1;
+ this->data->page = 0;
+
+ if (fd < 0 || !acc_isatty(fd))
+ return -1;
+ if (fstat(fd,&st) != 0)
+ return -1;
+
+ /* check if we are running in a virtual console */
+#if defined(MINOR) && defined(MAJOR) && defined(TTY_MAJOR)
+ if (MAJOR(st.st_rdev) == TTY_MAJOR)
+ {
+ char vc_name[64];
+ unsigned char vc_data[4];
+ int i;
+ int attr;
+ unsigned short a;
+
+ snprintf(vc_name, sizeof(vc_name), "/dev/vcsa%d", (int) MINOR(st.st_rdev));
+ this->data->fd = open(vc_name, O_RDWR);
+ if (this->data->fd != -1)
+ {
+ if (read(this->data->fd, vc_data, 4) == 4)
+ {
+ this->data->mode = 3;
+ this->data->rows = vc_data[0];
+ this->data->cols = vc_data[1];
+ this->data->cursor_x = vc_data[2];
+ this->data->cursor_y = vc_data[3];
+
+ for (i = 0; i < 256; i++)
+ this->data->map[i] = i;
+ i = init_scrnmap(this,this->data->fd) ||
+ init_scrnmap(this,STDIN_FILENO);
+
+ getChar(this,NULL,&attr,this->data->cursor_x,this->data->cursor_y);
+ this->data->init_attr = attr;
+ this->data->attr = attr;
+ a = make_cell(this,' ',attr);
+ for (i = 0; i < 256; i++)
+ this->data->empty_line[i] = a;
+ }
+ else
+ {
+ close(this->data->fd);
+ this->data->fd = -1;
+ }
+ }
+ }
+#endif
+
+ if (this->data->mode < 0)
+ return -1;
+
+ return 0;
+}
+
+
+static void finalize(screen_t *this)
+{
+ if (this->data->fd != -1)
+ (void) close(this->data->fd);
+}
+
+
+static void updateLineN(screen_t *this, const void *line, int y, int len)
+{
+ if (len > 0 && len <= 2*this->data->cols && gotoxy(this,0,y) == 0)
+ {
+ int i;
+ unsigned char new_line[len];
+ unsigned char *l1 = new_line;
+ const unsigned char *l2 = (const unsigned char *) line;
+
+ for (i = 0; i < len; i += 2)
+ {
+ *l1++ = *l2++;
+ *l1++ = this->data->map[*l2++];
+ }
+ write(this->data->fd, new_line, len);
+ }
+}
+
+
+static void clearLine(screen_t *this, int y)
+{
+ if (gotoxy(this,0,y) == 0)
+ write(this->data->fd, this->data->empty_line, 2*this->data->cols);
+}
+
+
+static void clear(screen_t *this)
+{
+ int y;
+
+ for (y = 0; y < this->data->rows; y++)
+ clearLine(this,y);
+}
+
+
+static int scrollUp(screen_t *this, int lines)
+{
+ int sr = this->data->rows;
+ int sc = this->data->cols;
+ int y;
+
+ if (lines <= 0)
+ return 0;
+ if (lines >= sr)
+ clear(this);
+ else
+ {
+ unsigned short buf[ (sr-lines)*sc ];
+
+ gotoxy(this,0,lines);
+ read(this->data->fd, buf, sizeof(buf));
+ gotoxy(this,0,0);
+ write(this->data->fd, buf, sizeof(buf));
+
+ for (y = sr - lines; y < sr; y++)
+ clearLine(this,y);
+ }
+ return lines;
+}
+
+
+static int getCursorShape(const screen_t *this)
+{
+ UNUSED(this);
+ return 0;
+}
+
+
+static void setCursorShape(screen_t *this, int shape)
+{
+ UNUSED(this);
+ UNUSED(shape);
+}
+
+
+static int kbhit(screen_t *this)
+{
+ const int fd = STDIN_FILENO;
+ const unsigned long usec = 0;
+ struct timeval tv;
+ fd_set fds;
+
+ UNUSED(this);
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
+ tv.tv_sec = usec / 1000000;
+ tv.tv_usec = usec % 1000000;
+ return (select(fd + 1, &fds, NULL, NULL, &tv) > 0);
+}
+
+
+static int intro(screen_t *this, void (*show_frames)(screen_t *) )
+{
+ int shape;
+ struct termios term_old, term_new;
+ int term_r;
+
+ if ((this->data->init_attr & mask_bg) != BG_BLACK)
+ return 0;
+
+ term_r = tcgetattr(STDIN_FILENO, &term_old);
+ if (term_r == 0)
+ {
+ term_new = term_old;
+ term_new.c_lflag &= ~(ISIG | ICANON | ECHO);
+ tcsetattr(STDIN_FILENO, TCSANOW, &term_new);
+ }
+
+ shape = getCursorShape(this);
+ setCursorShape(this,0x2000);
+ show_frames(this);
+ if (this->data->rows > 24)
+ setCursor(this,this->data->cursor_x,this->data->cursor_y+1);
+ setCursorShape(this,shape);
+
+ while (kbhit(this))
+ (void) getchar();
+ if (term_r == 0)
+ tcsetattr(STDIN_FILENO, TCSANOW, &term_old);
+
+ return 1;
+}
+
+
+static const screen_t driver =
+{
+ sobject_destroy,
+ finalize,
+ init,
+ refresh,
+ getMode,
+ getPage,
+ getRows,
+ getCols,
+ getFg,
+ getBg,
+ getCursor,
+ getCursorShape,
+ setFg,
+ setBg,
+ setCursor,
+ setCursorShape,
+ putChar,
+ putCharAttr,
+ putString,
+ putStringAttr,
+ clear,
+ clearLine,
+ updateLineN,
+ scrollUp,
+ kbhit,
+ intro,
+ (struct screen_data_t *) 0
+};
+
+
+/* public constructor */
+screen_t *screen_vcsa_construct(void)
+{
+ return sobject_construct(&driver,sizeof(*driver.data));
+}
+
+
+#endif /* defined(USE_SCREEN) && defined(USE_SCREEN_VCSA) */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/screen.h b/src/screen.h
new file mode 100644
index 0000000..3813c5a
--- /dev/null
+++ b/src/screen.h
@@ -0,0 +1,106 @@
+/* screen.h --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#ifndef __SCREEN_H
+#define __SCREEN_H 1
+
+#if defined(USE_SCREEN)
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+struct screen_data_t;
+struct screen_t;
+typedef struct screen_t screen_t;
+
+struct screen_t
+{
+/* public: */
+ void (*destroy)(screen_t *s);
+ void (*finalize)(screen_t *s);
+
+ int (*init)(screen_t *s, int fd);
+
+ void (*refresh)(screen_t *s);
+
+ int (*getMode)(const screen_t *s);
+ int (*getPage)(const screen_t *s);
+ int (*getRows)(const screen_t *s);
+ int (*getCols)(const screen_t *s);
+
+ int (*getFg)(const screen_t *s);
+ int (*getBg)(const screen_t *s);
+ void (*getCursor)(const screen_t *s, int *x, int *y);
+ int (*getCursorShape)(const screen_t *s);
+
+ void (*setFg)(screen_t *s, int);
+ void (*setBg)(screen_t *s, int);
+ void (*setCursor)(screen_t *s, int x, int y);
+ void (*setCursorShape)(screen_t *s, int shape);
+
+ void (*putChar)(screen_t *s, int c, int x, int y);
+ void (*putCharAttr)(screen_t *s, int c, int attr, int x, int y);
+ void (*putString)(screen_t *s, const char *, int x, int y);
+ void (*putStringAttr)(screen_t *s, const char *, int attr, int x, int y);
+
+ void (*clear)(screen_t *s);
+ void (*clearLine)(screen_t *s, int);
+ void (*updateLineN)(screen_t *s, const void *, int y, int len);
+
+ int (*scrollUp)(screen_t *s, int);
+
+ int (*kbhit)(screen_t *s);
+
+ int (*intro)(screen_t *s, void (*)(screen_t*) );
+
+/* private: */
+ struct screen_data_t *data;
+};
+
+
+screen_t *sobject_construct(const screen_t *c, size_t data_size);
+void sobject_destroy(screen_t *);
+
+screen_t *screen_curses_construct(void);
+screen_t *screen_djgpp2_construct(void);
+screen_t *screen_vcsa_construct(void);
+
+void screen_show_frames(screen_t *);
+
+
+#endif
+
+#endif /* already included */
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/util.c b/src/util.c
new file mode 100644
index 0000000..db50f56
--- /dev/null
+++ b/src/util.c
@@ -0,0 +1,681 @@
+/* util.c --
+
+ This file is part of the lzop file compressor.
+
+ Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ lzop and the LZO library are free software; you can redistribute them
+ and/or modify them under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 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; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ http://www.oberhumer.com/opensource/lzop/
+ */
+
+
+#include "conf.h"
+
+
+/*************************************************************************
+// filename util
+**************************************************************************/
+
+static const char dir_sep[] = DIR_SEP;
+
+#define fn_is_sep(c) (strchr(dir_sep,c) != NULL)
+
+#if defined(DOSISH)
+#define fn_is_drive(n) (n[0] && n[1] == ':')
+#define fn_skip_drive(n) (fn_is_drive(n) ? (n) + 2 : (n))
+#else
+#define fn_is_drive(n) (0)
+#define fn_skip_drive(n) (n)
+#endif
+
+
+unsigned fn_baseindex(const char *name)
+{
+ const char *n, *nn;
+
+ n = fn_skip_drive(name);
+ for (nn = n; *nn; nn++)
+ if (fn_is_sep(*nn))
+ n = nn + 1;
+ return (unsigned) (n - name);
+}
+
+
+const char *fn_basename(const char *name)
+{
+ return name + fn_baseindex(name);
+}
+
+
+void fn_addslash(char *name, lzo_bool slash)
+{
+ char *p;
+
+ name = fn_skip_drive(name);
+ p = name + strlen(name);
+ while (p > name && fn_is_sep(p[-1]))
+ *p-- = 0;
+ if (p > name)
+ {
+ if (slash)
+ *p++ = dir_sep[0];
+ *p = 0;
+ }
+}
+
+
+char *fn_strlwr(char *n)
+{
+ char *p;
+ for (p = n; *p; p++)
+ *p = (char) fn_tolower(*p);
+ return n;
+}
+
+
+int fn_strcmp(const char *n1, const char *n2)
+{
+ for (;;)
+ {
+ if (*n1 != *n2)
+ {
+ int c = fn_tolower(*n1) - fn_tolower(*n2);
+ if (c)
+ return c;
+ }
+ if (*n1 == 0)
+ return 0;
+ n1++; n2++;
+ }
+}
+
+
+lzo_bool fn_is_same_file(const char *n1, const char *n2)
+{
+ /* very simple... */
+ if (fn_strcmp(n1,n2) == 0)
+ return 1;
+ return 0;
+}
+
+
+int fn_has_suffix(const char *name)
+{
+ size_t l;
+ size_t s;
+
+ name = fn_skip_drive(name);
+ l = strlen(name);
+ if (l > 4 && name[l-4] == '.')
+ {
+ if (strcasecmp(&name[l-3],"lzo") == 0)
+ return SUFF_LZO;
+ if (strcasecmp(&name[l-3],"nrv") == 0)
+ return SUFF_NRV;
+ if (strcasecmp(&name[l-3],"tar") == 0)
+ return SUFF_TAR;
+ if (strcasecmp(&name[l-3],"tnv") == 0)
+ return SUFF_TNV;
+ if (strcasecmp(&name[l-3],"tzo") == 0)
+ return SUFF_TZO;
+ }
+
+ if (l > 5 && name[l-5] == '.')
+ {
+ if (strcasecmp(&name[l-4],"lzop") == 0)
+ return SUFF_LZOP;
+ }
+
+ s = strlen(opt_suffix);
+ if (s > 0 && l > s)
+ {
+ if (strcasecmp(&name[l-s],opt_suffix) == 0)
+ return SUFF_USER;
+ }
+
+ return SUFF_NONE;
+}
+
+
+int fn_cleanpath(const char *name, char *newname, size_t size, int flags)
+{
+ size_t l = 0;
+ size_t n = 0;
+ int slashes = 0;
+#define add(x) if (l >= size) return -1; else newname[l++] = (x)
+
+ name = fn_skip_drive(name);
+ while (*name && fn_is_sep(*name))
+ name++;
+ while (name[n])
+ {
+ size_t last_n;
+ assert(!fn_is_sep(name[n]));
+ last_n = n++;
+ while (name[n] && !fn_is_sep(name[n]))
+ n++;
+ if (n - last_n == 2 && name[n-2] == '.' && name[n-1] == '.')
+ {
+ if (flags & 1)
+ return -2;
+ while (l > 0) {
+ if (newname[--l] == '/')
+ {
+ --slashes;
+ break;
+ }
+ }
+ /* newname[l] = 0; printf("del %s\n", newname); */
+ }
+ else if (n - last_n == 1 && name[n-1] == '.')
+ {
+ if (flags & 2)
+ return -3;
+ }
+ else
+ {
+ if (l > 0)
+ { ++slashes; add('/'); }
+ while (last_n < n)
+ { add(name[last_n++]); }
+ /* newname[l] = 0; printf("add %s\n", newname); */
+ }
+ while (name[n] && fn_is_sep(name[n]))
+ n++;
+ }
+ add('\0');
+ return slashes;
+#undef add
+}
+
+
+/*************************************************************************
+// time util
+**************************************************************************/
+
+time_t fix_time(time_t t)
+{
+ if (t == (time_t) -1)
+ t = 0;
+ return t;
+}
+
+time_t get_mtime(const header_t *h)
+{
+ lzop_ulong_t t;
+ t = h->mtime_high;
+ t <<= 16; t <<= 16;
+ t |= h->mtime_low;
+ return t == (lzop_ulong_t)(time_t)t ? (time_t)t : (time_t)0;
+}
+
+
+#if defined(HAVE_LOCALTIME)
+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",
+#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
+
+
+void time2str(char *s, size_t size, const time_t *t)
+{
+#if defined(HAVE_LOCALTIME)
+ tm2str(s, size, localtime(t));
+#elif defined(HAVE_CTIME)
+ const char *p = ctime(t);
+ assert(size >= 18);
+ memset(s, ' ', 16);
+ memcpy(s + 2, p + 4, 6);
+ memcpy(s + 11, p + 11, 5);
+ s[16] = 0;
+#else
+ s[0] = 0;
+ UNUSED(size);
+#endif
+}
+
+
+void time2ls(char *s, size_t size, const time_t *t)
+{
+#if defined(HAVE_LOCALTIME) && defined(HAVE_STRFTIME)
+ const char *fmt = "%b %e %Y";
+#if defined(HAVE_DIFFTIME)
+# if (ACC_OS_DOS16)
+ /* do not introduce any floating point dependencies */
+ long d = (long)current_time - (long)*t;
+# else
+ const double d = difftime(current_time, *t);
+# endif
+ if (d <= 6 * 30 * 24 * 3600L && d >= -3600L)
+ fmt = "%b %e %H:%M";
+#endif
+ assert(size >= 13);
+ if (strftime(s, 13, fmt, localtime(t)) == 13)
+ s[0] = 0;
+#else
+ s[0] = 0;
+ UNUSED(size);
+ UNUSED(t);
+#endif
+}
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+lzo_bool file_exists(const char *name)
+{
+ int fd, r;
+ struct stat st;
+
+ /* return true if we can open it */
+ fd = open(name, O_RDONLY, 0);
+ if (fd >= 0)
+ {
+ (void) close(fd);
+ return 1;
+ }
+
+ /* return true if we can stat it */
+ r = stat(name, &st);
+ if (r != -1)
+ return 1;
+
+ /* return true if we can lstat it */
+#if defined(HAVE_LSTAT)
+ r = lstat(name, &st);
+ if (r != -1)
+ return 1;
+#endif
+
+ return 0;
+}
+
+
+/*************************************************************************
+// Some systems have very exotic mode values.
+// Convert them to standard values for portable use in our header.
+**************************************************************************/
+
+lzo_uint32 fix_mode_for_header(lzo_uint32 mode)
+{
+ lzo_uint32 m = mode;
+
+ if (mode == 0)
+ return 0;
+
+ /* This function can only deal with S_ISREG and S_ISDIR modes. */
+ assert(S_ISREG(mode) || S_ISDIR(mode));
+
+#if defined(ACC_OS_TOS) && defined(__PUREC__)
+ m = 0444;
+ if (mode & S_IWRITE)
+ m |= 0200;
+ if (mode & S_IEXEC)
+ m |= 0111;
+ if (S_ISREG(mode))
+ m |= 0100000 | 0400;
+ else if (S_ISDIR(mode))
+ m |= 0040000 | 0700;
+#elif defined(DOSISH)
+ m &= 0777;
+ if (S_ISREG(mode))
+ m |= 0100000 | 0400;
+ else if (S_ISDIR(mode))
+ m |= 0040000 | 0700;
+#else
+ m &= 07777;
+ if (S_ISREG(mode))
+ m |= 0100000;
+ else if (S_ISDIR(mode))
+ m |= 0040000 | 0700;
+#endif
+
+ if ((m & 0777) == 0)
+ m |= (0644 & ~u_mask);
+ return m;
+}
+
+
+MODE_T fix_mode_for_chmod(lzo_uint32 mode)
+{
+ MODE_T m = (MODE_T) (mode & 07777);
+ if ((m & 0777) == 0)
+ m |= (MODE_T) (0644 & ~u_mask);
+ return m;
+}
+
+
+MODE_T fix_mode_for_ls(lzo_uint32 mode)
+{
+ MODE_T m = (MODE_T) mode;
+ if ((m & 0777) == 0)
+ m |= (MODE_T) (0644 & ~u_mask);
+ return m;
+}
+
+
+MODE_T fix_mode_for_open(MODE_T mode)
+{
+ MODE_T m = (MODE_T) (mode & 0666);
+#if defined(ACC_OS_TOS) && defined(__PUREC__)
+ m = S_IWRITE | S_IREAD;
+#else
+ if ((m & 0777) == 0)
+ m |= (MODE_T) (0644 & ~u_mask);
+ m |= 0600;
+#endif
+ return m;
+}
+
+
+/*************************************************************************
+// ls util - adapted from GNU fileutils 3.16
+**************************************************************************/
+
+/* Return a character indicating the type of file described by
+ file mode BITS:
+ 'd' for directories
+ 'b' for block special files
+ 'c' for character special files
+ 'm' for multiplexor files
+ 'l' for symbolic links
+ 's' for sockets
+ 'p' for fifos
+ '-' for regular files
+ '?' for any other file type. */
+
+static char ftypelet(unsigned mode)
+{
+ if (S_ISREG(mode)) return '-';
+ if (S_ISDIR(mode)) return 'd';
+#ifdef S_ISBLK
+ if (S_ISBLK(mode)) return 'b';
+#endif
+#ifdef S_ISCHR
+ if (S_ISCHR(mode)) return 'c';
+#endif
+#ifdef S_ISFIFO
+ if (S_ISFIFO(mode)) return 'p';
+#endif
+#ifdef S_ISLNK
+ if (S_ISLNK(mode)) return 'l';
+#endif
+#ifdef S_ISSOCK
+ if (S_ISSOCK(mode)) return 's';
+#endif
+#ifdef S_ISMPC
+ if (S_ISMPC(mode)) return 'm';
+#endif
+#ifdef S_ISNWK
+ if (S_ISNWK(mode)) return 'n';
+#endif
+#ifdef S_ISOFD
+ if (S_ISOFD(mode)) return 'M'; /* Cray migrated dmf file. */
+#endif
+#ifdef S_ISOFL
+ if (S_ISOFL(mode)) return 'M'; /* Cray migrated dmf file. */
+#endif
+ return '?';
+}
+
+
+/* Set the read, write, and execute flags. */
+static void set_rwx(unsigned mode, char *str)
+{
+ str[0] = (char) ((mode & 4) ? 'r' : '-');
+ str[1] = (char) ((mode & 2) ? 'w' : '-');
+ str[2] = (char) ((mode & 1) ? 'x' : '-');
+}
+
+
+/* Set the 's' and 't' flags in file attributes string. */
+static void set_st(unsigned mode, char *str)
+{
+#ifdef S_ISUID
+ if (mode & S_ISUID)
+ str[3] = (char) (str[3] == 'x' ? 's' : 'S');
+#endif
+#ifdef S_ISGID
+ if (mode & S_ISGID)
+ str[6] = (char) (str[6] == 'x' ? 's' : 'S');
+#endif
+#ifdef S_ISVTX
+ if (mode & S_ISVTX)
+ str[9] = (char) (str[9] == 'x' ? 't' : 'T');
+#endif
+ UNUSED(mode);
+ UNUSED(str);
+}
+
+
+void mode_string(MODE_T m, char *str)
+{
+ unsigned mode = (unsigned) m;
+ str[0] = ftypelet(mode);
+ set_rwx((mode & 0700) >> 6, &str[1]);
+ set_rwx((mode & 0070) >> 3, &str[4]);
+ set_rwx((mode & 0007) >> 0, &str[7]);
+ set_st(mode, str);
+}
+
+
+/*************************************************************************
+// adapted from the djgpp port of cpio 2.4.2 by Eli Zaretskii
+**************************************************************************/
+
+#if defined(DOSISH)
+
+/* If the original file name includes characters illegal for MS-DOS and
+ MS-Windows, massage it to make it suitable and return a pointer to
+ static storage with a new name. If the original name is legit,
+ return it instead. Return NULL if the rename failed (shouldn't happen).
+
+ The file name changes are: (1) any name that is reserved by a DOS
+ device driver (such as 'prn.txt' or 'aux.c') is prepended with a '_';
+ and (2) illegal characters are replaced with '_' or '-' (well, almost;
+ look at the code below for details). */
+
+#define is_slash(x) fn_is_sep(x)
+
+char *maybe_rename_file(const char *original_name)
+{
+ static char dosified_name[PATH_MAX+1];
+ static const char illegal_chars_dos[] = ".+, ;=[]|<>\":?*";
+ const char *illegal_chars = illegal_chars_dos;
+ int idx, dot_idx;
+ const char *s = original_name;
+ char *d = dosified_name;
+
+ /* Support for Win32 VFAT systems, when available. */
+#if defined(__DJGPP__)
+ if (_use_lfn(original_name))
+ illegal_chars = illegal_chars_dos + 8;
+#elif (ACC_OS_WIN32 || ACC_OS_WIN64 || ACC_OS_CYGWIN)
+ illegal_chars = illegal_chars_dos + 8;
+#endif
+
+ /* Get past the drive letter, if any. */
+ if (fn_is_drive(s))
+ {
+ *d++ = *s++;
+ *d++ = *s++;
+ }
+
+ for (idx = 0, dot_idx = -1; *s; s++, d++)
+ {
+ if (strchr(illegal_chars, *s))
+ {
+ /* Dots are special on DOS: it doesn't allow them as the leading
+ character, and a file name cannot have more than a single dot.
+ We leave the first non-leading dot alone, unless it comes too
+ close to the beginning of the name: we want sh.lex.c to become
+ sh_lex.c, not sh.lex-c. */
+ if (*s == '.')
+ {
+ if (idx == 0
+ && (is_slash(s[1]) || s[1] == '\0'
+ || (s[1] == '.' && (is_slash(s[2]) || s[2] == '\0'))))
+ {
+ /* Copy "./" and "../" verbatim. */
+ *d++ = *s++;
+ if (*s == '.')
+ *d++ = *s++;
+ *d = *s;
+ }
+ else if (idx == 0)
+ *d = '_';
+ else if (dot_idx >= 0)
+ {
+ if (dot_idx < 5) /* 5 is merely a heuristic ad-hoc'ery */
+ {
+ d[dot_idx - idx] = '_'; /* replace previous dot */
+ *d = '.';
+ }
+ else
+ *d = '-';
+ }
+ else
+ *d = '.';
+
+ if (*s == '.')
+ dot_idx = idx;
+ }
+ else if (*s == '+' && s[1] == '+')
+ {
+ if (idx - 2 == dot_idx) /* .c++, .h++ etc. */
+ {
+ *d++ = 'x';
+ *d = 'x';
+ }
+ else
+ {
+ /* libg++ etc. */
+ memcpy (d, "plus", 4);
+ d += 3;
+ }
+ s++;
+ idx++;
+ }
+ else
+ *d = '_';
+ }
+ else
+ *d = *s;
+ if (is_slash(*s))
+ {
+ idx = 0;
+ dot_idx = -1;
+ }
+ else
+ idx++;
+ }
+
+ *d = '\0';
+
+#if defined(S_ISCHR)
+ /* We could have a file in an archive whose name is reserved
+ on MS-DOS by a device driver. Trying to extract such a
+ file would fail at best and wedge us at worst. We need to
+ rename such files. */
+
+ if (idx > 0)
+ {
+ struct stat st_buf;
+ char *base = d - idx;
+ int i = 0;
+
+ /* The list of character devices is not constant: it depends on
+ what device drivers did they install in their CONFIG.SYS.
+ 'stat' will tell us if the basename of the file name is a
+ characer device. */
+ while (stat(base, &st_buf) == 0 && S_ISCHR(st_buf.st_mode))
+ {
+ size_t blen = strlen(base);
+
+ /* I don't believe any DOS character device names begin with a
+ '_'. But in case they invent such a device, let us try twice. */
+ if (++i > 2)
+ return (char *)0;
+
+ /* Prepend a '_'. */
+ memmove(base + 1, base, blen + 1);
+ base[0] = '_';
+ }
+ }
+#endif
+
+ return dosified_name;
+}
+
+#endif /* DOSISH */
+
+
+/*************************************************************************
+//
+**************************************************************************/
+
+#if (ACC_CC_MSC && (_MSC_VER >= 1000 && _MSC_VER < 1200))
+ /* avoid '-W4' warnings in <windows.h> */
+# pragma warning(disable: 4201 4214 4514)
+#endif
+#if (ACC_CC_MSC && (_MSC_VER >= 1300))
+ /* avoid '-Wall' warnings in <windows.h> */
+# pragma warning(disable: 4255)
+#endif
+
+#define ACC_WANT_ACC_INCI_H 1
+#define ACC_WANT_ACCLIB_GETOPT 1
+#define ACC_WANT_ACCLIB_HALLOC 1
+#define ACC_WANT_ACCLIB_HMEMCPY 1
+#define ACC_WANT_ACCLIB_HSREAD 1
+#define ACC_WANT_ACCLIB_MISC 1
+#define ACC_WANT_ACCLIB_WILDARGV 1
+#if (ACC_HAVE_MM_HUGE_PTR)
+# define ACC_WANT_ACCLIB_HREAD 1
+#endif
+#include "miniacc.h"
+#undef ACC_WANT_ACC_INCI_H
+#undef ACC_WANT_ACCLIB_HALLOC
+#undef ACC_WANT_ACCLIB_MISC
+#undef ACC_WANT_ACCLIB_WILDARGV
+#undef ACC_WANT_ACCLIB_HREAD
+
+#if (__ACCLIB_REQUIRE_HMEMCPY_CH) && !defined(__ACCLIB_HMEMCPY_CH_INCLUDED)
+# define ACC_WANT_ACCLIB_HMEMCPY 1
+# include "acc/acclib/hmemcpy.ch"
+# undef ACC_WANT_ACCLIB_HMEMCPY
+#endif
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/src/version.h b/src/version.h
new file mode 100644
index 0000000..d8457b0
--- /dev/null
+++ b/src/version.h
@@ -0,0 +1,3 @@
+#define LZOP_VERSION 0x1030
+#define LZOP_VERSION_STRING "1.03"
+#define LZOP_VERSION_DATE "Nov 1st 2010"