summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorcvs <cvs@pkgsrc.org>2007-03-23 19:00:19 +0000
committercvs <cvs@pkgsrc.org>2007-03-23 19:00:19 +0000
commitda1b24d6fdfe442753c8272da5432c8fcaa1f43c (patch)
tree8c7c348db30abadfdc6b77822405d9ffe7b79103 /pkgtools
parentda5bb3f20f33565c1db65018aabd8cf59023cfef (diff)
downloadpkgsrc-da1b24d6fdfe442753c8272da5432c8fcaa1f43c.tar.gz
Creating branch jlam-pkgviewsjlam-pkgviews
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/Makefile54
-rw-r--r--pkgtools/autoswc/DESCR3
-rw-r--r--pkgtools/autoswc/Makefile70
-rw-r--r--pkgtools/autoswc/PLIST7
-rw-r--r--pkgtools/autoswc/files/autoswc.8130
-rw-r--r--pkgtools/autoswc/files/autoswc.mk50
-rw-r--r--pkgtools/autoswc/files/autoswc.sh210
-rw-r--r--pkgtools/autoswc/files/config.site41
-rw-r--r--pkgtools/autoswc/files/configure.ac304
-rw-r--r--pkgtools/binpatch/DESCR2
-rw-r--r--pkgtools/binpatch/Makefile32
-rw-r--r--pkgtools/binpatch/PLIST3
-rw-r--r--pkgtools/binpatch/files/binpatch.1116
-rw-r--r--pkgtools/binpatch/files/binpatch.c174
-rw-r--r--pkgtools/bootstrap-extras/DESCR2
-rw-r--r--pkgtools/bootstrap-extras/Makefile53
-rw-r--r--pkgtools/bootstrap-extras/PLIST4
-rw-r--r--pkgtools/bootstrap-extras/files/fakeldd6
-rw-r--r--pkgtools/bootstrap-extras/files/mkdir-sh53
-rw-r--r--pkgtools/bootstrap-extras/files/strip-sh28
-rw-r--r--pkgtools/bootstrap-mk-files/DESCR4
-rw-r--r--pkgtools/bootstrap-mk-files/Makefile50
-rw-r--r--pkgtools/bootstrap-mk-files/PLIST23
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.README683
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.dep.mk62
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.depall.mk5
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.doc.mk84
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.files.mk40
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.hostprog.mk137
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.inc.mk29
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.info.mk64
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.kernobj.mk33
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.kinc.mk145
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.kmod.mk98
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.lib.mk524
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.links.mk44
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.man.mk201
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.nls.mk65
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.obj.mk91
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.prog.mk174
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.subdir.mk62
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.sys.mk134
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk524
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.man.mk205
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.sys.mk65
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk210
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/FreeBSD.bsd.man.mk137
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.lib.mk522
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.own.mk.in246
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/IRIX.sys.mk198
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Interix.bsd.lib.mk472
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Interix.sys.mk194
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk524
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.man.mk203
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk194
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/NetBSD.bsd.man.mk206
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/NetBSD.sys.mk207
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/OSF1.sys.mk193
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.man.mk137
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.own.mk.in308
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/OpenBSD.sys.mk202
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk141
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk211
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/UnixWare.sys.mk195
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/bsd.own.mk.in326
-rw-r--r--pkgtools/bootstrap-mk-files/files/sys.mk208
-rw-r--r--pkgtools/cdpack/DESCR14
-rw-r--r--pkgtools/cdpack/Makefile48
-rw-r--r--pkgtools/cdpack/PLIST4
-rw-r--r--pkgtools/cdpack/files/TODO34
-rwxr-xr-xpkgtools/cdpack/files/cdgen.awk521
-rw-r--r--pkgtools/cdpack/files/cdpack.1193
-rwxr-xr-xpkgtools/cdpack/files/cdpack.sh699
-rw-r--r--pkgtools/createbuildlink/DESCR5
-rw-r--r--pkgtools/createbuildlink/Makefile38
-rw-r--r--pkgtools/createbuildlink/PLIST4
-rwxr-xr-xpkgtools/createbuildlink/files/createbuildlink199
-rw-r--r--pkgtools/createbuildlink/files/createbuildlink.893
-rwxr-xr-xpkgtools/createbuildlink/files/substplistbasedirs90
-rw-r--r--pkgtools/dfdisk/DESCR14
-rw-r--r--pkgtools/dfdisk/MESSAGE14
-rw-r--r--pkgtools/dfdisk/Makefile51
-rw-r--r--pkgtools/dfdisk/PLIST5
-rw-r--r--pkgtools/dfdisk/files/TODO22
-rw-r--r--pkgtools/dfdisk/files/dfdisk.1219
-rw-r--r--pkgtools/dfdisk/files/dfdisk.conf18
-rw-r--r--pkgtools/dfdisk/files/dfdisk.sh501
-rw-r--r--pkgtools/digest/DESCR12
-rw-r--r--pkgtools/digest/Makefile44
-rw-r--r--pkgtools/digest/PLIST3
-rw-r--r--pkgtools/digest/files/AUTHORS1
-rw-r--r--pkgtools/digest/files/COPYING30
-rw-r--r--pkgtools/digest/files/DESCR2
-rw-r--r--pkgtools/digest/files/INSTALL182
-rw-r--r--pkgtools/digest/files/Makefile.in168
-rw-r--r--pkgtools/digest/files/NEWS29
-rw-r--r--pkgtools/digest/files/PLIST2
-rw-r--r--pkgtools/digest/files/README2
-rw-r--r--pkgtools/digest/files/aclocal.m430
-rw-r--r--pkgtools/digest/files/bits.c184
-rwxr-xr-xpkgtools/digest/files/config.guess1516
-rw-r--r--pkgtools/digest/files/config.h.in271
-rwxr-xr-xpkgtools/digest/files/config.sub1622
-rwxr-xr-xpkgtools/digest/files/configure6660
-rw-r--r--pkgtools/digest/files/configure.ac169
-rw-r--r--pkgtools/digest/files/digest.1109
-rw-r--r--pkgtools/digest/files/digest.c208
-rwxr-xr-xpkgtools/digest/files/install-sh251
-rw-r--r--pkgtools/digest/files/md5.h53
-rw-r--r--pkgtools/digest/files/md5c.c375
-rw-r--r--pkgtools/digest/files/md5hl.c126
-rwxr-xr-xpkgtools/digest/files/missing283
-rwxr-xr-xpkgtools/digest/files/mkinstalldirs40
-rw-r--r--pkgtools/digest/files/regress.sh96
-rw-r--r--pkgtools/digest/files/rmd160.c470
-rw-r--r--pkgtools/digest/files/rmd160.h46
-rw-r--r--pkgtools/digest/files/rmd160hl.c111
-rw-r--r--pkgtools/digest/files/sha1.c288
-rw-r--r--pkgtools/digest/files/sha1.h28
-rw-r--r--pkgtools/digest/files/sha1hl.c117
-rw-r--r--pkgtools/digest/files/sha2.c946
-rw-r--r--pkgtools/digest/files/sha2.h179
-rw-r--r--pkgtools/digest/files/sha2hl.c262
-rw-r--r--pkgtools/digest/files/tiger.c781
-rw-r--r--pkgtools/digest/files/tiger.h49
-rw-r--r--pkgtools/digest/files/whirlpool.c1852
-rw-r--r--pkgtools/digest/files/whirlpool.h133
-rw-r--r--pkgtools/genrpm/DESCR8
-rw-r--r--pkgtools/genrpm/Makefile42
-rw-r--r--pkgtools/genrpm/PLIST4
-rw-r--r--pkgtools/genrpm/files/genrpm306
-rw-r--r--pkgtools/genrpm/files/genrpm.033
-rw-r--r--pkgtools/genrpm/files/genrpm.851
-rw-r--r--pkgtools/gensolpkg/DESCR8
-rw-r--r--pkgtools/gensolpkg/Makefile20
-rw-r--r--pkgtools/gensolpkg/PLIST3
-rw-r--r--pkgtools/gensolpkg/distinfo8
-rw-r--r--pkgtools/gensolpkg/patches/patch-aa22
-rw-r--r--pkgtools/gensolpkg/patches/patch-ab13
-rw-r--r--pkgtools/gensolpkg/patches/patch-ac73
-rw-r--r--pkgtools/libkver/DEINSTALL12
-rw-r--r--pkgtools/libkver/DESCR9
-rw-r--r--pkgtools/libkver/INSTALL12
-rw-r--r--pkgtools/libkver/Makefile50
-rw-r--r--pkgtools/libkver/PLIST8
-rw-r--r--pkgtools/libkver/files/Makefile12
-rw-r--r--pkgtools/libkver/files/Makefile.inc11
-rw-r--r--pkgtools/libkver/files/lib/Makefile10
-rw-r--r--pkgtools/libkver/files/lib/kver.347
-rw-r--r--pkgtools/libkver/files/lib/kver.c219
-rw-r--r--pkgtools/libkver/files/lib/shlib_version4
-rw-r--r--pkgtools/libkver/files/sysctl/Makefile13
-rw-r--r--pkgtools/libnbcompat/DESCR5
-rw-r--r--pkgtools/libnbcompat/Makefile31
-rw-r--r--pkgtools/libnbcompat/PLIST41
-rw-r--r--pkgtools/libnbcompat/buildlink3.mk25
-rw-r--r--pkgtools/libnbcompat/files/Makefile.in101
-rw-r--r--pkgtools/libnbcompat/files/README94
-rw-r--r--pkgtools/libnbcompat/files/__fts13.c1221
-rw-r--r--pkgtools/libnbcompat/files/__glob13.c1040
-rw-r--r--pkgtools/libnbcompat/files/__unsetenv13.c124
-rw-r--r--pkgtools/libnbcompat/files/aclocal.m4143
-rw-r--r--pkgtools/libnbcompat/files/bits.c195
-rwxr-xr-xpkgtools/libnbcompat/files/config.guess1516
-rwxr-xr-xpkgtools/libnbcompat/files/config.sub1622
-rwxr-xr-xpkgtools/libnbcompat/files/configure12080
-rw-r--r--pkgtools/libnbcompat/files/configure.ac387
-rw-r--r--pkgtools/libnbcompat/files/engine.c1188
-rw-r--r--pkgtools/libnbcompat/files/err.c121
-rw-r--r--pkgtools/libnbcompat/files/fgetln.c88
-rw-r--r--pkgtools/libnbcompat/files/findenv.c88
-rw-r--r--pkgtools/libnbcompat/files/fnmatch.c203
-rw-r--r--pkgtools/libnbcompat/files/fparseln.c249
-rw-r--r--pkgtools/libnbcompat/files/fts.c12
-rw-r--r--pkgtools/libnbcompat/files/getenv.c117
-rw-r--r--pkgtools/libnbcompat/files/getopt_long.c505
-rw-r--r--pkgtools/libnbcompat/files/gettemp.c180
-rw-r--r--pkgtools/libnbcompat/files/glob.c12
-rwxr-xr-xpkgtools/libnbcompat/files/install-sh251
-rw-r--r--pkgtools/libnbcompat/files/isblank.c57
-rw-r--r--pkgtools/libnbcompat/files/lchflags.c57
-rw-r--r--pkgtools/libnbcompat/files/lchmod.c57
-rw-r--r--pkgtools/libnbcompat/files/lchown.c57
-rw-r--r--pkgtools/libnbcompat/files/lutimes.c57
-rw-r--r--pkgtools/libnbcompat/files/malloc.c15
-rw-r--r--pkgtools/libnbcompat/files/md5c.c377
-rw-r--r--pkgtools/libnbcompat/files/md5hl.c22
-rw-r--r--pkgtools/libnbcompat/files/mdXhl.c105
-rw-r--r--pkgtools/libnbcompat/files/mkdtemp.c77
-rw-r--r--pkgtools/libnbcompat/files/mkstemp.c79
-rw-r--r--pkgtools/libnbcompat/files/nbcompat.awk24
-rw-r--r--pkgtools/libnbcompat/files/nbcompat.h147
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/assert.h54
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/cdefs.h107
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/config.h.in516
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/ctype.h54
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/dirent.h65
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/endian.h79
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/err.h59
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/fnmatch.h54
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/fts.h127
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/getopt.h71
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/glob.h88
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/grp.h62
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/limits.h80
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/md5.h53
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/param.h57
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/paths.h65
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/poll.h72
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/pwd.h62
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/queue.h174
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/regex.h147
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/rmd160.h46
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/sha1.h28
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/stat.h70
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/statvfs.h130
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/stdio.h66
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/stdlib.h75
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/string.h74
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/termcap.h59
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/time.h74
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/types.h59
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/tzfile.h82
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/unistd.h87
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/util.h64
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/vis.h98
-rw-r--r--pkgtools/libnbcompat/files/poll.c101
-rw-r--r--pkgtools/libnbcompat/files/private/cclass.h104
-rw-r--r--pkgtools/libnbcompat/files/private/cname.h175
-rw-r--r--pkgtools/libnbcompat/files/private/pwcache.h72
-rw-r--r--pkgtools/libnbcompat/files/private/regex2.h209
-rw-r--r--pkgtools/libnbcompat/files/private/utils.h102
-rw-r--r--pkgtools/libnbcompat/files/pwcache.c668
-rw-r--r--pkgtools/libnbcompat/files/regcomp.c1905
-rw-r--r--pkgtools/libnbcompat/files/regerror.c227
-rw-r--r--pkgtools/libnbcompat/files/regexec.c240
-rw-r--r--pkgtools/libnbcompat/files/regfree.c134
-rw-r--r--pkgtools/libnbcompat/files/rmd160.c473
-rw-r--r--pkgtools/libnbcompat/files/rmd160hl.c112
-rw-r--r--pkgtools/libnbcompat/files/setenv.c152
-rw-r--r--pkgtools/libnbcompat/files/setgroupent.c49
-rw-r--r--pkgtools/libnbcompat/files/setmode.c492
-rw-r--r--pkgtools/libnbcompat/files/setpassent.c49
-rw-r--r--pkgtools/libnbcompat/files/setprogname.c84
-rw-r--r--pkgtools/libnbcompat/files/sha1.c298
-rw-r--r--pkgtools/libnbcompat/files/sha1hl.c124
-rw-r--r--pkgtools/libnbcompat/files/snprintf.c790
-rwxr-xr-xpkgtools/libnbcompat/files/src2nbcompat185
-rw-r--r--pkgtools/libnbcompat/files/statvfs.c120
-rw-r--r--pkgtools/libnbcompat/files/strdup.c73
-rw-r--r--pkgtools/libnbcompat/files/strerror.c20
-rw-r--r--pkgtools/libnbcompat/files/strlcat.c92
-rw-r--r--pkgtools/libnbcompat/files/strlcpy.c88
-rw-r--r--pkgtools/libnbcompat/files/strmode.c181
-rw-r--r--pkgtools/libnbcompat/files/strsep.c98
-rw-r--r--pkgtools/libnbcompat/files/strtoll.c192
-rw-r--r--pkgtools/libnbcompat/files/unsetenv.c12
-rw-r--r--pkgtools/libnbcompat/files/unvis.c326
-rw-r--r--pkgtools/libnbcompat/files/usleep.c53
-rw-r--r--pkgtools/libnbcompat/files/utimes.c60
-rw-r--r--pkgtools/libnbcompat/files/vis.c380
-rw-r--r--pkgtools/libnbcompat/files/warn.c115
-rw-r--r--pkgtools/libnbcompat/inplace.mk27
-rw-r--r--pkgtools/mtree/DESCR6
-rw-r--r--pkgtools/mtree/Makefile25
-rw-r--r--pkgtools/mtree/Makefile.common28
-rw-r--r--pkgtools/mtree/PLIST4
-rw-r--r--pkgtools/mtree/files/Makefile.in49
-rw-r--r--pkgtools/mtree/files/compare.c486
-rwxr-xr-xpkgtools/mtree/files/config.guess1516
-rw-r--r--pkgtools/mtree/files/config.h.in243
-rwxr-xr-xpkgtools/mtree/files/config.sub1622
-rwxr-xr-xpkgtools/mtree/files/configure6225
-rw-r--r--pkgtools/mtree/files/configure.ac45
-rw-r--r--pkgtools/mtree/files/crc.c180
-rw-r--r--pkgtools/mtree/files/create.c418
-rw-r--r--pkgtools/mtree/files/excludes.c143
-rw-r--r--pkgtools/mtree/files/extern.h89
-rw-r--r--pkgtools/mtree/files/getid.c457
-rwxr-xr-xpkgtools/mtree/files/install-sh251
-rw-r--r--pkgtools/mtree/files/misc.c313
-rw-r--r--pkgtools/mtree/files/mtree.8660
-rw-r--r--pkgtools/mtree/files/mtree.c250
-rw-r--r--pkgtools/mtree/files/mtree.cat8320
-rw-r--r--pkgtools/mtree/files/mtree.h130
-rwxr-xr-xpkgtools/mtree/files/mtree2nbcompat57
-rw-r--r--pkgtools/mtree/files/pack_dev.c317
-rw-r--r--pkgtools/mtree/files/pack_dev.h59
-rw-r--r--pkgtools/mtree/files/spec.c662
-rw-r--r--pkgtools/mtree/files/stat_flags.c199
-rw-r--r--pkgtools/mtree/files/stat_flags.h35
-rw-r--r--pkgtools/mtree/files/verify.c313
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/DESCR1
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/Makefile36
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/PLIST1
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/Changes4
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/Dewey.pm85
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs31
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/MANIFEST8
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/Makefile.PL8
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/README26
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/t/Dewey.t19
-rw-r--r--pkgtools/p5-pkgsrc-Dewey/files/typemap1
-rw-r--r--pkgtools/pax/Makefile25
-rw-r--r--pkgtools/pkg_alternatives/DEINSTALL8
-rw-r--r--pkgtools/pkg_alternatives/DESCR3
-rw-r--r--pkgtools/pkg_alternatives/INSTALL8
-rw-r--r--pkgtools/pkg_alternatives/Makefile65
-rw-r--r--pkgtools/pkg_alternatives/PLIST8
-rw-r--r--pkgtools/pkg_alternatives/files/filter.conf19
-rw-r--r--pkgtools/pkg_alternatives/files/pkg_alternatives.8390
-rw-r--r--pkgtools/pkg_alternatives/files/pkg_alternatives.sh718
-rw-r--r--pkgtools/pkg_alternatives/files/wrapper.man70
-rw-r--r--pkgtools/pkg_alternatives/files/wrapper.sh64
-rw-r--r--pkgtools/pkg_chk/DESCR5
-rw-r--r--pkgtools/pkg_chk/Makefile50
-rw-r--r--pkgtools/pkg_chk/PLIST3
-rw-r--r--pkgtools/pkg_chk/files/pkg_chk.8369
-rwxr-xr-xpkgtools/pkg_chk/files/pkg_chk.sh858
-rw-r--r--pkgtools/pkg_comp/DESCR14
-rw-r--r--pkgtools/pkg_comp/Makefile26
-rw-r--r--pkgtools/pkg_comp/PLIST3
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.8518
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.sh1023
-rw-r--r--pkgtools/pkg_filecheck/DESCR3
-rw-r--r--pkgtools/pkg_filecheck/Makefile67
-rw-r--r--pkgtools/pkg_filecheck/PLIST8
-rw-r--r--pkgtools/pkg_filecheck/files/builddb.165
-rw-r--r--pkgtools/pkg_filecheck/files/builddb.pl133
-rw-r--r--pkgtools/pkg_filecheck/files/pkg_filecheck.165
-rw-r--r--pkgtools/pkg_filecheck/files/pkg_filecheck.c320
-rw-r--r--pkgtools/pkg_filecheck/files/pkg_filecheck.conf19
-rw-r--r--pkgtools/pkg_filecheck/files/pkg_filecheck.conf.575
-rw-r--r--pkgtools/pkg_install-info/DESCR6
-rw-r--r--pkgtools/pkg_install-info/Makefile31
-rw-r--r--pkgtools/pkg_install-info/PLIST2
-rw-r--r--pkgtools/pkg_install-info/files/Makefile.in28
-rw-r--r--pkgtools/pkg_install-info/files/README14
-rw-r--r--pkgtools/pkg_install-info/files/aclocal.m4826
-rw-r--r--pkgtools/pkg_install-info/files/config.h.in88
-rwxr-xr-xpkgtools/pkg_install-info/files/configure4735
-rw-r--r--pkgtools/pkg_install-info/files/configure.ac47
-rw-r--r--pkgtools/pkg_install-info/files/getopt.c1273
-rw-r--r--pkgtools/pkg_install-info/files/getopt.h180
-rw-r--r--pkgtools/pkg_install-info/files/getopt1.c195
-rw-r--r--pkgtools/pkg_install-info/files/gettext.h69
-rw-r--r--pkgtools/pkg_install-info/files/install-info.c1643
-rw-r--r--pkgtools/pkg_install-info/files/strcasecmp.c66
-rw-r--r--pkgtools/pkg_install-info/files/strdup.c54
-rw-r--r--pkgtools/pkg_install-info/files/strerror.c37
-rw-r--r--pkgtools/pkg_install-info/files/strncasecmp.c2
-rw-r--r--pkgtools/pkg_install-info/files/system.h261
-rw-r--r--pkgtools/pkg_install-info/files/xalloc.h87
-rw-r--r--pkgtools/pkg_install-info/files/xexit.c86
-rw-r--r--pkgtools/pkg_install-info/files/xstrdup.c38
-rw-r--r--pkgtools/pkg_install-info/hacks.mk15
-rw-r--r--pkgtools/pkg_install/DESCR14
-rw-r--r--pkgtools/pkg_install/INSTALL20
-rw-r--r--pkgtools/pkg_install/Makefile103
-rw-r--r--pkgtools/pkg_install/PLIST24
-rw-r--r--pkgtools/pkg_install/files/Makefile.in20
-rw-r--r--pkgtools/pkg_install/files/README21
-rw-r--r--pkgtools/pkg_install/files/add/Makefile.in44
-rw-r--r--pkgtools/pkg_install/files/add/add.h53
-rw-r--r--pkgtools/pkg_install/files/add/extract.c341
-rw-r--r--pkgtools/pkg_install/files/add/futil.c151
-rw-r--r--pkgtools/pkg_install/files/add/main.c216
-rw-r--r--pkgtools/pkg_install/files/add/perform.c1097
-rw-r--r--pkgtools/pkg_install/files/add/pkg_add.1670
-rw-r--r--pkgtools/pkg_install/files/add/pkg_add.cat1391
-rw-r--r--pkgtools/pkg_install/files/add/verify.c179
-rw-r--r--pkgtools/pkg_install/files/add/verify.h40
-rw-r--r--pkgtools/pkg_install/files/admin/Makefile.in44
-rw-r--r--pkgtools/pkg_install/files/admin/README9
-rw-r--r--pkgtools/pkg_install/files/admin/main.c854
-rw-r--r--pkgtools/pkg_install/files/admin/pkg_admin.1241
-rw-r--r--pkgtools/pkg_install/files/admin/pkg_admin.cat1154
-rw-r--r--pkgtools/pkg_install/files/bpm/bpm.1117
-rw-r--r--pkgtools/pkg_install/files/bpm/bpm.cat161
-rw-r--r--pkgtools/pkg_install/files/bpm/bpm.sh.in222
-rwxr-xr-xpkgtools/pkg_install/files/config.guess1516
-rwxr-xr-xpkgtools/pkg_install/files/config.sub1622
-rwxr-xr-xpkgtools/pkg_install/files/configure7169
-rw-r--r--pkgtools/pkg_install/files/configure.ac148
-rw-r--r--pkgtools/pkg_install/files/create/Makefile.in47
-rw-r--r--pkgtools/pkg_install/files/create/create.h57
-rw-r--r--pkgtools/pkg_install/files/create/main.c229
-rw-r--r--pkgtools/pkg_install/files/create/perform.c427
-rw-r--r--pkgtools/pkg_install/files/create/pkg_create.1547
-rw-r--r--pkgtools/pkg_install/files/create/pkg_create.cat1304
-rw-r--r--pkgtools/pkg_install/files/create/pl.c263
-rw-r--r--pkgtools/pkg_install/files/delete/Makefile.in44
-rw-r--r--pkgtools/pkg_install/files/delete/delete.h38
-rw-r--r--pkgtools/pkg_install/files/delete/main.c223
-rw-r--r--pkgtools/pkg_install/files/delete/perform.c884
-rw-r--r--pkgtools/pkg_install/files/delete/pkg_delete.1312
-rw-r--r--pkgtools/pkg_install/files/delete/pkg_delete.cat1171
-rw-r--r--pkgtools/pkg_install/files/info/Makefile.in44
-rw-r--r--pkgtools/pkg_install/files/info/info.h84
-rw-r--r--pkgtools/pkg_install/files/info/main.c329
-rw-r--r--pkgtools/pkg_install/files/info/perform.c458
-rw-r--r--pkgtools/pkg_install/files/info/pkg_info.1350
-rw-r--r--pkgtools/pkg_install/files/info/pkg_info.cat1200
-rw-r--r--pkgtools/pkg_install/files/info/show.c430
-rwxr-xr-xpkgtools/pkg_install/files/install-sh238
-rw-r--r--pkgtools/pkg_install/files/lib/Makefile.in44
-rw-r--r--pkgtools/pkg_install/files/lib/automatic.c98
-rw-r--r--pkgtools/pkg_install/files/lib/config.h.in201
-rw-r--r--pkgtools/pkg_install/files/lib/defs.h119
-rw-r--r--pkgtools/pkg_install/files/lib/dewey.c295
-rw-r--r--pkgtools/pkg_install/files/lib/dewey.h19
-rw-r--r--pkgtools/pkg_install/files/lib/fexec.c189
-rw-r--r--pkgtools/pkg_install/files/lib/file.c755
-rw-r--r--pkgtools/pkg_install/files/lib/ftpio.c1325
-rw-r--r--pkgtools/pkg_install/files/lib/global.c44
-rw-r--r--pkgtools/pkg_install/files/lib/lib.h424
-rw-r--r--pkgtools/pkg_install/files/lib/lpkg.c72
-rw-r--r--pkgtools/pkg_install/files/lib/path.c208
-rw-r--r--pkgtools/pkg_install/files/lib/path.h40
-rw-r--r--pkgtools/pkg_install/files/lib/pen.c223
-rw-r--r--pkgtools/pkg_install/files/lib/pexec.c109
-rw-r--r--pkgtools/pkg_install/files/lib/pkg_summary.5118
-rw-r--r--pkgtools/pkg_install/files/lib/pkg_summary.cat599
-rw-r--r--pkgtools/pkg_install/files/lib/pkgdb.c339
-rw-r--r--pkgtools/pkg_install/files/lib/plist.c561
-rw-r--r--pkgtools/pkg_install/files/lib/str.c431
-rw-r--r--pkgtools/pkg_install/files/lib/var.c304
-rw-r--r--pkgtools/pkg_install/files/lib/version.c57
-rw-r--r--pkgtools/pkg_install/files/lib/version.h38
-rwxr-xr-xpkgtools/pkg_install/files/pi2nbcompat141
-rwxr-xr-xpkgtools/pkg_install/files/pkg_install2nbcompat53
-rw-r--r--pkgtools/pkg_install/files/tkpkg152
-rw-r--r--pkgtools/pkg_install/files/view/Makefile.in34
-rw-r--r--pkgtools/pkg_install/files/view/linkfarm.1147
-rw-r--r--pkgtools/pkg_install/files/view/linkfarm.cat167
-rw-r--r--pkgtools/pkg_install/files/view/linkfarm.sh.in232
-rw-r--r--pkgtools/pkg_install/files/view/pkg_view.1280
-rw-r--r--pkgtools/pkg_install/files/view/pkg_view.cat1144
-rw-r--r--pkgtools/pkg_install/files/view/pkg_view.sh.in276
-rw-r--r--pkgtools/pkg_notify/DESCR2
-rw-r--r--pkgtools/pkg_notify/Makefile43
-rw-r--r--pkgtools/pkg_notify/PLIST6
-rw-r--r--pkgtools/pkg_notify/distinfo5
-rw-r--r--pkgtools/pkg_regress/DESCR1
-rw-r--r--pkgtools/pkg_regress/Makefile32
-rw-r--r--pkgtools/pkg_regress/PLIST2
-rwxr-xr-xpkgtools/pkg_regress/files/pkg_regress.sh162
-rw-r--r--pkgtools/pkg_rolling-replace/DESCR3
-rw-r--r--pkgtools/pkg_rolling-replace/Makefile61
-rw-r--r--pkgtools/pkg_rolling-replace/PLIST3
-rw-r--r--pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8108
-rwxr-xr-xpkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh396
-rw-r--r--pkgtools/pkg_select/DESCR16
-rw-r--r--pkgtools/pkg_select/Makefile43
-rw-r--r--pkgtools/pkg_select/PLIST8
-rw-r--r--pkgtools/pkg_select/distinfo8
-rw-r--r--pkgtools/pkg_select/patches/patch-aa15
-rw-r--r--pkgtools/pkg_select/patches/patch-ab12
-rw-r--r--pkgtools/pkg_select/patches/patch-ac14
-rw-r--r--pkgtools/pkg_tarup/DESCR14
-rw-r--r--pkgtools/pkg_tarup/Makefile55
-rw-r--r--pkgtools/pkg_tarup/PLIST4
-rw-r--r--pkgtools/pkg_tarup/files/pkg_tarup263
-rw-r--r--pkgtools/pkg_tarup/files/pkg_tarup.1117
-rw-r--r--pkgtools/pkg_tarup/files/pkg_tarup_all9
-rw-r--r--pkgtools/pkgclean/DESCR2
-rw-r--r--pkgtools/pkgclean/Makefile33
-rw-r--r--pkgtools/pkgclean/PLIST3
-rw-r--r--pkgtools/pkgclean/files/pkgclean.156
-rw-r--r--pkgtools/pkgclean/files/pkgclean.sh83
-rw-r--r--pkgtools/pkgdep/DESCR12
-rw-r--r--pkgtools/pkgdep/Makefile29
-rw-r--r--pkgtools/pkgdep/PLIST2
-rw-r--r--pkgtools/pkgdep/files/pkgdep.pl298
-rw-r--r--pkgtools/pkgdepgraph/DESCR14
-rw-r--r--pkgtools/pkgdepgraph/MESSAGE11
-rw-r--r--pkgtools/pkgdepgraph/Makefile59
-rw-r--r--pkgtools/pkgdepgraph/PLIST4
-rw-r--r--pkgtools/pkgdepgraph/files/pkgdepgraph.0345
-rw-r--r--pkgtools/pkgdepgraph/files/pkgdepgraph.1542
-rwxr-xr-xpkgtools/pkgdepgraph/files/pkgdepgraph.pl737
-rw-r--r--pkgtools/pkgdiff/DESCR14
-rw-r--r--pkgtools/pkgdiff/Makefile81
-rw-r--r--pkgtools/pkgdiff/PLIST16
-rw-r--r--pkgtools/pkgdiff/files/feedback-patches72
-rw-r--r--pkgtools/pkgdiff/files/feedback-patches.059
-rw-r--r--pkgtools/pkgdiff/files/feedback-patches.1100
-rw-r--r--pkgtools/pkgdiff/files/mkpatches.027
-rw-r--r--pkgtools/pkgdiff/files/mkpatches.142
-rwxr-xr-xpkgtools/pkgdiff/files/mkpatches.pl181
-rw-r--r--pkgtools/pkgdiff/files/patchdiff.023
-rw-r--r--pkgtools/pkgdiff/files/patchdiff.136
-rwxr-xr-xpkgtools/pkgdiff/files/patchdiff.pl106
-rwxr-xr-xpkgtools/pkgdiff/files/pkgdiff65
-rw-r--r--pkgtools/pkgdiff/files/pkgdiff.027
-rw-r--r--pkgtools/pkgdiff/files/pkgdiff.150
-rwxr-xr-xpkgtools/pkgdiff/files/pkgvi110
-rw-r--r--pkgtools/pkgdiff/files/pkgvi.033
-rw-r--r--pkgtools/pkgdiff/files/pkgvi.181
-rw-r--r--pkgtools/pkgfind/DESCR2
-rw-r--r--pkgtools/pkgfind/Makefile43
-rw-r--r--pkgtools/pkgfind/PLIST3
-rw-r--r--pkgtools/pkgfind/files/pkgfind.177
-rw-r--r--pkgtools/pkgfind/files/pkgfind.c293
-rw-r--r--pkgtools/pkglint/DESCR7
-rw-r--r--pkgtools/pkglint/Makefile74
-rw-r--r--pkgtools/pkglint/PLIST11
-rw-r--r--pkgtools/pkglint/README23
-rw-r--r--pkgtools/pkglint/TODO34
-rw-r--r--pkgtools/pkglint/files/deprecated.map135
-rw-r--r--pkgtools/pkglint/files/doc/Makefile27
-rw-r--r--pkgtools/pkglint/files/doc/chap.code.xml307
-rw-r--r--pkgtools/pkglint/files/doc/chap.defs.xml25
-rw-r--r--pkgtools/pkglint/files/doc/chap.design.xml117
-rw-r--r--pkgtools/pkglint/files/doc/chap.future.xml91
-rw-r--r--pkgtools/pkglint/files/doc/chap.intro.xml15
-rw-r--r--pkgtools/pkglint/files/doc/chap.statemachines.xml77
-rw-r--r--pkgtools/pkglint/files/doc/chap.types.xml539
-rw-r--r--pkgtools/pkglint/files/doc/pkglint.xml38
-rw-r--r--pkgtools/pkglint/files/doc/statemachine.patch.diabin2385 -> 0 bytes
-rw-r--r--pkgtools/pkglint/files/doc/statemachine.shellcmd.diabin3531 -> 0 bytes
-rw-r--r--pkgtools/pkglint/files/doc/stylesheet.xsl6
-rw-r--r--pkgtools/pkglint/files/lintpkgsrc.0131
-rw-r--r--pkgtools/pkglint/files/lintpkgsrc.1194
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl1823
-rw-r--r--pkgtools/pkglint/files/makevars.map697
-rw-r--r--pkgtools/pkglint/files/pkglint.0198
-rw-r--r--pkgtools/pkglint/files/pkglint.1229
-rw-r--r--pkgtools/pkglint/files/pkglint.pl7936
-rw-r--r--pkgtools/pkglint/files/plist-clash.pl60
-rw-r--r--pkgtools/pkgse/DESCR2
-rw-r--r--pkgtools/pkgse/Makefile26
-rw-r--r--pkgtools/pkgse/PLIST2
-rw-r--r--pkgtools/pkgse/distinfo5
-rw-r--r--pkgtools/pkgsurvey/DESCR19
-rw-r--r--pkgtools/pkgsurvey/MESSAGE17
-rw-r--r--pkgtools/pkgsurvey/Makefile25
-rw-r--r--pkgtools/pkgsurvey/PLIST2
-rw-r--r--pkgtools/pkgsurvey/files/pkgsurvey.sh5
-rw-r--r--pkgtools/port2pkg/DESCR11
-rw-r--r--pkgtools/port2pkg/Makefile41
-rw-r--r--pkgtools/port2pkg/PLIST4
-rw-r--r--pkgtools/port2pkg/files/port2pkg.034
-rw-r--r--pkgtools/port2pkg/files/port2pkg.156
-rwxr-xr-xpkgtools/port2pkg/files/port2pkg.pl358
-rw-r--r--pkgtools/prereq-readme/DESCR2
-rw-r--r--pkgtools/prereq-readme/Makefile33
-rw-r--r--pkgtools/prereq-readme/PLIST1
-rw-r--r--pkgtools/rc.subr/DESCR4
-rw-r--r--pkgtools/rc.subr/Makefile44
-rw-r--r--pkgtools/rc.subr/PLIST8
-rw-r--r--pkgtools/rc.subr/files/rc.conf.example8
-rwxr-xr-xpkgtools/rc.subr/files/rc.d/DAEMON10
-rwxr-xr-xpkgtools/rc.subr/files/rc.d/LOGIN13
-rwxr-xr-xpkgtools/rc.subr/files/rc.d/NETWORKING9
-rwxr-xr-xpkgtools/rc.subr/files/rc.d/SERVERS10
-rw-r--r--pkgtools/rc.subr/files/rc.subr956
-rw-r--r--pkgtools/rcorder/DESCR4
-rw-r--r--pkgtools/rcorder/Makefile27
-rw-r--r--pkgtools/rcorder/PLIST4
-rw-r--r--pkgtools/rcorder/files/Makefile.in150
-rwxr-xr-xpkgtools/rcorder/files/config.guess1516
-rw-r--r--pkgtools/rcorder/files/config.h.in64
-rwxr-xr-xpkgtools/rcorder/files/config.sub1622
-rwxr-xr-xpkgtools/rcorder/files/configure4629
-rw-r--r--pkgtools/rcorder/files/configure.ac36
-rw-r--r--pkgtools/rcorder/files/ealloc.c163
-rw-r--r--pkgtools/rcorder/files/ealloc.h6
-rw-r--r--pkgtools/rcorder/files/hash.c481
-rw-r--r--pkgtools/rcorder/files/hash.h161
-rwxr-xr-xpkgtools/rcorder/files/install-sh201
-rwxr-xr-xpkgtools/rcorder/files/mkinstalldirs40
-rw-r--r--pkgtools/rcorder/files/rcorder.8168
-rw-r--r--pkgtools/rcorder/files/rcorder.c781
-rw-r--r--pkgtools/rcorder/files/rcorder.cat886
-rwxr-xr-xpkgtools/rcorder/files/rcorder2nbcompat53
-rw-r--r--pkgtools/rdigest/DESCR16
-rw-r--r--pkgtools/rdigest/Makefile13
-rw-r--r--pkgtools/rdigest/PLIST3
-rw-r--r--pkgtools/rdigest/distinfo5
-rw-r--r--pkgtools/rdigest/patches/patch-aa60
-rw-r--r--pkgtools/rdigest/patches/patch-ab90
-rw-r--r--pkgtools/rdigest/patches/patch-ac210
-rw-r--r--pkgtools/revbump/DESCR5
-rw-r--r--pkgtools/revbump/Makefile38
-rw-r--r--pkgtools/revbump/PLIST7
-rw-r--r--pkgtools/revbump/files/blbump149
-rw-r--r--pkgtools/revbump/files/blbump.172
-rw-r--r--pkgtools/revbump/files/finddepends135
-rw-r--r--pkgtools/revbump/files/finddepends.181
-rw-r--r--pkgtools/revbump/files/revbump166
-rw-r--r--pkgtools/revbump/files/revbump.1110
-rw-r--r--pkgtools/rpm2pkg/DESCR3
-rw-r--r--pkgtools/rpm2pkg/Makefile44
-rw-r--r--pkgtools/rpm2pkg/PLIST3
-rw-r--r--pkgtools/rpm2pkg/files/rpm2pkg.8161
-rw-r--r--pkgtools/rpm2pkg/files/rpm2pkg.c965
-rw-r--r--pkgtools/shlock/DESCR15
-rw-r--r--pkgtools/shlock/Makefile47
-rw-r--r--pkgtools/shlock/PLIST2
-rw-r--r--pkgtools/shlock/files/Makefile10
-rw-r--r--pkgtools/shlock/files/shlock.1121
-rw-r--r--pkgtools/shlock/files/shlock.c345
-rw-r--r--pkgtools/tnftp/Makefile29
-rw-r--r--pkgtools/url2pkg/DESCR3
-rw-r--r--pkgtools/url2pkg/Makefile45
-rw-r--r--pkgtools/url2pkg/PLIST6
-rw-r--r--pkgtools/url2pkg/files/MakeMaker.pm76
-rw-r--r--pkgtools/url2pkg/files/url2pkg.8127
-rw-r--r--pkgtools/url2pkg/files/url2pkg.pl445
-rw-r--r--pkgtools/verifypc/DESCR8
-rw-r--r--pkgtools/verifypc/Makefile38
-rw-r--r--pkgtools/verifypc/PLIST3
-rw-r--r--pkgtools/verifypc/files/verifypc.194
-rw-r--r--pkgtools/verifypc/files/verifypc.sh172
-rw-r--r--pkgtools/x11-links/DESCR14
-rw-r--r--pkgtools/x11-links/Makefile86
-rw-r--r--pkgtools/x11-links/PLIST2
-rw-r--r--pkgtools/x11-links/buildlink3.mk38
-rw-r--r--pkgtools/x11-links/builtin.mk9
-rw-r--r--pkgtools/x11-links/files/openwin1001
-rw-r--r--pkgtools/x11-links/files/xdec436
-rw-r--r--pkgtools/x11-links/files/xfree643
-rw-r--r--pkgtools/x11-links/files/xfree.MesaLib36
-rw-r--r--pkgtools/x11-links/files/xfree.Xft212
-rw-r--r--pkgtools/x11-links/files/xfree.Xrandr14
-rw-r--r--pkgtools/x11-links/files/xfree.Xrender11
-rw-r--r--pkgtools/x11-links/files/xfree.expat15
-rw-r--r--pkgtools/x11-links/files/xfree.fontconfig12
-rw-r--r--pkgtools/x11-links/files/xfree.freetype2109
-rw-r--r--pkgtools/x11-links/files/xfree.glu10
-rw-r--r--pkgtools/x11-links/files/xfree.randrext4
-rw-r--r--pkgtools/x11-links/files/xfree.randrproto4
-rw-r--r--pkgtools/x11-links/files/xfree.render4
-rw-r--r--pkgtools/x11-links/files/xfree.renderproto4
-rw-r--r--pkgtools/x11-links/files/xfree.xcursor10
-rw-r--r--pkgtools/x11-links/files/xfree.xpm10
-rw-r--r--pkgtools/x11-links/files/xorg612
-rw-r--r--pkgtools/x11-links/files/xorg.Xcomposite5
-rw-r--r--pkgtools/x11-links/files/xorg.Xfixes8
-rw-r--r--pkgtools/x11-links/files/xorg.compositeext4
-rw-r--r--pkgtools/x11-links/files/xorg.compositeproto4
-rw-r--r--pkgtools/x11-links/files/xorg.fixesext4
-rw-r--r--pkgtools/x11-links/files/xorg.fixesproto4
-rw-r--r--pkgtools/x11-links/files/xorg.xextensions54
-rw-r--r--pkgtools/x11-links/files/xorg.xextproto54
-rw-r--r--pkgtools/x11-links/files/xsgi560
-rw-r--r--pkgtools/x11-links/openwin.mk27
-rw-r--r--pkgtools/x11-links/version.mk35
-rw-r--r--pkgtools/x11-links/xdec.mk3
-rw-r--r--pkgtools/x11-links/xfree-version.mk41
-rw-r--r--pkgtools/x11-links/xfree.mk34
-rw-r--r--pkgtools/x11-links/xorg.mk51
-rw-r--r--pkgtools/x11-links/xsgi.mk3
-rwxr-xr-xpkgtools/xpkgwedge/DEINSTALL55
-rw-r--r--pkgtools/xpkgwedge/DESCR8
-rw-r--r--pkgtools/xpkgwedge/INSTALL63
-rw-r--r--pkgtools/xpkgwedge/MESSAGE23
-rw-r--r--pkgtools/xpkgwedge/Makefile117
-rw-r--r--pkgtools/xpkgwedge/PLIST7
-rw-r--r--pkgtools/xpkgwedge/files/darwin.cf.patch13
-rw-r--r--pkgtools/xpkgwedge/files/irix5.patch102
-rw-r--r--pkgtools/xpkgwedge/files/irix6.patch40
-rw-r--r--pkgtools/xpkgwedge/files/pkgxmkmf.in83
-rw-r--r--pkgtools/xpkgwedge/files/xpkgwedge.def124
665 files changed, 0 insertions, 163419 deletions
diff --git a/pkgtools/Makefile b/pkgtools/Makefile
deleted file mode 100644
index c6b9fa521ef..00000000000
--- a/pkgtools/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-# $NetBSD: Makefile,v 1.82 2007/03/02 09:46:41 wiz Exp $
-#
-
-COMMENT= Tools for use in the packages collection
-
-SUBDIR+= autoswc
-SUBDIR+= binpatch
-SUBDIR+= bootstrap-extras
-SUBDIR+= bootstrap-mk-files
-SUBDIR+= cdpack
-SUBDIR+= createbuildlink
-SUBDIR+= dfdisk
-SUBDIR+= digest
-SUBDIR+= genrpm
-SUBDIR+= gensolpkg
-SUBDIR+= libkver
-SUBDIR+= libnbcompat
-SUBDIR+= mtree
-SUBDIR+= p5-pkgsrc-Dewey
-SUBDIR+= pax
-SUBDIR+= pkg_alternatives
-SUBDIR+= pkg_chk
-SUBDIR+= pkg_comp
-SUBDIR+= pkg_filecheck
-SUBDIR+= pkg_install
-SUBDIR+= pkg_install-info
-SUBDIR+= pkg_notify
-SUBDIR+= pkg_regress
-SUBDIR+= pkg_rolling-replace
-SUBDIR+= pkg_select
-SUBDIR+= pkg_tarup
-SUBDIR+= pkgclean
-SUBDIR+= pkgdep
-SUBDIR+= pkgdepgraph
-SUBDIR+= pkgdiff
-SUBDIR+= pkgfind
-SUBDIR+= pkglint
-SUBDIR+= pkgse
-SUBDIR+= pkgsurvey
-SUBDIR+= port2pkg
-#SUBDIR+= prereq-readme # Only used by the README.html generation
-SUBDIR+= rc.subr
-SUBDIR+= rcorder
-SUBDIR+= rdigest
-SUBDIR+= revbump
-SUBDIR+= rpm2pkg
-SUBDIR+= shlock
-SUBDIR+= tnftp
-SUBDIR+= url2pkg
-SUBDIR+= verifypc
-SUBDIR+= x11-links
-SUBDIR+= xpkgwedge
-
-.include "../mk/bsd.pkg.subdir.mk"
diff --git a/pkgtools/autoswc/DESCR b/pkgtools/autoswc/DESCR
deleted file mode 100644
index e8cc474199b..00000000000
--- a/pkgtools/autoswc/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-autoswc is an utility that automatically generates system wide cache files
-for use with configure scripts created by GNU autoconf, and specially by
-those executed within pkgsrc.
diff --git a/pkgtools/autoswc/Makefile b/pkgtools/autoswc/Makefile
deleted file mode 100644
index a05d37255a0..00000000000
--- a/pkgtools/autoswc/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# $NetBSD: Makefile,v 1.13 2007/01/07 09:14:08 rillig Exp $
-
-DISTNAME= autoswc-1.5
-CATEGORIES= pkgtools sysutils
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= jmmv@NetBSD.org
-COMMENT= Generates system wide cache files for GNU autoconf
-
-DEPENDS+= autoconf>=2.59:../../devel/autoconf
-DEPENDS+= automake>=1.8.2:../../devel/automake
-DEPENDS+= libtool-base>=1.5.2:../../devel/libtool-base
-
-NO_CHECKSUM= YES
-NO_CONFIGURE= YES
-NO_MTREE= YES
-WRKSRC= ${WRKDIR}
-
-PKG_SYSCONFSUBDIR= autoswc
-CACHEDIR= /var/db/autoswc
-MKCONF= /etc/mk.conf
-OWN_DIRS= ${CACHEDIR}
-
-EVAL_PREFIX+= PREFIX.autoconf=autoconf
-PREFIX.autoconf_DEFAULT= ${LOCALBASE}
-EVAL_PREFIX+= PREFIX.automake=automake
-PREFIX.automake_DEFAULT= ${LOCALBASE}
-EVAL_PREFIX+= PREFIX.libtool=libtool
-PREFIX.libtool_DEFAULT= ${LOCALBASE}
-
-SUBST_CLASSES+= build
-SUBST_MESSAGE.build= Building autoswc.
-SUBST_STAGE.build= do-build
-SUBST_FILES.build= autoswc
-SUBST_FILES.build+= autoswc.8
-SUBST_FILES.build+= autoswc.mk
-SUBST_FILES.build+= config.site
-SUBST_SED.build= -e 's|@ACLOCAL@|${PREFIX.automake}/bin/aclocal|g'
-SUBST_SED.build+= -e 's|@AUTOCONF@|${PREFIX.autoconf}/bin/autoconf|g'
-SUBST_SED.build+= -e 's|@AUTOMAKE@|${PREFIX.automake}/bin/automake|g'
-SUBST_SED.build+= -e 's|@CACHEDIR@|${CACHEDIR}|g'
-SUBST_SED.build+= -e 's|@LIBTOOLIZE@|${PREFIX.libtool}/bin/libtoolize|g'
-SUBST_SED.build+= -e 's|@MACHINE_GNU_PLATFORM@|${MACHINE_GNU_PLATFORM}|g'
-SUBST_SED.build+= -e 's|@MAKE@|${MAKE}|g'
-SUBST_SED.build+= -e 's|@MKCONF@|${MKCONF}|g'
-SUBST_SED.build+= -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.build+= -e 's|@SH@|${SH}|g'
-SUBST_SED.build+= -e 's|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
-
-INSTALLATION_DIRS= ${PKGMANDIR}/man8 sbin
-
-do-extract:
- ${CP} ${FILESDIR}/autoswc.8 ${WRKSRC}
- ${CP} ${FILESDIR}/autoswc.mk ${WRKSRC}
- ${CP} ${FILESDIR}/autoswc.sh ${WRKSRC}/autoswc
- ${CP} ${FILESDIR}/config.site ${WRKSRC}
-
-do-build:
- @${DO_NADA}
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/autoswc ${PREFIX}/sbin
- ${INSTALL_DATA} ${WRKSRC}/autoswc.8 ${PREFIX}/${PKGMANDIR}/man8
- ${INSTALL_DATA_DIR} ${PREFIX}/share/autoswc
- ${INSTALL_DATA} ${WRKSRC}/autoswc.mk ${PREFIX}/share/autoswc
- ${INSTALL_DATA} ${WRKSRC}/config.site ${PREFIX}/share/autoswc
- ${INSTALL_DATA} ${FILESDIR}/configure.ac ${PREFIX}/share/autoswc
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/autoswc/PLIST b/pkgtools/autoswc/PLIST
deleted file mode 100644
index 814a9502b35..00000000000
--- a/pkgtools/autoswc/PLIST
+++ /dev/null
@@ -1,7 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/02/21 23:28:32 jmmv Exp $
-man/man8/autoswc.8
-sbin/autoswc
-share/autoswc/autoswc.mk
-share/autoswc/config.site
-share/autoswc/configure.ac
-@dirrm share/autoswc
diff --git a/pkgtools/autoswc/files/autoswc.8 b/pkgtools/autoswc/files/autoswc.8
deleted file mode 100644
index 037b66db103..00000000000
--- a/pkgtools/autoswc/files/autoswc.8
+++ /dev/null
@@ -1,130 +0,0 @@
-.\" $NetBSD: autoswc.8,v 1.1.1.1 2004/02/21 23:28:36 jmmv Exp $
-.\"
-.\" autoswc - Generates system wide cache files for GNU autoconf
-.\" Copyright (c) 2004 Julio M. Merino Vidal <jmmv@NetBSD.org>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd February 21, 2004
-.Dt AUTOSWC 8
-.Os
-.Sh NAME
-.Nm autoswc
-.Nd generates system wide cache files for GNU autoconf
-.Sh SYNOPSIS
-.Nm
-.Op Fl c Ar ac_file
-.Op Fl n Ar cache_name
-.Sh DESCRIPTION
-.Nm
-is an utility that automatically generates system wide cache files for use
-with configure scripts created by
-.Nm GNU autoconf ,
-and specially by those executed within
-.Nm pkgsrc .
-.Pp
-.Nm
-starts by reading the configuration script template.
-It will use
-.Pa @SYSCONFDIR@/configure.ac
-if found, or fallback to
-.Pa @PREFIX@/share/autoswc/configure.ac
-otherwise (a custom file may be given using the
-.Fl c
-flag, though).
-This issues all checks that the user wants to store in the system wide
-cache file, and are basically calls to standard
-.Nm GNU autoconf ,
-.Nm GNU automake
-and/or
-.Nm GNU libtool
-macros.
-There is no need to manually execute any of the
-.Sq AC_INIT ,
-.Sq AM_INIT_AUTOMAKE ,
-.Sq AC_CACHE_SAVE
-and
-.Sq AC_OUTPUT
-macros, as they are automatically inserted in the right place during
-execution.
-.Pp
-The default cache file is stored inside the
-.Pa @CACHEDIR@
-directory, using
-.Pa config.cache.default
-as the file name.
-The
-.Sq default
-part can be changed using the
-.Fl n
-flag, which takes the base name of the cache file.
-.Pp
-To tell
-.Nm pkgsrc
-to use the system wide cache, all you need to do is append the following
-line to your
-.Pa @MKCONF@
-file:
-.Bd -literal -offset indent
-\&.sinclude "@PREFIX@/share/autoswc/autoswc.mk"
-.Ed
-.Pp
-In case you used the
-.Fl n
-flag, you also need to define the
-.Va AUTOSWC_CACHE_NAME
-variable in this file, setting it to the value passed to the flag.
-.Sh NOTES
-Be very careful about what you add to
-.Pa configure.ac .
-You should only check for things that are unlikely to change over time,
-as functions in the
-.Lb libc
-and its header files.
-Failure to do so can easily lead to cache files that get outdated very
-easily during installation of new packages, and cause unexpected
-configuration errors.
-.Pp
-It is recommended that you rebuild the cache file periodically.
-You can configure a simple
-.Xr cron 8
-job to it, which just needs to launch this utility.
-.Pp
-If you hit a compilation problem in any package when using
-.Nm ,
-be
-.Em absolutely
-sure it is not beeing caused by an outdated cache before reporting
-problems.
-The safest and easiest way to do this is to clean the package in question
-and restart the build with the
-.Va AUTOSWC_DISABLE
-variable set, like in the following example:
-.Bd -literal -offset indent
-$ @MAKE@ clean
-$ @MAKE@ AUTOSWC_DISABLE=YES
-.Ed
-.Sh AUTHORS
-.An Julio M. Merino Vidal Aq jmmv@netbsd.org
diff --git a/pkgtools/autoswc/files/autoswc.mk b/pkgtools/autoswc/files/autoswc.mk
deleted file mode 100644
index ea65a26f9a4..00000000000
--- a/pkgtools/autoswc/files/autoswc.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# $NetBSD: autoswc.mk,v 1.1.1.1 2004/02/21 23:28:36 jmmv Exp $
-#
-# autoswc - Generates system wide cache files for GNU autoconf
-# Copyright (c) 2004 Julio M. Merino Vidal <jmmv@NetBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-.if !defined(AUTOSWC_MK)
-AUTOSWC_MK= # defined
-
-. if !defined(AUTOSWC_DISABLE)
-AUTOSWC_CACHE_FILE?= @CACHEDIR@/config.cache.${AUTOSWC_CACHE_NAME}
-AUTOSWC_CACHE_NAME?= default
-
-. if exists(@SYSCONFDIR@/config.site)
-AUTOSWC_CONFIG_SITE?= @SYSCONFDIR@/config.site
-. else
-AUTOSWC_CONFIG_SITE?= @PREFIX@/share/autoswc/config.site
-. endif
-
-CONFIGURE_ENV+= AUTOSWC_CACHE_FILE="${AUTOSWC_CACHE_FILE}"
-CONFIGURE_ENV+= AUTOSWC_CACHE_NAME="${AUTOSWC_CACHE_NAME}"
-CONFIGURE_ENV+= CONFIG_SITE="${AUTOSWC_CONFIG_SITE}"
-. endif
-
-.endif # AUTOSWC_MK
diff --git a/pkgtools/autoswc/files/autoswc.sh b/pkgtools/autoswc/files/autoswc.sh
deleted file mode 100644
index 4c016c08956..00000000000
--- a/pkgtools/autoswc/files/autoswc.sh
+++ /dev/null
@@ -1,210 +0,0 @@
-#!@SH@
-#
-# $NetBSD: autoswc.sh,v 1.2 2004/10/15 20:00:57 tv Exp $
-#
-# autoswc - Generates system wide cache files for GNU autoconf
-# Copyright (c) 2004 Julio M. Merino Vidal <jmmv@NetBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-ProgName=${0##*/}
-
-err() {
- echo "${ProgName}: $*" 1>&2
- exit 1
-}
-
-info() {
- echo "${ProgName}: $*" 1>&2
-}
-
-mktempdir() {
- local d tmpdir
-
- # Check if mktemp exists in the current system.
- for d in $(echo ${PATH} | tr ':' ' '); do
- if [ -x $d/mktemp ]; then
- $d/mktemp -d /tmp/autoswc.XXXX
- return
- fi
- done
-
- # Emulate mktemp; this is not safe.
- info "mktemp(1) not found; race conditions may appear"
- tmpdir=/tmp/autoswc.$$
- mkdir -p ${tmpdir}
- chmod 700 ${tmpdir}
- echo ${tmpdir}
-}
-
-usage() {
- echo "Usage: ${ProgName} [-c ac_file] [-n cache_name]" 1>&2
- exit 1
-}
-
-# -------------------------------------------------------------------------
-
-# Main program
-
-cachename="default"
-
-confsrc="@PREFIX@/share/autoswc/configure.ac"
-[ -f "@SYSCONFDIR@/configure.ac" ] && confsrc="@SYSCONFDIR@/configure.ac"
-
-# Parse command line options
-args=$(getopt c:n: $*)
-[ $? -ne 0 ] && usage
-set -- ${args}
-while [ $# -gt 0 ]; do
- case "$1" in
- -c)
- confsrc="$2"; shift
- ;;
- -n)
- cachename="$2"; shift
- ;;
- --)
- shift; break
- ;;
- esac
- shift
-done
-[ $# -gt 0 ] && usage
-
-# Set the cache name.
-confcache="@CACHEDIR@/config.cache.${cachename}"
-
-# Check if we will be able to store the resulting cache file.
-# The permissions may change during the execution of this script, but this
-# won't bring us problems. This check is just done to save some time in
-# case we got the wrong user running autoswc.
-touch ${confcache} >/dev/null 2>&1 || err "can't update ${confcache}"
-
-# Ensure that the source configure.ac exists.
-[ ! -f ${confsrc} ] && err "${confsrc} does not exist"
-
-# Create work directory.
-wrkdir=$(mktempdir)
-info "using ${wrkdir} as work directory"
-cd ${wrkdir}
-
-# Create work project. This includes:
-# - Makefile.am - empty, just needs to be present.
-# - configure.ac - the user-defined configure.ac file, modified to include
-# basic and required macros.
-# - NEWS README AUTHORS ChangeLog - empty, just need to be present.
-echo "# empty" >Makefile.am
-
-echo "AC_INIT(configure.ac)" >configure.ac
-echo "AM_INIT_AUTOMAKE" >>configure.ac
-cat ${confsrc} >>configure.ac
-echo "AC_CACHE_SAVE" >>configure.ac
-echo "AC_OUTPUT(Makefile)" >>configure.ac
-
-touch NEWS README AUTHORS ChangeLog
-
-# Generate scripts and add missing files.
-info "running @ACLOCAL@..."
-@ACLOCAL@
-if grep LIBTOOL configure.ac >/dev/null 2>&1; then
- info "running @LIBTOOLIZE@..."
- @LIBTOOLIZE@ --force
-fi
-info "running @AUTOMAKE@..."
-@AUTOMAKE@ --add-missing --force-missing
-info "running @AUTOCONF@..."
-@AUTOCONF@
-
-# Run the configure script.
-[ ! -f configure ] && err "autoconf failed"
-CONFIG_SITE= ./configure --cache-file=config.cache \
- --build=@MACHINE_GNU_PLATFORM@ --host=@MACHINE_GNU_PLATFORM@ || \
- err "configure failed"
-mv config.cache config.cache.in
-
-# Prune the cache file from entries that will abort configure scripts when
-# running from within pkgsrc. This is not 100% safe, because configure is
-# right in warning from changed values, but is needed to get this working.
-grep -v "^ac_cv_env" <config.cache.in >config.cache
-
-# Update the cache file. We don't give it write permissions since we don't
-# want third-party configure scripts update it with unwanted results.
-install -c -m 444 config.cache ${confcache} || err "can't update ${confcache}"
-
-cd -
-
-rm -rf ${wrkdir}
-
-# Start of summary.
-cat <<EOF
-
-===========================================================================
-AUTOSWC - SUMMARY FOR \`${cachename}' CACHE
-
- ${confcache} updated successfully.
-
-EOF
-
-# Warn the user if autoswc.mk is not included from mk.conf.
-if ! egrep '^.-?[ \t]*s?include[ \t]+"@PREFIX@/share/autoswc/autoswc.mk"' \
- @MKCONF@ >/dev/null 2>&1; then
- cat <<EOF
- The @MKCONF@ file seems to not include autoswc.mk. This means that
- configure scripts will not find the generated cache file. Add the
- following line to it:
-
- .sinclude "@PREFIX@/share/autoswc/autoswc.mk"
-
-EOF
-fi
-
-# Tell the user to define AUTOSWC_CACHE_NAME if he used a custom cache
-# name.
-if [ ${cachename} != default ]; then
- cat <<EOF
- You have used a non-standard cache name. To let configure scripts
- find it, you should add the following line somewhere in your
- @MKCONF@ file, in case it is not there yet:
-
- AUTOSWC_CACHE_NAME= ${cachename}
-
-EOF
-fi
-
-# Warn the user about the dangers of using a system wide cache file.
-cat <<EOF
- Please remember that by using a system wide cache file, you assume
- that the results stored in it may get outdated and cause strange build
- failures in third-party packages. When reporting bugs, be absolutely
- sure it is not your fault. Check the autoswc(8) manpage for more
- details.
-===========================================================================
-EOF
-
-exit 0
-
-# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
diff --git a/pkgtools/autoswc/files/config.site b/pkgtools/autoswc/files/config.site
deleted file mode 100644
index c59b3703f50..00000000000
--- a/pkgtools/autoswc/files/config.site
+++ /dev/null
@@ -1,41 +0,0 @@
-# $NetBSD: config.site,v 1.1.1.1 2004/02/21 23:28:36 jmmv Exp $
-#
-# autoswc - Generates system wide cache files for GNU autoconf
-# Copyright (c) 2004 Julio M. Merino Vidal <jmmv@NetBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-# Set default values.
-: ${AUTOSWC_CACHE_NAME:=default}
-: ${AUTOSWC_CACHE_FILE:=@CACHEDIR@/config.cache.${AUTOSWC_CACHE_NAME}}
-
-# Set which cache file to use, if not already set.
-if test "${cache_file}" = /dev/null; then
- cache_file="${AUTOSWC_CACHE_FILE}"
-fi
-
-# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
diff --git a/pkgtools/autoswc/files/configure.ac b/pkgtools/autoswc/files/configure.ac
deleted file mode 100644
index fe56b00319a..00000000000
--- a/pkgtools/autoswc/files/configure.ac
+++ /dev/null
@@ -1,304 +0,0 @@
-dnl $NetBSD: configure.ac,v 1.5 2004/10/25 20:58:05 tv Exp $
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for host details.
-AC_CANONICAL_HOST
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for compilers and preprocessors.
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_CXX
-AC_PROG_CXXCPP
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for libtool and the maximum command line length supported by the
-dnl system, as this takes a long time.
-AM_PROG_LIBTOOL
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for compiler features.
-AC_C_BACKSLASH_A
-AC_C_BIGENDIAN
-AC_C_CONST
-AC_C_RESTRICT
-AC_C_VOLATILE
-AC_C_INLINE
-AC_C_CHAR_UNSIGNED
-AC_C_LONG_DOUBLE
-AC_C_STRINGIZE
-AC_C_PROTOTYPES
-AC_PROG_CC_C_O
-AC_PROG_GCC_TRADITIONAL
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for standard header files.
-AC_HEADER_DIRENT
-AC_HEADER_MAJOR
-AC_HEADER_STAT
-AC_HEADER_STDBOOL
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-AC_HEADER_TIOCGWINSZ
-AC_CHECK_HEADERS([sys/cdefs.h \
- sys/param.h \
- sys/types.h \
- sys/file.h \
- sys/ioctl.h \
- sys/mount.h \
- sys/resource.h \
- sys/socket.h \
- sys/stat.h \
- sys/statvfs.h \
- sys/sysctl.h \
- sys/times.h \
- sys/utsname.h \
- sys/varargs.h \
- sys/vfs.h \
- netinet/in.h \
- argz.h \
- assert.h \
- ctype.h \
- err.h \
- fcntl.h \
- fstab.h \
- grp.h \
- inttypes.h \
- libgen.h \
- limits.h \
- malloc.h \
- mntent.h \
- mount.h \
- paths.h \
- signal.h \
- stdarg.h \
- stddef.h \
- stdint.h \
- strings.h \
- util.h \
- varargs.h \
- wctype.h],,,
- [[#if HAVE_SYS_CDEFS_H
- # include <sys/cdefs.h>
- #endif
- #if HAVE_SYS_PARAM_H
- # include <sys/param.h>
- #endif]])
-AC_LANG_PUSH(C++)
-AC_CHECK_HEADERS([bitset \
- deque \
- fstream \
- iostream \
- list \
- map \
- queue \
- set \
- stack \
- string \
- vector])
-AC_LANG_POP(C++)
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for standard functions.
-AC_FUNC_ALLOCA
-AC_FUNC_CHOWN
-AC_FUNC_CLOSEDIR_VOID
-AC_FUNC_ERROR_AT_LINE
-AC_FUNC_FORK
-AC_FUNC_FSEEKO
-AC_FUNC_GETGROUPS
-AC_FUNC_GETMNTENT
-AC_FUNC_GETPGRP
-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_FUNC_MALLOC
-AC_FUNC_MEMCMP
-AC_FUNC_MBRTOWC
-AC_FUNC_MKTIME
-AC_FUNC_MMAP
-AC_FUNC_OBSTACK
-AC_FUNC_REALLOC
-AC_FUNC_SELECT_ARGTYPES
-AC_FUNC_SETPGRP
-AC_FUNC_STAT
-AC_FUNC_LSTAT
-AC_FUNC_SETVBUF_REVERSED
-AC_FUNC_STRCOLL
-AC_FUNC_STRTOD
-AC_FUNC_STRERROR_R
-AC_FUNC_STRFTIME
-AC_FUNC_STRNLEN
-AC_FUNC_UTIME_NULL
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([__argz_count \
- __argz_next \
- __argz_stringify \
- __fsetlocking \
- asprintf \
- basename \
- bzero \
- confstr \
- connect \
- dirname \
- dup2 \
- err \
- errx \
- feof_unlocked \
- fgets_unlocked \
- fnmatch \
- getc_unlocked \
- getcwd \
- getdelim \
- getdtablesize \
- getegid \
- geteuid \
- getgid \
- getmode \
- getprogname \
- getrlimit \
- getrusage \
- gettimeofday \
- getuid \
- inet_pton \
- isascii \
- isblank \
- isdigit \
- isgraph \
- isinf \
- isprint \
- isspace \
- isxdigit \
- killpg \
- lockf \
- lseek64 \
- lstat \
- memchr \
- memcpy \
- memmove \
- memset \
- mempcpy \
- mmap \
- mkdir \
- mkfifo \
- mkstemp \
- mkstemps \
- mktemp \
- munmap \
- open64 \
- pathconf \
- poll \
- putenv \
- readdir_r \
- readlink \
- remove \
- rename \
- sbrk \
- select \
- setegid \
- setenv \
- seteuid \
- setlinebuf \
- setmode \
- setprogname \
- setresgid \
- setresuid \
- setvbuf \
- shmat \
- sigaction \
- siginterrupt \
- sigset \
- snprintf \
- socket \
- statvfs \
- stpcpy \
- strcasecmp \
- strchr \
- strrchr \
- strdup \
- strerror \
- stricmp \
- strlcat \
- strlcpy \
- strncasecmp \
- strncat \
- strncpy \
- strndup \
- strpbrk \
- strspn \
- strstr \
- strtol \
- strtoll \
- strtoul \
- strtoull \
- strtoimax \
- strtoumax \
- sysconf \
- times \
- tsearch \
- ttyname \
- tzset \
- ulimit \
- uname \
- unsetenv \
- utime \
- utimes \
- vasprintf \
- vsnprintf \
- waitpid \
- wait3 \
- warn \
- warnx])
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for standard types.
-AC_CHECK_TYPES([gid_t,
- int16_t,
- int32_t,
- int64_t,
- int8_t,
- intmax_t,
- long long,
- mode_t,
- off_t,
- ptrdiff_t,
- quad_t,
- rlim_t,
- sig_t,
- size_t,
- ssize_t,
- time_t,
- u_int,
- u_int16_t,
- u_int32_t,
- u_int64_t,
- u_int8_t,
- u_long,
- u_quad_t,
- uid_t,
- uint16_t,
- uint32_t,
- uint64_t,
- uint8_t,
- uintmax_t,
- unsigned long long])
-
-dnl -----------------------------------------------------------------------
-
-dnl Check for standard sizes.
-AC_CHECK_SIZEOF(char)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(float)
-AC_CHECK_SIZEOF(double)
-
-dnl vim: syntax=config:expandtab:shiftwidth=4:softtabstop=4
diff --git a/pkgtools/binpatch/DESCR b/pkgtools/binpatch/DESCR
deleted file mode 100644
index 64ce39d7776..00000000000
--- a/pkgtools/binpatch/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-Apply small, arbitrary binary patches using an arcane command line
-syntax.
diff --git a/pkgtools/binpatch/Makefile b/pkgtools/binpatch/Makefile
deleted file mode 100644
index f2d57aafc81..00000000000
--- a/pkgtools/binpatch/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-# $NetBSD: Makefile,v 1.7 2007/01/07 09:14:08 rillig Exp $
-#
-
-DISTNAME= binpatch-1.0
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= atatat@NetBSD.org
-HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
-COMMENT= Trivial binary patch applicator
-
-
-NO_CHECKSUM= yes
-
-.include "../../mk/bsd.prefs.mk"
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-do-build:
- @(cd ${WRKSRC}; \
- ${ECHO} "${CC} -o binpatch binpatch.c"; \
- ${CC} -o binpatch binpatch.c )
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/binpatch ${PREFIX}/bin/binpatch
- ${INSTALL_MAN} ${WRKSRC}/binpatch.1 ${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/binpatch/PLIST b/pkgtools/binpatch/PLIST
deleted file mode 100644
index 13f0c0b99f8..00000000000
--- a/pkgtools/binpatch/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/07/23 03:37:26 atatat Exp $
-bin/binpatch
-man/man1/binpatch.1
diff --git a/pkgtools/binpatch/files/binpatch.1 b/pkgtools/binpatch/files/binpatch.1
deleted file mode 100644
index 8e7ef0930e5..00000000000
--- a/pkgtools/binpatch/files/binpatch.1
+++ /dev/null
@@ -1,116 +0,0 @@
-.\" $NetBSD: binpatch.1,v 1.1.1.1 2004/07/23 03:37:26 atatat Exp $
-.\"
-.\" Copyright (c) 2004 by Andrew Brown <atatat@netbsd.org>
-.\" Absolutely no warranty.
-.\"
-.Dd July 20, 2004
-.Dt BINPATCH 1
-.Sh NAME
-.Nm binpatch
-.Nd trivial binary patch applicator
-.Sh SYNOPSIS
-.Nm
-.Pa file=...
-.Pa size=...
-.Pa offset=...
-.Pa compare=...
-.Pa skip=...
-.Pa replace=...
-.Sh DESCRIPTION
-The
-.Nm
-utility can read and replace a small section of a given file.
-It is designed for use in those instances where a problem exists with
-a given binary that cannot be reconstructed from source code, but the
-required change can be implemented by replacing a few bytes in the
-existing binary.
-All arguments must be given.
-.Sh EXAMPLES
-Given a binary called
-.Dq a.out
-of 10713 bytes in size with the following text segment:
-.Bd -literal -offset indent
-% objdump -h a.out
-.sp
-a.out: file format elf32-i386
-.sp
-Sections:
-Idx Name Size VMA LMA File off Algn
-[...]
- 9 .text 00000be4 08048968 08048968 00000968 2**2
- CONTENTS, ALLOC, LOAD, READONLY, CODE
-[...]
-% objdump -d -j .text a.out
-[...]
- 8048b0f: 83 ef 04 sub $0x4,%edi
- 8048b12: ff d0 call *%eax
- 8048b14: 83 fe ff cmp $0xffffffff,%esi
-[...]
-.sp
-.Ed
-where we wish to elide the call through
-.Ar %eax
-by replacing it with a series of
-.Ar nop
-(or
-.Dq no operation )
-instructions (the machine code for this on the i386 platform is 0x90),
-we first calculate the offset into the file of the previous
-.Ar sub
-instruction. To do this, we take the address of the
-.Ar sub
-instruction as given by the dissassembly output, subtract the
-.Dq LMA
-and add the
-.Dq File off
-values from the objdump output (note that
-.Xr bc 1
-expects hexadecimal values to be given using upper case):
-.Bd -literal -offset indent
-% bc
-ibase=16
-8048B0F-08048968+00000968
-2831
-.sp
-.Ed
-The region of the binary we want to compare to before applying the
-patch is the concatenation of the relevant machine codes from the
-dissassembly dump (\c
-.Ar 83ef04ffd083feff )
-and the replacement is simply two
-.Ar nop
-instructions (\c
-.Ar 9090 ) ,
-that will replace the
-.Ar ffd0
-of the original call.
-The offset of the replacement is 3, since that is the number of bytes
-in the
-.Ar sub
-instruction.
-From this we have our patch:
-.Bd -literal -offset indent
-% binpatch file=a.out size=10713 offset=2831 \\
- compare=83ef04ffd083feff skip=3 replace=9090
-% objdump -d -j .text a.out
-[...]
- 8048b0f: 83 ef 04 sub $0x4,%edi
- 8048b12: 90 nop
- 8048b13: 90 nop
- 8048b14: 83 fe ff cmp $0xffffffff,%esi
-[...]
-.sp
-.Ed
-And thus the call is removed.
-.Sh DIAGNOSTICS
-The diagnostics are terse and almost unhelpful, but are more verbose
-than users of
-.Xr ed 1
-might be used to.
-They typically mention the command line argument that was in error.
-.Sh SEE ALSO
-.Xr bc 1 ,
-.Xr objdump 1 ,
-.Xr patch 1
-.Sh AUTHORS
-.An Andrew Brown Aq atatat@netbsd.org
diff --git a/pkgtools/binpatch/files/binpatch.c b/pkgtools/binpatch/files/binpatch.c
deleted file mode 100644
index a80667f0bd4..00000000000
--- a/pkgtools/binpatch/files/binpatch.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/* $NetBSD: binpatch.c,v 1.1.1.1 2004/07/23 03:37:26 atatat Exp $ */
-
-/*
- * ------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * Andrew Brown <atatat@NetBSD.org> wrote this file. As long as you
- * retain this notice you can do whatever you want with this stuff.
- * If we meet some day, and you think this stuff is worth it, you can
- * buy me a beer in return.
- * ------------------------------------------------------------------------
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static int
-die(int rc, const char *msg)
-{
- if (rc)
- perror(msg);
- else
- fprintf(stderr, "%s\n", msg);
- exit(1);
-}
-
-static void
-cvt(const char *s, const char *i, unsigned char *o, size_t l)
-{
- int t, x;
-
- for (t = 0; t < l; t++) {
- x = i[2 * t];
- if (x >= '0' && x <= '9')
- x -= '0';
- else if (x >= 'a' && x <= 'f')
- x -= 'a' - 10;
- else if (x >= 'A' && x <= 'F')
- x -= 'A' - 10;
- else
- die(0, s);
- o[t] = x * 16;
-
- x = i[2 * t + 1];
- if (x >= '0' && x <= '9')
- x -= '0';
- else if (x >= 'a' && x <= 'f')
- x -= 'a' - 10;
- else if (x >= 'A' && x <= 'F')
- x -= 'A' - 10;
- else
- die(0, s);
- o[t] += x;
- }
-}
-
-int
-main(int argc, char *argv[])
-{
- struct stat st;
- char *key, *value;
- int f, i;
- unsigned char *buf, *get, *put;
- size_t lget, lput;
- off_t sz, cmp_off, skip_off;
-
- f = -1;
- get = put = NULL;
- lget = lput = 0;
- sz = cmp_off = skip_off = -1;
-
- while (--argc > 0) {
- key = *++argv;
- if ((value = strchr(key, '=')) == NULL)
- die(0, "value required");
- else
- *value++ = '\0';
-
- if (strcmp(key, "file") == 0) {
- f = open(value, O_RDWR);
- if (f == -1)
- die(1, "file");
- }
- else if (strcmp(key, "size") == 0) {
- char *t;
- errno = 0;
- sz = strtol(value, &t, 0);
- if (errno != 0)
- die(1, "size");
- }
- else if (strcmp(key, "offset") == 0) {
- char *t;
- errno = 0;
- cmp_off = strtol(value, &t, 0);
- if (errno != 0)
- die(1, "offset");
- }
- else if (strcmp(key, "compare") == 0) {
- lget = strlen(value);
- if (lget % 2 != 0)
- die(0, "compare");
- lget /= 2;
- get = malloc(lget);
- buf = malloc(lget);
- cvt("compare", value, get, lget);
- }
- else if (strcmp(key, "skip") == 0) {
- char *t;
- errno = 0;
- skip_off = strtol(value, &t, 0);
- if (errno != 0)
- die(1, "offset");
- }
- else if (strcmp(key, "replace") == 0) {
- lput = strlen(value);
- if (lput % 2 != 0)
- die(0, "replace");
- lput /= 2;
- put = malloc(lput);
- cvt("replace", value, put, lput);
- }
- }
-
- /*
- * ./binpatch
- * file=${MOZILLA_HOME}/netscape
- * size=13823336
- * offset=0x008073e9
- * compare=6a00e82406a3ffe81f0ca3ff
- * skip=2
- * replace=9090909090
- */
-
- if (f == -1)
- die(0, "file missing");
- if (get == NULL || lget == 0)
- die(0, "compare missing");
- if (put == NULL || lput == 0)
- die(0, "replace missing");
- if (sz == -1)
- die(0, "size missing");
- if (cmp_off == -1)
- die(0, "offset missing");
- if (skip_off == -1)
- die(0, "skip missing");
- if (skip_off < 0 ||
- (skip_off == 0 && lput >= lget) ||
- (skip_off > 0 && skip_off + lput > lget))
- die(0, "illegal skip");
-
- if (fstat(f, &st) == -1)
- die(1, "fstat");
- if (st.st_size != sz)
- die(0, "wrong size");
- if (lseek(f, cmp_off, SEEK_SET) == -1)
- die(1, "lseek");
- if (read(f, buf, lget) != lget)
- die(1, "read");
- if (memcmp(buf, get, lget) != 0)
- die(0, "instructions not found");
- if (lseek(f, cmp_off + skip_off, SEEK_SET) == -1)
- die(1, "lseek");
- if (write(f, put, lput) != lput)
- die(1, "write");
- if (close(f) != 0)
- die(1, "close");
-
- return (0);
-}
diff --git a/pkgtools/bootstrap-extras/DESCR b/pkgtools/bootstrap-extras/DESCR
deleted file mode 100644
index 45571ba49b9..00000000000
--- a/pkgtools/bootstrap-extras/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-This package provides extra files and scripts needed to bootstrap pkgsrc
-on this platform.
diff --git a/pkgtools/bootstrap-extras/Makefile b/pkgtools/bootstrap-extras/Makefile
deleted file mode 100644
index c7fc44c56b7..00000000000
--- a/pkgtools/bootstrap-extras/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# $NetBSD: Makefile,v 1.2 2006/08/24 17:46:53 wiz Exp $
-
-DISTNAME= bootstrap-extra-files-20060824
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-COMMENT= Extra bootstrap files and scripts for ${OPSYS}
-
-NO_CHECKSUM= yes
-NO_MTREE= yes
-NO_CONFIGURE= yes
-NO_BUILD= yes
-
-.include "../../mk/bsd.prefs.mk"
-
-OPSYSVARS+= NEED_FAKELDD
-NEED_FAKELDD.IRIX= # empty
-NEED_FAKELDD.*= "@comment "
-PLIST_SUBST+= NEED_FAKELDD=${NEED_FAKELDD}
-
-OPSYSVARS+= NEED_MKDIR
-NEED_MKDIR.UnixWare= # empty
-NEED_MKDIR.*= "@comment "
-PLIST_SUBST+= NEED_MKDIR=${NEED_MKDIR}
-
-OPSYSVARS+= NEED_STRIP
-NEED_STRIP.AIX= # empty
-NEED_STRIP.*= "@comment "
-PLIST_SUBST+= NEED_STRIP=${NEED_STRIP}
-
-do-extract:
- ${CP} -R ${FILESDIR} ${WRKSRC}
-
-do-install:
- if ${TEST} -z ${NEED_FAKELDD:M*:Q}""; then \
- ${INSTALL_SCRIPT_DIR} ${PREFIX}/sbin; \
- ${INSTALL_SCRIPT} ${WRKSRC}/fakeldd \
- ${PREFIX}/sbin/fakeldd; \
- fi
- if ${TEST} -z ${NEED_MKDIR:M*:Q}""; then \
- ${INSTALL_SCRIPT_DIR} ${PREFIX}/bin; \
- ${INSTALL_SCRIPT} ${WRKSRC}/mkdir-sh \
- ${PREFIX}/bin/mkdir-sh; \
- fi
- if ${TEST} -z ${NEED_STRIP:M*:Q}""; then \
- ${INSTALL_SCRIPT_DIR} ${PREFIX}/bin; \
- ${INSTALL_SCRIPT} ${WRKSRC}/strip-sh \
- ${PREFIX}/bin/strip; \
- fi
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/bootstrap-extras/PLIST b/pkgtools/bootstrap-extras/PLIST
deleted file mode 100644
index 8e729b33a58..00000000000
--- a/pkgtools/bootstrap-extras/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
-${NEED_MKDIR}bin/mkdir-sh
-${NEED_STRIP}bin/strip
-${NEED_FAKELDD}sbin/fakeldd
diff --git a/pkgtools/bootstrap-extras/files/fakeldd b/pkgtools/bootstrap-extras/files/fakeldd
deleted file mode 100644
index 97f11df6f69..00000000000
--- a/pkgtools/bootstrap-extras/files/fakeldd
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: fakeldd,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
-#
-/usr/bin/elfdump -Dl "$@" |
-/usr/bin/nawk 'NF == 7 || NF == 8 {printf "x x %s\n",$1}'
diff --git a/pkgtools/bootstrap-extras/files/mkdir-sh b/pkgtools/bootstrap-extras/files/mkdir-sh
deleted file mode 100644
index 851ad525c7b..00000000000
--- a/pkgtools/bootstrap-extras/files/mkdir-sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: mkdir-sh,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
-#
-
-PATH=/bin:/sbin:/usr/bin:/usr/sbin; export PATH
-
-MKDIRCMD=mkdir
-cmdargs="$@"
-
-# variable 'options' is unused
-for options in p m
-do
- if [ $# -lt 1 ]
- then
- ${MKDIRCMD} ${cmdargs}
- exit $?
- fi
-
- case $1 in
- -p) pathopt=-p;
- shift;;
- -m) modeopt="-m ${2}"
- shift;
- if [ $# -ne 0 ]
- then
- shift
- else
- ${MKDIRCMD} ${cmdargs}
- exit $?
- fi
- ;;
- esac
-done
-
-if [ $# -gt 0 ]
-then
- while [ $# -gt 0 ]
- do
- if [ -z "${pathopt}" ]
- then
- ${MKDIRCMD} ${modeopt} -- "$1"
- elif [ ! -d $1 ]
- then
- ${MKDIRCMD} ${pathopt} ${modeopt} -- "$1"
- else
- : # directory exists, nothing to do
- fi
- shift
- done
-else
- ${MKDIRCMD} ${cmdargs}
-fi
diff --git a/pkgtools/bootstrap-extras/files/strip-sh b/pkgtools/bootstrap-extras/files/strip-sh
deleted file mode 100644
index 9e0c9368bdc..00000000000
--- a/pkgtools/bootstrap-extras/files/strip-sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: strip-sh,v 1.1.1.1 2006/07/17 14:21:31 jlam Exp $
-#
-# On some platforms strip complains too much if the file is not writable,
-# or if it's already stripped.
-#
-for f in "$@" ; do
- if ! /usr/bin/file "$f" | grep -q "not stripped" ; then
- # Skip the file if it's already stripped
- continue
- fi
- nowrite=0
- if [ ! -w "$f" ] ; then
- # Make sure it's writable.
- nowrite=1
- chmod +w "$f"
- fi
- /usr/bin/strip "$f"
- ret=$?
- if [ $nowrite -eq 1 ] ; then
- chmod -w "$f"
- fi
- if [ $ret -ne 0 ] ; then
- exit $ret
- fi
-done
-exit 0
diff --git a/pkgtools/bootstrap-mk-files/DESCR b/pkgtools/bootstrap-mk-files/DESCR
deleted file mode 100644
index 66092a5d38d..00000000000
--- a/pkgtools/bootstrap-mk-files/DESCR
+++ /dev/null
@@ -1,4 +0,0 @@
-The bootstrap bmake(1) utility uses some customised .mk files in order
-to pre-define certain definitions and targets, which guide the build
-process. This package provides those *.mk files for the bmake(1)
-utility.
diff --git a/pkgtools/bootstrap-mk-files/Makefile b/pkgtools/bootstrap-mk-files/Makefile
deleted file mode 100644
index a339b66d191..00000000000
--- a/pkgtools/bootstrap-mk-files/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-# $NetBSD: Makefile,v 1.3 2006/11/11 18:24:52 jschauma Exp $
-
-DISTNAME= bootstrap-mk-files-20061111
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-CONFLICTS+= mk-files-[0-9]*
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.pkgsrc.org/
-COMMENT= *.mk files for the bootstrap bmake utility
-
-NO_PKGTOOLS_REQD_CHECK= # defined
-PKG_PRESERVE= # defined
-
-NO_CHECKSUM= yes
-NO_MTREE= yes
-NO_BUILD= yes
-
-USE_TOOLS+= sed
-
-INSTALLTION_DIRS= share/mk
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-do-configure:
- cd ${WRKSRC}; for file in bsd.* sys.mk; do \
- ${TEST} ! -f mods/${OPSYS}.$$file || \
- ${CP} -f mods/${OPSYS}.$$file ${WRKSRC}/$$file; \
- done
- cd ${WRKSRC}; \
- if ${TEST} -f mods/${OPSYS}.bsd.own.mk.in; then \
- own_mk=mods/${OPSYS}.bsd.own.mk.in; \
- else \
- own_mk=mods/bsd.own.mk.in; \
- fi; \
- ${SED} -e 's|@ROOT_GROUP@|'${ROOT_GROUP}'|g' \
- -e 's|@ROOT_USER@|'${ROOT_USER}'|g' \
- -e 's|@SYSCONFDIR@|'${PKG_SYSCONFDIR}'|g' \
- $$own_mk > bsd.own.mk
-
-do-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/mk
- cd ${WRKSRC} && for file in bsd.* sys.mk; do \
- ${INSTALL_DATA} $$file ${PREFIX}/share/mk/$$file; \
- done
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/bootstrap-mk-files/PLIST b/pkgtools/bootstrap-mk-files/PLIST
deleted file mode 100644
index 45a1fa051fb..00000000000
--- a/pkgtools/bootstrap-mk-files/PLIST
+++ /dev/null
@@ -1,23 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2006/08/24 17:49:52 wiz Exp $
-share/mk/bsd.README
-share/mk/bsd.dep.mk
-share/mk/bsd.depall.mk
-share/mk/bsd.doc.mk
-share/mk/bsd.files.mk
-share/mk/bsd.hostprog.mk
-share/mk/bsd.inc.mk
-share/mk/bsd.info.mk
-share/mk/bsd.kernobj.mk
-share/mk/bsd.kinc.mk
-share/mk/bsd.kmod.mk
-share/mk/bsd.lib.mk
-share/mk/bsd.links.mk
-share/mk/bsd.man.mk
-share/mk/bsd.nls.mk
-share/mk/bsd.obj.mk
-share/mk/bsd.own.mk
-share/mk/bsd.prog.mk
-share/mk/bsd.subdir.mk
-share/mk/bsd.sys.mk
-share/mk/sys.mk
-@dirrm share/mk
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.README b/pkgtools/bootstrap-mk-files/files/bsd.README
deleted file mode 100644
index bd4694a1165..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.README
+++ /dev/null
@@ -1,683 +0,0 @@
-# $NetBSD: bsd.README,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-# @(#)bsd.README 8.2 (Berkeley) 4/2/94
-
-This is the README file for the new make "include" files for the BSD
-source tree. The files are installed in /usr/share/mk, and are, by
-convention, named with the suffix ".mk".
-
-Note, this file is not intended to replace reading through the .mk
-files for anything tricky.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-RANDOM THINGS WORTH KNOWING:
-
-The files are simply C-style #include files, and pretty much behave like
-you'd expect. The syntax is slightly different in that a single '.' is
-used instead of the hash mark, i.e. ".include <bsd.prog.mk>".
-
-One difference that will save you lots of debugging time is that inclusion
-of the file is normally done at the *end* of the Makefile. The reason for
-this is because .mk files often modify variables and behavior based on the
-values of variables set in the Makefile. To make this work, remember that
-the FIRST target found is the target that is used, i.e. if the Makefile has:
-
- a:
- echo a
- a:
- echo a number two
-
-the command "make a" will echo "a". To make things confusing, the SECOND
-variable assignment is the overriding one, i.e. if the Makefile has:
-
- a= foo
- a= bar
-
- b:
- echo ${a}
-
-the command "make b" will echo "bar". This is for compatibility with the
-way the V7 make behaved.
-
-It's fairly difficult to make the BSD .mk files work when you're building
-multiple programs in a single directory. It's a lot easier to split up the
-programs than to deal with the problem. Most of the agony comes from making
-the "obj" directory stuff work right, not because we switched to a new version
-of make. So, don't get mad at us, figure out a better way to handle multiple
-architectures so we can quit using the symbolic link stuff. (Imake doesn't
-count.)
-
-The file .depend in the source directory is expected to contain dependencies
-for the source files. This file is read automatically by make after reading
-the Makefile.
-
-The variable DESTDIR works as before. It's not set anywhere but will change
-the tree where the file gets installed.
-
-The profiled libraries are no longer built in a different directory than
-the regular libraries. A new suffix, ".po", is used to denote a profiled
-object, and ".so" denotes a shared (position-independent) object.
-
-The following variables that control how things are made/installed that
-are not set by default. These should not be set by Makefiles; they're for
-the user to define in MAKECONF (see bsd.own.mk, below) or on the make(1)
-command line:
-
-BUILD If defined, 'make install' checks that the targets in the
- source directories are up-to-date and remakes them if they
- are out of date, instead of blindly trying to install
- out of date or non-existent targets.
-
-UPDATE If defined, 'make install' only installs targets that are
- more recently modified in the source directories that their
- installed counterparts.
-
-UNPRIVILEGED If defined, don't set the owner/group/mode when installing
- files or directories. This allows a non-root "make install".
-
-MKCATPAGES If "no", don't build or install the catman pages.
-
-MKDOC If "no", don't build or install the documentation.
-
-MKINFO If "no", don't build or install Info documentation from
- Texinfo source files.
-
-MKLINT If "no", don't build or install the lint libraries.
-
-MKMAN If "no", don't build or install the man or catman pages.
- Also acts as "MKCATPAGES=no"
-
-MKNLS If "no", don't build or install the NLS files and locale
- definition files.
-
-MKOBJ If "no", don't enable the rule which creates objdirs.
- "yes" by default.
-
-MKOBJDIRS If "no", don't create objdirs during a "make build".
- "no" by default.
-
-MKPIC If "no", don't build or install shared libraries.
-
-MKPICINSTALL If "no", don't install the *_pic.a libraries.
-
-MKPROFILE If "no", don't build or install the profiling libraries.
-
-MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKINFO=no MKMAN=no
- MKNLS=no". I.e, don't build catman pages, documentation,
- Info documentation, man pages, NLS files, ...
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <sys.mk> has the default rules for all makes, in the BSD
-environment or otherwise. You probably don't want to touch this file.
-If you intend to run a cross build, you will need to supply the following
-host tools, and configure the following variables properly:
-
-OBJCOPY objcopy - copy and translate object files
-
-STRIP strip - Discard symbols from object files
-
-CONFIG config - build kernel compilation directories
-
-RPCGEN rpcgen - Remote Procedure Call (RPC) protocol compiler
-
-MKLOCALE mklocale - make LC_CTYPE locale files
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.man.mk> handles installing manual pages and their
-links.
-
-It has a two targets:
-
- maninstall:
- Install the manual page sources and their links.
- catinstall:
- Install the preformatted manual pages and their links.
-
-It sets/uses the following variables:
-
-MANDIR Base path for manual installation.
-
-MANGRP Manual group.
-
-MANOWN Manual owner.
-
-MANMODE Manual mode.
-
-MANSUBDIR Subdirectory under the manual page section, i.e. "/vax"
- or "/tahoe" for machine specific manual pages.
-
-MAN The manual pages to be installed (use a .1 - .9 suffix).
-
-MLINKS List of manual page links (using a .1 - .9 suffix). The
- linked-to file must come first, the linked file second,
- and there may be multiple pairs. The files are soft-linked.
-
-The include file <bsd.man.mk> includes a file named "../Makefile.inc" if
-it exists.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.own.mk> contains source tree configuration parameters,
-such as the owners, groups, etc. for both manual pages and binaries, and
-a few global "feature configuration" parameters.
-
-It has no targets.
-
-To get system-specific configuration parameters, bsd.own.mk will try to
-include the file specified by the "MAKECONF" variable. If MAKECONF is not
-set, or no such file exists, the system make configuration file, /etc/mk.conf
-is included. These files may define any of the variables described below.
-
-bsd.own.mk sets the following variables, if they are not already defined
-(defaults are in brackets):
-
-BSDSRCDIR The real path to the system sources, so that 'make obj'
- will work correctly. [/usr/src]
-
-BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj'
- will work correctly. [/usr/obj]
-
-BINGRP Binary group. [wheel]
-
-BINOWN Binary owner. [root]
-
-BINMODE Binary mode. [555]
-
-NONBINMODE Mode for non-executable files. [444]
-
-MANDIR Base path for manual installation. [/usr/share/man/cat]
-
-MANGRP Manual group. [wheel]
-
-MANOWN Manual owner. [root]
-
-MANMODE Manual mode. [${NONBINMODE}]
-
-MANINSTALL Manual installation type: maninstall, catinstall, or both
-
-LDSTATIC Control program linking; if set blank, link everything
- dynamically. If set to "-static", link everything statically.
- If not set, programs link according to their makefile.
-
-LIBDIR Base path for library installation. [/usr/lib]
-
-LINTLIBDIR Base path for lint(1) library installation. [/usr/libdata/lint]
-
-LIBGRP Library group. [${BINGRP}]
-
-LIBOWN Library owner. [${BINOWN}]
-
-LIBMODE Library mode. [${NONBINMODE}]
-
-DOCDIR Base path for system documentation (e.g. PSD, USD, etc.)
- installation. [/usr/share/doc]
-
-HTMLDOCDIR Base path for html system documentation installation.
- [/usr/share/doc/html]
-
-DOCGRP Documentation group. [wheel]
-
-DOCOWN Documentation owner. [root]
-
-DOCMODE Documentation mode. [${NONBINMODE}]
-
-NLSDIR Base path for National Language Support files installation.
- [/usr/share/nls]
-
-NLSGRP National Language Support files group. [wheel]
-
-NLSOWN National Language Support files owner. [root]
-
-NLSMODE National Language Support files mode. [${NONBINMODE}]
-
-STRIPFLAG The flag passed to the install program to cause the binary
- to be stripped. This is to be used when building your
- own install script so that the entire system can be made
- stripped/not-stripped using a single knob. [-s]
-
-COPY The flag passed to the install program to cause the binary
- to be copied rather than moved. This is to be used when
- building our own install script so that the entire system
- can either be installed with copies, or with moves using
- a single knob. [-c]
-
-Additionally, the following variables may be set by bsd.own.mk or in a
-make configuration file to modify the behaviour of the system build
-process (default values are in brackets along with comments, if set by
-bsd.own.mk):
-
-MKCRYPTO If set to "no", no cryptography support will be built
- into the system. Defaults to "yes".
-
-NOCRYPTO If set, it is equivalent to setting MKCRYPTO to "no".
-
-MKCRYPTO_IDEA If set to "yes", IDEA support will be built into
- libcrypto_idea.a. Defaults to "no".
-
-MKCRYPTO_RC5 If set to "yes", RC5 support will be built into
- libcrypto_rc5.a. Defaults to "no".
-
-MKKERBEROS If set to "no", disables building Kerberos (v4 or v5)
- support into various system utilities that support it.
- Defaults to "yes". NOTE: This does not affect the
- building of the Kerberos libraries or infrastructure
- programs themselves. To completely disable Kerberos,
- set MKCRYPTO to "no".
-
-NOKERBEROS If set, it is equivalent to setting MKKERBEROS to "no".
-
-SKEY Compile in support for S/key authentication. [yes, set
- unconditionally]
-
-MANZ Compress manual pages at installation time.
-
-SYS_INCLUDE Copy or symlink kernel include files into /usr/include.
- Possible values are "symlinks" or "copies" (which is
- the same as the variable being unset).
-
-NOPROFILE Do not build profiled versions of system libraries
-
-NOPIC Do not build PIC versions of system libraries, and
- do not build shared libraries. [set if ${MACHINE_ARCH}
- is "sh3" and ${OBJECT_FMT} is "COFF", unset otherwise.]
-
-NOLINT Do not build lint libraries.
-
-OBJECT_FMT Object file format. [set to "ELF" on architectures that
- use ELF -- currently if ${MACHINE_ARCH} is "alpha",
- "mipsel", "mipseb", "powerpc", "sparc", "sparc64",
- "i386" and some m68k machines, or set to "a.out" on
- other architectures].
-
-MKSOFTFLOAT If "yes", build with options to enable the compiler to
- generate output containing library calls for floating
- point and possibly soft-float library support. Defaults
- to "no".
-
-bsd.own.mk is generally useful when building your own Makefiles so that
-they use the same default owners etc. as the rest of the tree.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.prog.mk> handles building programs from one or
-more source files, along with their manual pages. It has a limited number
-of suffixes, consistent with the current needs of the BSD tree.
-
-It has eight targets:
-
- all:
- build the program and its manual page
- clean:
- remove the program, any object files and the files a.out,
- Errs, errs, mklog, and ${PROG}.core.
- cleandir:
- remove all of the files removed by the target clean, as
- well as .depend, tags, and any manual pages.
- `distclean' is a synonym for `cleandir'.
- depend:
- make the dependencies for the source files, and store
- them in the file .depend.
- includes:
- install any header files.
- install:
- install the program and its manual pages; if the Makefile
- does not itself define the target install, the targets
- beforeinstall and afterinstall may also be used to cause
- actions immediately before and after the install target
- is executed.
- lint:
- run lint on the source files
- tags:
- create a tags file for the source files.
-
-It sets/uses the following variables:
-
-BINGRP Binary group.
-
-BINOWN Binary owner.
-
-BINMODE Binary mode.
-
-CLEANFILES Additional files to remove for the clean and cleandir targets.
-
-COPTS Additional flags to the compiler when creating C objects.
-
-CPPFLAGS Additional flags to the C pre-processor
-
-LDADD Additional loader objects. Usually used for libraries.
- For example, to load with the compatibility and utility
- libraries, use:
-
- LDADD+=-lutil -lcompat
-
-LDFLAGS Additional loader flags.
-
-LINKS The list of binary links; should be full pathnames, the
- linked-to file coming first, followed by the linked
- file. The files are hard-linked. For example, to link
- /bin/test and /bin/[, use:
-
- LINKS= ${DESTDIR}/bin/test ${DESTDIR}/bin/[
-
-SYMLINKS The list of symbolic links; should be full pathnames.
- Syntax is identical to LINKS. Note that DESTDIR is not
- automatically included in the link.
-
-MAN Manual pages (should end in .1 - .9). If no MAN variable is
- defined, "MAN=${PROG}.1" is assumed.
-
-PROG The name of the program to build. If not supplied, nothing
- is built.
-
-PROGNAME The name that the above program will be installed as, if
- different from ${PROG}.
-
-SRCS List of source files to build the program. If SRCS is not
- defined, it's assumed to be ${PROG}.c.
-
-DPADD Additional dependencies for the program. Usually used for
- libraries. For example, to depend on the compatibility and
- utility libraries use:
-
- DPADD+=${LIBCOMPAT} ${LIBUTIL}
-
- The following libraries are predefined for DPADD:
-
- LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o
- LIBC?= ${DESTDIR}/usr/lib/libc.a
- LIBC_PIC?= ${DESTDIR}/usr/lib/libc_pic.a
- LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a
- LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a
- LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a
- LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a
- LIBDES?= ${DESTDIR}/usr/lib/libdes.a
- LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a
- LIBFORM?= ${DESTDIR}/usr/lib/libform.a
- LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a
- LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a
- LIBINTL?= ${DESTDIR}/usr/lib/libintl.a
- LIBIPSEC?= ${DESTDIR}/usr/lib/libipsec.a
- LIBKDB?= ${DESTDIR}/usr/lib/libkdb.a
- LIBKRB?= ${DESTDIR}/usr/lib/libkrb.a
- LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a
- LIBL?= ${DESTDIR}/usr/lib/libl.a
- LIBM?= ${DESTDIR}/usr/lib/libm.a
- LIBMENU?= ${DESTDIR}/usr/lib/libmenu.a
- LIBMP?= ${DESTDIR}/usr/lib/libmp.a
- LIBNTP?= ${DESTDIR}/usr/lib/libntp.a
- LIBPC?= ${DESTDIR}/usr/lib/libpc.a
- LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a
- LIBPLOT?= ${DESTDIR}/usr/lib/libplot.a
- LIBPOSIX?= ${DESTDIR}/usr/lib/libposix.a
- LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a
- LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a
- LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a
- LIBTERMCAP?= ${DESTDIR}/usr/lib/libtermcap.a
- LIBTELNET?= ${DESTDIR}/usr/lib/libtelnet.a
- LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a
- LIBWRAP?= ${DESTDIR}/usr/lib/libwrap.a
- LIBY?= ${DESTDIR}/usr/lib/liby.a
- LIBZ?= ${DESTDIR}/usr/lib/libz.a
-
-
-SHAREDSTRINGS If defined, a new .c.o rule is used that results in shared
- strings, using xstr(1). Note that this will not work with
- parallel makes.
-
-STRIPFLAG The flag passed to the install program to cause the binary
- to be stripped.
-
-SUBDIR A list of subdirectories that should be built as well.
- Each of the targets will execute the same target in the
- subdirectories.
-
-SCRIPTS A list of interpreter scripts [file.{sh,csh,pl,awk,...}].
- These are installed exactly like programs.
-
-SCRIPTSNAME The name that the above program will be installed as, if
- different from ${SCRIPTS}. These can be further specialized
- by setting SCRIPTSNAME_<script>.
-
-FILES A list of files to install. The installation is controlled
- by the FILESNAME, FILESOWN, FILESGRP, FILESMODE, FILESDIR
- variables that can be further specialized by FILES<VAR>_<file>
-
-The include file <bsd.prog.mk> includes the file named "../Makefile.inc"
-if it exists, as well as the include file <bsd.man.mk>.
-
-Some simple examples:
-
-To build foo from foo.c with a manual page foo.1, use:
-
- PROG= foo
-
- .include <bsd.prog.mk>
-
-To build foo from foo.c with a manual page foo.2, add the line:
-
- MAN= foo.2
-
-If foo does not have a manual page at all, add the line:
-
- MKMAN= no
-
-If foo has multiple source files, add the line:
-
- SRCS= a.c b.c c.c d.c
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.subdir.mk> contains the default targets for building
-subdirectories. It has the same eight targets as <bsd.prog.mk>: all,
-clean, cleandir, depend, includes, install, lint, and tags. For all of
-the directories listed in the variable SUBDIR, the specified directory
-will be visited and the target made. There is also a default target which
-allows the command "make subdir" where subdir is any directory listed in
-the variable SUBDIR.
-
-As a special case, the use of a token .WAIT as an entry in SUBDIR acts
-as a synchronization barrier when multiple make jobs are run; subdirs
-before the .WAIT must complete before any subdirs after .WAIT are
-started. See make(1) for some caveats on use of .WAIT and other
-special sources.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.links.mk> handles the LINKS and SYMLINKS variables
-and is included from from bsd.lib.mk and bsd.prog.mk.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.files.mk> handles the FILES variables and is included
-from bsd.lib.mk and bsd.prog.mk.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.inc.mk> defines the includes target and uses two
-variables:
-
-INCS The list of include files
-
-INCSDIR The location to install the include files.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.kinc.mk> defines the many targets (includes,
-subdirectories, etc.), and is used by kernel makefiles to handle
-include file installation. It is intended to be included alone, by
-kernel Makefiles. Please see bsd.kinc.mk for more details, and keep
-the documentation in that file up to date.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.info.mk> is used to generate and install GNU Info
-documentation from respective Texinfo source files. It defines three
-implicit targets (.txi.info, .texi.info, and .texinfo.info), and uses the
-following variables:
-
-TEXINFO List of Texinfo source files. Info documentation will
- consist of single files with the extension replaced by
- .info.
-
-INFOFLAGS Flags to pass to makeinfo. []
-
-INSTALL_INFO Name of install-info program. [install-info]
-
-MAKEINFO Name of makeinfo program. [makeinfo]
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.sys.mk> is used by <bsd.prog.mk> and
-<bsd.lib.mk>. It contains overrides that are used when building
-the NetBSD source tree. For instance, if "PARALLEL" is defined by
-the program/library Makefile, it includes a set of rules for lex and
-yacc that allow multiple lex and yacc targets to be built in parallel.
-
-Other variables of note (incomplete list):
-
-WARNS Crank up gcc warning options; WARNS=1 and WARNS=2 are the two
- distinct levels.
-
-FORMAT_AUDIT If FORMAT_AUDIT is set, and WFORMAT is set and > 1, turn on
-WFORMAT -Wnetbsd-format-audit for extra-stringent format checking.
- WFORMAT belongs in individual makefiles and/or
- Makefile.inc files. (set WFORMAT=1 in individual
- makefiles if a program is not security critical and is
- doing bizarre things with format strings which would
- be even uglier if rewritten) FORMAT_AUDIT should go in
- mk.conf if you're doing format-string auditing.
- FORMAT_AUDIT may go away in time.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.lib.mk> has support for building libraries. It has
-the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend,
-includes, install, lint, and tags. Additionally, it has a checkver target
-which checks for installed shared object libraries whose version is greater
-that the version of the source. It has a limited number of suffixes,
-consistent with the current needs of the BSD tree.
-
-It sets/uses the following variables:
-
-LIB The name of the library to build.
-
-LIBDIR Target directory for libraries.
-
-LINTLIBDIR Target directory for lint libraries.
-
-LIBGRP Library group.
-
-LIBOWN Library owner.
-
-LIBMODE Library mode.
-
-LDADD Additional loader objects.
-
-MAN The manual pages to be installed (use a .1 - .9 suffix).
-
-MKLINKLIB If "no", act as "MKPICINSTALL=no MKPROFILE=no".
- Also:
- - don't install the .a libraries
- - don't install _pic.a libraries on PIC systems
- - don't build .a libraries on PIC systems
- - don't install the .so symlink on ELF systems
- I.e, only install the shared library (and the .so.major
- symlink on ELF).
-
-MKPICLIB If "no", don't build _pic.a libraries, and build the
- shared object libraries from the .a libraries. A
- symlink is installed in ${DESTDIR}/usr/lib for the
- _pic.a library pointing to the .a library.
-
-NOCHECKVER_<library>
-NOCHECKVER If set, disables checking for installed shared object
- libraries with versions greater than the source. A
- particular library name, without the "lib" prefix, may
- be appended to the variable name to disable the check for
- only that library.
-
-SRCS List of source files to build the library. Suffix types
- .s, .c, and .f are supported. Note, .s files are preferred
- to .c files of the same name. (This is not the default for
- versions of make.)
-
-The include file <bsd.lib.mk> includes the file named "../Makefile.inc"
-if it exists, as well as the include file <bsd.man.mk>.
-
-It has rules for building profiled objects; profiled libraries are
-built by default.
-
-Libraries are ranlib'd when made.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.obj.mk> defines targets related to the creation
-and use of separated object and source directories.
-
-If an environment variable named MAKEOBJDIRPREFIX is set, make(1) uses
-${MAKEOBJDIRPREFIX}${.CURDIR} as the name of the object directory if
-it exists. Otherwise make(1) looks for the existence of a
-subdirectory (or a symlink to a directory) of the source directory
-into which built targets should be placed. If an environment variable
-named MAKEOBJDIR is set, make(1) uses its value as the name of the
-object directory; failing that, make first looks for a subdirectory
-named "obj.${MACHINE}", and if that doesn't exist, it looks for "obj".
-
-Object directories are not created automatically by make(1) if they
-don't exist; you need to run a separate "make obj". (This will happen
-during a top-level build if "MKOBJDIRS" is set to a value other than
-"no"). When the source directory is a subdirectory of ${BSDSRCDIR} --
-and this is determined by a simple string prefix comparison -- object
-directories are created in a separate object directory tree, and a
-symlink to the object directory in that tree is created in the source
-directory; otherwise, "make obj" assumes that you're not in the main
-source tree and that it's not safe to use a separate object tree.
-
-Several variables used by <bsd.obj.mk> control exactly what
-directories and links get created during a "make obj":
-
-MAKEOBJDIR If set, this is the component name of the object
- directory.
-
-OBJMACHINE If this is set but MAKEOBJDIR is not set, creates
- object directories or links named "obj.${MACHINE}";
- otherwise, just creates ones named "obj".
-
-USR_OBJMACHINE If set, and the current directory is a subdirectory of
- ${BSDSRCDIR}, create object directory in the
- corresponding subdirectory of ${BSDOBJDIR}.${MACHINE};
- otherwise, create it in the corresponding subdirectory
- of ${BSDOBJDIR}
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-The include file <bsd.kernobj.mk> defines variables related to the
-location of kernel sources and object directories.
-
-KERNSRCDIR Is the location of the top of the kernel src.
- It defaults to ${BSDSRCDIR}/sys, but the top-level
- Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the
- absolute path to the directory where the top-level
- Makefile.inc was found.
-
-KERNARCHDIR Is the location of the machine dependent kernel
- sources. It defaults to arch/${MACHINE}
-
-KERNCONFDIR Is where the configuration files for kernels are
- found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf.
-
-KERNOBJDIR Is the kernel build directory. The kernel GENERIC for
- instance will be compiled in ${KERNOBJDIR}/GENERIC.
- The default value is
- ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
- if it exists or the target 'obj' is being made.
- Otherwise the default is
- ${KERNSRCDIR}/${KERNARCHDIR}/compile.
-
-It is important that Makefiles (such as those under src/distrib) that
-wish to find compiled kernels use bsd.kernobj.mk and ${KERNOBJDIR}
-rather than make assumptions about the location of the compiled kernel.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.dep.mk b/pkgtools/bootstrap-mk-files/files/bsd.dep.mk
deleted file mode 100644
index a42a2420349..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.dep.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-# $NetBSD: bsd.dep.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-.PHONY: cleandepend
-cleandir: cleandepend
-
-MKDEP?= mkdep
-
-# some of the rules involve .h sources, so remove them from mkdep line
-realdepend: beforedepend
-.if defined(SRCS)
-realdepend: .depend
-.NOPATH: .depend
-.depend: ${SRCS} ${DPSRCS}
- @rm -f .depend
- @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \
- if [ "$$files" != " " ]; then \
- echo ${MKDEP} -a ${MKDEPFLAGS} \
- ${AFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} -traditional-cpp ${AINC:Q} \
- $$files; \
- ${MKDEP} -a ${MKDEPFLAGS} \
- ${AFLAGS:M-[ID]*} ${CPPFLAGS} -traditional-cpp ${AINC} $$files; \
- fi
- @files="${.ALLSRC:M*.c}"; \
- if [ "$$files" != "" ]; then \
- echo ${MKDEP} -a ${MKDEPFLAGS} \
- ${CFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
- ${MKDEP} -a ${MKDEPFLAGS} \
- ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
- fi
- @files="${.ALLSRC:M*.m}"; \
- if [ "$$files" != "" ]; then \
- echo ${MKDEP} -a ${MKDEPFLAGS} \
- ${OBJCFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
- ${MKDEP} -a ${MKDEPFLAGS} \
- ${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
- fi
- @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
- if [ "$$files" != " " ]; then \
- echo ${MKDEP} -a ${MKDEPFLAGS} \
- ${CXXFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
- ${MKDEP} -a ${MKDEPFLAGS} \
- ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
- fi
-cleandepend:
- rm -f .depend ${.CURDIR}/tags ${CLEANDEPEND}
-.else
-cleandepend:
-.endif
-realdepend: afterdepend
-
-beforedepend:
-afterdepend:
-
-.if !target(tags)
-.if defined(SRCS)
-tags: ${SRCS}
- -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
- sed "s;\${.CURDIR}/;;" > tags
-.else
-tags:
-.endif
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.depall.mk b/pkgtools/bootstrap-mk-files/files/bsd.depall.mk
deleted file mode 100644
index 2bab28b043a..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.depall.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# $NetBSD: bsd.depall.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-dependall: realdepend .MAKE
- @cd ${.CURDIR}; \
- ${MAKE} realall
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.doc.mk b/pkgtools/bootstrap-mk-files/files/bsd.doc.mk
deleted file mode 100644
index 80a58d544c6..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.doc.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-# $NetBSD: bsd.doc.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-# @(#)bsd.doc.mk 8.1 (Berkeley) 8/14/93
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.MAIN: all
-.endif
-
-.PHONY: cleandoc docinstall print spell
-.if ${MKSHARE} != "no"
-realinstall: docinstall
-.endif
-clean cleandir: cleandoc
-
-BIB?= bib
-EQN?= eqn
-GREMLIN?= grn
-GRIND?= vgrind -f
-INDXBIB?= indxbib
-PIC?= pic
-REFER?= refer
-ROFF?= groff -M/usr/share/tmac ${MACROS} ${PAGES}
-SOELIM?= soelim
-TBL?= tbl
-
-.if !target(all)
-.if ${MKSHARE} != "no"
-realall: paper.ps
-.else
-realall:
-.endif
-.endif
-
-.if !target(paper.ps)
-paper.ps: ${SRCS}
- ${ROFF} ${.ALLSRC} > ${.TARGET}
-.endif
-
-.if !target(print)
-print: paper.ps
- lpr -P${PRINTER} ${.ALLSRC}
-.endif
-
-cleandoc:
- rm -f paper.* [eE]rrs mklog ${CLEANFILES}
-
-.if ${MKDOC} != "no"
-FILES?=${SRCS}
-ALLFILES=Makefile ${FILES} ${EXTRA}
-
-docinstall:: ${ALLFILES:@F@${DESTDIR}${DOCDIR}/${DIR}/${F}@}
-.PRECIOUS: ${ALLFILES:@F@${DESTDIR}${DOCDIR}/${DIR}/${F}@}
-.if !defined(UPDATE)
-.PHONY: ${ALLFILES:@F@${DESTDIR}${DOCDIR}/${DIR}/${F}@}
-.endif
-
-__docinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${INSTPRIV} -c -o ${DOCOWN} \
- -g ${DOCGRP} -m ${DOCMODE} ${.ALLSRC} ${.TARGET}
-
-.for F in ${ALLFILES:O:u}
-.if !defined(BUILD) && !make(all) && !make(${F})
-${DESTDIR}${DOCDIR}/${DIR}/${F}: .MADE
-.endif
-${DESTDIR}${DOCDIR}/${DIR}/${F}: ${F} __docinstall
-.endfor
-.endif
-
-.if !target(docinstall)
-docinstall::
-.endif
-
-spell: ${SRCS}
- spell ${.ALLSRC} | sort | comm -23 - spell.ok > paper.spell
-
-depend includes lint obj tags:
-
-dependall: all
-
-.include <bsd.obj.mk>
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.files.mk b/pkgtools/bootstrap-mk-files/files/bsd.files.mk
deleted file mode 100644
index 7bb266dc7d3..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.files.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# $NetBSD: bsd.files.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-# This file can be included multiple times. It clears the definition of
-# FILES at the end so that this is possible.
-
-.PHONY: filesinstall
-realinstall: filesinstall
-
-.if defined(FILES) && !empty(FILES)
-FILESDIR?=${BINDIR}
-FILESOWN?=${BINOWN}
-FILESGRP?=${BINGRP}
-FILESMODE?=${NONBINMODE}
-
-filesinstall:: ${FILES:@F@${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}@}
-.PRECIOUS: ${FILES:@F@${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}@}
-.if !defined(UPDATE)
-.PHONY: ${FILES:@F@${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}@}
-.endif
-
-__fileinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
- -o ${FILESOWN_${.ALLSRC:T}:U${FILESOWN}} \
- -g ${FILESGRP_${.ALLSRC:T}:U${FILESGRP}} \
- -m ${FILESMODE_${.ALLSRC:T}:U${FILESMODE}} \
- ${.ALLSRC} ${.TARGET}
-
-.for F in ${FILES:O:u}
-.if !defined(BUILD) && !make(all) && !make(${F})
-${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}: .MADE
-.endif
-${DESTDIR}${FILESDIR_${F}:U${FILESDIR}}/${FILESNAME_${F}:U${FILESNAME:U${F:T}}}: ${F} __fileinstall
-.endfor
-.endif
-
-.if !target(filesinstall)
-filesinstall::
-.endif
-
-FILES:=
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.hostprog.mk b/pkgtools/bootstrap-mk-files/files/bsd.hostprog.mk
deleted file mode 100644
index 1ab1eceb2cd..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.hostprog.mk
+++ /dev/null
@@ -1,137 +0,0 @@
-# $NetBSD: bsd.hostprog.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: cleanprog
-clean cleandir: cleanprog
-
-CFLAGS+= ${COPTS}
-
-LIBBZ2?= /usr/lib/libbz2.a
-LIBC?= /usr/lib/libc.a
-LIBC_PIC?= /usr/lib/libc_pic.a
-LIBCDK?= /usr/lib/libcdk.a
-LIBCOMPAT?= /usr/lib/libcompat.a
-LIBCRYPT?= /usr/lib/libcrypt.a
-LIBCURSES?= /usr/lib/libcurses.a
-LIBDBM?= /usr/lib/libdbm.a
-LIBDES?= /usr/lib/libdes.a
-LIBEDIT?= /usr/lib/libedit.a
-LIBFORM?= /usr/lib/libform.a
-LIBGCC?= /usr/lib/libgcc.a
-LIBGNUMALLOC?= /usr/lib/libgnumalloc.a
-LIBINTL?= /usr/lib/libintl.a
-LIBIPSEC?= /usr/lib/libipsec.a
-LIBKDB?= /usr/lib/libkdb.a
-LIBKRB?= /usr/lib/libkrb.a
-LIBKVM?= /usr/lib/libkvm.a
-LIBL?= /usr/lib/libl.a
-LIBM?= /usr/lib/libm.a
-LIBMENU?= /usr/lib/libmenu.a
-LIBMP?= /usr/lib/libmp.a
-LIBNTP?= /usr/lib/libntp.a
-LIBOBJC?= /usr/lib/libobjc.a
-LIBPC?= /usr/lib/libpc.a
-LIBPCAP?= /usr/lib/libpcap.a
-LIBPLOT?= /usr/lib/libplot.a
-LIBPOSIX?= /usr/lib/libposix.a
-LIBRESOLV?= /usr/lib/libresolv.a
-LIBRPCSVC?= /usr/lib/librpcsvc.a
-LIBSKEY?= /usr/lib/libskey.a
-LIBTERMCAP?= /usr/lib/libtermcap.a
-LIBTELNET?= /usr/lib/libtelnet.a
-LIBUTIL?= /usr/lib/libutil.a
-LIBWRAP?= /usr/lib/libwrap.a
-LIBY?= /usr/lib/liby.a
-LIBZ?= /usr/lib/libz.a
-
-.if defined(SHAREDSTRINGS)
-CLEANFILES+=strings
-.c.lo:
- ${HOST_CC} -E ${CFLAGS} ${.IMPSRC} | xstr -c -
- @${HOST_CC} ${CFLAGS} -c x.c -o ${.TARGET}
- @rm -f x.c
-
-.cc.lo:
- ${HOST_CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
- @mv -f x.c x.cc
- @${HOST_CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET}
- @rm -f x.cc
-
-.C.lo:
- ${HOST_CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
- @mv -f x.c x.C
- @${HOST_CXX} ${CXXFLAGS} -c x.C -o ${.TARGET}
- @rm -f x.C
-.endif
-
-
-.if defined(HOSTPROG)
-SRCS?= ${HOSTPROG}.c
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-.if !empty(SRCS:N*.h:N*.sh)
-OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.lo/g}
-LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
-.endif
-
-.if defined(OBJS) && !empty(OBJS)
-.NOPATH: ${OBJS}
-
-${HOSTPROG}: ${DPSRCS} ${OBJS} ${LIBC} ${DPADD}
- ${HOST_LINK.c} ${HOST_LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
-
-.endif # defined(OBJS) && !empty(OBJS)
-
-.if !defined(MAN)
-MAN= ${HOSTPROG}.1
-.endif # !defined(MAN)
-.endif # defined(HOSTPROG)
-
-realall: ${HOSTPROG}
-
-cleanprog:
- rm -f a.out [Ee]rrs mklog core *.core \
- ${HOSTPROG} ${OBJS} ${LOBJS} ${CLEANFILES}
-
-beforedepend:
-CPPFLAGS= ${HOST_CPPFLAGS}
-
-.if defined(SRCS)
-afterdepend: .depend
- @(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.lo \1.ln:/' \
- < .depend > $$TMP; \
- mv $$TMP .depend)
-.endif
-
-lint: ${LOBJS}
-.if defined(LOBJS) && !empty(LOBJS)
- ${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.nls.mk>
-.include <bsd.files.mk>
-.include <bsd.inc.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-regress:
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.inc.mk b/pkgtools/bootstrap-mk-files/files/bsd.inc.mk
deleted file mode 100644
index 5f1d0078c44..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.inc.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# $NetBSD: bsd.inc.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-.PHONY: incinstall
-includes: ${INCS} incinstall
-
-.if defined(INCS)
-incinstall:: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.PRECIOUS: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.if !defined(UPDATE)
-.PHONY: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.endif
-
-__incinstall: .USE
- @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
- (echo "${INSTALL} ${RENAME} ${PRESERVE} ${INSTPRIV} -c \
- -o ${BINOWN} -g ${BINGRP} -m ${NONBINMODE} \
- ${.ALLSRC} ${.TARGET}" && \
- ${INSTALL} ${RENAME} ${PRESERVE} ${INSTPRIV} -c \
- -o ${BINOWN} \
- -g ${BINGRP} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
-
-.for I in ${INCS:O:u}
-${DESTDIR}${INCSDIR}/$I: $I __incinstall
-.endfor
-.endif
-
-.if !target(incinstall)
-incinstall::
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.info.mk b/pkgtools/bootstrap-mk-files/files/bsd.info.mk
deleted file mode 100644
index 31b3e594843..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.info.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-# $NetBSD: bsd.info.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-MAKEINFO?= makeinfo
-INFOFLAGS?=
-INSTALL_INFO?= install-info
-
-.PHONY: infoinstall cleaninfo
-cleandir: cleaninfo
-
-.SUFFIXES: .txi .texi .texinfo .info
-
-.txi.info .texi.info .texinfo.info:
- ${MAKEINFO} ${INFOFLAGS} --no-split -o $@ $<
-
-.if defined(TEXINFO) && !empty(TEXINFO)
-INFOFILES= ${TEXINFO:C/\.te?xi(nfo)?$/.info/}
-.NOPATH: ${INFOFILES}
-
-.if ${MKINFO} != "no"
-realinstall: infoinstall
-realall: ${INFOFILES}
-.endif
-
-cleaninfo:
- rm -f ${INFOFILES}
-
-infoinstall:: ${INFOFILES:@F@${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}@}
-.PRECIOUS: ${INFOFILES:@F@${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}@}
-.if !defined(UPDATE)
-.PHONY: ${INFOFILES:@F@${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}@}
-.endif
-
-__infoinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
- -o ${INFOOWN_${.ALLSRC:T}:U${INFOOWN}} \
- -g ${INFOGRP_${.ALLSRC:T}:U${INFOGRP}} \
- -m ${INFOMODE_${.ALLSRC:T}:U${INFOMODE}} \
- ${.ALLSRC} ${.TARGET}
- @${INSTALL_INFO} --remove --info-dir=${DESTDIR}${INFODIR} ${.TARGET}
- ${INSTALL_INFO} --info-dir=${DESTDIR}${INFODIR} ${.TARGET}
-
-.for F in ${INFOFILES:O:u}
-.if !defined(BUILD) && !make(all) && !make(${F})
-${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}: .MADE
-.endif
-${DESTDIR}${INFODIR_${F}:U${INFODIR}}/${INFONAME_${F}:U${INFONAME:U${F:T}}}: ${F} __infoinstall
-.endfor
-.else
-cleaninfo:
-.endif
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-clean depend includes lint regress tags:
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.kernobj.mk b/pkgtools/bootstrap-mk-files/files/bsd.kernobj.mk
deleted file mode 100644
index e2f91e5e870..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.kernobj.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# $NetBSD: bsd.kernobj.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-# KERNSRCDIR Is the location of the top of the kernel src.
-# It defaults to ${BSDSRCDIR}/sys, but the top-level
-# Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the
-# absolute path to the directory where the top-level
-# Makefile.inc was found.
-#
-# KERNARCHDIR Is the location of the machine dependent kernel
-# sources. It defaults to arch/${MACHINE}
-#
-# KERNCONFDIR Is where the configuration files for kernels are
-# found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf.
-#
-# KERNOBJDIR Is the kernel build directory. The kernel GENERIC for
-# instance will be compiled in ${KERNOBJDIR}/GENERIC.
-# The default value is
-# ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
-# if it exists or the target 'obj' is being made.
-# Otherwise the default is
-# ${KERNSRCDIR}/${KERNARCHDIR}/compile.
-#
-
-KERNSRCDIR?= ${BSDSRCDIR}/sys
-# just incase ${MACHINE} is not always correct
-KERNARCHDIR?= arch/${MACHINE}
-
-.if make(obj) || exists(${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile)
-KERNOBJDIR?= ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile
-.else
-KERNOBJDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/compile
-.endif
-KERNCONFDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/conf
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.kinc.mk b/pkgtools/bootstrap-mk-files/files/bsd.kinc.mk
deleted file mode 100644
index 5b0e2fd71f4..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.kinc.mk
+++ /dev/null
@@ -1,145 +0,0 @@
-# $NetBSD: bsd.kinc.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-# System configuration variables:
-#
-# SYS_INCLUDE "symlinks": symlinks to include directories are created.
-# This may not work 100% properly for all headers.
-#
-# "copies": directories are made, if necessary, and headers
-# are installed into them.
-#
-# Variables:
-#
-# INCSDIR Directory to install includes into (and/or make, and/or
-# symlink, depending on what's going on).
-#
-# KDIR Kernel directory to symlink to, if SYS_INCLUDE is symlinks.
-# If unspecified, no action will be taken when making include
-# for the directory if SYS_INCLUDE is symlinks.
-#
-# INCS Headers to install, if SYS_INCLUDE is copies.
-#
-# DEPINCS Headers to install which are built dynamically.
-#
-# SUBDIR Subdirectories to enter
-#
-# SYMLINKS Symlinks to make (unconditionally), a la bsd.links.mk.
-# Note that the original bits will be 'rm -rf'd rather than
-# just 'rm -f'd, to make the right thing happen with include
-# directories.
-#
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.MAIN: all
-.endif
-
-# Change SYS_INCLUDE in bsd.own.mk or /etc/mk.conf to "symlinks" if you
-# don't want copies
-SYS_INCLUDE?= copies
-
-# If DESTDIR is set, we're probably building a release, so force "copies".
-.if defined(DESTDIR) && (${DESTDIR} != "/" && !empty(DESTDIR))
-SYS_INCLUDE= copies
-.endif
-
-
-.PHONY: incinstall
-includes: ${INCS} incinstall
-
-
-.if ${SYS_INCLUDE} == "symlinks"
-
-# don't install includes, just make symlinks.
-
-.if defined(KDIR)
-SYMLINKS+= ${KDIR} ${INCSDIR}
-.endif
-
-.else # not symlinks
-
-# make sure the directory is OK, and install includes.
-
-incinstall:: ${DESTDIR}${INCSDIR}
-.PRECIOUS: ${DESTDIR}${INCSDIR}
-.PHONY: ${DESTDIR}${INCSDIR}
-
-${DESTDIR}${INCSDIR}:
- @if [ ! -d ${.TARGET} ] || [ -h ${.TARGET} ] ; then \
- echo creating ${.TARGET}; \
- /bin/rm -rf ${.TARGET}; \
- ${INSTALL} ${INSTPRIV} -d -o ${BINOWN} \
- -g ${BINGRP} -m 755 ${.TARGET}; \
- fi
-
-.if defined(INCS)
-incinstall:: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.PRECIOUS: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.if !defined(UPDATE)
-.PHONY: ${INCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.endif
-
-__incinstall: .USE
- @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
- (echo "${INSTALL} ${RENAME} ${PRESERVE} ${INSTPRIV} -c \
- -o ${BINOWN} -g ${BINGRP} -m ${NONBINMODE} \
- ${.ALLSRC} ${.TARGET}" && \
- ${INSTALL} ${RENAME} ${PRESERVE} ${INSTPRIV} -c \
- -o ${BINOWN} \
- -g ${BINGRP} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
-
-.for I in ${INCS:O:u}
-${DESTDIR}${INCSDIR}/$I: $I __incinstall
-.endfor
-.endif
-
-.if defined(DEPINCS)
-incinstall:: ${DEPINCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.PRECIOUS: ${DEPINCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.if !defined(UPDATE)
-.PHONY: ${DEPINCS:@I@${DESTDIR}${INCSDIR}/$I@}
-.endif
-
-__depincinstall: .USE
- @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
- (echo "${INSTALL} ${RENAME} ${PRESERVE} -c \
- -o ${BINOWN} \
- -g ${BINGRP} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}" && \
- ${INSTALL} ${RENAME} ${PRESERVE} -c -o ${BINOWN} \
- -g ${BINGRP} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET})
-
-.for I in ${DEPINCS:O:u}
-${DESTDIR}${INCSDIR}/$I: $I __depincinstall
-.endfor
-.endif
-
-.endif # not symlinks
-
-.if defined(SYMLINKS) && !empty(SYMLINKS)
-incinstall::
- @(set ${SYMLINKS}; \
- while test $$# -ge 2; do \
- l=$$1; \
- shift; \
- t=${DESTDIR}$$1; \
- shift; \
- if [ -h $$t ]; then \
- cur=`ls -ld $$t | awk '{print $$NF}'` ; \
- if [ "$$cur" = "$$l" ]; then \
- continue ; \
- fi; \
- fi; \
- echo "$$t -> $$l"; \
- rm -rf $$t; ln -s $$l $$t; \
- done; )
-.endif
-
-.if !target(incinstall)
-incinstall::
-.endif
-
-.include <bsd.subdir.mk>
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.kmod.mk b/pkgtools/bootstrap-mk-files/files/bsd.kmod.mk
deleted file mode 100644
index ab5adb4b0ea..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.kmod.mk
+++ /dev/null
@@ -1,98 +0,0 @@
-# $NetBSD: bsd.kmod.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: cleankmod kmodinstall load unload
-realinstall: kmodinstall
-clean cleandir: cleankmod
-
-S?= /sys
-KERN= $S/kern
-
-CFLAGS+= ${COPTS} -D_KERNEL -D_LKM -I. -I${.CURDIR} -I$S -I$S/arch
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-
-.if !defined(PROG)
-PROG= ${KMOD}.o
-.endif
-
-${PROG}: ${DPSRCS} ${OBJS} ${DPADD}
- ${LD} -r ${LDFLAGS} -o tmp.o ${OBJS}
- mv tmp.o ${.TARGET}
-
-.if !defined(MAN)
-MAN= ${KMOD}.4
-.endif
-
-realall: machine-links ${PROG}
-
-.PHONY: machine-links
-beforedepend: machine-links
-machine-links:
- -rm -f machine && \
- ln -s $S/arch/${MACHINE}/include machine
- -rm -f ${MACHINE_ARCH} && \
- ln -s $S/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
-CLEANFILES+=machine ${MACHINE_ARCH}
-
-cleankmod:
- rm -f a.out [Ee]rrs mklog core *.core \
- ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}
-
-#
-# define various install targets
-#
-.if !target(kmodinstall)
-kmodinstall:: ${DESTDIR}${KMODDIR}/${PROG}
-.PRECIOUS: ${DESTDIR}${KMODDIR}/${PROG}
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${KMODDIR}/${PROG}
-.endif
-
-__kmodinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${KMODOWN} \
- -g ${KMODGRP} -m ${KMODMODE} ${.ALLSRC} ${.TARGET}
-
-.if !defined(BUILD) && !make(all) && !make(${PROG})
-${DESTDIR}${KMODDIR}/${PROG}: .MADE
-.endif
-${DESTDIR}${KMODDIR}/${PROG}: ${PROG} __kmodinstall
-.endif
-
-lint: ${LOBJS}
-.if defined(LOBJS) && !empty(LOBJS)
- ${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
-.endif
-
-.if !target(load)
-load: ${PROG}
- /sbin/modload ${KMOD_LOADFLAGS} -o ${KMOD} -e${KMOD}_lkmentry ${PROG}
-.endif
-
-.if !target(unload)
-unload:
- /sbin/modunload -n ${KMOD}
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-.-include "machine/Makefile.inc"
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/bsd.lib.mk
deleted file mode 100644
index 73564817c7e..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.lib.mk
+++ /dev/null
@@ -1,524 +0,0 @@
-# $NetBSD: bsd.lib.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: checkver cleanlib libinstall
-realinstall: checkver libinstall
-clean cleandir: cleanlib
-
-.if exists(${SHLIB_VERSION_FILE})
-SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
-SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
-SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
-
-# Check for higher installed library versions.
-.if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
- exists(${BSDSRCDIR}/lib/checkver)
-checkver:
- @(cd ${.CURDIR} && \
- sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
- -d ${DESTDIR}${LIBDIR} ${LIB})
-.endif
-.endif
-
-.if !target(checkver)
-checkver:
-.endif
-
-print-shlib-major:
-.if defined(SHLIB_MAJOR)
- @echo ${SHLIB_MAJOR}
-.else
- @false
-.endif
-
-print-shlib-minor:
-.if defined(SHLIB_MINOR)
- @echo ${SHLIB_MINOR}
-.else
- @false
-.endif
-
-print-shlib-teeny:
-.if defined(SHLIB_TEENY)
- @echo ${SHLIB_TEENY}
-.else
- @false
-.endif
-
-.if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)
-.if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
-.if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
-.endif
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}
-.endif
-.endif
-
-# add additional suffixes not exported.
-# .po is used for profiling object files.
-# .so is used for PIC object files.
-.SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4 .m
-
-
-# Set PICFLAGS to cc flags for producing position-independent code,
-# if not already set. Includes -DPIC, if required.
-
-# Data-driven table using make variables to control how shared libraries
-# are built for different platforms and object formats.
-# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk>
-# SHLIB_SOVERSION: version number to be compiled into a shared library
-# via -soname. Usualy ${SHLIB_MAJOR} on ELF.
-# NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
-# [.${SHLIB_TEENY}]]
-# SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
-# with ELF, also set shared-lib version for ld.so.
-# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
-# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
-# FPICFLAGS: flags for ${FC} to compile .[fF] files to .so objects.
-# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
-# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects.
-# CAPICFLAGS flags for {$CC} to compiling .[Ss] files
-# (usually just ${CPPPICFLAGS} ${CPICFLAGS})
-# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects.
-
-.if ${MACHINE_ARCH} == "alpha"
- # Alpha-specific shared library flags
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?=
-.elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
- # mips-specific shared library flags
-
-# On mips, all libs are compiled with ABIcalls, not just sharedlibs.
-MKPICLIB= no
-
-# so turn shlib PIC flags on for ${AS}.
-AINC+=-DABICALLS
-AFLAGS+= -fPIC
-AS+= -KPIC
-
-.elif ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
-# On the VAX, all object are PIC by default, not just sharedlibs.
-MKPICLIB= no
-
-.elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
- ${OBJECT_FMT} == "ELF"
-
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?= -KPIC
-
-.else
-
-# Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
-SHLIB_LDSTARTFILE=
-SHLIB_LDENDFILE=
-SHLIB_SOVERSION=${SHLIB_FULLVERSION}
-SHLIB_SHFLAGS=
-FPICFLAGS ?= -fPIC
-CPICFLAGS?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS?= -k
-
-.endif
-
-MKPICLIB?= yes
-
-# Platform-independent linker flags for ELF shared libraries
-.if ${OBJECT_FMT} == "ELF"
-SHLIB_SOVERSION= ${SHLIB_MAJOR}
-SHLIB_SHFLAGS= -soname lib${LIB}.so.${SHLIB_SOVERSION}
-SHLIB_LDSTARTFILE?= ${DESTDIR}/usr/lib/crtbeginS.o
-SHLIB_LDENDFILE?= ${DESTDIR}/usr/lib/crtendS.o
-.endif
-
-CFLAGS+= ${COPTS}
-FFLAGS+= ${FOPTS}
-
-.c.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${.IMPSRC}
-.else
- @echo ${COMPILE.c:Q} ${.IMPSRC}
- @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-.cc.o .C.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${.IMPSRC}
-.else
- @echo ${COMPILE.cc:Q} ${.IMPSRC}
- @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.po .C.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.so .C.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.o:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${.IMPSRC}
-.else
- @echo ${COMPILE.f:Q} ${.IMPSRC}
- @${COMPILE.f} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.po:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.so:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.ln:
- ${ECHO} Skipping lint for Fortran libraries.
-
-.m.o:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${.IMPSRC}
-.else
- @echo ${COMPILE.m:Q} ${.IMPSRC}
- @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.po:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.so:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.S.o .s.o:
- @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
- @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.po .s.po:
- @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.so .s.so:
- @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-_LIBS=lib${LIB}.a
-.else
-_LIBS=
-.endif
-
-OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-
-.if ${MKPROFILE} != "no"
-_LIBS+=lib${LIB}_p.a
-POBJS+=${OBJS:.o=.po}
-.endif
-
-.if ${MKPIC} != "no"
-.if ${MKPICLIB} == "no"
-SOLIB=lib${LIB}.a
-.else
-SOLIB=lib${LIB}_pic.a
-_LIBS+=${SOLIB}
-SOBJS+=${OBJS:.o=.so}
-.endif
-.if defined(SHLIB_FULLVERSION)
-_LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-.endif
-
-LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-_LIBS+=llib-l${LIB}.ln
-.endif
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-ALLOBJS=${OBJS} ${POBJS} ${SOBJS}
-.else
-ALLOBJS=${POBJS} ${SOBJS}
-.endif
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-ALLOBJS+=${LOBJS}
-.endif
-.NOPATH: ${ALLOBJS} ${_LIBS}
-
-realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
-
-__archivebuild: .USE
- @rm -f ${.TARGET}
- ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
- ${RANLIB} ${.TARGET}
-
-__archiveinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}
- ${RANLIB} -t ${.TARGET}
- chmod ${LIBMODE} ${.TARGET}
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-lib${LIB}.a:: ${OBJS} __archivebuild
- @echo building standard ${LIB} library
-
-lib${LIB}_p.a:: ${POBJS} __archivebuild
- @echo building profiled ${LIB} library
-
-lib${LIB}_pic.a:: ${SOBJS} __archivebuild
- @echo building shared object ${LIB} library
-
-lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
- ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
- @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
- @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
-.if defined(DESTDIR)
- $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- --whole-archive ${SOLIB} \
- --no-whole-archive ${LDADD} \
- -L${DESTDIR}${LIBDIR} ${RPATH_FLAG}${LIBDIR} \
- ${SHLIB_LDENDFILE}
-.else
- $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \
- ${SHLIB_LDENDFILE}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
- mv -f lib${LIB}.so.tmp lib${LIB}.so
-.endif
-
-.if !empty(LOBJS)
-LLIBS?= -lc
-llib-l${LIB}.ln: ${LOBJS}
- @echo building llib-l${LIB}.ln
- @rm -f llib-l${LIB}.ln
- @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
-.endif
-
-cleanlib:
- rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
- rm -f lib${LIB}.a ${OBJS}
- rm -f lib${LIB}_p.a ${POBJS}
- rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
- rm -f llib-l${LIB}.ln ${LOBJS}
-
-.if defined(SRCS)
-afterdepend: .depend
- @(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
- < .depend > $$TMP; \
- mv $$TMP .depend)
-.endif
-
-.if !target(libinstall)
-# Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
-libinstall::
-
-.if ${MKLINKLIB} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
-${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
-.endif
-
-.if ${MKPROFILE} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
-.endif
-
-.if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
-.endif
-.if ${MKPICLIB} == "no"
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:
- rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
- ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.else
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
-.endif
-.endif
-
-.if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
-.if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
- /sbin/ldconfig -m ${LIBDIR}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
-.if ${MKLINKLIB} != "no"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so
-.endif
-.endif
-.endif
-
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
-.endif
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
-.endif
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.nls.mk>
-.include <bsd.files.mk>
-.include <bsd.inc.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-lint regress:
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.links.mk b/pkgtools/bootstrap-mk-files/files/bsd.links.mk
deleted file mode 100644
index fcb54fa46b5..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.links.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: bsd.links.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-.PHONY: linksinstall
-realinstall: linksinstall
-
-.if defined(SYMLINKS) && !empty(SYMLINKS)
-linksinstall::
- @(set ${SYMLINKS}; \
- while test $$# -ge 2; do \
- l=$$1; \
- shift; \
- t=${DESTDIR}$$1; \
- shift; \
- if [ -h $$t ]; then \
- cur=`ls -ld $$t | awk '{print $$NF}'` ; \
- if [ "$$cur" = "$$l" ]; then \
- continue ; \
- fi; \
- fi; \
- echo "$$t -> $$l"; \
- rm -rf $$t; ln -s $$l $$t; \
- done; )
-.endif
-.if defined(LINKS) && !empty(LINKS)
-linksinstall::
- @(set ${LINKS}; \
- echo ".include <bsd.own.mk>"; \
- while test $$# -ge 2; do \
- l=${DESTDIR}$$1; \
- shift; \
- t=${DESTDIR}$$1; \
- shift; \
- echo "realall: $$t"; \
- echo ".PHONY: $$t"; \
- echo "$$t:"; \
- echo " @echo \"$$t -> $$l\""; \
- echo " @rm -f $$t; ln $$l $$t"; \
- done; \
- ) | ${MAKE} -f- all
-.endif
-
-.if !target(linksinstall)
-linksinstall:
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.man.mk b/pkgtools/bootstrap-mk-files/files/bsd.man.mk
deleted file mode 100644
index cb28ef8a44b..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.man.mk
+++ /dev/null
@@ -1,201 +0,0 @@
-# $NetBSD: bsd.man.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-# @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: catinstall maninstall catpages manpages catlinks manlinks cleanman html installhtml cleanhtml
-.if ${MKMAN} != "no"
-realinstall: ${MANINSTALL}
-.endif
-cleandir: cleanman
-
-TMACDIR?= ${DESTDIR}/usr/share/groff/tmac
-HTMLDIR?= ${DESTDIR}/usr/share/man
-.if exists(${TMACDIR}/tmac.andoc) && exists(${TMACDIR}/tmac.doc)
-CATDEPS?= ${TMACDIR}/tmac.andoc \
- ${TMACDIR}/tmac.doc
-.endif
-MANTARGET?= cat
-NROFF?= nroff -Tascii
-GROFF?= groff -Tascii
-TBL?= tbl
-
-
-.SUFFIXES: .1 .2 .3 .4 .5 .6 .7 .8 .9 \
- .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \
- .html1 .html2 .html3 .html4 .html5 .html6 .html7 .html8 .html9
-
-.9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3.cat3 .2.cat2 .1.cat1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}"
- @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.9.html9 .8.html8 .7.html7 .6.html6 .5.html5 .4.html4 .3.html3 .2.html2 .1.html1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET}"
- @${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET}"
- @cat ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.if defined(MAN) && !empty(MAN)
-MANPAGES= ${MAN}
-CATPAGES= ${MANPAGES:C/(.*).([1-9])/\1.cat\2/}
-.NOPATH: ${CATPAGES}
-.if !defined(NOHTML)
-HTMLPAGES= ${MANPAGES:C/(.*).([1-9])/\1.html\2/}
-.endif
-.endif
-
-MINSTALL= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
- -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
-
-.if defined(MANZ)
-# chown and chmod are done afterward automatically
-MCOMPRESS= gzip -cf
-MCOMPRESSSUFFIX= .gz
-.endif
-
-catinstall: catlinks
-maninstall: manlinks
-
-__installpage: .USE
-.if defined(MCOMPRESS) && !empty(MCOMPRESS)
- @rm -f ${.TARGET}
- ${MCOMPRESS} ${.ALLSRC} > ${.TARGET}
- @chown ${MANOWN}:${MANGRP} ${.TARGET}
- @chmod ${MANMODE} ${.TARGET}
-.else
- @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
- (echo "${MINSTALL} ${.ALLSRC} ${.TARGET}" && \
- ${MINSTALL} ${.ALLSRC} ${.TARGET})
-.endif
-
-
-# Rules for cat'ed man page installation
-.if defined(CATPAGES) && !empty(CATPAGES) && ${MKCATPAGES} != "no"
-catpages:: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${CATPAGES:O:u}
-. if !defined(BUILD) && !make(all) && !make(${P})
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: .MADE
-. endif
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-catpages::
-.endif
-
-# Rules for source page installation
-.if defined(MANPAGES) && !empty(MANPAGES)
-manpages:: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${MANPAGES:O:u}
-${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-manpages::
-.endif
-
-.if ${MKCATPAGES} != "no"
-catlinks: catpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-.else
-catlinks:
-.endif
-
-manlinks: manpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-
-# Html rules
-html: ${HTMLPAGES}
-
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
-.for P in ${HTMLPAGES:O:u}
-${HTMLDIR}/${P:T:E}/${P:T:R}.html: ${P}
- ${MINSTALL} ${.ALLSRC} ${.TARGET}
-.endfor
-.endif
-installhtml: ${HTMLPAGES:@P@${HTMLDIR}/${P:T:E}/${P:T:R}.html@}
-
-cleanhtml:
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
- rm -f ${HTMLPAGES}
-.endif
-
-
-.if defined(CATPAGES)
-.if ${MKCATPAGES} != "no" && ${MKMAN} != "no"
-realall: ${CATPAGES}
-.else
-realall:
-.endif
-
-cleanman:
- rm -f ${CATPAGES}
-.else
-cleanman:
-.endif
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-clean depend includes lint regress tags:
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.nls.mk b/pkgtools/bootstrap-mk-files/files/bsd.nls.mk
deleted file mode 100644
index 9f1ee6d685a..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.nls.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-# $NetBSD: bsd.nls.mk,v 1.1.1.1 2006/07/14 23:13:00 jlam Exp $
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.MAIN: all
-.endif
-
-.PHONY: cleannls nlsinstall
-cleandir: cleannls
-
-.SUFFIXES: .cat .msg
-
-.msg.cat:
- @rm -f ${.TARGET}
- gencat ${.TARGET} ${.IMPSRC}
-
-.if defined(NLS) && !empty(NLS)
-NLSALL= ${NLS:.msg=.cat}
-.NOPATH: ${NLSALL}
-
-NLSNAME?=${PROG:Ulib${LIB}}
-
-.if ${MKNLS} != "no"
-realinstall: nlsinstall
-realall: ${NLSALL}
-.endif
-
-cleannls:
- rm -f ${NLSALL}
-
-nlsinstall:: ${DESTDIR}${NLSDIR}
-.PRECIOUS:: ${DESTDIR}${NLSDIR}
-.PHONY:: ${DESTDIR}${NLSDIR}
-
-${DESTDIR}${NLSDIR}:
- @if [ ! -d ${.TARGET} ] || [ -h ${.TARGET} ] ; then \
- echo creating ${.TARGET}; \
- /bin/rm -rf ${.TARGET}; \
- ${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} -m 755 \
- ${.TARGET}; \
- fi
-
-nlsinstall:: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@}
-.PRECIOUS: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@}
-.if !defined(UPDATE)
-.PHONY: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@}
-.endif
-
-__nlsinstall: .USE
- ${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} ${.TARGET:H}
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${NLSOWN} \
- -g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} ${.TARGET}
-
-.for F in ${NLSALL:O:u}
-.if !defined(BUILD) && !make(all) && !make(${F})
-${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE
-.endif
-${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F} __nlsinstall
-.endfor
-.else
-cleannls:
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.obj.mk b/pkgtools/bootstrap-mk-files/files/bsd.obj.mk
deleted file mode 100644
index d58baf2073d..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.obj.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-# $NetBSD: bsd.obj.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-
-.if !target(__initialized_obj__)
-__initialized_obj__:
-.include <bsd.own.mk>
-.endif
-
-.if ${MKOBJ} == "no"
-obj:
-.else
-.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
-.if defined(MAKEOBJDIRPREFIX)
-__objdir:= ${MAKEOBJDIRPREFIX}${.CURDIR}
-.else
-__objdir:= ${MAKEOBJDIR}
-.endif
-# MAKEOBJDIR and MAKEOBJDIRPREFIX are env variables supported
-# by make(1). We simply mkdir -p the specified path.
-# If that fails - we do a mkdir to get the appropriate error message
-# before bailing out.
-obj:
- @if test ! -d ${__objdir}; then \
- mkdir -p ${__objdir}; \
- if test ! -d ${__objdir}; then \
- mkdir ${__objdir}; exit 1; \
- fi; \
- echo "${.CURDIR} -> ${__objdir}"; \
- fi
-.else
-.if defined(OBJMACHINE)
-__objdir= obj.${MACHINE}
-.else
-__objdir= obj
-.endif
-
-.if defined(USR_OBJMACHINE)
-__usrobjdir= ${BSDOBJDIR}.${MACHINE}
-__usrobjdirpf=
-.else
-__usrobjdir= ${BSDOBJDIR}
-.if defined(OBJMACHINE)
-__usrobjdirpf= .${MACHINE}
-.else
-__usrobjdirpf=
-.endif
-.endif
-
-PAWD?= /bin/pwd
-
-obj:
- @cd ${.CURDIR}; \
- here=`${PAWD}`; subdir=$${here#${BSDSRCDIR}/}; \
- if test $$here != $$subdir ; then \
- if test ! -d ${__usrobjdir}; then \
- echo "BSDOBJDIR ${__usrobjdir} does not exist, bailing..."; \
- exit 1; \
- fi; \
- dest=${__usrobjdir}/$$subdir${__usrobjdirpf} ; \
- if [ -h $$here/${__objdir} ]; then \
- curtarg=`ls -ld $$here/${__objdir} | awk '{print $$NF}'` ; \
- if [ "$$curtarg" = "$$dest" ]; then \
- : ; \
- else \
- echo "$$here/${__objdir} -> $$dest"; \
- rm -rf ${__objdir}; \
- ln -s $$dest ${__objdir}; \
- fi; \
- else \
- echo "$$here/${__objdir} -> $$dest"; \
- rm -rf ${__objdir}; \
- ln -s $$dest ${__objdir}; \
- fi; \
- if test ! -d $$dest; then \
- mkdir -p $$dest; \
- else \
- true; \
- fi; \
- else \
- true ; \
- dest=$$here/${__objdir} ; \
- if test ! -d ${__objdir} || test -h ${__objdir}; then \
- echo "making $$dest" ; \
- rm -f ${__objdir}; \
- mkdir $$dest; \
- fi ; \
- fi;
-.endif
-.endif
-
-print-objdir:
- @echo ${.OBJDIR}
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.prog.mk b/pkgtools/bootstrap-mk-files/files/bsd.prog.mk
deleted file mode 100644
index 04e6ccf4aaf..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.prog.mk
+++ /dev/null
@@ -1,174 +0,0 @@
-# $NetBSD: bsd.prog.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: cleanprog proginstall scriptsinstall
-realinstall: proginstall scriptsinstall
-clean cleandir: cleanprog
-
-CFLAGS+= ${COPTS}
-
-# ELF platforms depend on crtbegin.o and crtend.o
-.if ${OBJECT_FMT} == "ELF" && ${MACHINE:Mirix} != ""
-LIBCRTBEGIN?= ${DESTDIR}/usr/lib/crtbegin.o
-LIBCRTEND?= ${DESTDIR}/usr/lib/crtend.o
-.else
-LIBCRTBEGIN?=
-LIBCRTEND?=
-.endif
-
-# here is where you can define what LIB* are
-.-include <libnames.mk>
-
-.if defined(SHAREDSTRINGS)
-CLEANFILES+=strings
-.c.o:
- ${CC} -E ${CFLAGS} ${.IMPSRC} | xstr -c -
- @${CC} ${CFLAGS} -c x.c -o ${.TARGET}
- @rm -f x.c
-
-.cc.o:
- ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
- @mv -f x.c x.cc
- @${CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET}
- @rm -f x.cc
-
-.C.o:
- ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
- @mv -f x.c x.C
- @${CXX} ${CXXFLAGS} -c x.C -o ${.TARGET}
- @rm -f x.C
-.endif
-
-
-.if defined(PROG)
-SRCS?= ${PROG}.c
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-.if !empty(SRCS:N*.h:N*.sh:N*.fth)
-OBJS+= ${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
-LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
-.endif
-
-.if defined(OBJS) && !empty(OBJS)
-.NOPATH: ${OBJS}
-.if defined(DESTDIR)
-
-${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
-.if !commands(${PROG})
- ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -Wl,-rpath-link,${DESTDIR}/usr/lib ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${DESTDIR}/usr/lib -lgcc -lc -lgcc ${LIBCRTEND}
-.endif
-
-.else
-
-${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
-.if !commands(${PROG})
- ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
-.endif
-
-.endif # defined(DESTDIR)
-.endif # defined(OBJS) && !empty(OBJS)
-
-.if !defined(MAN)
-MAN= ${PROG}.1
-.endif # !defined(MAN)
-.endif # defined(PROG)
-
-realall: ${PROG} ${SCRIPTS}
-
-cleanprog:
- rm -f a.out [Ee]rrs mklog core *.core \
- ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}
-
-.if defined(SRCS) && !target(afterdepend)
-afterdepend: .depend
- @(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.ln:/' \
- < .depend > $$TMP; \
- mv $$TMP .depend)
-.endif
-
-.if defined(PROG) && !target(proginstall)
-PROGNAME?=${PROG}
-
-proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}
-.PRECIOUS: ${DESTDIR}${BINDIR}/${PROGNAME}
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${BINDIR}/${PROGNAME}
-.endif
-
-__proginstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${STRIPFLAG} ${INSTPRIV} \
- -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${.ALLSRC} ${.TARGET}
-
-.if !defined(BUILD) && !make(all) && !make(${PROG})
-${DESTDIR}${BINDIR}/${PROGNAME}: .MADE
-.endif
-${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG} __proginstall
-.endif
-
-.if !target(proginstall)
-proginstall::
-.endif
-
-.if defined(SCRIPTS) && !target(scriptsinstall)
-SCRIPTSDIR?=${BINDIR}
-SCRIPTSOWN?=${BINOWN}
-SCRIPTSGRP?=${BINGRP}
-SCRIPTSMODE?=${BINMODE}
-
-scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
-.PRECIOUS: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
-.if !defined(UPDATE)
-.PHONY: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
-.endif
-
-__scriptinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
- -o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \
- -g ${SCRIPTSGRP_${.ALLSRC:T}:U${SCRIPTSGRP}} \
- -m ${SCRIPTSMODE_${.ALLSRC:T}:U${SCRIPTSMODE}} \
- ${.ALLSRC} ${.TARGET}
-
-.for S in ${SCRIPTS:O:u}
-.if !defined(BUILD) && !make(all) && !make(${S})
-${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: .MADE
-.endif
-${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: ${S} __scriptinstall
-.endfor
-.endif
-
-.if !target(scriptsinstall)
-scriptsinstall::
-.endif
-
-lint: ${LOBJS}
-.if defined(LOBJS) && !empty(LOBJS)
- ${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.nls.mk>
-.include <bsd.files.mk>
-.include <bsd.inc.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-regress:
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.subdir.mk b/pkgtools/bootstrap-mk-files/files/bsd.subdir.mk
deleted file mode 100644
index 31d1effa7eb..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.subdir.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-# $NetBSD: bsd.subdir.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.subdir.mk 8.1 (Berkeley) 6/8/93
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.MAIN: all
-.endif
-
-.for dir in ${SUBDIR}
-.if exists(${dir}.${MACHINE})
-__REALSUBDIR+=${dir}.${MACHINE}
-.else
-__REALSUBDIR+=${dir}
-.endif
-.endfor
-
-.if defined(DESTDIR) && exists(${DESTDIR}/usr/share/mk/sys.mk)
-_M=-m ${DESTDIR}/usr/share/mk
-.else
-_M=
-.endif
-
-__recurse: .USE
- @targ=${.TARGET:C/-.*$//};dir=${.TARGET:C/^[^-]*-//}; \
- case "$$dir" in /*) \
- echo "$$targ ===> $$dir"; \
- cd "$$dir"; \
- ${MAKE} ${_M} "_THISDIR_=$$dir/" $$targ; \
- ;; \
- *) \
- echo "$$targ ===> ${_THISDIR_}$$dir"; \
- cd "${.CURDIR}/$$dir"; \
- ${MAKE} ${_M} "_THISDIR_=${_THISDIR_}$$dir/" $$targ; \
- ;; \
- esac
-
-# for obscure reasons, we can't do a simple .if ${dir} == ".WAIT"
-# but have to assign to __TARGDIR first.
-.for targ in ${TARGETS}
-.for dir in ${__REALSUBDIR}
-__TARGDIR := ${dir}
-.if ${__TARGDIR} == ".WAIT"
-SUBDIR_${targ} += .WAIT
-.else
-.PHONY: ${targ}-${dir}
-${targ}-${dir}: .MAKE __recurse
-SUBDIR_${targ} += ${targ}-${dir}
-.endif
-.endfor
-.if defined(__REALSUBDIR)
-.PHONY: subdir-${targ}
-subdir-${targ}: ${SUBDIR_${targ}}
-${targ}: subdir-${targ}
-.endif
-.endfor
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-${TARGETS}:
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.sys.mk b/pkgtools/bootstrap-mk-files/files/bsd.sys.mk
deleted file mode 100644
index 8ba7d174a80..00000000000
--- a/pkgtools/bootstrap-mk-files/files/bsd.sys.mk
+++ /dev/null
@@ -1,134 +0,0 @@
-# $NetBSD: bsd.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-#
-# Overrides used for NetBSD source tree builds.
-
-.if defined(WARNS)
-.if ${WARNS} > 0
-CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
-# XXX always get it right.
-CFLAGS+= -Wno-uninitialized
-.endif
-.if ${WARNS} > 1
-CFLAGS+=-Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings
-CFLAGS+=-Wswitch -Wshadow
-.endif
-.endif
-
-.if defined(WFORMAT) && defined(FORMAT_AUDIT)
-.if ${WFORMAT} > 1
-CFLAGS+=-Wnetbsd-format-audit -Wno-format-extra-args
-.endif
-.endif
-
-.if !defined(NOGCCERROR)
-CFLAGS+= -Werror
-.endif
-CFLAGS+= ${CWARNFLAGS}
-
-.if defined(DESTDIR)
-CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
-LINTFLAGS+= -d ${DESTDIR}/usr/include
-.endif
-
-.if defined(AUDIT)
-CPPFLAGS+= -D__AUDIT__
-.endif
-
-.if defined(MKSOFTFLOAT) && (${MKSOFTFLOAT} != "no")
-COPTS+= -msoft-float
-FOPTS+= -msoft-float
-.endif
-
-# Helpers for cross-compiling
-HOST_CC?= cc
-HOST_CFLAGS?= -O
-HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} -c
-HOST_LINK.c?= ${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS}
-
-HOST_CPP?= cpp
-HOST_CPPFLAGS?=
-
-HOST_LD?= ld
-HOST_LDFLAGS?=
-
-OBJCOPY?= objcopy
-STRIP?= strip
-CONFIG?= config
-RPCGEN?= rpcgen
-MKLOCALE?= mklocale
-
-.SUFFIXES: .m .o .ln .lo
-
-# Objective C
-# (Defined here rather than in <sys.mk> because `.m' is not just
-# used for Objective C source)
-.m:
- ${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.m.o:
- ${COMPILE.m} ${.IMPSRC}
-
-# Host-compiled C objects
-.c.lo:
- ${HOST_COMPILE.c} -o ${.TARGET} ${.IMPSRC}
-
-
-.if defined(PARALLEL) || defined(LPREFIX)
-LPREFIX?=yy
-LFLAGS+=-P${LPREFIX}
-# Lex
-.l:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c ${LDLIBS} -ll
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.l.c:
- ${LEX.l} -o${.TARGET} ${.IMPSRC}
-.l.o:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.l.lo:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${HOST_COMPILE.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.endif
-
-# Yacc
-.if defined(YHEADER) || defined(YPREFIX)
-.if defined(YPREFIX)
-YFLAGS+=-p${YPREFIX}
-.endif
-.if defined(YHEADER)
-YFLAGS+=-d
-.endif
-.y:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
- rm -f ${.TARGET:R}.tab.c ${.TARGET:R}.tab.h
-.y.h: ${.TARGET:R}.c
-.y.c:
- ${YACC.y} -o ${.TARGET} ${.IMPSRC}
-.y.o:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c ${TARGET:R}.tab.h
-.y.lo:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${HOST_COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c ${TARGET:R}.tab.h
-.elif defined(PARALLEL)
-.y:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
- rm -f ${.TARGET:R}.tab.c
-.y.c:
- ${YACC.y} -o ${.TARGET} ${.IMPSRC}
-.y.o:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c
-.y.lo:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${HOST_COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk
deleted file mode 100644
index 089e9515b9a..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk
+++ /dev/null
@@ -1,524 +0,0 @@
-# $NetBSD: Darwin.bsd.lib.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: checkver cleanlib libinstall
-realinstall: checkver libinstall
-clean cleandir: cleanlib
-
-.if exists(${SHLIB_VERSION_FILE})
-SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
-SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
-SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
-
-# Check for higher installed library versions.
-.if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
- exists(${BSDSRCDIR}/lib/checkver)
-checkver:
- @(cd ${.CURDIR} && \
- sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
- -d ${DESTDIR}${LIBDIR} ${LIB})
-.endif
-.endif
-
-.if !target(checkver)
-checkver:
-.endif
-
-print-shlib-major:
-.if defined(SHLIB_MAJOR)
- @echo ${SHLIB_MAJOR}
-.else
- @false
-.endif
-
-print-shlib-minor:
-.if defined(SHLIB_MINOR)
- @echo ${SHLIB_MINOR}
-.else
- @false
-.endif
-
-print-shlib-teeny:
-.if defined(SHLIB_TEENY)
- @echo ${SHLIB_TEENY}
-.else
- @false
-.endif
-
-.if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)
-.if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
-.if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
-.endif
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}
-.endif
-.endif
-
-# add additional suffixes not exported.
-# .po is used for profiling object files.
-# .so is used for PIC object files.
-.SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4 .m
-
-
-# Set PICFLAGS to cc flags for producing position-independent code,
-# if not already set. Includes -DPIC, if required.
-
-# Data-driven table using make variables to control how shared libraries
-# are built for different platforms and object formats.
-# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk>
-# SHLIB_SOVERSION: version number to be compiled into a shared library
-# via -soname. Usualy ${SHLIB_MAJOR} on ELF.
-# NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
-# [.${SHLIB_TEENY}]]
-# SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
-# with ELF, also set shared-lib version for ld.so.
-# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
-# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
-# FPICFLAGS: flags for ${FC} to compile .[fF] files to .so objects.
-# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
-# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects.
-# CAPICFLAGS flags for {$CC} to compiling .[Ss] files
-# (usually just ${CPPPICFLAGS} ${CPICFLAGS})
-# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects.
-
-.if ${MACHINE_ARCH} == "alpha"
- # Alpha-specific shared library flags
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?=
-.elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
- # mips-specific shared library flags
-
-# On mips, all libs are compiled with ABIcalls, not just sharedlibs.
-MKPICLIB= no
-
-# so turn shlib PIC flags on for ${AS}.
-AINC+=-DABICALLS
-AFLAGS+= -fPIC
-AS+= -KPIC
-
-.elif ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
-# On the VAX, all object are PIC by default, not just sharedlibs.
-MKPICLIB= no
-
-.elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
- ${OBJECT_FMT} == "ELF"
-
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?= -KPIC
-
-.else
-
-# Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
-SHLIB_LDSTARTFILE=
-SHLIB_LDENDFILE=
-SHLIB_SOVERSION=${SHLIB_FULLVERSION}
-SHLIB_SHFLAGS=
-FPICFLAGS ?= -fPIC
-CPICFLAGS?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS?= -k
-
-.endif
-
-MKPICLIB?= yes
-
-# Platform-independent linker flags for ELF shared libraries
-.if ${OBJECT_FMT} == "ELF"
-SHLIB_SOVERSION= ${SHLIB_MAJOR}
-SHLIB_SHFLAGS= -soname lib${LIB}.so.${SHLIB_SOVERSION}
-SHLIB_LDSTARTFILE?= ${DESTDIR}/usr/lib/crtbeginS.o
-SHLIB_LDENDFILE?= ${DESTDIR}/usr/lib/crtendS.o
-.endif
-
-CFLAGS+= ${COPTS}
-FFLAGS+= ${FOPTS}
-
-.c.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${.IMPSRC}
-.else
- @echo ${COMPILE.c:Q} ${.IMPSRC}
- @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-.cc.o .C.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${.IMPSRC}
-.else
- @echo ${COMPILE.cc:Q} ${.IMPSRC}
- @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.po .C.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.so .C.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.o:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${.IMPSRC}
-.else
- @echo ${COMPILE.f:Q} ${.IMPSRC}
- @${COMPILE.f} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.po:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.so:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.ln:
- ${ECHO} Skipping lint for Fortran libraries.
-
-.m.o:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${.IMPSRC}
-.else
- @echo ${COMPILE.m:Q} ${.IMPSRC}
- @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.po:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.so:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.S.o .s.o:
- @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
- @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.po .s.po:
- @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.so .s.so:
- @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-_LIBS=lib${LIB}.a
-.else
-_LIBS=
-.endif
-
-OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-
-.if ${MKPROFILE} != "no"
-_LIBS+=lib${LIB}_p.a
-POBJS+=${OBJS:.o=.po}
-.endif
-
-.if ${MKPIC} != "no"
-.if ${MKPICLIB} == "no"
-SOLIB=lib${LIB}.a
-.else
-SOLIB=lib${LIB}_pic.a
-_LIBS+=${SOLIB}
-SOBJS+=${OBJS:.o=.so}
-.endif
-.if defined(SHLIB_FULLVERSION)
-_LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-.endif
-
-LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-_LIBS+=llib-l${LIB}.ln
-.endif
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-ALLOBJS=${OBJS} ${POBJS} ${SOBJS}
-.else
-ALLOBJS=${POBJS} ${SOBJS}
-.endif
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-ALLOBJS+=${LOBJS}
-.endif
-.NOPATH: ${ALLOBJS} ${_LIBS}
-
-realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
-
-__archivebuild: .USE
- @rm -f ${.TARGET}
- ${AR} -c -q ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
- ${RANLIB} ${.TARGET}
-
-__archiveinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}
- ${RANLIB} -t ${.TARGET}
- chmod ${LIBMODE} ${.TARGET}
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-lib${LIB}.a:: ${OBJS} __archivebuild
- @echo building standard ${LIB} library
-
-lib${LIB}_p.a:: ${POBJS} __archivebuild
- @echo building profiled ${LIB} library
-
-lib${LIB}_pic.a:: ${SOBJS} __archivebuild
- @echo building shared object ${LIB} library
-
-lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
- ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
- @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
- @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
-.if defined(DESTDIR)
- $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- --whole-archive ${SOLIB} \
- --no-whole-archive ${LDADD} \
- -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
- ${SHLIB_LDENDFILE}
-.else
- $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \
- ${SHLIB_LDENDFILE}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
- mv -f lib${LIB}.so.tmp lib${LIB}.so
-.endif
-
-.if !empty(LOBJS)
-LLIBS?= -lc
-llib-l${LIB}.ln: ${LOBJS}
- @echo building llib-l${LIB}.ln
- @rm -f llib-l${LIB}.ln
- @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
-.endif
-
-cleanlib:
- rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
- rm -f lib${LIB}.a ${OBJS}
- rm -f lib${LIB}_p.a ${POBJS}
- rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
- rm -f llib-l${LIB}.ln ${LOBJS}
-
-.if defined(SRCS)
-afterdepend: .depend
- @(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
- < .depend > $$TMP; \
- mv $$TMP .depend)
-.endif
-
-.if !target(libinstall)
-# Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
-libinstall::
-
-.if ${MKLINKLIB} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
-${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
-.endif
-
-.if ${MKPROFILE} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
-.endif
-
-.if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
-.endif
-.if ${MKPICLIB} == "no"
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:
- rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
- ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.else
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
-.endif
-.endif
-
-.if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
-.if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
- /sbin/ldconfig -m ${LIBDIR}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
-.if ${MKLINKLIB} != "no"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so
-.endif
-.endif
-.endif
-
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
-.endif
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
-.endif
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.nls.mk>
-.include <bsd.files.mk>
-.include <bsd.inc.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-lint regress:
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.man.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.man.mk
deleted file mode 100644
index c922245b8ad..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.man.mk
+++ /dev/null
@@ -1,205 +0,0 @@
-# $NetBSD: Darwin.bsd.man.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: catinstall maninstall catpages manpages catlinks manlinks cleanman html installhtml cleanhtml
-.if ${MKMAN} != "no"
-realinstall: ${MANINSTALL}
-.endif
-cleandir: cleanman
-
-.if exists(${DESTDIR}/usr/share/groff/1.19.1/tmac)
-TMACDIR?= ${DESTDIR}/usr/share/groff/1.19.1/tmac
-.elif exists(${DESTDIR}/usr/share/groff/1.18.1/tmac)
-TMACDIR?= ${DESTDIR}/usr/share/groff/1.18.1/tmac
-.else
-TMACDIR?= ${DESTDIR}/usr/share/groff/tmac
-.endif
-HTMLDIR?= ${DESTDIR}/usr/share/man
-CATDEPS?= ${TMACDIR}/mandoc.tmac \
- ${TMACDIR}/doc.tmac
-MANTARGET?= cat
-NROFF?= nroff -Tascii
-GROFF?= groff -Tascii
-TBL?= tbl
-
-
-.SUFFIXES: .1 .2 .3 .4 .5 .6 .7 .8 .9 \
- .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \
- .html1 .html2 .html3 .html4 .html5 .html6 .html7 .html8 .html9
-
-.9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3.cat3 .2.cat2 .1.cat1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}"
- @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.9.html9 .8.html8 .7.html7 .6.html6 .5.html5 .4.html4 .3.html3 .2.html2 .1.html1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET}"
- @${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET}"
- @cat ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.if defined(MAN) && !empty(MAN)
-MANPAGES= ${MAN}
-CATPAGES= ${MANPAGES:C/(.*).([1-9])/\1.cat\2/}
-.NOPATH: ${CATPAGES}
-.if !defined(NOHTML)
-HTMLPAGES= ${MANPAGES:C/(.*).([1-9])/\1.html\2/}
-.endif
-.endif
-
-MINSTALL= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
- -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
-
-.if defined(MANZ)
-# chown and chmod are done afterward automatically
-MCOMPRESS= gzip -cf
-MCOMPRESSSUFFIX= .gz
-.endif
-
-catinstall: catlinks
-maninstall: manlinks
-
-__installpage: .USE
-.if defined(MCOMPRESS) && !empty(MCOMPRESS)
- @rm -f ${.TARGET}
- ${MCOMPRESS} ${.ALLSRC} > ${.TARGET}
- @chown ${MANOWN}:${MANGRP} ${.TARGET}
- @chmod ${MANMODE} ${.TARGET}
-.else
- @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
- (echo "${MINSTALL} ${.ALLSRC} ${.TARGET}" && \
- ${MINSTALL} ${.ALLSRC} ${.TARGET})
-.endif
-
-
-# Rules for cat'ed man page installation
-.if defined(CATPAGES) && !empty(CATPAGES) && ${MKCATPAGES} != "no"
-catpages:: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${CATPAGES:O:u}
-. if !defined(BUILD) && !make(all) && !make(${P})
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: .MADE
-. endif
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-catpages::
-.endif
-
-# Rules for source page installation
-.if defined(MANPAGES) && !empty(MANPAGES)
-manpages:: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${MANPAGES:O:u}
-${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-manpages::
-.endif
-
-.if ${MKCATPAGES} != "no"
-catlinks: catpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-.else
-catlinks:
-.endif
-
-manlinks: manpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-
-# Html rules
-html: ${HTMLPAGES}
-
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
-.for P in ${HTMLPAGES:O:u}
-${HTMLDIR}/${P:T:E}/${P:T:R}.html: ${P}
- ${MINSTALL} ${.ALLSRC} ${.TARGET}
-.endfor
-.endif
-installhtml: ${HTMLPAGES:@P@${HTMLDIR}/${P:T:E}/${P:T:R}.html@}
-
-cleanhtml:
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
- rm -f ${HTMLPAGES}
-.endif
-
-
-.if defined(CATPAGES)
-.if ${MKCATPAGES} != "no" && ${MKMAN} != "no"
-realall: ${CATPAGES}
-.else
-realall:
-.endif
-
-cleanman:
- rm -f ${CATPAGES}
-.else
-cleanman:
-.endif
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-clean depend includes lint regress tags:
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.sys.mk
deleted file mode 100644
index 49e2f5729e3..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.sys.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-# $NetBSD: Darwin.bsd.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-
-#OBJCOPY?= objcopy
-STRIP?= strip
-CONFIG?= config
-RPCGEN?= rpcgen
-MKLOCALE?= mklocale
-
-.SUFFIXES: .m .o .ln .lo
-
-# Objective C
-# (Defined here rather than in <sys.mk> because `.m' is not just
-# used for Objective C source)
-.m:
- ${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.m.o:
- ${COMPILE.m} ${.IMPSRC}
-
-.if defined(PARALLEL) || defined(LPREFIX)
-LPREFIX?=yy
-LFLAGS+=-P${LPREFIX}
-# Lex
-.l:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c ${LDLIBS} -ll
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.l.c:
- ${LEX.l} -o${.TARGET} ${.IMPSRC}
-.l.o:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.endif
-
-# Yacc
-.if defined(YHEADER) || defined(YPREFIX)
-.if defined(YPREFIX)
-YFLAGS+=-p${YPREFIX}
-.endif
-.if defined(YHEADER)
-YFLAGS+=-d
-.endif
-.y:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
- rm -f ${.TARGET:R}.tab.c ${.TARGET:R}.tab.h
-.y.h: ${.TARGET:R}.c
-.y.c:
- ${YACC.y} -o ${.TARGET} ${.IMPSRC}
-.y.o:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c ${TARGET:R}.tab.h
-.elif defined(PARALLEL)
-.y:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
- rm -f ${.TARGET:R}.tab.c
-.y.c:
- ${YACC.y} -o ${.TARGET} ${.IMPSRC}
-.y.o:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk
deleted file mode 100644
index e7092b03e8f..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk
+++ /dev/null
@@ -1,210 +0,0 @@
-# $NetBSD: Darwin.sys.mk,v 1.2 2006/11/11 18:24:52 jschauma Exp $
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix= We run UNIX.
-OS!= uname -s
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-COMPILE.s?= ${AS} ${AFLAGS}
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-.if exists(/usr/bin/gcc)
-CC?= gcc
-.else
-CC?= cc
-.endif
-DBG?= -O2
-CFLAGS?= -pipe ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-.if exists(/usr/bin/g++)
-CXX?= g++
-.else
-CXX?= c++
-.endif
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-NOLINT= 1
-CPPFLAGS?=
-
-MK_DEP?= mkdeps.sh -N
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= install
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbx
-
-LORDER?= lorder
-
-MAKE?= bmake
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort -q
-
-YACC?= yacc
-YFLAGS?= -d
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# C++
-.cc:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} -o ${.TARGET} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/FreeBSD.bsd.man.mk b/pkgtools/bootstrap-mk-files/files/mods/FreeBSD.bsd.man.mk
deleted file mode 100644
index 4aff313d54e..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/FreeBSD.bsd.man.mk
+++ /dev/null
@@ -1,137 +0,0 @@
-# $NetBSD: FreeBSD.bsd.man.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# From:
-# OpenBSD: bsd.man.mk,v 1.23 2001/07/20 23:02:21 espie Exp
-# NetBSD: bsd.man.mk,v 1.23 1996/02/10 07:49:33 jtc Exp
-# @(#)bsd.man.mk 5.2 (Berkeley) 5/11/90
-
-MANTARGET?= cat
-NROFF?= nroff -Tascii
-TBL?= tbl
-
-.if !target(.MAIN)
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-
-.MAIN: all
-.endif
-
-.SUFFIXES: .1 .2 .3 .3p .4 .5 .6 .7 .8 .9 .1tbl .2tbl .3tbl .4tbl .5tbl .6tbl \
- .7tbl .8tbl .9tbl .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \
- .ps1 .ps2 .ps3 .ps4 .ps5 .ps6 .ps7 .ps8 .ps9
-
-.9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3p.cat3p .3.cat3 .2.cat2 .1.cat1:
- @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}"
- @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false)
-
-.9tbl.cat9 .8tbl.cat8 .7tbl.cat7 .6tbl.cat6 .5tbl.cat5 .4tbl.cat4 .3tbl.cat3 \
-.2tbl.cat2 .1tbl.cat1:
- @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-
-.9.ps9 .8.ps8 .7.ps7 .6.ps6 .5.ps5 .4.ps4 .3p.ps3p .3.ps3 .2.ps2 .1.ps1:
- @echo "nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET}"
- @nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false)
-
-.9tbl.ps9 .8tbl.ps8 .7tbl.ps7 .6tbl.ps6 .5tbl.ps5 .4tbl.ps4 .3tbl.ps3 \
-.2tbl.ps2 .1tbl.ps1:
- @echo "${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET} || (rm -f ${.TARGET}; false)
-
-.if defined(MAN) && !empty(MAN) && !defined(MANALL)
-
-MANALL= ${MAN:S/.1$/.cat1/g:S/.2$/.cat2/g:S/.3$/.cat3/g:S/.3p$/.cat3p/g:S/.4$/.cat4/g:S/.5$/.cat5/g:S/.6$/.cat6/g:S/.7$/.cat7/g:S/.8$/.cat8/g:S/.9$/.cat9/g:S/.1tbl$/.cat1/g:S/.2tbl$/.cat2/g:S/.3tbl$/.cat3/g:S/.4tbl$/.cat4/g:S/.5tbl$/.cat5/g:S/.6tbl$/.cat6/g:S/.7tbl$/.cat7/g:S/.8tbl$/.cat8/g:S/.9tbl$/.cat9/g}
-
-.if defined(MANPS)
-
-PSALL= ${MAN:S/.1$/.ps1/g:S/.2$/.ps2/g:S/.3$/.ps3/g:S/.3p$/.ps3p/g:S/.4$/.ps4/g:S/.5$/.ps5/g:S/.6$/.ps6/g:S/.7$/.ps7/g:S/.8$/.ps8/g:S/.9$/.ps9/g:S/.1tbl$/.ps1/g:S/.2tbl$/.ps2/g:S/.3tbl$/.ps3/g:S/.4tbl$/.ps4/g:S/.5tbl$/.ps5/g:S/.6tbl$/.ps6/g:S/.7tbl$/.ps7/g:S/.8tbl$/.ps8/g:S/.9tbl$/.ps9/g}
-
-.endif
-
-.endif
-
-MINSTALL= ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
-.if defined(MANZ)
-# chown and chmod are done afterward automatically
-MCOMPRESS= gzip -cf
-MCOMPRESSSUFFIX= .gz
-.endif
-
-.if defined(MANSUBDIR)
-# Add / so that we don't have to specify it. Better arch -> MANSUBDIR mapping
-MANSUBDIR:=${MANSUBDIR:S,^,/,}
-.else
-# XXX MANSUBDIR must be non empty for the mlink loops to work
-MANSUBDIR=''
-.endif
-
-maninstall:
-.if defined(MANALL)
- @for page in ${MANALL}; do \
- set -- ${MANSUBDIR}; \
- subdir=$$1; \
- dir=${DESTDIR}${MANDIR}$${page##*.cat}; \
- base=$${page##*/}; \
- instpage=$${dir}$${subdir}/$${base%.*}.0${MCOMPRESSSUFFIX}; \
- if [ X"${MCOMPRESS}" = X ]; then \
- echo ${MINSTALL} $$page $$instpage; \
- ${MINSTALL} $$page $$instpage; \
- else \
- rm -f $$instpage; \
- echo ${MCOMPRESS} $$page \> $$instpage; \
- ${MCOMPRESS} $$page > $$instpage; \
- chown ${MANOWN}:${MANGRP} $$instpage; \
- chmod ${MANMODE} $$instpage; \
- fi; \
- while test $$# -ge 2; do \
- shift; \
- extra=$${dir}$$1/$${base%.*}.0${MCOMPRESSSUFFIX}; \
- echo $$extra -\> $$instpage; \
- ln -f $$instpage $$extra; \
- done; \
- done
-.endif
-.if defined(PSALL)
- @for page in ${PSALL}; do \
- set -- ${MANSUBDIR}; \
- subdir=$$1; \
- dir=${DESTDIR}${PSDIR}$${page##*.ps}; \
- base=$${page##*/}; \
- instpage=$${dir}$${subdir}/$${base%.*}.ps${MCOMPRESSSUFFIX}; \
- if [ X"${MCOMPRESS}" = X ]; then \
- echo ${MINSTALL} $$page $$instpage; \
- ${MINSTALL} $$page $$instpage; \
- else \
- rm -f $$instpage; \
- echo ${MCOMPRESS} $$page \> $$instpage; \
- ${MCOMPRESS} $$page > $$instpage; \
- chown ${PSOWN}:${PSGRP} $$instpage; \
- chmod ${PSMODE} $$instpage; \
- fi; \
- while test $$# -ge 2; do \
- shift; \
- extra=$${dir}$$1/$${base%.*}.ps${MCOMPRESSSUFFIX}; \
- echo $$extra -\> $$instpage; \
- ln -f $$instpage $$extra; \
- done; \
- done
-.endif
-.if defined(MLINKS) && !empty(MLINKS)
-. for sub in ${MANSUBDIR}
-. for lnk file in ${MLINKS}
- @l=${DESTDIR}${MANDIR}${lnk:E}${sub}/${lnk:R}.0${MCOMPRESSSUFFIX}; \
- t=${DESTDIR}${MANDIR}${file:E}${sub}/${file:R}.0${MCOMPRESSSUFFIX}; \
- echo $$t -\> $$l; \
- rm -f $$t; ln $$l $$t;
-. endfor
-. endfor
-.endif
-
-.if (defined(MANALL) || defined(PSALL)) && !defined(MANLOCALBUILD)
-all: ${MANALL} ${PSALL}
-
-cleandir: cleanman
-cleanman:
- rm -f ${MANALL} ${PSALL}
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.lib.mk
deleted file mode 100644
index 02e9d96920a..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.lib.mk
+++ /dev/null
@@ -1,522 +0,0 @@
-# $NetBSD: IRIX.bsd.lib.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: checkver cleanlib libinstall
-realinstall: checkver libinstall
-clean cleandir: cleanlib
-
-.if exists(${SHLIB_VERSION_FILE})
-SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
-SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
-SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
-
-# Check for higher installed library versions.
-.if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
- exists(${BSDSRCDIR}/lib/checkver)
-checkver:
- @(cd ${.CURDIR} && \
- sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
- -d ${DESTDIR}${LIBDIR} ${LIB})
-.endif
-.endif
-
-.if !target(checkver)
-checkver:
-.endif
-
-print-shlib-major:
-.if defined(SHLIB_MAJOR)
- @echo ${SHLIB_MAJOR}
-.else
- @false
-.endif
-
-print-shlib-minor:
-.if defined(SHLIB_MINOR)
- @echo ${SHLIB_MINOR}
-.else
- @false
-.endif
-
-print-shlib-teeny:
-.if defined(SHLIB_TEENY)
- @echo ${SHLIB_TEENY}
-.else
- @false
-.endif
-
-.if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)
-.if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
-.if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
-.endif
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}
-.endif
-.endif
-
-# add additional suffixes not exported.
-# .po is used for profiling object files.
-# .so is used for PIC object files.
-.SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4 .m
-
-
-# Set PICFLAGS to cc flags for producing position-independent code,
-# if not already set. Includes -DPIC, if required.
-
-# Data-driven table using make variables to control how shared libraries
-# are built for different platforms and object formats.
-# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk>
-# SHLIB_SOVERSION: version number to be compiled into a shared library
-# via -soname. Usualy ${SHLIB_MAJOR} on ELF.
-# NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
-# [.${SHLIB_TEENY}]]
-# SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
-# with ELF, also set shared-lib version for ld.so.
-# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
-# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
-# FPICFLAGS: flags for ${FC} to compile .[fF] files to .so objects.
-# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
-# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects.
-# CAPICFLAGS flags for {$CC} to compiling .[Ss] files
-# (usually just ${CPPPICFLAGS} ${CPICFLAGS})
-# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects.
-
-.if ${MACHINE_ARCH} == "alpha"
- # Alpha-specific shared library flags
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?=
-.elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
- # mips-specific shared library flags
-
-# On mips, all libs are compiled with ABIcalls, not just sharedlibs.
-MKPICLIB= no
-
-# so turn shlib PIC flags on for ${AS}.
-AINC+=-DABICALLS
-AFLAGS+= -fPIC
-AS+= -KPIC
-
-.elif ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
-# On the VAX, all object are PIC by default, not just sharedlibs.
-MKPICLIB= no
-
-.elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
- ${OBJECT_FMT} == "ELF"
-
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?= -KPIC
-
-.else
-
-# Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
-SHLIB_LDSTARTFILE=
-SHLIB_LDENDFILE=
-SHLIB_SOVERSION=${SHLIB_FULLVERSION}
-SHLIB_SHFLAGS=
-FPICFLAGS ?= -fPIC
-CPICFLAGS?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS?= -k
-
-.endif
-
-MKPICLIB?= yes
-
-# Platform-independent linker flags for ELF shared libraries
-.if ${OBJECT_FMT} == "ELF"
-SHLIB_SOVERSION= ${SHLIB_MAJOR}
-SHLIB_SHFLAGS= -soname lib${LIB}.so.${SHLIB_SOVERSION}
-SHLIB_LDSTARTFILE?= ${DESTDIR}/usr/lib/crtbeginS.o
-SHLIB_LDENDFILE?= ${DESTDIR}/usr/lib/crtendS.o
-.endif
-
-CFLAGS+= ${COPTS}
-FFLAGS+= ${FOPTS}
-
-.c.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${.IMPSRC}
-.else
- @echo ${COMPILE.c:Q} ${.IMPSRC}
- @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-.cc.o .C.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${.IMPSRC}
-.else
- @echo ${COMPILE.cc:Q} ${.IMPSRC}
- @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.po .C.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.so .C.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.o:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${.IMPSRC}
-.else
- @echo ${COMPILE.f:Q} ${.IMPSRC}
- @${COMPILE.f} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.po:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.so:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.ln:
- ${ECHO} Skipping lint for Fortran libraries.
-
-.m.o:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${.IMPSRC}
-.else
- @echo ${COMPILE.m:Q} ${.IMPSRC}
- @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.po:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.so:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.S.o .s.o:
- @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
- @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.po .s.po:
- @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.so .s.so:
- @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-_LIBS=lib${LIB}.a
-.else
-_LIBS=
-.endif
-
-OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-
-.if ${MKPROFILE} != "no"
-_LIBS+=lib${LIB}_p.a
-POBJS+=${OBJS:.o=.po}
-.endif
-
-.if ${MKPIC} != "no"
-.if ${MKPICLIB} == "no"
-SOLIB=lib${LIB}.a
-.else
-SOLIB=lib${LIB}_pic.a
-_LIBS+=${SOLIB}
-SOBJS+=${OBJS:.o=.so}
-.endif
-.if defined(SHLIB_FULLVERSION)
-_LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-.endif
-
-LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-_LIBS+=llib-l${LIB}.ln
-.endif
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-ALLOBJS=${OBJS} ${POBJS} ${SOBJS}
-.else
-ALLOBJS=${POBJS} ${SOBJS}
-.endif
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-ALLOBJS+=${LOBJS}
-.endif
-.NOPATH: ${ALLOBJS} ${_LIBS}
-
-realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
-
-__archivebuild: .USE
- @rm -f ${.TARGET}
- ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
-
-__archiveinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}
- chmod ${LIBMODE} ${.TARGET}
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-lib${LIB}.a:: ${OBJS} __archivebuild
- @echo building standard ${LIB} library
-
-lib${LIB}_p.a:: ${POBJS} __archivebuild
- @echo building profiled ${LIB} library
-
-lib${LIB}_pic.a:: ${SOBJS} __archivebuild
- @echo building shared object ${LIB} library
-
-lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
- ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
- @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
- @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
-.if defined(DESTDIR)
- $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- -all archive ${SOLIB} \
- -none ${LDADD} \
- -L${DESTDIR}${LIBDIR} -rpath ${LIBDIR} \
- ${SHLIB_LDENDFILE}
-.else
- $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- -all ${SOLIB} -none ${LDADD} \
- ${SHLIB_LDENDFILE}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
- mv -f lib${LIB}.so.tmp lib${LIB}.so
-.endif
-
-.if !empty(LOBJS)
-LLIBS?= -lc
-llib-l${LIB}.ln: ${LOBJS}
- @echo building llib-l${LIB}.ln
- @rm -f llib-l${LIB}.ln
- @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
-.endif
-
-cleanlib:
- rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
- rm -f lib${LIB}.a ${OBJS}
- rm -f lib${LIB}_p.a ${POBJS}
- rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
- rm -f llib-l${LIB}.ln ${LOBJS}
-
-.if defined(SRCS)
-afterdepend: .depend
- @(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
- < .depend > $$TMP; \
- mv $$TMP .depend)
-.endif
-
-.if !target(libinstall)
-# Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
-libinstall::
-
-.if ${MKLINKLIB} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
-${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
-.endif
-
-.if ${MKPROFILE} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
-.endif
-
-.if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
-.endif
-.if ${MKPICLIB} == "no"
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:
- rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
- ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.else
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
-.endif
-.endif
-
-.if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
-.if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
- /sbin/ldconfig -m ${LIBDIR}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
-.if ${MKLINKLIB} != "no"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so
-.endif
-.endif
-.endif
-
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
-.endif
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
-.endif
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.nls.mk>
-.include <bsd.files.mk>
-.include <bsd.inc.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-lint regress:
diff --git a/pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.own.mk.in b/pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.own.mk.in
deleted file mode 100644
index db177c8f54a..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/IRIX.bsd.own.mk.in
+++ /dev/null
@@ -1,246 +0,0 @@
-# $NetBSD: IRIX.bsd.own.mk.in,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-
-.if !defined(_IRIX_OWN_MK_)
-_IRIX_OWN_MK_=1
-
-.if defined(MAKECONF) && exists(${MAKECONF})
-.include "${MAKECONF}"
-.elif exists(@SYSCONFDIR@/mk.conf)
-.include "@SYSCONFDIR@/mk.conf"
-.elif exists(/etc/mk.conf)
-.include "/etc/mk.conf"
-.endif
-
-# Defining `SKEY' causes support for S/key authentication to be compiled in.
-SKEY= yes
-
-# where the system object and source trees are kept; can be configurable
-# by the user in case they want them in ~/foosrc and ~/fooobj, for example
-BSDSRCDIR?= /opt/bsd/src
-BSDOBJDIR?= /opt/bsd/obj
-
-BINGRP?= @ROOT_GROUP@
-BINOWN?= root
-BINMODE?= 555
-NONBINMODE?= 444
-
-# Define MANZ to have the man pages compressed (gzip)
-#MANZ= 1
-
-MANDIR?= /usr/share/man
-MANGRP?= @ROOT_GROUP@
-MANOWN?= ${BINOWN}
-MANMODE?= ${NONBINMODE}
-MANINSTALL?= maninstall catinstall
-
-INFODIR?= /usr/share/info
-INFOGRP?= @ROOT_GROUP@
-INFOOWN?= ${BINOWN}
-INFOMODE?= ${NONBINMODE}
-
-LIBDIR?= /usr/lib
-LINTLIBDIR?= ${LIBDIR}/lint
-LIBGRP?= ${BINGRP}
-LIBOWN?= ${BINOWN}
-LIBMODE?= ${NONBINMODE}
-
-DOCDIR?= /usr/share/doc
-HTMLDOCDIR?= /usr/share/doc/html
-DOCGRP?= @ROOT_GROUP@
-DOCOWN?= ${BINOWN}
-DOCMODE?= ${NONBINMODE}
-
-NLSDIR?= /usr/share/nls
-NLSGRP?= @ROOT_GROUP@
-NLSOWN?= ${BINOWN}
-NLSMODE?= ${NONBINMODE}
-
-LOCALEDIR?= /usr/lib/locale
-LOCALEGRP?= @ROOT_GROUP@
-LOCALEOWN?= ${BINOWN}
-LOCALEMODE?= ${NONBINMODE}
-
-COPY?= -c
-.if defined(UPDATE)
-PRESERVE?= -p
-.else
-PRESERVE?=
-.endif
-.if defined(UNPRIVILEGED)
-INSTPRIV?= -U
-.endif
-STRIPFLAG?= -s
-
-# Define SYS_INCLUDE to indicate whether you want symbolic links to the system
-# source (``symlinks''), or a separate copy (``copies''); (latter useful
-# in environments where it's not possible to keep /sys publicly readable)
-#SYS_INCLUDE= symlinks
-
-OBJECT_FMT?=ELF
-
-# GNU sources and packages sometimes see architecture names differently.
-# This table maps an architecture name to its GNU counterpart.
-# Use as so: ${GNU_ARCH.${TARGET_ARCH}} or ${MACHINE_GNU_ARCH}
-.ifndef MACHINE_GNU_ARCH
-GNU_ARCH.alpha=alpha
-GNU_ARCH.arm26=arm
-GNU_ARCH.arm32=arm
-GNU_ARCH.arm=arm
-GNU_ARCH.i386=i386
-GNU_ARCH.m68k=m68k
-GNU_ARCH.mipseb=mipseb
-GNU_ARCH.mipsel=mipsel
-GNU_ARCH.ns32k=ns32k
-GNU_ARCH.powerpc=powerpc
-GNU_ARCH.sh3eb=sh
-GNU_ARCH.sh3el=sh
-GNU_ARCH.sparc=sparc
-GNU_ARCH.sparc64=sparc64
-GNU_ARCH.vax=vax
-MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}}
-.endif
-
-# CPU model, derived from MACHINE_ARCH
-MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:S/arm26/arm/:S/arm32/arm/:C/sh3e[bl]/sh3/:S/m68000/m68k/}
-
-TARGETS+= all clean cleandir depend dependall includes \
- install lint obj regress tags html installhtml cleanhtml
-.PHONY: all clean cleandir depend dependall distclean includes \
- install lint obj regress tags beforedepend afterdepend \
- beforeinstall afterinstall realinstall realdepend realall \
- html installhtml cheanhtml
-
-# set NEED_OWN_INSTALL_TARGET, if it's not already set, to yes
-# this is used by bsd.pkg.mk to stop "install" being defined
-NEED_OWN_INSTALL_TARGET?= yes
-
-.if ${NEED_OWN_INSTALL_TARGET} == "yes"
-.if !target(install)
-install: .NOTMAIN beforeinstall subdir-install realinstall afterinstall
-beforeinstall: .NOTMAIN
-subdir-install: .NOTMAIN beforeinstall
-realinstall: .NOTMAIN beforeinstall
-afterinstall: .NOTMAIN subdir-install realinstall
-.endif
-all: .NOTMAIN realall subdir-all
-subdir-all: .NOTMAIN
-realall: .NOTMAIN
-depend: .NOTMAIN realdepend subdir-depend
-subdir-depend: .NOTMAIN
-realdepend: .NOTMAIN
-distclean: .NOTMAIN cleandir
-.endif
-
-PRINTOBJDIR= printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -B -s -f-
-
-# Define MKxxx variables (which are either yes or no) for users
-# to set in /etc/mk.conf and override on the make commandline.
-# These should be tested with `== "no"' or `!= "no"'.
-# The NOxxx variables should only be used by Makefiles.
-#
-
-MKCATPAGES?=yes
-
-.if defined(NODOC)
-MKDOC=no
-#.elif !defined(MKDOC)
-#MKDOC=yes
-.else
-MKDOC?=yes
-.endif
-
-MKINFO?=yes
-
-.if defined(NOLINKLIB)
-MKLINKLIB=no
-.else
-MKLINKLIB?=yes
-.endif
-.if ${MKLINKLIB} == "no"
-MKPICINSTALL=no
-MKPROFILE=no
-.endif
-
-.if defined(NOLINT)
-MKLINT=no
-.else
-MKLINT?=yes
-.endif
-
-.if defined(NOMAN)
-MKMAN=no
-.else
-MKMAN?=yes
-.endif
-.if ${MKMAN} == "no"
-MKCATPAGES=no
-.endif
-
-.if defined(NONLS)
-MKNLS=no
-.else
-MKNLS?=yes
-.endif
-
-#
-# MKOBJDIRS controls whether object dirs are created during "make build".
-# MKOBJ controls whether the "make obj" rule does anything.
-#
-.if defined(NOOBJ)
-MKOBJ=no
-MKOBJDIRS=no
-.else
-MKOBJ?=yes
-MKOBJDIRS?=no
-.endif
-
-.if defined(NOPIC)
-MKPIC=no
-.else
-MKPIC?=yes
-.endif
-
-.if defined(NOPICINSTALL)
-MKPICINSTALL=no
-.else
-MKPICINSTALL?=yes
-.endif
-
-.if defined(NOPROFILE)
-MKPROFILE=no
-.else
-MKPROFILE?=yes
-.endif
-
-.if defined(NOSHARE)
-MKSHARE=no
-.else
-MKSHARE?=yes
-.endif
-.if ${MKSHARE} == "no"
-MKCATPAGES=no
-MKDOC=no
-MKINFO=no
-MKMAN=no
-MKNLS=no
-.endif
-
-.if defined(NOCRYPTO)
-MKCRYPTO=no
-.else
-MKCRYPTO?=yes
-.endif
-
-MKCRYPTO_IDEA?=no
-
-MKCRYPTO_RC5?=no
-
-.if defined(NOKERBEROS) || (${MKCRYPTO} == "no")
-MKKERBEROS=no
-.else
-MKKERBEROS?=yes
-.endif
-
-MKSOFTFLOAT?=no
-
-.endif # _IRIX_OWN_MK_
diff --git a/pkgtools/bootstrap-mk-files/files/mods/IRIX.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/IRIX.sys.mk
deleted file mode 100644
index a0760fb899b..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/IRIX.sys.mk
+++ /dev/null
@@ -1,198 +0,0 @@
-# $NetBSD: IRIX.sys.mk,v 1.2 2006/08/06 18:59:41 schwarz Exp $
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run Unix
-OS!= uname -s
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= true
-
-AS?= as
-AFLAGS?=
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CC?= cc
-NOGCCERROR?= # defined
-DBG?= -O2
-CFLAGS?= ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= CC
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-_IRIXVERS!= uname -r
-.if !empty(_IRIXVERS:M6*)
-CPP?= CC -E
-.else
-CPP?= cpp
-.endif
-CPPFLAGS?=
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= ${PREFIX}/bin/install-sh
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Interix.bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/mods/Interix.bsd.lib.mk
deleted file mode 100644
index 089a6c3014c..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Interix.bsd.lib.mk
+++ /dev/null
@@ -1,472 +0,0 @@
-# $NetBSD: Interix.bsd.lib.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: checkver cleanlib libinstall
-realinstall: checkver libinstall
-clean cleandir: cleanlib
-
-.if exists(${SHLIB_VERSION_FILE})
-SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
-SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
-SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
-
-# Check for higher installed library versions.
-.if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
- exists(${BSDSRCDIR}/lib/checkver)
-checkver:
- @(cd ${.CURDIR} && \
- sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
- -d ${DESTDIR}${LIBDIR} ${LIB})
-.endif
-.endif
-
-.if !target(checkver)
-checkver:
-.endif
-
-print-shlib-major:
-.if defined(SHLIB_MAJOR)
- @echo ${SHLIB_MAJOR}
-.else
- @false
-.endif
-
-print-shlib-minor:
-.if defined(SHLIB_MINOR)
- @echo ${SHLIB_MINOR}
-.else
- @false
-.endif
-
-print-shlib-teeny:
-.if defined(SHLIB_TEENY)
- @echo ${SHLIB_TEENY}
-.else
- @false
-.endif
-
-.if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)
-.if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
-.if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
-.endif
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}
-.endif
-.endif
-
-# add additional suffixes not exported.
-# .po is used for profiling object files.
-# .so is used for PIC object files.
-.SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4 .m
-
-
-# Set PICFLAGS to cc flags for producing position-independent code,
-# if not already set. Includes -DPIC, if required.
-
-# Data-driven table using make variables to control how shared libraries
-# are built for different platforms and object formats.
-# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk>
-# SHLIB_SOVERSION: version number to be compiled into a shared library
-# via -soname. Usualy ${SHLIB_MAJOR} on ELF.
-# NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
-# [.${SHLIB_TEENY}]]
-# SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
-# with ELF, also set shared-lib version for ld.so.
-# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
-# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
-# FPICFLAGS: flags for ${FC} to compile .[fF] files to .so objects.
-# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
-# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects.
-# CAPICFLAGS flags for {$CC} to compiling .[Ss] files
-# (usually just ${CPPPICFLAGS} ${CPICFLAGS})
-# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects.
-
-SHLIB_LDSTARTFILE=
-SHLIB_LDENDFILE=
-SHLIB_SOVERSION= ${SHLIB_MAJOR}
-SHLIB_SHFLAGS= -Wl,-h,lib${LIB}.so.${SHLIB_SOVERSION}
-FPICFLAGS?=
-CPICFLAGS?= -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS?=
-
-MKPICLIB?= yes
-
-CFLAGS+= ${COPTS}
-FFLAGS+= ${FOPTS}
-
-.c.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${.IMPSRC}
-.else
- @echo ${COMPILE.c:Q} ${.IMPSRC}
- @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-.cc.o .C.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${.IMPSRC}
-.else
- @echo ${COMPILE.cc:Q} ${.IMPSRC}
- @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.po .C.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.so .C.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.o:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${.IMPSRC}
-.else
- @echo ${COMPILE.f:Q} ${.IMPSRC}
- @${COMPILE.f} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.po:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.so:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.ln:
- ${ECHO} Skipping lint for Fortran libraries.
-
-.m.o:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${.IMPSRC}
-.else
- @echo ${COMPILE.m:Q} ${.IMPSRC}
- @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.po:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.so:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.S.o .s.o:
- @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
- @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.po .s.po:
- @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.so .s.so:
- @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-_LIBS=lib${LIB}.a
-.else
-_LIBS=
-.endif
-
-OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-
-.if ${MKPROFILE} != "no"
-_LIBS+=lib${LIB}_p.a
-POBJS+=${OBJS:.o=.po}
-.endif
-
-.if ${MKPIC} != "no"
-.if ${MKPICLIB} == "no"
-SOLIB=lib${LIB}.a
-.else
-SOLIB=lib${LIB}_pic.a
-_LIBS+=${SOLIB}
-SOBJS+=${OBJS:.o=.so}
-.endif
-.if defined(SHLIB_FULLVERSION)
-_LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-.endif
-
-LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-_LIBS+=llib-l${LIB}.ln
-.endif
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-ALLOBJS=${OBJS} ${POBJS} ${SOBJS}
-.else
-ALLOBJS=${POBJS} ${SOBJS}
-.endif
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-ALLOBJS+=${LOBJS}
-.endif
-.NOPATH: ${ALLOBJS} ${_LIBS}
-
-realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
-
-__archivebuild: .USE
- @rm -f ${.TARGET}
- ${AR} cq ${.TARGET} ${.ALLSRC:M*o}
- ${RANLIB} ${.TARGET}
-
-__archiveinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}
- ${RANLIB} -t ${.TARGET}
- chmod ${LIBMODE} ${.TARGET}
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-lib${LIB}.a:: ${OBJS} __archivebuild
- @echo building standard ${LIB} library
-
-lib${LIB}_p.a:: ${POBJS} __archivebuild
- @echo building profiled ${LIB} library
-
-lib${LIB}_pic.a:: ${SOBJS} __archivebuild
- @echo building shared object ${LIB} library
-
-lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
- ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
- @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
- @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
- $(CC) -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280)) \
- -Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD} \
- ${SHLIB_LDENDFILE}
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
- mv -f lib${LIB}.so.tmp lib${LIB}.so
-.endif
-
-.if !empty(LOBJS)
-LLIBS?= -lc
-llib-l${LIB}.ln: ${LOBJS}
- @echo building llib-l${LIB}.ln
- @rm -f llib-l${LIB}.ln
- @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
-.endif
-
-cleanlib:
- rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
- rm -f lib${LIB}.a ${OBJS}
- rm -f lib${LIB}_p.a ${POBJS}
- rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
- rm -f llib-l${LIB}.ln ${LOBJS}
-
-.if defined(SRCS)
-afterdepend: .depend
- @(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
- < .depend > $$TMP; \
- mv $$TMP .depend)
-.endif
-
-.if !target(libinstall)
-# Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
-libinstall::
-
-.if ${MKLINKLIB} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
-${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
-.endif
-
-.if ${MKPROFILE} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
-.endif
-
-.if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
-.endif
-.if ${MKPICLIB} == "no"
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:
- rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
- ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.else
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
-.endif
-.endif
-
-.if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
-.if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
- /sbin/ldconfig -m ${LIBDIR}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
-.if ${MKLINKLIB} != "no"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so
-.endif
-.endif
-.endif
-
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
-.endif
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
-.endif
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.nls.mk>
-.include <bsd.files.mk>
-.include <bsd.inc.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-lint regress:
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Interix.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Interix.sys.mk
deleted file mode 100644
index a8119f48503..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Interix.sys.mk
+++ /dev/null
@@ -1,194 +0,0 @@
-# $NetBSD: Interix.sys.mk,v 1.2 2006/11/11 18:24:52 jschauma Exp $
-
-unix?= We run Unix
-OS!= uname -s
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-# Unless told otherwise, assume GNU CC
-CC?= gcc
-
-DBG?= -O
-
-CFLAGS?= -D_ALL_SOURCE ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= c++
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-CPPFLAGS?=
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= ${LOCALBASE}/bin/install-sh
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort -q
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk
deleted file mode 100644
index 773b62d621d..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk
+++ /dev/null
@@ -1,524 +0,0 @@
-# $NetBSD: Linux.bsd.lib.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: checkver cleanlib libinstall
-realinstall: checkver libinstall
-clean cleandir: cleanlib
-
-.if exists(${SHLIB_VERSION_FILE})
-SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
-SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
-SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
-
-# Check for higher installed library versions.
-.if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
- exists(${BSDSRCDIR}/lib/checkver)
-checkver:
- @(cd ${.CURDIR} && \
- sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \
- -d ${DESTDIR}${LIBDIR} ${LIB})
-.endif
-.endif
-
-.if !target(checkver)
-checkver:
-.endif
-
-print-shlib-major:
-.if defined(SHLIB_MAJOR)
- @echo ${SHLIB_MAJOR}
-.else
- @false
-.endif
-
-print-shlib-minor:
-.if defined(SHLIB_MINOR)
- @echo ${SHLIB_MINOR}
-.else
- @false
-.endif
-
-print-shlib-teeny:
-.if defined(SHLIB_TEENY)
- @echo ${SHLIB_TEENY}
-.else
- @false
-.endif
-
-.if defined(SHLIB_MAJOR) && !empty(SHLIB_MAJOR)
-.if defined(SHLIB_MINOR) && !empty(SHLIB_MINOR)
-.if defined(SHLIB_TEENY) && !empty(SHLIB_TEENY)
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}.${SHLIB_TEENY}
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
-.endif
-.else
-SHLIB_FULLVERSION=${SHLIB_MAJOR}
-.endif
-.endif
-
-# add additional suffixes not exported.
-# .po is used for profiling object files.
-# .so is used for PIC object files.
-.SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4 .m
-
-
-# Set PICFLAGS to cc flags for producing position-independent code,
-# if not already set. Includes -DPIC, if required.
-
-# Data-driven table using make variables to control how shared libraries
-# are built for different platforms and object formats.
-# OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk>
-# SHLIB_SOVERSION: version number to be compiled into a shared library
-# via -soname. Usualy ${SHLIB_MAJOR} on ELF.
-# NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR}
-# [.${SHLIB_TEENY}]]
-# SHLIB_SHFLAGS: Flags to tell ${LD} to emit shared library.
-# with ELF, also set shared-lib version for ld.so.
-# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
-# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
-# FPICFLAGS: flags for ${FC} to compile .[fF] files to .so objects.
-# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
-# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects.
-# CAPICFLAGS flags for {$CC} to compiling .[Ss] files
-# (usually just ${CPPPICFLAGS} ${CPICFLAGS})
-# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects.
-
-.if ${MACHINE_ARCH} == "alpha"
- # Alpha-specific shared library flags
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?=
-.elif ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
- # mips-specific shared library flags
-
-# On mips, all libs are compiled with ABIcalls, not just sharedlibs.
-MKPICLIB= no
-
-# so turn shlib PIC flags on for ${AS}.
-AINC+=-DABICALLS
-AFLAGS+= -fPIC
-AS+= -KPIC
-
-.elif ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
-# On the VAX, all object are PIC by default, not just sharedlibs.
-MKPICLIB= no
-
-.elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64") && \
- ${OBJECT_FMT} == "ELF"
-
-FPICFLAGS ?= -fPIC
-CPICFLAGS ?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS ?= -KPIC
-
-.else
-
-# Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
-SHLIB_LDSTARTFILE=
-SHLIB_LDENDFILE=
-SHLIB_SOVERSION=${SHLIB_FULLVERSION}
-SHLIB_SHFLAGS=
-FPICFLAGS ?= -fPIC
-CPICFLAGS?= -fPIC -DPIC
-CPPPICFLAGS?= -DPIC
-CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
-APICFLAGS?= -k
-
-.endif
-
-MKPICLIB?= yes
-
-# Platform-independent linker flags for ELF shared libraries
-.if ${OBJECT_FMT} == "ELF"
-SHLIB_SOVERSION= ${SHLIB_MAJOR}
-SHLIB_SHFLAGS= -soname lib${LIB}.so.${SHLIB_SOVERSION}
-SHLIB_LDSTARTFILE?= ${DESTDIR}/usr/lib/crtbeginS.o
-SHLIB_LDENDFILE?= ${DESTDIR}/usr/lib/crtendS.o
-.endif
-
-CFLAGS+= ${COPTS}
-FFLAGS+= ${FOPTS}
-
-.c.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${.IMPSRC}
-.else
- @echo ${COMPILE.c:Q} ${.IMPSRC}
- @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-.cc.o .C.o:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${.IMPSRC}
-.else
- @echo ${COMPILE.cc:Q} ${.IMPSRC}
- @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.po .C.po:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.cc.so .C.so:
-.if defined(COPTS) && !empty(COPTS:M*-g*)
- ${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.o:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${.IMPSRC}
-.else
- @echo ${COMPILE.f:Q} ${.IMPSRC}
- @${COMPILE.f} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.po:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.so:
-.if defined(FOPTS) && !empty(FOPTS:M*-g*)
- ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.f:Q} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.f.ln:
- ${ECHO} Skipping lint for Fortran libraries.
-
-.m.o:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${.IMPSRC}
-.else
- @echo ${COMPILE.m:Q} ${.IMPSRC}
- @${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.po:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.m.so:
-.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
- ${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
-.else
- @echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
-.S.o .s.o:
- @echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
- @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.po .s.po:
- @echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.S.so .s.so:
- @echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
- @${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-_LIBS=lib${LIB}.a
-.else
-_LIBS=
-.endif
-
-OBJS+=${SRCS:N*.h:N*.sh:R:S/$/.o/g}
-
-.if ${MKPROFILE} != "no"
-_LIBS+=lib${LIB}_p.a
-POBJS+=${OBJS:.o=.po}
-.endif
-
-.if ${MKPIC} != "no"
-.if ${MKPICLIB} == "no"
-SOLIB=lib${LIB}.a
-.else
-SOLIB=lib${LIB}_pic.a
-_LIBS+=${SOLIB}
-SOBJS+=${OBJS:.o=.so}
-.endif
-.if defined(SHLIB_FULLVERSION)
-_LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-.endif
-
-LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-_LIBS+=llib-l${LIB}.ln
-.endif
-
-.if ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \
- || ${MKLINKLIB} != "no"
-ALLOBJS=${OBJS} ${POBJS} ${SOBJS}
-.else
-ALLOBJS=${POBJS} ${SOBJS}
-.endif
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-ALLOBJS+=${LOBJS}
-.endif
-.NOPATH: ${ALLOBJS} ${_LIBS}
-
-realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
-
-__archivebuild: .USE
- @rm -f ${.TARGET}
- ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
- ${RANLIB} ${.TARGET}
-
-__archiveinstall: .USE
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m 600 ${.ALLSRC} ${.TARGET}
- ${RANLIB} -t ${.TARGET}
- chmod ${LIBMODE} ${.TARGET}
-
-DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
-CLEANFILES+= ${DPSRCS}
-.if defined(YHEADER)
-CLEANFILES+= ${SRCS:M*.y:.y=.h}
-.endif
-
-lib${LIB}.a:: ${OBJS} __archivebuild
- @echo building standard ${LIB} library
-
-lib${LIB}_p.a:: ${POBJS} __archivebuild
- @echo building profiled ${LIB} library
-
-lib${LIB}_pic.a:: ${SOBJS} __archivebuild
- @echo building shared object ${LIB} library
-
-lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
- ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
- @echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
- @rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
-.if defined(DESTDIR)
- $(LD) -nostdlib -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- --whole-archive ${SOLIB} \
- --no-whole-archive ${LDADD} \
- -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
- ${SHLIB_LDENDFILE}
-.else
- $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
- ${SHLIB_LDSTARTFILE} \
- --whole-archive ${SOLIB} --no-whole-archive ${LDADD} \
- ${SHLIB_LDENDFILE}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
- mv -f lib${LIB}.so.tmp lib${LIB}.so
-.endif
-
-.if !empty(LOBJS)
-LLIBS?= -lc
-llib-l${LIB}.ln: ${LOBJS}
- @echo building llib-l${LIB}.ln
- @rm -f llib-l${LIB}.ln
- @${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
-.endif
-
-cleanlib:
- rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
- rm -f lib${LIB}.a ${OBJS}
- rm -f lib${LIB}_p.a ${POBJS}
- rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
- rm -f llib-l${LIB}.ln ${LOBJS}
-
-.if defined(SRCS)
-afterdepend: .depend
- @(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
- < .depend > $$TMP; \
- mv $$TMP .depend)
-.endif
-
-.if !target(libinstall)
-# Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no
-libinstall::
-
-.if ${MKLINKLIB} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.a)
-${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
-.endif
-
-.if ${MKPROFILE} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_p.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
-.endif
-
-.if ${MKPIC} != "no" && ${MKPICINSTALL} != "no"
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}_pic.a)
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
-.endif
-.if ${MKPICLIB} == "no"
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a:
- rm -f ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
- ln -s lib${LIB}.a ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
-.else
-${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
-.endif
-.endif
-
-.if ${MKPIC} != "no" && defined(SHLIB_FULLVERSION)
-libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(lib${LIB}.so.${SHLIB_FULLVERSION})
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
-.endif
-${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
-.if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
- /sbin/ldconfig -m ${LIBDIR}
-.endif
-.if ${OBJECT_FMT} == "ELF"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
-.if ${MKLINKLIB} != "no"
- ln -sf lib${LIB}.so.${SHLIB_FULLVERSION}\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp
- mv -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.tmp\
- ${DESTDIR}${LIBDIR}/lib${LIB}.so
-.endif
-.endif
-.endif
-
-.if ${MKLINT} != "no" && ${MKLINKLIB} != "no" && !empty(LOBJS)
-libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.if !defined(UPDATE)
-.PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
-.endif
-
-.if !defined(BUILD) && !make(all) && !make(llib-l${LIB}.ln)
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
-.endif
-${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
- ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${LIBOWN} \
- -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
-.endif
-.endif
-
-.include <bsd.man.mk>
-.include <bsd.nls.mk>
-.include <bsd.files.mk>
-.include <bsd.inc.mk>
-.include <bsd.links.mk>
-.include <bsd.dep.mk>
-.include <bsd.sys.mk>
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-lint regress:
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.man.mk b/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.man.mk
deleted file mode 100644
index 6d6a456ce9d..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.man.mk
+++ /dev/null
@@ -1,203 +0,0 @@
-# $NetBSD: Linux.bsd.man.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: catinstall maninstall catpages manpages catlinks manlinks cleanman html installhtml cleanhtml
-.if ${MKMAN} != "no"
-realinstall: ${MANINSTALL}
-.endif
-cleandir: cleanman
-
-.if exists(${DESTDIR}/usr/share/groff/1.18.1/tmac)
-TMACDIR?= ${DESTDIR}/usr/share/groff/1.18.1/tmac
-.else
-TMACDIR?= ${DESTDIR}/usr/share/groff/tmac
-.endif
-HTMLDIR?= ${DESTDIR}/usr/share/man
-CATDEPS?= ${TMACDIR}/mandoc.tmac \
- ${TMACDIR}/doc.tmac
-MANTARGET?= cat
-NROFF?= nroff -Tascii
-GROFF?= groff -Tascii
-TBL?= tbl
-
-
-.SUFFIXES: .1 .2 .3 .4 .5 .6 .7 .8 .9 \
- .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \
- .html1 .html2 .html3 .html4 .html5 .html6 .html7 .html8 .html9
-
-.9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3.cat3 .2.cat2 .1.cat1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}"
- @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.9.html9 .8.html8 .7.html7 .6.html6 .5.html5 .4.html4 .3.html3 .2.html2 .1.html1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET}"
- @${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET}"
- @cat ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.if defined(MAN) && !empty(MAN)
-MANPAGES= ${MAN}
-CATPAGES= ${MANPAGES:C/(.*).([1-9])/\1.cat\2/}
-.NOPATH: ${CATPAGES}
-.if !defined(NOHTML)
-HTMLPAGES= ${MANPAGES:C/(.*).([1-9])/\1.html\2/}
-.endif
-.endif
-
-MINSTALL= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
- -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
-
-.if defined(MANZ)
-# chown and chmod are done afterward automatically
-MCOMPRESS= gzip -cf
-MCOMPRESSSUFFIX= .gz
-.endif
-
-catinstall: catlinks
-maninstall: manlinks
-
-__installpage: .USE
-.if defined(MCOMPRESS) && !empty(MCOMPRESS)
- @rm -f ${.TARGET}
- ${MCOMPRESS} ${.ALLSRC} > ${.TARGET}
- @chown ${MANOWN}:${MANGRP} ${.TARGET}
- @chmod ${MANMODE} ${.TARGET}
-.else
- @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
- (echo "${MINSTALL} ${.ALLSRC} ${.TARGET}" && \
- ${MINSTALL} ${.ALLSRC} ${.TARGET})
-.endif
-
-
-# Rules for cat'ed man page installation
-.if defined(CATPAGES) && !empty(CATPAGES) && ${MKCATPAGES} != "no"
-catpages:: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${CATPAGES:O:u}
-. if !defined(BUILD) && !make(all) && !make(${P})
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: .MADE
-. endif
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-catpages::
-.endif
-
-# Rules for source page installation
-.if defined(MANPAGES) && !empty(MANPAGES)
-manpages:: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${MANPAGES:O:u}
-${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-manpages::
-.endif
-
-.if ${MKCATPAGES} != "no"
-catlinks: catpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-.else
-catlinks:
-.endif
-
-manlinks: manpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-
-# Html rules
-html: ${HTMLPAGES}
-
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
-.for P in ${HTMLPAGES:O:u}
-${HTMLDIR}/${P:T:E}/${P:T:R}.html: ${P}
- ${MINSTALL} ${.ALLSRC} ${.TARGET}
-.endfor
-.endif
-installhtml: ${HTMLPAGES:@P@${HTMLDIR}/${P:T:E}/${P:T:R}.html@}
-
-cleanhtml:
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
- rm -f ${HTMLPAGES}
-.endif
-
-
-.if defined(CATPAGES)
-.if ${MKCATPAGES} != "no" && ${MKMAN} != "no"
-realall: ${CATPAGES}
-.else
-realall:
-.endif
-
-cleanman:
- rm -f ${CATPAGES}
-.else
-cleanman:
-.endif
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-clean depend includes lint regress tags:
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk
deleted file mode 100644
index 1079052fb31..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk
+++ /dev/null
@@ -1,194 +0,0 @@
-# $NetBSD: Linux.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run Unix.
-OS?= Linux
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CC?= gcc
-DBG?= -O2
-CFLAGS?= ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= g++
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-NOLINT= 1
-CPPFLAGS?=
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= install
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= echo
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/NetBSD.bsd.man.mk b/pkgtools/bootstrap-mk-files/files/mods/NetBSD.bsd.man.mk
deleted file mode 100644
index b2b464f9d6b..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/NetBSD.bsd.man.mk
+++ /dev/null
@@ -1,206 +0,0 @@
-# $NetBSD: NetBSD.bsd.man.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93
-
-.if !target(__initialized__)
-__initialized__:
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-.include <bsd.own.mk>
-.include <bsd.obj.mk>
-.include <bsd.depall.mk>
-.MAIN: all
-.endif
-
-.PHONY: catinstall maninstall catpages manpages catlinks manlinks cleanman html installhtml cleanhtml
-.if ${MKMAN} != "no"
-realinstall: ${MANINSTALL}
-.endif
-cleandir: cleanman
-
-TMACDIR?= ${DESTDIR}/usr/share/tmac
-HTMLDIR?= ${DESTDIR}/usr/share/man
-
-# tmac.andoc and tmac.doc were renamed in the update to groff-1.19 in
-# NetBSD-current 20030630.
-.if exists(${TMACDIR}/tmac.andoc)
-CATDEPS?= ${TMACDIR}/tmac.andoc ${TMACDIR}/tmac.doc
-.elif exists(${TMACDIR}/andoc.tmac)
-CATDEPS?= ${TMACDIR}/andoc.tmac ${TMACDIR}/doc.tmac
-.endif
-
-MANTARGET?= cat
-NROFF?= nroff -Tascii
-GROFF?= groff -Tascii
-TBL?= tbl
-
-
-.SUFFIXES: .1 .2 .3 .4 .5 .6 .7 .8 .9 \
- .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \
- .html1 .html2 .html3 .html4 .html5 .html6 .html7 .html8 .html9
-
-.9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3.cat3 .2.cat2 .1.cat1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}"
- @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.9.html9 .8.html8 .7.html7 .6.html6 .5.html5 .4.html4 .3.html3 .2.html2 .1.html1: \
- ${CATDEPS}
-.if !defined(USETBL)
- @echo "${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET}"
- @${GROFF} -mdoc2html -P-b -P-u -P-o ${.IMPSRC} > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.else
- @echo "${TBL} ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET}"
- @cat ${.IMPSRC} | ${GROFF} -mdoc2html -P-b -P-u -P-o > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-.endif
-
-.if defined(MAN) && !empty(MAN)
-MANPAGES= ${MAN}
-CATPAGES= ${MANPAGES:C/(.*).([1-9])/\1.cat\2/}
-.NOPATH: ${CATPAGES}
-.if !defined(NOHTML)
-HTMLPAGES= ${MANPAGES:C/(.*).([1-9])/\1.html\2/}
-.endif
-.endif
-
-MINSTALL= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
- -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
-
-.if defined(MANZ)
-# chown and chmod are done afterward automatically
-MCOMPRESS= gzip -cf
-MCOMPRESSSUFFIX= .gz
-.endif
-
-catinstall: catlinks
-maninstall: manlinks
-
-__installpage: .USE
-.if defined(MCOMPRESS) && !empty(MCOMPRESS)
- @rm -f ${.TARGET}
- ${MCOMPRESS} ${.ALLSRC} > ${.TARGET}
- @chown ${MANOWN}:${MANGRP} ${.TARGET}
- @chmod ${MANMODE} ${.TARGET}
-.else
- @cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
- (echo "${MINSTALL} ${.ALLSRC} ${.TARGET}" && \
- ${MINSTALL} ${.ALLSRC} ${.TARGET})
-.endif
-
-
-# Rules for cat'ed man page installation
-.if defined(CATPAGES) && !empty(CATPAGES) && ${MKCATPAGES} != "no"
-catpages:: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${CATPAGES:@P@${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${CATPAGES:O:u}
-. if !defined(BUILD) && !make(all) && !make(${P})
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: .MADE
-. endif
-${DESTDIR}${MANDIR}/${P:T:E}${MANSUBDIR}/${P:T:R}.0${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-catpages::
-.endif
-
-# Rules for source page installation
-.if defined(MANPAGES) && !empty(MANPAGES)
-manpages:: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.PRECIOUS: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.if !defined(UPDATE)
-.PHONY: ${MANPAGES:@P@${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}@}
-.endif
-
-. for P in ${MANPAGES:O:u}
-${DESTDIR}${MANDIR}/man${P:T:E}${MANSUBDIR}/${P}${MCOMPRESSSUFFIX}: ${P} __installpage
-. endfor
-.else
-manpages::
-.endif
-
-.if ${MKCATPAGES} != "no"
-catlinks: catpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/cat$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-.else
-catlinks:
-.endif
-
-manlinks: manpages
-.if defined(MLINKS) && !empty(MLINKS)
- @set ${MLINKS}; \
- while test $$# -ge 2; do \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- l=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- name=$$1; \
- shift; \
- dir=${DESTDIR}${MANDIR}/man$${name##*.}; \
- t=$${dir}${MANSUBDIR}/$${name}${MCOMPRESSSUFFIX}; \
- if test $$l -nt $$t -o ! -f $$t; then \
- echo $$t -\> $$l; \
- ln -f $$l $$t; \
- fi; \
- done
-.endif
-
-# Html rules
-html: ${HTMLPAGES}
-
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
-.for P in ${HTMLPAGES:O:u}
-${HTMLDIR}/${P:T:E}/${P:T:R}.html: ${P}
- ${MINSTALL} ${.ALLSRC} ${.TARGET}
-.endfor
-.endif
-installhtml: ${HTMLPAGES:@P@${HTMLDIR}/${P:T:E}/${P:T:R}.html@}
-
-cleanhtml:
-.if defined(HTMLPAGES) && !empty(HTMLPAGES)
- rm -f ${HTMLPAGES}
-.endif
-
-
-.if defined(CATPAGES)
-.if ${MKCATPAGES} != "no" && ${MKMAN} != "no"
-realall: ${CATPAGES}
-.else
-realall:
-.endif
-
-cleanman:
- rm -f ${CATPAGES}
-.else
-cleanman:
-.endif
-
-# Make sure all of the standard targets are defined, even if they do nothing.
-clean depend includes lint regress tags:
diff --git a/pkgtools/bootstrap-mk-files/files/mods/NetBSD.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/NetBSD.sys.mk
deleted file mode 100644
index 92341c14b96..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/NetBSD.sys.mk
+++ /dev/null
@@ -1,207 +0,0 @@
-# $NetBSD: NetBSD.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run NetBSD.
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-.if ${MACHINE_ARCH} == "sparc64"
-AFLAGS+= -Wa,-Av9a
-.endif
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CC?= cc
-.if ${MACHINE_ARCH} == "alpha" || \
- ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm26" || \
- ${MACHINE_ARCH} == "arm32" || \
- ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "m68k" || \
- ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
- ${MACHINE_ARCH} == "sparc" || \
- ${MACHINE_ARCH} == "vax"
-DBG?= -O2
-.elif ${MACHINE_ARCH} == "x86_64"
-DBG?=
-.else
-DBG?= -O
-.endif
-CFLAGS?= ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= c++
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-CPPFLAGS?=
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= install
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort -q
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/OSF1.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/OSF1.sys.mk
deleted file mode 100644
index bed4eb074fb..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/OSF1.sys.mk
+++ /dev/null
@@ -1,193 +0,0 @@
-# $NetBSD: OSF1.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run Unix
-OS!= uname -s
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CC?= cc
-NOGCCERROR?= # defined
-DBG?= -O2
-CFLAGS?= ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= cxx
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= CC -E
-CPPFLAGS?=
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= ${PREFIX}/bin/install-sh
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.man.mk b/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.man.mk
deleted file mode 100644
index bc367109075..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.man.mk
+++ /dev/null
@@ -1,137 +0,0 @@
-# $NetBSD: OpenBSD.bsd.man.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# From:
-# OpenBSD: bsd.man.mk,v 1.23 2001/07/20 23:02:21 espie Exp
-# NetBSD: bsd.man.mk,v 1.23 1996/02/10 07:49:33 jtc Exp
-# @(#)bsd.man.mk 5.2 (Berkeley) 5/11/90
-
-MANTARGET?= cat
-NROFF?= nroff -Tascii
-TBL?= tbl
-
-.if !target(.MAIN)
-.if exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-.endif
-
-.MAIN: all
-.endif
-
-.SUFFIXES: .1 .2 .3 .3p .4 .5 .6 .7 .8 .9 .1tbl .2tbl .3tbl .4tbl .5tbl .6tbl \
- .7tbl .8tbl .9tbl .cat1 .cat2 .cat3 .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \
- .ps1 .ps2 .ps3 .ps4 .ps5 .ps6 .ps7 .ps8 .ps9
-
-.9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3p.cat3p .3.cat3 .2.cat2 .1.cat1:
- @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}"
- @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false)
-
-.9tbl.cat9 .8tbl.cat8 .7tbl.cat7 .6tbl.cat6 .5tbl.cat5 .4tbl.cat4 .3tbl.cat3 \
-.2tbl.cat2 .1tbl.cat1:
- @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \
- (rm -f ${.TARGET}; false)
-
-.9.ps9 .8.ps8 .7.ps7 .6.ps6 .5.ps5 .4.ps4 .3p.ps3p .3.ps3 .2.ps2 .1.ps1:
- @echo "nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET}"
- @nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false)
-
-.9tbl.ps9 .8tbl.ps8 .7tbl.ps7 .6tbl.ps6 .5tbl.ps5 .4tbl.ps4 .3tbl.ps3 \
-.2tbl.ps2 .1tbl.ps1:
- @echo "${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET}"
- @${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET} || (rm -f ${.TARGET}; false)
-
-.if defined(MAN) && !empty(MAN) && !defined(MANALL)
-
-MANALL= ${MAN:S/.1$/.cat1/g:S/.2$/.cat2/g:S/.3$/.cat3/g:S/.3p$/.cat3p/g:S/.4$/.cat4/g:S/.5$/.cat5/g:S/.6$/.cat6/g:S/.7$/.cat7/g:S/.8$/.cat8/g:S/.9$/.cat9/g:S/.1tbl$/.cat1/g:S/.2tbl$/.cat2/g:S/.3tbl$/.cat3/g:S/.4tbl$/.cat4/g:S/.5tbl$/.cat5/g:S/.6tbl$/.cat6/g:S/.7tbl$/.cat7/g:S/.8tbl$/.cat8/g:S/.9tbl$/.cat9/g}
-
-.if defined(MANPS)
-
-PSALL= ${MAN:S/.1$/.ps1/g:S/.2$/.ps2/g:S/.3$/.ps3/g:S/.3p$/.ps3p/g:S/.4$/.ps4/g:S/.5$/.ps5/g:S/.6$/.ps6/g:S/.7$/.ps7/g:S/.8$/.ps8/g:S/.9$/.ps9/g:S/.1tbl$/.ps1/g:S/.2tbl$/.ps2/g:S/.3tbl$/.ps3/g:S/.4tbl$/.ps4/g:S/.5tbl$/.ps5/g:S/.6tbl$/.ps6/g:S/.7tbl$/.ps7/g:S/.8tbl$/.ps8/g:S/.9tbl$/.ps9/g}
-
-.endif
-
-.endif
-
-MINSTALL= ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
-.if defined(MANZ)
-# chown and chmod are done afterward automatically
-MCOMPRESS= gzip -cf
-MCOMPRESSSUFFIX= .gz
-.endif
-
-.if defined(MANSUBDIR)
-# Add / so that we don't have to specify it. Better arch -> MANSUBDIR mapping
-MANSUBDIR:=${MANSUBDIR:S,^,/,}
-.else
-# XXX MANSUBDIR must be non empty for the mlink loops to work
-MANSUBDIR=''
-.endif
-
-maninstall:
-.if defined(MANALL)
- @for page in ${MANALL}; do \
- set -- ${MANSUBDIR}; \
- subdir=$$1; \
- dir=${DESTDIR}${MANDIR}$${page##*.cat}; \
- base=$${page##*/}; \
- instpage=$${dir}$${subdir}/$${base%.*}.0${MCOMPRESSSUFFIX}; \
- if [ X"${MCOMPRESS}" = X ]; then \
- echo ${MINSTALL} $$page $$instpage; \
- ${MINSTALL} $$page $$instpage; \
- else \
- rm -f $$instpage; \
- echo ${MCOMPRESS} $$page \> $$instpage; \
- ${MCOMPRESS} $$page > $$instpage; \
- chown ${MANOWN}:${MANGRP} $$instpage; \
- chmod ${MANMODE} $$instpage; \
- fi; \
- while test $$# -ge 2; do \
- shift; \
- extra=$${dir}$$1/$${base%.*}.0${MCOMPRESSSUFFIX}; \
- echo $$extra -\> $$instpage; \
- ln -f $$instpage $$extra; \
- done; \
- done
-.endif
-.if defined(PSALL)
- @for page in ${PSALL}; do \
- set -- ${MANSUBDIR}; \
- subdir=$$1; \
- dir=${DESTDIR}${PSDIR}$${page##*.ps}; \
- base=$${page##*/}; \
- instpage=$${dir}$${subdir}/$${base%.*}.ps${MCOMPRESSSUFFIX}; \
- if [ X"${MCOMPRESS}" = X ]; then \
- echo ${MINSTALL} $$page $$instpage; \
- ${MINSTALL} $$page $$instpage; \
- else \
- rm -f $$instpage; \
- echo ${MCOMPRESS} $$page \> $$instpage; \
- ${MCOMPRESS} $$page > $$instpage; \
- chown ${PSOWN}:${PSGRP} $$instpage; \
- chmod ${PSMODE} $$instpage; \
- fi; \
- while test $$# -ge 2; do \
- shift; \
- extra=$${dir}$$1/$${base%.*}.ps${MCOMPRESSSUFFIX}; \
- echo $$extra -\> $$instpage; \
- ln -f $$instpage $$extra; \
- done; \
- done
-.endif
-.if defined(MLINKS) && !empty(MLINKS)
-. for sub in ${MANSUBDIR}
-. for lnk file in ${MLINKS}
- @l=${DESTDIR}${MANDIR}${lnk:E}${sub}/${lnk:R}.0${MCOMPRESSSUFFIX}; \
- t=${DESTDIR}${MANDIR}${file:E}${sub}/${file:R}.0${MCOMPRESSSUFFIX}; \
- echo $$t -\> $$l; \
- rm -f $$t; ln $$l $$t;
-. endfor
-. endfor
-.endif
-
-.if (defined(MANALL) || defined(PSALL)) && !defined(MANLOCALBUILD)
-all: ${MANALL} ${PSALL}
-
-cleandir: cleanman
-cleanman:
- rm -f ${MANALL} ${PSALL}
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.own.mk.in b/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.own.mk.in
deleted file mode 100644
index 5842c2f4966..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.bsd.own.mk.in
+++ /dev/null
@@ -1,308 +0,0 @@
-# $NetBSD: OpenBSD.bsd.own.mk.in,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-
-.if !defined(_BSD_OWN_MK_)
-_BSD_OWN_MK_=1
-
-# XXX On systems with a Berkeley-style make, perhaps we ought to check
-# XXX for and source a file other than /etc/mk.conf
-
-.if defined(MAKECONF) && exists(${MAKECONF})
-.include "${MAKECONF}"
-.elif exists(@SYSCONFDIR@/mk.conf)
-.include "@SYSCONFDIR@/mk.conf"
-.elif exists(/etc/mk.conf)
-.include "/etc/mk.conf"
-.endif
-
-# Defining `SKEY' causes support for S/key authentication to be compiled in.
-SKEY= yes
-
-# where the system object and source trees are kept; can be configurable
-# by the user in case they want them in ~/foosrc and ~/fooobj, for example
-BSDSRCDIR?= /usr/src
-BSDOBJDIR?= /usr/obj
-
-BINGRP?= wheel
-BINOWN?= root
-BINMODE?= 555
-NONBINMODE?= 444
-
-# Define MANZ to have the man pages compressed (gzip)
-#MANZ= 1
-
-MANDIR?= /usr/share/man
-MANGRP?= wheel
-MANOWN?= root
-MANMODE?= ${NONBINMODE}
-MANINSTALL?= maninstall catinstall
-
-INFODIR?= /usr/share/info
-INFOGRP?= wheel
-INFOOWN?= root
-INFOMODE?= ${NONBINMODE}
-
-LIBDIR?= /usr/lib
-LINTLIBDIR?= /usr/libdata/lint
-LIBGRP?= ${BINGRP}
-LIBOWN?= ${BINOWN}
-LIBMODE?= ${NONBINMODE}
-
-DOCDIR?= /usr/share/doc
-HTMLDOCDIR?= /usr/share/doc/html
-DOCGRP?= wheel
-DOCOWN?= root
-DOCMODE?= ${NONBINMODE}
-
-NLSDIR?= /usr/share/nls
-NLSGRP?= wheel
-NLSOWN?= root
-NLSMODE?= ${NONBINMODE}
-
-KMODDIR?= /usr/lkm
-KMODGRP?= wheel
-KMODOWN?= root
-KMODMODE?= ${NONBINMODE}
-
-LOCALEDIR?= /usr/share/locale
-LOCALEGRP?= wheel
-LOCALEOWN?= root
-LOCALEMODE?= ${NONBINMODE}
-
-COPY?= -c
-.if defined(UPDATE)
-PRESERVE?= -p
-.else
-PRESERVE?=
-.endif
-.if defined(UNPRIVILEGED)
-INSTPRIV?= -U
-.endif
-STRIPFLAG?= -s
-
-# Define SYS_INCLUDE to indicate whether you want symbolic links to the system
-# source (``symlinks''), or a separate copy (``copies''); (latter useful
-# in environments where it's not possible to keep /sys publicly readable)
-#SYS_INCLUDE= symlinks
-
-# Profiling and linting is also off on the x86_64 port at the moment.
-.if ${MACHINE_ARCH} == "sparc64"
-NOPROFILE=1
-NOLINT=1
-.endif
-
-# The m68000 port is incomplete.
-.if ${MACHINE_ARCH} == "m68000"
-NOLINT=1
-NOPROFILE=1
-NOPIC?=1
-.endif
-
-# Data-driven table using make variables to control how
-# toolchain-dependent targets and shared libraries are built
-# for different platforms and object formats.
-# OBJECT_FMT: currently either "ELF" or "a.out".
-# SHLIB_TYPE: "ELF" or "a.out" or "" to force static libraries.
-#
-.if ${MACHINE_ARCH} == "alpha" || \
- ${MACHINE_ARCH} == "powerpc" || \
- ${MACHINE_ARCH} == "sparc"
-OBJECT_FMT?=ELF
-.else
-OBJECT_FMT?=a.out
-.endif
-
-# Location of the file that contains the major and minor numbers of the
-# version of a shared library. If this file exists a shared library
-# will be built by <bsd.lib.mk>.
-SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
-
-# GNU sources and packages sometimes see architecture names differently.
-# This table maps an architecture name to its GNU counterpart.
-# Use as so: ${GNU_ARCH.${TARGET_ARCH}} or ${MACHINE_GNU_ARCH}
-.ifndef MACHINE_GNU_ARCH
-GNU_ARCH.alpha=alpha
-GNU_ARCH.arm26=arm
-GNU_ARCH.arm32=arm
-GNU_ARCH.arm=arm
-GNU_ARCH.i386=i386
-GNU_ARCH.m68k=m68k
-GNU_ARCH.mipseb=mipseb
-GNU_ARCH.mipsel=mipsel
-GNU_ARCH.ns32k=ns32k
-GNU_ARCH.powerpc=powerpc
-GNU_ARCH.sh3eb=sh
-GNU_ARCH.sh3el=sh
-GNU_ARCH.sparc=sparc
-GNU_ARCH.sparc64=sparc64
-GNU_ARCH.vax=vax
-MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}}
-.endif
-
-# In order to identify NetBSD to GNU packages, we sometimes need
-# an "elf" tag for historically a.out platforms.
-.if ${OBJECT_FMT} == "ELF" && \
- (${MACHINE_ARCH} == "arm" || \
- ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "m68k" || \
- ${MACHINE_ARCH} == "sparc" || \
- ${MACHINE_ARCH} == "vax")
-MACHINE_GNU_PLATFORM?= netbsdelf
-.else
-MACHINE_GNU_PLATFORM?= netbsd
-.endif
-
-# CPU model, derived from MACHINE_ARCH
-MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:S/arm26/arm/:S/arm32/arm/:C/sh3e[bl]/sh3/:S/m68000/m68k/}
-
-.if ${MACHINE_ARCH} == "mips"
-.BEGIN:
- @echo Must set MACHINE_ARCH to one of mipseb or mipsel
- @false
-.endif
-.if ${MACHINE_ARCH} == "sh3"
-.BEGIN:
- @echo Must set MACHINE_ARCH to one of sh3eb or sh3el
- @false
-.endif
-
-TARGETS+= all clean cleandir depend dependall includes \
- install lint obj regress tags html installhtml cleanhtml
-.PHONY: all clean cleandir depend dependall distclean includes \
- install lint obj regress tags beforedepend afterdepend \
- beforeinstall afterinstall realinstall realdepend realall \
- html installhtml cheanhtml
-
-# set NEED_OWN_INSTALL_TARGET, if it's not already set, to yes
-# this is used by bsd.pkg.mk to stop "install" being defined
-NEED_OWN_INSTALL_TARGET?= yes
-
-.if ${NEED_OWN_INSTALL_TARGET} == "yes"
-.if !target(install)
-install: .NOTMAIN beforeinstall subdir-install realinstall afterinstall
-beforeinstall: .NOTMAIN
-subdir-install: .NOTMAIN beforeinstall
-realinstall: .NOTMAIN beforeinstall
-afterinstall: .NOTMAIN subdir-install realinstall
-.endif
-all: .NOTMAIN realall subdir-all
-subdir-all: .NOTMAIN
-realall: .NOTMAIN
-depend: .NOTMAIN realdepend subdir-depend
-subdir-depend: .NOTMAIN
-realdepend: .NOTMAIN
-distclean: .NOTMAIN cleandir
-.endif
-
-PRINTOBJDIR= printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -B -s -f-
-
-# Define MKxxx variables (which are either yes or no) for users
-# to set in /etc/mk.conf and override on the make commandline.
-# These should be tested with `== "no"' or `!= "no"'.
-# The NOxxx variables should only be used by Makefiles.
-#
-
-MKCATPAGES?=yes
-
-.if defined(NODOC)
-MKDOC=no
-#.elif !defined(MKDOC)
-#MKDOC=yes
-.else
-MKDOC?=yes
-.endif
-
-MKINFO?=yes
-
-.if defined(NOLINKLIB)
-MKLINKLIB=no
-.else
-MKLINKLIB?=yes
-.endif
-.if ${MKLINKLIB} == "no"
-MKPICINSTALL=no
-MKPROFILE=no
-.endif
-
-.if defined(NOLINT)
-MKLINT=no
-.else
-MKLINT?=yes
-.endif
-
-.if defined(NOMAN)
-MKMAN=no
-.else
-MKMAN?=yes
-.endif
-.if ${MKMAN} == "no"
-MKCATPAGES=no
-.endif
-
-.if defined(NONLS)
-MKNLS=no
-.else
-MKNLS?=yes
-.endif
-
-#
-# MKOBJDIRS controls whether object dirs are created during "make build".
-# MKOBJ controls whether the "make obj" rule does anything.
-#
-.if defined(NOOBJ)
-MKOBJ=no
-MKOBJDIRS=no
-.else
-MKOBJ?=yes
-MKOBJDIRS?=no
-.endif
-
-.if defined(NOPIC)
-MKPIC=no
-.else
-MKPIC?=yes
-.endif
-
-.if defined(NOPICINSTALL)
-MKPICINSTALL=no
-.else
-MKPICINSTALL?=yes
-.endif
-
-.if defined(NOPROFILE)
-MKPROFILE=no
-.else
-MKPROFILE?=yes
-.endif
-
-.if defined(NOSHARE)
-MKSHARE=no
-.else
-MKSHARE?=yes
-.endif
-.if ${MKSHARE} == "no"
-MKCATPAGES=no
-MKDOC=no
-MKINFO=no
-MKMAN=no
-MKNLS=no
-.endif
-
-.if defined(NOCRYPTO)
-MKCRYPTO=no
-.else
-MKCRYPTO?=yes
-.endif
-
-MKCRYPTO_IDEA?=no
-
-MKCRYPTO_RC5?=no
-
-.if defined(NOKERBEROS) || (${MKCRYPTO} == "no")
-MKKERBEROS=no
-.else
-MKKERBEROS?=yes
-.endif
-
-MKSOFTFLOAT?=no
-
-.endif # _BSD_OWN_MK_
diff --git a/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.sys.mk
deleted file mode 100644
index 2ef8389731e..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/OpenBSD.sys.mk
+++ /dev/null
@@ -1,202 +0,0 @@
-# $NetBSD: OpenBSD.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run OpenBSD.
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-.if ${MACHINE_ARCH} == "sparc64"
-AFLAGS+= -Wa,-Av9a
-.endif
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CC?= cc
-.if ${MACHINE_ARCH} == "alpha" || \
- ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "m68k" || \
- ${MACHINE_ARCH} == "sparc" || \
- ${MACHINE_ARCH} == "vax"
-DBG?= -O2
-.else
-DBG?= -O
-.endif
-CFLAGS?= ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= c++
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-CPPFLAGS?=
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= install
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort -q
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk
deleted file mode 100644
index f335afcae73..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk
+++ /dev/null
@@ -1,141 +0,0 @@
-# $NetBSD: SunOS.bsd.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-#
-# Overrides used for NetBSD source tree builds.
-
-.if ${CC:M*gcc*} != ""
-
-.if defined(WARNS)
-.if ${WARNS} > 0
-CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes
-# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
-# XXX always get it right.
-CFLAGS+= -Wno-uninitialized
-.endif
-.if ${WARNS} > 1
-CFLAGS+= -Wreturn-type -Wpointer-arith
-.endif
-.if ${WARNS} > 2
-CFLAGS+= -Wcast-qual -Wwrite-strings
-.endif
-CFLAGS+= -Wswitch -Wshadow
-.endif
-
-.if defined(WFORMAT) && defined(FORMAT_AUDIT)
-.if ${WFORMAT} > 1
-CFLAGS+= -Wnetbsd-format-audit -Wno-format-extra-args
-.endif
-.endif
-
-.if !defined(NOGCCERROR)
-CFLAGS+= -Werror
-.endif
-CFLAGS+= ${CWARNFLAGS}
-
-.if defined(DESTDIR)
-CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
-LINTFLAGS+= -d ${DESTDIR}/usr/include
-.endif
-
-.if defined(MKSOFTFLOAT) && (${MKSOFTFLOAT} != "no")
-COPTS+= -msoft-float
-FOPTS+= -msoft-float
-.endif
-
-.endif # gcc
-
-.if defined(AUDIT)
-CPPFLAGS+= -D__AUDIT__
-.endif
-
-# Helpers for cross-compiling
-HOST_CC?= cc
-HOST_CFLAGS?= -O
-HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} -c
-HOST_LINK.c?= ${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS}
-
-HOST_CPP?= cpp
-HOST_CPPFLAGS?=
-
-HOST_LD?= ld
-HOST_LDFLAGS?=
-
-OBJCOPY?= objcopy
-STRIP?= strip
-CONFIG?= config
-RPCGEN?= rpcgen
-MKLOCALE?= mklocale
-
-.SUFFIXES: .m .o .ln .lo
-
-# Objective C
-# (Defined here rather than in <sys.mk> because `.m' is not just
-# used for Objective C source)
-.m:
- ${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.m.o:
- ${COMPILE.m} ${.IMPSRC}
-
-# Host-compiled C objects
-.c.lo:
- ${HOST_COMPILE.c} -o ${.TARGET} ${.IMPSRC}
-
-
-.if defined(PARALLEL) || defined(LPREFIX)
-LPREFIX?=yy
-LFLAGS+=-P${LPREFIX}
-# Lex
-.l:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c ${LDLIBS} -ll
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.l.c:
- ${LEX.l} -o${.TARGET} ${.IMPSRC}
-.l.o:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.l.lo:
- ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
- ${HOST_COMPILE.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c
- rm -f ${.TARGET:R}.${LPREFIX}.c
-.endif
-
-# Yacc
-.if defined(YHEADER) || defined(YPREFIX)
-.if defined(YPREFIX)
-YFLAGS+=-p${YPREFIX}
-.endif
-.if defined(YHEADER)
-YFLAGS+=-d
-.endif
-.y:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
- rm -f ${.TARGET:R}.tab.c ${.TARGET:R}.tab.h
-.y.h: ${.TARGET:R}.c
-.y.c:
- ${YACC.y} -o ${.TARGET} ${.IMPSRC}
-.y.o:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c ${TARGET:R}.tab.h
-.y.lo:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${HOST_COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c ${TARGET:R}.tab.h
-.elif defined(PARALLEL)
-.y:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
- rm -f ${.TARGET:R}.tab.c
-.y.c:
- ${YACC.y} -o ${.TARGET} ${.IMPSRC}
-.y.o:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c
-.y.lo:
- ${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
- ${HOST_COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c
- rm -f ${.TARGET:R}.tab.c
-.endif
diff --git a/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk
deleted file mode 100644
index db5765b78db..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk
+++ /dev/null
@@ -1,211 +0,0 @@
-# $NetBSD: SunOS.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run Unix.
-OS?= SunOS.5
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${AS} ${AFLAGS} ${CPPFLAGS} -P
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-# Unless told otherwise, assume GNU CC
-CC?= gcc
-
-DBG?= -O
-
-CFLAGS?= ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= g++
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-.if defined(NETBSD_COMPATIBLE)
-CPPFLAGS?= -I${BSDDIR}/include -D__EXTENSIONS__ -D_XPG4_2 -DSUNOS_5
-HOST_CPPFLAGS?= ${CPPFLAGS}
-NOLINT=1
-.else
-CPPFLAGS?=
-.endif
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= /usr/ucb/install
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
-
-# override the definitions in bsd.own.mk for Solaris
-BINGRP?= root
-MANGRP?= root
-INFOGRP?= root
-DOCGRP?= root
-NLSGRP?= root
-KMODGRP?= root
-LOCALEGRP?= root
diff --git a/pkgtools/bootstrap-mk-files/files/mods/UnixWare.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/UnixWare.sys.mk
deleted file mode 100644
index 43856c45bfa..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/UnixWare.sys.mk
+++ /dev/null
@@ -1,195 +0,0 @@
-# $NetBSD: UnixWare.sys.mk,v 1.2 2006/11/11 18:24:52 jschauma Exp $
-# NetBSD: SunOS.sys.mk,v 1.1.1.1 2004/03/11 13:04:00 grant Exp
-# NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run Unix.
-OS= UnixWare
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CC?= gcc
-DBG?= -O2
-# gcc on Unixware has no internal macro to identify the system
-CFLAGS?= -DUNIXWARE ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= g++
-CXXFLAGS?= -DUNIXWARE ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-CPPFLAGS?= -DUNIXWARE
-
-FC?= g77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= /usr/ucb/install
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= bmake
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/bootstrap-mk-files/files/mods/bsd.own.mk.in b/pkgtools/bootstrap-mk-files/files/mods/bsd.own.mk.in
deleted file mode 100644
index 6efb36be106..00000000000
--- a/pkgtools/bootstrap-mk-files/files/mods/bsd.own.mk.in
+++ /dev/null
@@ -1,326 +0,0 @@
-# $NetBSD: bsd.own.mk.in,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-
-.if !defined(_BSD_OWN_MK_)
-_BSD_OWN_MK_=1
-
-.if defined(MAKECONF) && exists(${MAKECONF})
-.include "${MAKECONF}"
-.elif exists(@SYSCONFDIR@/mk.conf)
-.include "@SYSCONFDIR@/mk.conf"
-.elif exists(/etc/mk.conf)
-.include "/etc/mk.conf"
-.endif
-
-# Defining `SKEY' causes support for S/key authentication to be compiled in.
-SKEY= yes
-
-# where the system object and source trees are kept; can be configurable
-# by the user in case they want them in ~/foosrc and ~/fooobj, for example
-BSDSRCDIR?= /usr/src
-BSDOBJDIR?= /usr/obj
-
-BINGRP?= @ROOT_GROUP@
-BINOWN?= @ROOT_USER@
-BINMODE?= 555
-NONBINMODE?= 444
-
-# Define MANZ to have the man pages compressed (gzip)
-#MANZ= 1
-
-MANDIR?= /usr/share/man
-MANGRP?= @ROOT_GROUP@
-MANOWN?= @ROOT_USER@
-MANMODE?= ${NONBINMODE}
-MANINSTALL?= maninstall catinstall
-
-INFODIR?= /usr/share/info
-INFOGRP?= @ROOT_GROUP@
-INFOOWN?= @ROOT_USER@
-INFOMODE?= ${NONBINMODE}
-
-LIBDIR?= /usr/lib
-LINTLIBDIR?= /usr/libdata/lint
-LIBGRP?= ${BINGRP}
-LIBOWN?= ${BINOWN}
-LIBMODE?= ${NONBINMODE}
-
-DOCDIR?= /usr/share/doc
-HTMLDOCDIR?= /usr/share/doc/html
-DOCGRP?= @ROOT_GROUP@
-DOCOWN?= @ROOT_USER@
-DOCMODE?= ${NONBINMODE}
-
-NLSDIR?= /usr/share/nls
-NLSGRP?= @ROOT_GROUP@
-NLSOWN?= @ROOT_USER@
-NLSMODE?= ${NONBINMODE}
-
-KMODDIR?= /usr/lkm
-KMODGRP?= @ROOT_GROUP@
-KMODOWN?= @ROOT_USER@
-KMODMODE?= ${NONBINMODE}
-
-LOCALEDIR?= /usr/share/locale
-LOCALEGRP?= @ROOT_GROUP@
-LOCALEOWN?= @ROOT_USER@
-LOCALEMODE?= ${NONBINMODE}
-
-COPY?= -c
-.if defined(UPDATE)
-PRESERVE?= -p
-.else
-PRESERVE?=
-.endif
-.if defined(UNPRIVILEGED)
-INSTPRIV?= -U
-.endif
-STRIPFLAG?= -s
-
-# Define SYS_INCLUDE to indicate whether you want symbolic links to the system
-# source (``symlinks''), or a separate copy (``copies''); (latter useful
-# in environments where it's not possible to keep /sys publicly readable)
-#SYS_INCLUDE= symlinks
-
-# The sh3 port is incomplete.
-.if ${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el"
-NOLINT=1
-NOPROFILE=1
-OBJECT_FMT?=COFF
-NOPIC?=1
-.endif
-
-# The sparc64 port is incomplete.
-# Profiling and linting is also off on the x86_64 port at the moment.
-.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "x86_64"
-NOPROFILE=1
-NOLINT=1
-.endif
-
-# The m68000 port is incomplete.
-.if ${MACHINE_ARCH} == "m68000"
-NOLINT=1
-NOPROFILE=1
-NOPIC?=1
-.endif
-
-# Data-driven table using make variables to control how
-# toolchain-dependent targets and shared libraries are built
-# for different platforms and object formats.
-# OBJECT_FMT: currently either "ELF" or "a.out".
-# SHLIB_TYPE: "ELF" or "a.out" or "" to force static libraries.
-#
-.if ${MACHINE_ARCH} == "alpha" || \
- ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
- ${MACHINE_ARCH} == "powerpc" || \
- ${MACHINE_ARCH} == "sparc" || \
- ${MACHINE_ARCH} == "sparc64" || \
- ${MACHINE_ARCH} == "x86_64" || \
- ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "m68000" || \
- ${MACHINE_ARCH} == "arm" || \
- ${MACHINE} == "next68k" || \
- ${MACHINE} == "sun3" || \
- ${MACHINE} == "mvme68k" || \
- ${MACHINE} == "hp300" || \
- ${MACHINE} == "news68k" || \
- ${MACHINE} == "arm26"
-OBJECT_FMT?=ELF
-.else
-OBJECT_FMT?=a.out
-.endif
-
-.if ${MACHINE_ARCH} == "x86_64"
-CFLAGS+=-Wno-format -fno-builtin
-.endif
-
-# Location of the file that contains the major and minor numbers of the
-# version of a shared library. If this file exists a shared library
-# will be built by <bsd.lib.mk>.
-SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
-
-# GNU sources and packages sometimes see architecture names differently.
-# This table maps an architecture name to its GNU counterpart.
-# Use as so: ${GNU_ARCH.${TARGET_ARCH}} or ${MACHINE_GNU_ARCH}
-.ifndef MACHINE_GNU_ARCH
-GNU_ARCH.alpha=alpha
-GNU_ARCH.arm26=arm
-GNU_ARCH.arm32=arm
-GNU_ARCH.arm=arm
-GNU_ARCH.i386=i386
-GNU_ARCH.m68k=m68k
-GNU_ARCH.mipseb=mipseb
-GNU_ARCH.mipsel=mipsel
-GNU_ARCH.ns32k=ns32k
-GNU_ARCH.powerpc=powerpc
-GNU_ARCH.sh3eb=sh
-GNU_ARCH.sh3el=sh
-GNU_ARCH.sparc=sparc
-GNU_ARCH.sparc64=sparc64
-GNU_ARCH.vax=vax
-MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}}
-.endif
-
-# In order to identify NetBSD to GNU packages, we sometimes need
-# an "elf" tag for historically a.out platforms.
-.if ${OBJECT_FMT} == "ELF" && \
- (${MACHINE_ARCH} == "arm" || \
- ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "m68k" || \
- ${MACHINE_ARCH} == "sparc" || \
- ${MACHINE_ARCH} == "vax")
-MACHINE_GNU_PLATFORM?= netbsdelf
-.else
-MACHINE_GNU_PLATFORM?= netbsd
-.endif
-
-# CPU model, derived from MACHINE_ARCH
-MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:S/arm26/arm/:S/arm32/arm/:C/sh3e[bl]/sh3/:S/m68000/m68k/}
-
-.if ${MACHINE_ARCH} == "mips"
-.BEGIN:
- @echo Must set MACHINE_ARCH to one of mipseb or mipsel
- @false
-.endif
-.if ${MACHINE_ARCH} == "sh3"
-.BEGIN:
- @echo Must set MACHINE_ARCH to one of sh3eb or sh3el
- @false
-.endif
-
-TARGETS+= all clean cleandir depend dependall includes \
- install lint obj regress tags html installhtml cleanhtml
-.PHONY: all clean cleandir depend dependall distclean includes \
- install lint obj regress tags beforedepend afterdepend \
- beforeinstall afterinstall realinstall realdepend realall \
- html installhtml cheanhtml
-
-# set NEED_OWN_INSTALL_TARGET, if it's not already set, to yes
-# this is used by bsd.pkg.mk to stop "install" being defined
-NEED_OWN_INSTALL_TARGET?= yes
-
-.if ${NEED_OWN_INSTALL_TARGET} == "yes"
-.if !target(install)
-install: .NOTMAIN beforeinstall subdir-install realinstall afterinstall
-beforeinstall: .NOTMAIN
-subdir-install: .NOTMAIN beforeinstall
-realinstall: .NOTMAIN beforeinstall
-afterinstall: .NOTMAIN subdir-install realinstall
-.endif
-all: .NOTMAIN realall subdir-all
-subdir-all: .NOTMAIN
-realall: .NOTMAIN
-depend: .NOTMAIN realdepend subdir-depend
-subdir-depend: .NOTMAIN
-realdepend: .NOTMAIN
-distclean: .NOTMAIN cleandir
-.endif
-
-PRINTOBJDIR= printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -B -s -f-
-
-# Define MKxxx variables (which are either yes or no) for users
-# to set in /etc/mk.conf and override on the make commandline.
-# These should be tested with `== "no"' or `!= "no"'.
-# The NOxxx variables should only be used by Makefiles.
-#
-
-MKCATPAGES?=yes
-
-.if defined(NODOC)
-MKDOC=no
-#.elif !defined(MKDOC)
-#MKDOC=yes
-.else
-MKDOC?=yes
-.endif
-
-MKINFO?=yes
-
-.if defined(NOLINKLIB)
-MKLINKLIB=no
-.else
-MKLINKLIB?=yes
-.endif
-.if ${MKLINKLIB} == "no"
-MKPICINSTALL=no
-MKPROFILE=no
-.endif
-
-MKLINT?=no
-
-.if defined(NOMAN)
-MKMAN=no
-.else
-MKMAN?=yes
-.endif
-.if ${MKMAN} == "no"
-MKCATPAGES=no
-.endif
-
-.if defined(NONLS)
-MKNLS=no
-.else
-MKNLS?=yes
-.endif
-
-#
-# MKOBJDIRS controls whether object dirs are created during "make build".
-# MKOBJ controls whether the "make obj" rule does anything.
-#
-.if defined(NOOBJ)
-MKOBJ=no
-MKOBJDIRS=no
-.else
-MKOBJ?=yes
-MKOBJDIRS?=no
-.endif
-
-.if defined(NOPIC)
-MKPIC=no
-.else
-MKPIC?=yes
-.endif
-
-.if defined(NOPICINSTALL)
-MKPICINSTALL=no
-.else
-MKPICINSTALL?=yes
-.endif
-
-.if defined(NOPROFILE)
-MKPROFILE=no
-.else
-MKPROFILE?=yes
-.endif
-
-.if defined(NOSHARE)
-MKSHARE=no
-.else
-MKSHARE?=yes
-.endif
-.if ${MKSHARE} == "no"
-MKCATPAGES=no
-MKDOC=no
-MKINFO=no
-MKMAN=no
-MKNLS=no
-.endif
-
-.if defined(NOCRYPTO)
-MKCRYPTO=no
-.else
-MKCRYPTO?=yes
-.endif
-
-MKCRYPTO_IDEA?=no
-
-MKCRYPTO_RC5?=no
-
-.if defined(NOKERBEROS) || (${MKCRYPTO} == "no")
-MKKERBEROS=no
-.else
-MKKERBEROS?=yes
-.endif
-
-MKSOFTFLOAT?=no
-
-.endif # _BSD_OWN_MK_
diff --git a/pkgtools/bootstrap-mk-files/files/sys.mk b/pkgtools/bootstrap-mk-files/files/sys.mk
deleted file mode 100644
index db022616536..00000000000
--- a/pkgtools/bootstrap-mk-files/files/sys.mk
+++ /dev/null
@@ -1,208 +0,0 @@
-# $NetBSD: sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
-# @(#)sys.mk 8.2 (Berkeley) 3/21/94
-
-unix?= We run Unix
-OS!= uname -s
-
-.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
-.SUFFIXES: .sh .m4
-
-.LIBS: .a
-
-AR?= ar
-ARFLAGS?= rl
-RANLIB?= ranlib
-
-AS?= as
-AFLAGS?=
-.if ${MACHINE_ARCH} == "sparc64"
-AFLAGS+= -Wa,-Av9a
-.endif
-COMPILE.s?= ${CC} ${AFLAGS} -c
-LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
-LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CC?= cc
-.if ${MACHINE_ARCH} == "alpha" || \
- ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm26" || \
- ${MACHINE_ARCH} == "arm32" || \
- ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "m68k" || \
- ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
- ${MACHINE_ARCH} == "sparc" || \
- ${MACHINE_ARCH} == "vax"
-DBG?= -O2
-.elif ${MACHINE_ARCH} == "x86_64"
-DBG?=
-.else
-DBG?= -O
-.endif
-CFLAGS?= ${DBG}
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX?= c++
-CXXFLAGS?= ${CFLAGS}
-COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-OBJC?= ${CC}
-OBJCFLAGS?= ${CFLAGS}
-COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
-LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP?= cpp
-CPPFLAGS?=
-
-FC?= f77
-FFLAGS?= -O
-RFLAGS?=
-COMPILE.f?= ${FC} ${FFLAGS} -c
-LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
-
-INSTALL?= install
-
-LEX?= lex
-LFLAGS?=
-LEX.l?= ${LEX} ${LFLAGS}
-
-LD?= ld
-LDFLAGS?=
-
-LINT?= lint
-LINTFLAGS?= -chapbxzF
-
-LORDER?= lorder
-
-MAKE?= make
-
-NM?= nm
-
-PC?= pc
-PFLAGS?=
-COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-SHELL?= sh
-
-SIZE?= size
-
-TSORT?= tsort -q
-
-YACC?= yacc
-YFLAGS?=
-YACC.y?= ${YACC} ${YFLAGS}
-
-# C
-.c:
- ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.c.o:
- ${COMPILE.c} ${.IMPSRC}
-.c.a:
- ${COMPILE.c} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.c.ln:
- ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
-
-# C++
-.cc .cpp .cxx .C:
- ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.cc.o .cpp.o .cxx.o .C.o:
- ${COMPILE.cc} ${.IMPSRC}
-.cc.a .cpp.a .cxx.a .C.a:
- ${COMPILE.cc} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Fortran/Ratfor
-.f:
- ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.f.o:
- ${COMPILE.f} ${.IMPSRC}
-.f.a:
- ${COMPILE.f} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.F:
- ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.F.o:
- ${COMPILE.F} ${.IMPSRC}
-.F.a:
- ${COMPILE.F} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-.r:
- ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.r.o:
- ${COMPILE.r} ${.IMPSRC}
-.r.a:
- ${COMPILE.r} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Pascal
-.p:
- ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.p.o:
- ${COMPILE.p} ${.IMPSRC}
-.p.a:
- ${COMPILE.p} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Assembly
-.s:
- ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.s.o:
- ${COMPILE.s} ${.IMPSRC}
-.s.a:
- ${COMPILE.s} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-.S:
- ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-.S.o:
- ${COMPILE.S} ${.IMPSRC}
-.S.a:
- ${COMPILE.S} ${.IMPSRC}
- ${AR} ${ARFLAGS} $@ $*.o
- rm -f $*.o
-
-# Lex
-.l:
- ${LEX.l} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll
- rm -f lex.yy.c
-.l.c:
- ${LEX.l} ${.IMPSRC}
- mv lex.yy.c ${.TARGET}
-.l.o:
- ${LEX.l} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} lex.yy.c
- rm -f lex.yy.c
-
-# Yacc
-.y:
- ${YACC.y} ${.IMPSRC}
- ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS}
- rm -f y.tab.c
-.y.c:
- ${YACC.y} ${.IMPSRC}
- mv y.tab.c ${.TARGET}
-.y.o:
- ${YACC.y} ${.IMPSRC}
- ${COMPILE.c} -o ${.TARGET} y.tab.c
- rm -f y.tab.c
-
-# Shell
-.sh:
- rm -f ${.TARGET}
- cp ${.IMPSRC} ${.TARGET}
diff --git a/pkgtools/cdpack/DESCR b/pkgtools/cdpack/DESCR
deleted file mode 100644
index 02be58cca57..00000000000
--- a/pkgtools/cdpack/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-cdpack is a small utility for creating ISO 9660 images for
-a multi-CD/DVD binary package collection. The utility creates
-ISO 9660 images for all the binary packages in a specified
-directory.
-
-A choice of two algorithms is available for how the packages
-are grouped. The "no duplication" algorithm arranges the
-packages so any package on CD/DVD number `n' will have all of
-its dependencies on CD/DVD numbers 1 through `n'.
-
-The "no inter-CD/DVD depends" algorithm will place certain
-packages on more than one CD/DVD to ensure that each CD/DVD is
-self contained (all package dependencies are satisfied within
-the single CD/DVD).
diff --git a/pkgtools/cdpack/Makefile b/pkgtools/cdpack/Makefile
deleted file mode 100644
index 6a8578b29ee..00000000000
--- a/pkgtools/cdpack/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-# $NetBSD: Makefile,v 1.24 2007/02/22 19:27:02 wiz Exp $
-#
-
-DISTNAME= cdpack-1.7
-PKGREVISION= 1
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= dmcmahill@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/
-COMMENT= Utility to create multi-cd binary package collections
-
-# for mkisofs
-DEPENDS+= cdrtools-[0-9]*:../../sysutils/cdrtools
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-
-USE_TOOLS+= awk:run
-USE_TOOLS+= expr:run
-USE_TOOLS+= sort:run
-USE_TOOLS+= tsort:run
-
-INSTALLATION_DIRS= bin libexec ${PKGMANDIR}/man1
-
-do-build:
- ${SED} -e 's;@prefix@;${PREFIX};g' \
- -e 's;@progver@;${PKGVERSION};g' \
- -e 's;@AWK@;${AWK};g' \
- -e 's;@EXPR@;${EXPR};g' \
- -e 's;@SORT@;${SORT};g' \
- -e 's;@TSORT@;${TSORT};g' \
- ${FILESDIR}/cdpack.sh > \
- ${WRKSRC}/cdpack
- ${CHMOD} 755 ${WRKDIR}/cdpack
- ${SED} -e 's;@AWK@;${AWK};g' ${FILESDIR}/cdpack.1 > \
- ${WRKSRC}/cdpack.1
- ${SED} -e 's;@AWK@;${AWK};g' ${FILESDIR}/cdgen.awk > \
- ${WRKSRC}/cdgen.awk
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/cdpack ${PREFIX}/bin
- ${INSTALL_SCRIPT} ${WRKSRC}/cdgen.awk ${PREFIX}/libexec
- ${INSTALL_MAN} ${WRKSRC}/cdpack.1 ${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/cdpack/PLIST b/pkgtools/cdpack/PLIST
deleted file mode 100644
index 0b3fd9efc32..00000000000
--- a/pkgtools/cdpack/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2005/03/14 19:56:15 tv Exp $
-bin/cdpack
-libexec/cdgen.awk
-man/man1/cdpack.1
diff --git a/pkgtools/cdpack/files/TODO b/pkgtools/cdpack/files/TODO
deleted file mode 100644
index 2d36728d9f0..00000000000
--- a/pkgtools/cdpack/files/TODO
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: TODO,v 1.5 2002/09/20 11:48:12 dmcmahill Exp $
-
-To-Do List for cdpack
----------------------
-
-
-- extract COMMENT and DESCR to generate a browseable index of all the
- packages on the CD set. This would be similar to the README.html's
- in pkgsrc, but with some modifications. The changes would be to
- list which CD certain pkgs are on. Also, if a DEPENDS is not on the
- CD set (due to redistribution restrictions for example), perhaps
- list that so the user knows s/he must install the restricted DEPENDS
- by hand first.
-
-- come up with some sort of install tool around pkg_add. Perhaps this
- could be done using SUSHI. The idea would be to let the user browse
- the selection of packages, select some subset of them and then do
- a batch install.
-
-- add a -pipe option to pipe the output of mkisofs directly to
- cdrecord (or other program) to allow direct writing to CD avoiding
- the need for a potentially large amount of disk space for the
- generated images.
-
-- add an option to go through pkgsrc and find all the packages
- which can't be packaged (NO_PACKAGE or INTERACTIVE) and copy
- the distfiles into a single directory. This way you can create
- a CD set where you include distfiles for the packages which
- couldn't be made into binary pkgs.
-
-- add an options that would search in multiple directories for
- binary packages and only pick the most recent versions of any
- given package. If an older version is required by some other
- pkg, also pick that one up too.
diff --git a/pkgtools/cdpack/files/cdgen.awk b/pkgtools/cdpack/files/cdgen.awk
deleted file mode 100755
index 6f4fbbace0d..00000000000
--- a/pkgtools/cdpack/files/cdgen.awk
+++ /dev/null
@@ -1,521 +0,0 @@
-#!@AWK@ -f
-# $NetBSD: cdgen.awk,v 1.6 2005/08/01 21:47:43 dmcmahill Exp $
-#
-# Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Dan McMahill
-# 4. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY DAN MCMAHILL
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-BEGIN {
-
-# ARGV[0] = program name
-# ARGV[1] = packages directory (/usr/pkgsrc/packages/All)
-# ARGV[2] = output directory
-# ARGV[3] = Depends tree file. Has packages in tsort(1) input format.
-# ARGV[4] = Exclude file. Packages listed here are excluded.
-# ARGV[5] = Depends order file. Has packages in tsort(1) output format.
-# ARGV[6] = CD list. This script leaves a list of the CD directories in this file
-# ARGV[7] = dup flag. "dup=yes" for package duplication, "dup=no" for no duplication.
-# ARGV[8] = verbose flag. "verbose=yes" for verbose output
-# ARGV[9] = xtra_size. How many kB are needed per CD for common files
-
- reqnum = 12;
- if (ARGC != reqnum){
- printf("cdgen.awk: wrong number of arguments (got %d, wanted %d)\n", ARGC, reqnum);
- usage();
- exit(1);
- }
-
- prog = "cdgen.awk";
- packages = ARGV[1];
- cddir = ARGV[2];
- deptree = ARGV[3];
- exclude = ARGV[4];
- order = ARGV[5];
- cdlist = ARGV[6];
- xtra_size= ARGV[10];
- other_size= ARGV[11];
-
- if (ARGV[7] ~ "dup=yes"){
- dup=1;
- }
- else{
- dup=0;
- }
- if (ARGV[8] ~ "verbose=yes"){
- verbose=1;
- }
- if (ARGV[9] ~ "dvd=yes"){
- dvd=1;
- }
- else{
- dvd=0;
- }
-
-#
-# Make sure all required directories and files exist
-#
- cmd="test -d " packages ;
- if(system(cmd) != 0){
- printf("%s: packages directory \"%s\" does not exist\n",prog,packages);
- usage();
- exit(1);
- }
-
- cmd="test -d " cddir ;
- if(system(cmd) != 0){
- printf("%s: cd image directory \"%s\" does not exist\n",prog,cddir);
- usage();
- exit(1);
- }
-
- cmd="test -f " deptree ;
- if(system(cmd) != 0){
- printf("%s: dependstree file \"%s\" does not exist\n",prog,deptree);
- usage();
- exit(1);
- }
-
- cmd="test -f " exclude ;
- if(system(cmd) != 0){
- printf("%s: exclude file \"%s\" does not exist\n",prog,exclude);
- usage();
- exit(1);
- }
-
- cmd="test -f " order ;
- if(system(cmd) != 0){
- printf("%s: build order file \"%s\" does not exist\n",prog,order);
- usage();
- exit(1);
- }
-
-
- "date" | getline now;
- printf("%s starting %28s\n",prog,now);
-
-#
-# Read in the build order. This gives the list of all possible
-# packages (note that some may actually not be available as binary
-# packages). The order is such that a package earlier in the list
-# will never depend on a package lower on the list.
-#
-
- printf("Reading the depends order from \"%s\".\n",order);
- n=1;
- while(getline < order > 0){
- pkgorder[n] = $1;
- n++;
- }
- close(order);
- npkgs = n-1;
- printf("%d packages to go on CD-ROM/DVD!\n",npkgs);
-
-#
-# Read in the list of excluded packages
-#
- printf("Reading list of packages to be excluded\n");
- while(getline < exclude > 0){
- excludes[$1] = 1 ;
- }
- close(exclude);
-
-#
-# Read in the depends tree and flatten it.
-#
- printf("Reading depends tree\n");
- while(getline < deptree > 0){
- if ($2 in topdepends)
- topdepends[$2] = topdepends[$2] " " $1 " " ;
- else
- topdepends[$2] = " " $1 " " ;
- }
- close(deptree);
-
-# Now recurse the tree to give a flattened depends list for each pkg
- printf("Flattening depends tree\n");
- for (toppkg in topdepends){
- find_all_depends(toppkg);
- }
-
-
-#
-# Next get the sizes of each of the binary pacakges if they
-# exist. For those which don't exist, make a note of that.
-# getsize() returns size in kB if the file exists, 0 otherwise.
-#
- printf("Loading binary package sizes\n");
- nonzero=0;
- totsize=0;
- for (n in pkgorder){
- pkgsize[pkgorder[n]] = getsize(pkgorder[n]);
- if(pkgsize[pkgorder[n]] > 0){
- nonzero++;
- }
- else{
- printf("WARNING: binary package \"%s\" has zero size\n",pkgorder[n]);
- }
- totsize = totsize + pkgsize[pkgorder[n]];
- }
- printf("%d binary packages are available (%g Mb)!\n",nonzero,totsize/1024);
-
-#
-# Now we need to figure out which binary packages go on each
-# CD. The way we'll do this is start taking packages in the order
-# specified by 'pkgorder' until the first CD is full, then move
-# to the second, etc. This way, we never have to reinsert a CD
-# while installing pkgs.
-#
- printf("Figuring out which packages go on each CD/DVD\n");
-
-# maximum kB for binary pkgs per CD.
- if( dvd )
- maxcd = 1024 * 4300;
- else
- maxcd = 1024 * 620;
-
- if( verbose ) printf("Maximum image size = %g Mb\n", maxcd/1024);
-#
-# no package duplication
-#
- if (!dup){
- cdn=1;
- pkgn=0;
- cdtot[cdn]=xtra_size;
- cdpkgs[cdn]=0;
-
- for (n=1; n<=npkgs ; n=n+1){
- if (verbose) printf("Processing: %s\n",pkgorder[n]);
- if (pkgorder[n] in excludes) {
- if (verbose) printf("Skipping excluded package: %s\n",pkgorder[n]);
- }
- else {
-# only process the package if it exists.
- if (pkgsize[pkgorder[n]] > 0){
- if (cdtot[cdn] < (maxcd-pkgsize[pkgorder[n]]) ){
- cdtot[cdn] = cdtot[cdn] +pkgsize[pkgorder[n]];
- cdcontents[cdn":"pkgorder[n]] = 1;
- pkgn = pkgn + 1;
- }
- else{
-# the CD is full
- printf("disk number %d is full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- cdpkgs[cdn] = pkgn;
-# increment the CD counter
- cdn = cdn + 1;
- pkgn = 1;
- cdtot[cdn] = xtra_size + pkgsize[pkgorder[n]];
- cdcontents[cdn":"pkgorder[n]] = 1;
- }
- }
- }
- }
- cdpkgs[cdn] = pkgn;
-
-# see if the extra files will fit on the last CD
- if ( (cdtot[cdn] + other_size) < maxcd ){
- printf("disk number %d is partially full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- }
- else{
- printf("disk number %d is full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- cdn = cdn + 1;
- cdtot[cdn] = other_size;
- cdpkgs[cdn] = 0;
- printf("disk number %d is partially full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- }
-
- }
-
-#
-# We will duplicate some packages to eliminate inter-CD dependencies.
-#
- else{
- cdn=1;
- pkgn=0;
-# initialize the size count for the current CD with the extras that we
-# are putting on all CD's
- cdtot[cdn]=xtra_size;
- cdpkgs[cdn]=0;
- n=npkgs;
- while (n > 0){
- if (verbose) printf("Begin processing %s\n",pkgorder[n]);
- if ( !pkg_done[pkgorder[n]]){
- size_needed = pkgsize[pkgorder[n]];
- deps_needed = 0;
- split(alldepends[pkgorder[n]],pkgdeps);
- for (dep in pkgdeps){
- if (verbose) printf(" Examining dependency: %s\n",pkgdeps[dep]);
- if (pkgdeps[dep] in excludes) {
- if (verbose) printf(" Skipping excluded dependency in count: %s\n",pkgdeps[dep]);
- }
- else {
- if(!cdcontents[cdn":"pkgdeps[dep]]){
- size_needed = size_needed + pkgsize[pkgdeps[dep]];
- deps_needed++;
- }
- }
- }
- if (cdtot[cdn] + size_needed < maxcd){
- if (verbose) printf(" Processing %s\n",pkgorder[n]);
- if (pkgorder[n] in excludes) {
- if (verbose) printf(" Skipping excluded package in packing: %s\n",pkgorder[n]);
- }
- else {
- cdcontents[cdn":"pkgorder[n]] = 1;
- }
- pkg_done[pkgorder[n]] = 1;
- if (verbose) printf(" Marked %s as processed\n",pkgorder[n]);
- for (dep in pkgdeps){
- if (pkgdeps[dep] in excludes) {
- if (verbose) printf(" Skipping excluded dependency in packing: %s\n",pkgdeps[dep]);
- }
- else {
- cdcontents[cdn":"pkgdeps[dep]] = 1;
- pkg_done[pkgdeps[dep]] = 1;
- if (verbose) printf(" Marked dependency pkg %s as processed\n",pkgdeps[dep]);
- }
- }
- cdtot[cdn] = cdtot[cdn] + size_needed;
- if (pkgorder[n] in excludes) {
-# don't include this one in the count if its excluded
- if (verbose) printf(" Added %d dependencies to the image\n",deps_needed);
- pkgn = pkgn + deps_needed;
- }
- else {
- if (verbose) printf(" Added %s plus %d dependencies to the image\n",pkgorder[n],deps_needed);
- pkgn = pkgn + 1 + deps_needed;
- }
- n--;
- }
- else{
-# the CD is full
- printf("disk number %d is full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- cdpkgs[cdn] = pkgn;
- cdn++;
- cdtot[cdn] = xtra_size;
- pkgn = 0;
- }
- }
- else{
-# we've already done this pkg
- if (verbose) printf(" %s has already been processed\n",pkgorder[n]);
- n--;
- }
-
- }
- cdpkgs[cdn] = pkgn;
-
-# see if the extra files will fit on the last CD
- if ( (cdtot[cdn] + other_size) < maxcd ){
- printf("disk number %d is partially full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- }
- else{
- printf("disk number %d is full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- cdn = cdn + 1;
- cdtot[cdn] = other_size;
- cdpkgs[cdn] = 0;
- printf("disk number %d is partially full (%g Mb)\n",cdn,
- cdtot[cdn]/1024);
- }
- }
-
-# remember how many cd's there are
- ncd=cdn;
-
-# print some stats
- tot_ex=0;
- for (ex in excludes){
- tot_ex++;
- }
- if (dup){
- tot_cdpkgs=0;
- for (cdn=1; cdn<=ncd; cdn=cdn+1){
- tot_cdpkgs = tot_cdpkgs + cdpkgs[cdn];
- }
- printf("CD/DVD images with package duplication resulted in %d packages total\n",tot_cdpkgs);
- printf("This is an increase of %d over the base %d packages\n",tot_cdpkgs-(npkgs-tot_ex),npkgs-tot_ex);
- }
-
- printf("%d packages out of %d have been excluded due to redistribution restrictions\n",tot_ex,npkgs);
-#
-# Next, create a subdirectory for each CD and populate the directory
-# with links to the actual binary pkgs
-#
- printf("Creating subdirectories for each CD/DVD and populating it with links\n");
- printf("to the binary packages and other required files.\n");
- for (cdn=1; cdn<=ncd; cdn=cdn+1){
- printf("----------- CD/DVD #%d ----------\n",cdn);
- printf(" %3d binary packages\n",cdpkgs[cdn]);
- outdir=cddir "/disk" cdn "/packages/All";
- cmd="test -d " outdir;
- if(system(cmd) == 0){
- printf("%10s: output dir \"%s\" already exists.\n",prog,outdir);
- printf("%10s please remove it.\n","");
- exit(1);
- }
-
-# create output directory
- cmd = "mkdir -p " outdir;
- do_system(cmd);
-
-# populate it with the symlinks to the binary packages
- for (n=1; n<=npkgs; n++){
- if (cdcontents[cdn":"pkgorder[n]]){
- cmd = "cd " outdir " && ln -s " packages "/" ;
- cmd = cmd pkgorder[n] ".tgz";
- do_system(cmd);
- }
- }
-
-# add it to the cd list
- printf("disk%d\n", cdn) > cdlist ;
-
- }
-
- close(cdlist);
-
- "date" | getline now;
- printf("%s finished on %28s\n",prog,now);
-
- printf("\n");
-
- exit 0
- } # BEGIN
-
-function getsize(name,cmd,sz){
-
- cmd="test -f " packages "/" name ".tgz";
- if(system(cmd) == 0){
- cmd="du -k " packages "/" name ".tgz";
- cmd | getline ;
- close(cmd);
- sz=$1;
- }
- else{
- sz=0;
- }
-
- return(sz);
-}
-
-function do_system(cmd,rv){
- rv = system(cmd);
- if (rv != 0){
- printf("Error: system(\"%s\") returned %d\n",cmd,rv);
- exit(1);
- }
- return(0);
-}
-
-#
-# show usage
-#
-function usage(){
- printf("\nUsage:\n\n");
- printf("%10s -- Create directories for building binary package ISO images\n",
- prog,prog);
- printf("%10s packages images dependstree order cdlist\n","");
- printf("\n");
- printf("\n");
-
-}
-
-
-function find_all_depends(pkg,pkgreg,i,deps){
-# if we find the package already has been fully depended
-# then return the depends list
- if (pkg in alldepends){
-# printf("\t%s is already depended.\n",pkg);
- return(alldepends[pkg]);
- }
-
-# if we find the package listed in its own depends list, then
-# return an empty list if we're going down the depends tree.
-# When a package lists itself in the depends tree file, it simply
-# is a place holder and means the package has no depends. However
-# other packages may still depend upon it, so we need to keep looking.
- if ( topdepends[pkg]~reg2str(pkg) ){
-# printf("\t%s depends on its self.\n",pkg);
- alldepends[pkg] = " ";
- return(alldepends[pkg]);
- }
-
-# otherwise recursively gather depends that each of the depends
-# has
- pkgreg=reg2str(pkg);
- split(topdepends[pkg],deps);
- i=1;
- alldepends[pkg] = " ";
- while ( i in deps ){
-# don't add ourselves to the list (a possibility when going up the tree)
- if (" "deps[i]" "!~pkgreg){
- alldepends[pkg] = alldepends[pkg] " " deps[i] " " find_all_depends(deps[i]);
- }
- i=i+1;
- }
- alldepends[pkg] = uniq(alldepends[pkg]);
- return(alldepends[pkg]);
-}
-
-#
-# take a string which has special characters like '+' in it and
-# escape them. Also put a space before and after since that's how
-# we'll distinguish things like gnome from gnome-libs
-#
-function reg2str(reg){
- gsub(/\+/,"\\\+",reg);
- gsub(/\./,"\\\.",reg);
- reg = " "reg" ";
- return(reg);
-}
-
-#
-# take the depends lists and uniq them.
-#
-function uniq(list,deps,i,ulist){
-
-# split out the depends
- split(list,deps);
-
- i=1;
- ulist = " ";
- while (i in deps){
- if (ulist !~reg2str(deps[i])){
- ulist = ulist deps[i]" ";
- }
- i++;
- }
- return(ulist);
-}
diff --git a/pkgtools/cdpack/files/cdpack.1 b/pkgtools/cdpack/files/cdpack.1
deleted file mode 100644
index 31599d318f0..00000000000
--- a/pkgtools/cdpack/files/cdpack.1
+++ /dev/null
@@ -1,193 +0,0 @@
-.\" $NetBSD: cdpack.1,v 1.12 2005/08/01 21:47:43 dmcmahill Exp $
-.\"
-.\" Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Dan McMahill
-.\" 4. The name of the author may not be used to endorse or promote
-.\" products derived from this software without specific prior written
-.\" permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY DAN MCMAHILL
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd April 25, 2001
-.Dt CDPACK 1
-.Os
-.Sh NAME
-.Nm cdpack
-.Nd produce multi-CD/DVD binary package images
-.Sh SYNOPSIS
-.Nm ""
-.Op -ac | -ec
-.Op -af | -ef
-.Op -dvd
-.Op -h | --help
-.Op -l logfile
-.Op -m machine_architecture
-.Op -o operating_system
-.Op -r os_version
-.Op -dnRvV
-.Op -x common_directory
-.Op -X extras_directory
-.Ar packages_directory
-.Ar cd_image_directory
-.Sh DESCRIPTION
-The
-.Nm
-utility produces ISO 9660 image files for
-a multiple CD/DVD collection of binary packages.
-.Pp
-The
-.Nm
-utility extracts the dependency information from the binary
-packages in the directory
-.Ar packages_directory
-specified on the command line. The dependency information is
-used to determine which packages are placed on which CD/DVD. The
-directory
-.Ar cd_image_directory
-is used as a staging area and the final ISO 9660 images are left in
-that directory. A file,
-.Ar .index ,
-which lists the contents of each CD/DVD will be left in the root
-directory of each CD/DVD image.
-.Bl -tag -width "-x directory "
-.It Fl ac
-Include binary packages marked as NO_BIN_ON_CDROM on the CD/DVD set.
-The default is to omit any
-packages which were marked as NO_BIN_ON_CDROM. This option should
-only be used when making a CD/DVD set for personal use and not for
-distribution unless you are sure you have not violated any licenses.
-.It Fl af
-Include binary packages marked as NO_BIN_ON_FTP on the CD/DVD set.
-This option is enabled by default.
-.It Fl d
-Enable debugging by not deleting temporary files at the end of the
-run. These files are left in TMPDIR.
-.It Fl ec
-Exclude packages marked as NO_BIN_ON_CDROM from the CD/DVD set. This is
-the default.
-.It Fl ef
-Exclude packages marked as NO_BIN_ON_FTP from the CD/DVD set. The default
-is to allow packages which are NO_BIN_ON_FTP.
-.It Fl dvd
-Create DVD sized images rather than the default CD-ROM sized images.
-.It Fl h
-.It Fl -help
-Displays a short usage message.
-.It Fl l Ar logfile
-Log the output of mkisofs -v -v to the file
-.Ar logfile .
-.It Fl m Ar machine_architecture
-Specifies
-.Ar machine_architecture
-as the target architecture for the binary packages in the generated README file.
-.It Fl n
-Do not duplicate packages in order to prevent inter-CD/DVD dependencies.
-The default without the
-.Fl n
-option will place a package and all of its dependencies on the same
-CD/DVD. If a particular package is also required by pacakges on other
-CD/DVD's, it will be placed there as well.
-When the
-.Fl n
-option is used packages are not duplicated. This results in slightly
-smaller ISO 9660 images.
-.Nm
-places packages which are lower in the dependency tree on lower
-numbered CD/DVD's and packages which are higher on the higher numbered
-CD/DVD's. In this fashion, a package on CD/DVD number n
-will have all of its dependencies on CD/DVD numbers 1 through n
-.It Fl o Ar operating_system
-Specifies
-.Ar operating_system
-as the target operating system for the binary packages in the generated README file.
-.It Fl r Ar os_version
-Specifies
-.Ar os_version
-as the target operating system version for the binary packages in the generated README file.
-.It Fl R
-Generate a file,
-.Ar README.txt ,
-which will be placed in the root directory of each CD/DVD image. This
-README file contains a small amount of information about the contents
-of the CD/DVD set.
-.It Fl v
-Be verbose. Currently does not change things much.
-.It Fl V
-Print the program version number and exit.
-.It Fl x Ar directory
-Includes the contents of
-.Ar directory
-on each CD/DVD. This is useful for README files, etc., which you want
-to be present on each CD/DVD in the set.
-.It Fl X Ar directory
-Includes the contents of
-.Ar directory
-on the last CD/DVD in the set. This is useful for adding
-a pkgsrc.tar.gz tarball, i.e. a file which does not
-need to be on each CD/DVD.
-.El
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
-.Sh ENVIRONMENT
-.Nm
-uses the fillowing environment variables if set.
-.Bl -tag -width "TMPDIR"
-.It Ev AWK
-awk implementation to use.
-Defaults to
-.Dq Li @AWK@ .
-.It Ev TMPDIR
-Directory for holding temporary files during the image creation.
-Defaults to
-.Dq Li /tmp .
-.El
-.Sh EXAMPLES
-This example takes all of the binary packages found in
-/usr/pkgsrc/packages/All and creates cd images in
-/u2/cdimages/cd{1,2,...}.iso. The directories
-/u2/cdimages/cd{1,2,...} are used to create the ISO 9660 layouts.
-.D1 cdpack /usr/pkgsrc/packages/All /u2/cdimages
-.Pp
-To include a common set of files on all CD/DVD's, place them in a
-directory, /tmp/foo, in this example, and pass in the directory name
-with the
-.Fl x
-option.
-.Dl cdpack -x /tmp/foo /usr/pkgsrc/packages/All /u2/cdimages
-.Sh SEE ALSO
-.Xr mkisofs 1
-.Sh HISTORY
-The
-.Nm
-utility first appeared in the
-.Nx
-packages collection in April, 2001.
-.Sh AUTHORS
-The
-.Nm
-utility was written by Dan McMahill (dmcmahill@NetBSD.org). The
-idea of duplicating packages to eliminate inter-CD/DVD dependencies
-came from Todd Vierling (tv@NetBSD.org).
diff --git a/pkgtools/cdpack/files/cdpack.sh b/pkgtools/cdpack/files/cdpack.sh
deleted file mode 100755
index 3c442754d58..00000000000
--- a/pkgtools/cdpack/files/cdpack.sh
+++ /dev/null
@@ -1,699 +0,0 @@
-#!/bin/sh
-# $NetBSD: cdpack.sh,v 1.10 2005/08/01 21:47:43 dmcmahill Exp $
-#
-# Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Dan McMahill
-# 4. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY DAN MCMAHILL
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-# $0 = program name
-# $2 = packages directory (/usr/pkgsrc/packages/All)
-# $3 = output directory
-
-prog=cdpack
-progver=@progver@
-
-TMPDIR=${TMPDIR:-/tmp}
-TMP=${TMPDIR}/${prog}.$$
-AWK=${AWK:-@AWK@}
-EXPR="@EXPR@"
-SORT="@SORT@"
-TSORT="@TSORT@"
-
-depf=$TMP/depf
-depf2=$TMP/depf2
-deptree=$TMP/deptree
-exclude=$TMP/exclude
-order=$TMP/order
-cdlist=$TMP/cdlist
-indexf=$TMP/indexf
-readme=$TMP/readme
-warnings=$TMP/warnings
-restricted=$TMP/restricted
-
-rm -fr $TMP
-mkdir $TMP
-touch $exclude
-
-usage(){
- echo " "
- echo "$prog - generates ISO9660 images for a multi-cd binary package collection"
- echo "Usage: $prog [-ac | -ec] [-af | -ef] [-dvd] [-h|--help] [-l logfile] [-dnRvV]"
- echo " [-o opsys] [-m machine] [-r release]"
- echo " [-x dir] [-X dir] packages_directory cdimage_directory"
- echo "Example: $prog /usr/pkgsrc/packages/All /images/netbsd-1.5/alpha"
- echo "Please refer to the manual page for complete documentation."
- echo " "
-}
-
-clean_and_exit(){
- if [ "x$DEBUG" = "xno" ]; then
- rm -fr $TMP
- else
- echo "Debugging output left in $TMP"
- fi
- exit 1
-}
-
-# return the full path name from a path which may
-# be a full path name or a relative path name
-fullpath(){
- local x
- x=$1
- case $x in
- /*) # do nothing, its an absolute path
- ;;
- *) x=`pwd`/$x
- ;;
- esac
- echo $x
-}
-
-ADD_README=no
-ARCH=`uname -m`
-DEBUG=no
-DUP=yes
-OS=`uname -s`
-RELEASE=`uname -r`
-VERBOSE=no
-VERSION=no
-USE_XTRA=no
-USE_OTHERS=no
-mkisofslog=/dev/null
-
-ALLOW_NO_BIN_ON_CDROM=no
-ALLOW_NO_BIN_ON_FTP=yes
-DVD=no
-
-while
- test -n "$1"
-do
- case "$1"
- in
- # allow NO_BIN_ON_CDROM packages
- -ac) ALLOW_NO_BIN_ON_CDROM=yes
- shift
- ;;
-
- # allow NO_BIN_ON_FTP packages
- -af) ALLOW_NO_BIN_ON_FTP=yes
- shift
- ;;
-
- # enable debugging
- -d) DEBUG=yes
- shift
- ;;
-
- # make a DVD sized image
- -dvd) DVD=yes
- shift
- ;;
-
- # exclude NO_BIN_ON_CDROM packages
- -ec) ALLOW_NO_BIN_ON_CDROM=no
- shift
- ;;
-
- # exclude NO_BIN_ON_FTP packages
- -ef) ALLOW_NO_BIN_ON_FTP=no
- shift
- ;;
-
- # help
- -h|--help) usage
- exit 0
- ;;
-
- # log file for the output of mkisofs -v -v
- -l) mkisofslog=$2
- shift 2
- ;;
-
- # target machine architecture for these packages
- -m) ARCH=$2
- shift 2
- ;;
-
- # do not duplicate packages to avoid inter-CD dependencies
- -n) DUP=no
- shift
- ;;
-
- # target os for these packages
- -o) OS=$2
- shift 2
- ;;
-
- # target os version for these packages
- -r) RELEASE=$2
- shift 2
- ;;
-
- # automatically generate a README.txt file for each CD-ROM
- -R) ADD_README=yes
- shift
- ;;
-
- # be verbose
- -v) VERBOSE=yes
- shift
- ;;
-
- # display version
- -V) VERSION=yes
- shift
- ;;
-
- # extra directory to go on each CD.
- -x) extra=$2
- USE_XTRA=yes
- shift 2
- ;;
-
- # extra directory to go on only 1 CD (pkgsrc.tar.gz for example)
- -X) others=$2
- USE_OTHERS=yes
- shift 2
- ;;
-
- -*) echo "$prog: ERROR: $s is not a valid option"
- usage
- clean_and_exit
- ;;
-
- *) ARGS="$ARGS $1"
- shift
- ;;
- esac
-done
-
-if [ $VERSION = "yes" ]; then
- echo "$prog-$progver"
- rm -fr $TMP
- exit 0
-fi
-
-set -- $ARGS
-
-if [ $# -ne 2 ]; then
- echo "$prog: wrong number of arguments"
- usage
- clean_and_exit
-fi
-
-packages=$1
-cddir=$2
-
-if [ "$VERBOSE" = "yes" ]; then
- echo "Verbose output is on"
-
- if [ "$ALLOW_NO_BIN_ON_CDROM" = "yes" ]; then
- echo "NO_BIN_ON_CDROM Packages will be included in the images"
- else
- echo "NO_BIN_ON_CDROM Packages will be excluded in the images"
- fi
-
- if [ "$ALLOW_NO_BIN_ON_FTP" = "yes" ]; then
- echo "NO_BIN_ON_FTP Packages will be included in the images"
- else
- echo "NO_BIN_ON_FTP Packages will be excluded in the images"
- fi
-
- if [ "$DVD" = "yes" ]; then
- echo "A DVD sized image will be created"
- else
- echo "A CD-ROM sized image will be created"
- fi
-fi
-
-#
-# Make sure all required directories and files exist
-#
-
-if [ ! -d $packages ]; then
- echo "$prog: packages directory \"$packages\" does not exist"
- usage
- clean_and_exit
-else
- packages=`fullpath $packages`
-fi
-
-if [ ! -d $cddir ]; then
- echo "$prog: cd image directory \"$cddir\" does not exist"
- usage
- clean_and_exit
-else
- cddir=`fullpath $cddir`
-fi
-
-if [ "$USE_XTRA" = "yes" -a ! -d $extra ]; then
- echo "$prog: extra directory \"$extra\" specified with -x does not exist"
- usage
- clean_and_exit
-fi
-
-if [ "$USE_XTRA" = "yes" ]; then
- extra=`fullpath $extra`
- XTRA_SIZE=`du -sk $extra | ${AWK} '{print $1}'`
- if [ "$VERBOSE" = "yes" ]; then
- echo "Extra directory full path name is \"$extra\". It contains $XTRA_SIZE kB."
- fi
-else
- XTRA_SIZE=0
-fi
-
-if [ "$USE_OTHERS" = "yes" -a ! -d $others ]; then
- echo "$prog: other files directory \"$others\" specified with -X does not exist"
- usage
- clean_and_exit
-fi
-
-if [ "$USE_OTHERS" = "yes" ]; then
- others=`fullpath $others`
- OTHER_SIZE=`du -sk $others | ${AWK} '{print $1}'`
- if [ "$VERBOSE" = "yes" ]; then
- echo "Other files directory full path name is \"$others\". It contains $OTHER_SIZE kB."
- fi
-else
- OTHER_SIZE=0
-fi
-
-echo " "
-echo "$prog starting: `date`"
-echo " "
-
-#
-# go through all the binary packages and extract their run depends and
-# also any package conflicts.
-#
-# $deptree = this file contains a tsort(1) run depends tree using
-# binary package names.
-#
-
-npkgs=0
-echo "Extracting all dependency information for the binary packages..."
-for pkg in $packages/*
-do
- case $pkg in
- # this allows foo.tgz to have a foo.txt containing some readme info
- # about the file to exist without throwing off cdpack.
- *.txt)
- continue
- ;;
- esac
-
- if [ -f $pkg ]; then
- # extract the packge name
- pkgname=`basename $pkg .tgz`
-
- # extract the packing list
- cat $pkg | (cd $TMP; tar --fast-read -xzf - +BUILD_INFO +CONTENTS)
-
- # extract the depends
- deps=`${AWK} '/^@pkgdep/ {printf("%s ",$2)}' $TMP/+CONTENTS`
-
- # extract any conflicts
- cfls=`${AWK} '/^@pkgcfl/ {printf("%s ",$2)}' $TMP/+CONTENTS`
-
- # check to see if we're allowed to add this package to the CD set
- NO_BIN_ON_CDROM=`${AWK} -F "=" '/NO_BIN_ON_CDROM/ {print $2}' $TMP/+BUILD_INFO`
- if [ ! -z "$NO_BIN_ON_CDROM" ]; then
- if [ "$ALLOW_NO_BIN_ON_CDROM" = "no" ]; then
- echo "EXCLUDED $pkgname: NO_BIN_ON_CDROM=$NO_BIN_ON_CDROM" >> $restricted
- if [ "$VERBOSE" = "yes" ]; then
- echo "Excluding $pkg because NO_BIN_ON_CDROM=$NO_BIN_ON_CDROM"
- echo "$pkgname" >> $exclude
- fi
- else
- echo "INCLUDED $pkgname: NO_BIN_ON_CDROM=$NO_BIN_ON_CDROM" >> $restricted
- fi
- fi
- NO_BIN_ON_FTP=`${AWK} -F "=" '/NO_BIN_ON_FTP/ {print $2}' $TMP/+BUILD_INFO`
- if [ ! -z "$NO_BIN_ON_FTP" ]; then
- if [ "$ALLOW_NO_BIN_ON_FTP" = "no" ]; then
- echo "EXCLUDED $pkgname: NO_BIN_ON_FTP=$NO_BIN_ON_FTP" >> $restricted
- if [ "$VERBOSE" = "yes" ]; then
- echo "Excluding $pkg because NO_BIN_ON_FTP=$NO_BIN_ON_FTP"
- echo "$pkgname" >> $exclude
- fi
- else
- echo "INCLUDED $pkgname: NO_BIN_ON_FTP=$NO_BIN_ON_FTP" >> $restricted
- fi
- fi
-
- # cleanup
- rm $TMP/+CONTENTS $TMP/+BUILD_INFO
-
- # store the results
- echo "$pkgname | $deps | $cfls" >> $depf
-
- # also process all of the listed depends with
- # 'pkg_admin lsbest' to handle glob patterns
- bestdeps=" "
- listed=no
- if [ ! -z "$deps" ]; then
- for dep in $deps
- do
- best=`/usr/sbin/pkg_admin lsbest "${packages}/${dep}"`
- if [ ! -z "$best" ]; then
- best=`basename $best .tgz`
- bestdeps=$bestdeps" "$best
- echo "$best $pkgname" >> $deptree
- listed=yes
- else
- echo "WARNING: $pkgname depends on \"$dep\" which was not found"
- echo "WARNING: $pkgname depends on \"$dep\" which was not found" >> $warnings
- fi
- done
- fi
- if [ "$listed" = "no" ]; then
- # make sure we add ourselves to the tree if we have no depends or if the
- # depends were not found
- echo "$pkgname $pkgname" >> $deptree
- fi
-
- echo "$pkgname | $bestdeps | $cfls" >> $depf2
-
- npkgs=`${EXPR} $npkgs + 1`
- else
- # Don't bomb out on 1 package
- echo "$prog: warning: $pkg not readable"
- fi
-done
-
-echo " "
-echo "Finished extracting dependencies and conflicts for $npkgs binary packages"
-echo " "
-
-#
-# sort the packages in dependency order
-#
-mv $deptree ${deptree}.bak
-${SORT} -u ${deptree}.bak > ${deptree}
-${TSORT} $deptree > $order
-
-#
-# Run the awk program which figures out which packages go on which CD.
-# This program also creates subdirectories and populates them with
-# links to the actual binary pacakges.
-#
-# packages = ARGV[1];
-# cddir = ARGV[2];
-# deptree = ARGV[3];
-# exclude = ARGV[4];
-# order = ARGV[5];
-# cdlist = ARGV[6];
-#
-if [ "$VERBOSE" = "yes" ]; then
- echo "${AWK} -f @prefix@/libexec/cdgen.awk $packages $cddir $deptree $exclude $order $cdlist dup=$DUP verbose=$VERBOSE dvd=$DVD $XTRA_SIZE $OTHER_SIZE"
-fi
-${AWK} -f @prefix@/libexec/cdgen.awk $packages $cddir $deptree $exclude $order $cdlist dup=$DUP verbose=$VERBOSE dvd=$DVD $XTRA_SIZE $OTHER_SIZE
-
-if [ $? -ne 0 ]; then
- echo "$prog: ERROR: cdgen.awk has failed"
- clean_and_exit
-fi
-
-#
-# Generate a README
-#
-if [ "$DVD" = "yes" ]; then
- what="DVD"
- space=" "
-else
- what="CD-ROM"
- space=""
-fi
-
-cat <<EOF > $readme
-This is @DISKNAME@ of a @NDISKS@-disk ${what} collection
-containing binary packages for version ${RELEASE} of
-the ${OS} operating system running on a ${ARCH} platform.
-
-These binary packages were created with the NetBSD packages
-colection (pkgsrc). For information on the NetBSD package
-collection, please visit the NetBSD pkgsrc homepage at
-
- http://www.pkgsrc.org
-
-For more information about the NetBSD project, please visit the
-project's homepage at
-
- http://www.NetBSD.org
-
-EOF
-
-if [ "$DUP" = "yes" ]; then
-cat <<EOF >> $readme
-The packages on this ${what} have been arranged to eliminate all
-inter-${what} dependencies. In other words, each package on this
-${what} should have all of its dependencies (if they are allowed
-to be provided on a ${what}) present on the same ${what}.
-Installation of an individual package on this ${what} should not
-require any swapping of media. Some packages may be duplicated on
-multiple ${what}s.
-
-EOF
-else
-
-cat <<EOF >> $readme
-The packages on this ${what} have been arranged by order of their
-dependencies across the entire @NDISKS@ set of ${what}s. This allows
-you to make a single pass through the ${what} set when installing
-any group of pacakges provided on the set, or when installing or
-loading the entire collection.
-
-EOF
-fi
-
-#
-# NO_BIN_ON_CDROM Comment
-#
-
-if [ "$ALLOW_NO_BIN_ON_CDROM" = "no" ]; then
-cat <<EOF >> $readme
-All packages with NO_BIN_ON_CDROM set have been excluded from
-this ${what} collection.
-EOF
-else
-cat <<EOF >> $readme
-This ${what} collection includes packages with NO_BIN_ON_CDROM set.
-Please do not violate license agreements by selling this ${what}
-without verifying that you are allowed to. A list of these
-packages may be found in the ".restricted" file on this ${what}.
-EOF
-fi
-
-#
-# NO_BIN_ON_FTP Comment
-#
-
-if [ "$ALLOW_NO_BIN_ON_FTP" = "no" ]; then
-cat <<EOF >> $readme
-All packages with NO_BIN_ON_FTP set have been excluded from
-this ${what} collection.
-EOF
-else
-cat <<EOF >> $readme
-This ${what} collection includes packages with NO_BIN_ON_FTP set.
-Please do not violate license agreements by placing this image or
-its contents on a public FTP site without verifying that you are
-allowed to. A list of these packages may be found in the
-".restricted" file on this ${what}.
-EOF
-fi
-
-#
-# cdpack Comment
-#
-cat <<EOF >> $readme
-
-This file, along with the ${what} layout was created using the
-cdpack program which is available as part of the NetBSD
-packages collection at
-
-ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/pkgtools/cdpack/
-
-EOF
-
-#
-# Generate an index file which lists the contents of each CD.
-#
-
-echo "Creating Disk Index File"
-
-numdisks=0
-for cdname in `cat ${cdlist}`
-do
- #
- # cdgen shouldn't have included any restricted pkgs, but
- # make 100% sure now!
- #
- if [ "$VERBOSE" = "yes" ]; then
- echo "Removing any leftover restricted packages from $cdname"
- fi
- for pkg in `cat $exclude`
- do
- rm -f ${cddir}/${cdname}/packages/*/$pkg
- done
-
- if [ "$VERBOSE" = "yes" ]; then
- echo "Creating index for $cdname"
- fi
- for pkg in ${cddir}/${cdname}/packages/All/*
- do
- echo "`basename $pkg` $cdname" >> $indexf
- done
- numdisks=`${EXPR} ${numdisks} + 1`
-done
-mv $indexf ${indexf}.tmp
-${SORT} ${indexf}.tmp > $indexf
-
-#
-# Populate the cd's with the index file and readme
-# actually copy these over since the originals will
-# be deleted from their temporary directories
-#
-# Also make symlinks to the stuff in the extra directory
-# specified with the -x flag.
-#
-
-if [ "$VERBOSE" = "yes" ]; then
- echo "Copying .index and .restricted files to the image directories."
-fi
-
-ncds=0
-for cdname in `cat $cdlist`
-do
- if [ -f $indexf ]; then
- (cd ${cddir}/${cdname} && cp $indexf .index)
- fi
-
- if [ -f $indexf ]; then
- (cd ${cddir}/${cdname} && cp $restricted .restricted)
- fi
-
- if [ "$ADD_README" = "yes" ]; then
- if [ "$VERBOSE" = "yes" ]; then
- echo "Copying README.txt file"
- fi
- (cd ${cddir}/${cdname} && sed -e "s/@DISKNAME@/$cdname/g" \
- -e "s/@NDISKS@/${numdisks}/g" \
- < $readme > README.txt)
- fi
-
- if [ $USE_XTRA = "yes" ]; then
- for f in $extra/*
- do
- (cd ${cddir}/${cdname} && ln -sf $f)
- done
- fi
-
- ncds=`${EXPR} $ncds + 1`
-done
-
-
-if [ "$USE_OTHERS" = "yes" ]; then
- if [ "$VERBOSE" = "yes" ]; then
- echo "Creating symlinks from $others (specified with -X) to ${cddir}/${cdname}"
- fi
- cdname=`tail -1 $cdlist`
- for f in $others/*
- do
- (cd ${cddir}/${cdname} && ln -sf $f)
- done
-fi
-
-#
-# Create the ISO Images
-#
-volid=PkgsrcDisk
-#mkisofs_flags="-f -l -r -J -L -volset-size $ncds -V $volid "
-mkisofs_flags="-v -v -f -l -r -J -L "
-
-echo "Creating the ISO images"
-cdn=1
-for cdname in `cat $cdlist`
-do
- echo "----------- $cdname ----------"
- #mkisofs_flags2=" -volset-ID $cdname -volset-seqno $cdn "
- mkisofs_flags2=" -V ${volid}$cdn "
- echo "( cd ${cddir} && mkisofs $mkisofs_flags $mkisofs_flags2 -o ${cdname}.iso $cdname >> $mkisofslog 2>&1)"
- ( cd ${cddir} && mkisofs $mkisofs_flags $mkisofs_flags2 -o ${cdname}.iso $cdname >> $mkisofslog 2>&1)
- if [ $? != 0 ]; then
- echo "mkisofs failed"
- clean_and_exit
- fi
- cdn=$(($cdn + 1))
-done
-
-echo "ISO Images are available in $cddir"
-
-if [ -f $warnings ]; then
- echo "There were warnings generated:"
- cat $warnings
-fi
-
-echo "-----------------------------------------------------------"
-echo "* Please note: This ${what} set was created with ${space}*"
-echo "* *"
-if [ "$ALLOW_NO_BIN_ON_CDROM" = "no" ]; then
- echo "* - NO_BIN_ON_CDROM packages excluded. *"
-else
- echo "* - NO_BIN_ON_CDROM packages INCLUDED. Please *"
- echo "* verify that you will not violate any licenses *"
- echo "* with this ${what} set. Refer to the /.restricted ${space}*"
- echo "* file which has been placed on each ${what} in the ${space}*"
- echo "* set for details. *"
-fi
-echo "* *"
-if [ "$ALLOW_NO_BIN_ON_FTP" = "no" ]; then
- echo "* - NO_BIN_ON_FTP packages excluded. *"
-else
- echo "* - NO_BIN_ON_FTP packages INCLUDED. You should *"
- echo "* not make this ${what} set available via FTP as it ${space}*"
- echo "* would violate the license on one or more *"
- echo "* packages. Refer to the /.restricted file *"
- echo "* which has been placed on each ${what} in the ${space}*"
- echo "* set for details. *"
-fi
-echo "* *"
-echo "-----------------------------------------------------------"
-
-echo " "
-echo "$prog finished: `date`"
-echo " "
-
-if [ "x$DEBUG" = "xno" ]; then
- rm -fr $TMP
-else
- echo "Debugging output left in $TMP"
-fi
-
-exit 0
diff --git a/pkgtools/createbuildlink/DESCR b/pkgtools/createbuildlink/DESCR
deleted file mode 100644
index f1c7039f65e..00000000000
--- a/pkgtools/createbuildlink/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-This package installs a shell script that will take a Makefile
-and a PLIST file of an existing package and create an initial
-buildlink3.mk file from it. The script tries to interpret the
-contents of the include and lib subdirectories (if any) of the
-package and add the corresponding BUILDLINK files.
diff --git a/pkgtools/createbuildlink/Makefile b/pkgtools/createbuildlink/Makefile
deleted file mode 100644
index bd26e187e3d..00000000000
--- a/pkgtools/createbuildlink/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-# $NetBSD: Makefile,v 1.43 2006/11/02 18:02:07 joerg Exp $
-
-DISTNAME= createbuildlink-3.13
-CATEGORIES= pkgtools sysutils
-MASTER_SITES= # Nothing
-DISTFILES= # Nothing
-
-MAINTAINER= rh@NetBSD.org
-COMMENT= Shell script to help creating buildlink3.mk files
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-PKG_DESTDIR_SUPPORT= user-destdir
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= # empty
-USE_LANGUAGES= # empty
-NO_CHECKSUM= yes
-NO_BUILD= yes
-
-SCRIPT= ${DISTNAME:C/-.*$//}
-SCRIPTS= ${SCRIPT} substplistbasedirs
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man8
-
-do-configure:
-.for scr in ${SCRIPTS}
- ${SED} -e 's|@PKGVERSION@|${PKGVERSION}|' \
- -e 's|@MAKE@|${MAKE}|' \
- < ${FILESDIR:Q}/${scr:Q} > ${WRKSRC:Q}/${scr:Q}
-.endfor
-
-do-install:
-.for scr in ${SCRIPTS}
- ${INSTALL_SCRIPT} ${WRKSRC:Q}/${scr:Q} ${DESTDIR}${PREFIX}/bin/${scr:Q}
-.endfor
- ${INSTALL_MAN} ${FILESDIR:Q}/${SCRIPT:Q}.8 ${DESTDIR}${PREFIX}/${PKGMANDIR:Q}/man8
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/createbuildlink/PLIST b/pkgtools/createbuildlink/PLIST
deleted file mode 100644
index a834cdf995a..00000000000
--- a/pkgtools/createbuildlink/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.4 2004/09/26 23:48:09 rh Exp $
-bin/createbuildlink
-bin/substplistbasedirs
-man/man8/createbuildlink.8
diff --git a/pkgtools/createbuildlink/files/createbuildlink b/pkgtools/createbuildlink/files/createbuildlink
deleted file mode 100755
index 974308c11ea..00000000000
--- a/pkgtools/createbuildlink/files/createbuildlink
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: createbuildlink,v 1.32 2006/07/12 13:29:03 wiz Exp $
-#
-# Copyright (c) 2002 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Rene Hexel.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# Create an initial buildlink3.mk from a package's Makefile and PLIST
-#
-
-REV=`echo '$Revision: 1.32 $' | sed 's/\\$//g'`
-tmpdir=/tmp
-spacesintab=8
-makefile=Makefile
-sedrules=$tmpdir/sedrules.buildlink.$$
-PLIST=PLIST
-CREATEPLSUBST=false
-
-args=`getopt 3p $*`
-if [ $? != 0 ]; then
- echo "Usage: $0 [-p] > buildlink3.mk"
- exit 2
-fi
-set -- $args
-while [ $# -gt 0 ]; do
- case "$1" in
- -3)
- shift;;
- -p)
- CREATEPLSUBST=true
- shift;;
- --)
- shift; break
- ;;
- esac
- shift
-done
-
-##
-## some simple integrity checking
-##
-if [ ! -f $makefile ]; then
- echo "===> Incomplete package! To create a buildlink file <==="
- echo "===> a working $makefile is required! <==="
- exit 1
-fi
-
-##
-## try to find any included Makefile.common's
-##
-commons=`grep '^.include.*Makefile.common\"' $makefile | \
- sed 's/^.*"\(.*\)".*/\1/'`
-
-##
-## package specific variables
-##
-CURDIR=`pwd | sed 's|^.*/\([^/]*/[^/]*\)$|\1|'`
-PKGNAME=`@MAKE@ show-var VARNAME=PKGNAME`
-PKGVER=`echo $PKGNAME | sed -e 's/^.*-//'`
-PKGNOVER=`echo $PKGNAME | sed -e 's/-[^-]*$//'`
-PKGUPPER=`echo $PKGNOVER | tr '[:lower:]' '[:upper:]' | tr - _`
-PREFIX=X11PREFIX
-USE_X11BASE=`@MAKE@ show-var VARNAME=USE_X11BASE`
-if [ -z "$USE_X11BASE" ]; then
- if ! grep "^USE_X11BASE" $makefile $commons > /dev/null; then
- PREFIX=LOCALBASE
- fi
-fi
-
-##
-## create sed rules
-##
-echo >$sedrules "s|@@CURDIR@@|$CURDIR|g"
-echo >>$sedrules "s|@@ID@@|\$NetBSD\$|g"
-echo >>$sedrules "s|@@PKGNAME@@|$PKGNAME|g"
-echo >>$sedrules "s|@@PKGNOVER@@|$PKGNOVER|g"
-echo >>$sedrules "s|@@PKGUPPER@@|$PKGUPPER|g"
-echo >>$sedrules "s|@@PKGVER@@|$PKGVER|g"
-echo >>$sedrules "s|@@PREFIX@@|$PREFIX|g"
-echo >>$sedrules "s|@@REV@@|$REV|g"
-echo >>$sedrules "s|@@PKGVERSION@@|@PKGVERSION@|g"
-
-#
-# buildlink header
-#
-sed -f $sedrules <<EOF
-# @@ID@@
-# XXX
-# XXX This file was created automatically using createbuildlink-@PKGVERSION@.
-# XXX After this file has been verified as correct, the comment lines
-# XXX beginning with "XXX" should be removed. Please do not commit
-# XXX unverified buildlink3.mk files.
-# XXX
-# XXX Packages that only install static libraries or headers should
-# XXX include the following line:
-# XXX
-# XXX BUILDLINK_DEPMETHOD.$PKGNOVER?= build
-
-EOF
-
-gap=" "
-for i in 1 2 3; do
- n=`expr $i \* $spacesintab`
- if [ ${#PKGUPPER} -ge $n ]; then
- gap=" $gap"
- fi
-done
-
-sed -f $sedrules <<EOF
-BUILDLINK_DEPTH:=${gap}\${BUILDLINK_DEPTH}+
-${PKGUPPER}_BUILDLINK3_MK:= \${${PKGUPPER}_BUILDLINK3_MK}+
-EOF
-
-sed -f $sedrules <<EOF
-
-.if \${BUILDLINK_DEPTH} == "+"
-BUILDLINK_DEPENDS+= ${PKGNOVER}
-.endif
-
-BUILDLINK_PACKAGES:= \${BUILDLINK_PACKAGES:N${PKGNOVER}}
-BUILDLINK_PACKAGES+= $PKGNOVER
-BUILDLINK_ORDER:= \${BUILDLINK_ORDER} \${BUILDLINK_DEPTH}$PKGNOVER
-
-.if \${${PKGUPPER}_BUILDLINK3_MK} == "+"
-EOF
-
-sed -f $sedrules <<EOF
-BUILDLINK_API_DEPENDS.$PKGNOVER+= $PKGNOVER>=$PKGVER
-EOF
-
-sed -f $sedrules <<EOF
-BUILDLINK_PKGSRCDIR.$PKGNOVER?= ../../$CURDIR
-EOF
-
-if [ $CREATEPLSUBST = "true" ]; then
- echo ""
- substplistbasedirs
- echo ""
-fi
-
-sed -f $sedrules <<EOF
-.endif # ${PKGUPPER}_BUILDLINK3_MK
-EOF
-
-##
-## buildlinked dependencies
-##
-grep -l '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $makefile $commons \
- >/dev/null 2>&1 && cat <<EOF
-
-# XXX
-# XXX Uncomment and keep only the buildlink3 lines below which are directly
-# XXX needed for dependencies to compile, link, and run. If this package
-# XXX provides a wrappered API or otherwise does not expose the APIs of the
-# XXX buildlink3 lines below to dependencies, remove them.
-# XXX
-EOF
-for i in $makefile $commons ; do
- [ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink3.mk\"' $i |
- egrep -v '/devel/pkg-config/|/textproc/intltool/' | sed 's,^,#,'
-done
-
-sed -f $sedrules <<EOF
-
-BUILDLINK_DEPTH:=${gap}\${BUILDLINK_DEPTH:S/+\$//}
-EOF
-
-rm -f $sedrules
diff --git a/pkgtools/createbuildlink/files/createbuildlink.8 b/pkgtools/createbuildlink/files/createbuildlink.8
deleted file mode 100644
index a36980474e9..00000000000
--- a/pkgtools/createbuildlink/files/createbuildlink.8
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" $NetBSD: createbuildlink.8,v 1.11 2004/09/27 12:55:00 wiz Exp $
-.\"
-.\" Copyright (c) 2002,2004 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Rene Hexel.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd September 27, 2004
-.Dt CREATEBUILDLINK 8
-.Os
-.Sh NAME
-.Nm createbuildlink
-.Nd automatic pkgsrc buildlink3.mk generator
-.Sh SYNOPSIS
-.Nm
-.Op Fl p
-.Sh DESCRIPTION
-.Nm
-reads in the
-.Pa Makefile
-and
-.Pa PLIST
-of a package and creates
-an initial
-.Pa buildlink3.mk
-file on stdout.
-.Pp
-The following options are available:
-.Bl -tag -width indent
-.It Fl p
-Create PRINT_PLIST_AWK substitution patterns for directories created
-and removed by this package.
-This is useful for base packages that create a directory structure
-for a number of dependent packages.
-.El
-.Pp
-While
-.Nm
-is supposed to help starting create a buildlink file
-for a package, it is not intended to fly on autopilot.
-That means that while the script makes some simplistic attempts
-to interpret some elements of the
-.Pa Makefile
-and the
-.Pa PLIST
-such as the contents of the include and lib subdirectories or
-package config scripts, the results should not be put into a
-package directory without some scrutiny.
-.Pp
-Using
-.Nm
-helps maneuver through the initial process of creating a buildlink
-file for a package to be included by depending packages.
-Using
-.Nm
-is less error-prone than copying an existing buildlink file
-as a template and renaming the entries in there.
-.Sh SEE ALSO
-.Xr packages 7 ,
-.Xr url2pkg 8
-.Sh AUTHORS
-.Nm
-was written by
-.An Rene Hexel Aq rh@netbsd.org .
diff --git a/pkgtools/createbuildlink/files/substplistbasedirs b/pkgtools/createbuildlink/files/substplistbasedirs
deleted file mode 100755
index 2266bb01785..00000000000
--- a/pkgtools/createbuildlink/files/substplistbasedirs
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: substplistbasedirs,v 1.2 2004/09/27 00:31:30 rh Exp $
-#
-# Copyright (c) 2002 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Rene Hexel.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# Create substitution patterns for dependent packages for directories listed
-# in a base package
-#
-
-REV=`echo '$Revision: 1.2 $' | sed 's/\\$//g'`
-CURDIR=`pwd | sed 's|^.*/\([^/]*/[^/]*\)$|\1|'`
-PLIST=PLIST
-MDFLAG=true
-
-args=`getopt n $*`
-if [ $? != 0 ]; then
- echo "Usage: $0 [-n]"
- exit 2
-fi
-set -- $args
-while [ $# -gt 0 ]; do
- case "$1" in
- -n)
- MDFLAG=no_mkdir_patterns
- shift;;
- --)
- shift; break
- ;;
- esac
- shift
-done
-
-##
-## some simple integrity checking
-##
-if [ ! -f $PLIST ]; then
- echo "###> Incomplete package! To create a substitution pattern <###"
- echo "###> a working $PLIST is required! <###"
- exit 1
-fi
-
-##
-## create @dirrm substitution patterns
-##
-grep '^@dirrm' $PLIST | sort | sed \
- -e 's|/|\\/|g' \
- -e 's|^|PRINT_PLIST_AWK+= /\^|' \
- -e "s|$|\$\$/ { print \"@comment in ${CURDIR}: \" \$\$0; next; }|"
-
-##
-## create @exec ${MKDIR} removal patterns
-##
-[ "$MDFLAG" != "true" ] || grep '^@dirrm' $PLIST | sort | sed \
- -e 's|/|\\/|g' \
- -e 's|^|PRINT_PLIST_AWK+= /\^|' \
- -e 's|@dirrm |@exec \\$${MKDIR} %D\\/|' \
- -e "s|$|\$\$/ { next; }|"
diff --git a/pkgtools/dfdisk/DESCR b/pkgtools/dfdisk/DESCR
deleted file mode 100644
index 4ba58be389d..00000000000
--- a/pkgtools/dfdisk/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-dfdisk is an utility that adds extra functionality to pkgsrc, allowing it
-to fetch distfiles from multiple locations. It currently supports the
-following methods:
-
-CD-ROM The program manages a CD database where every disk is matched to
- a series of distfiles. Whenever a distfile is requested, the
- program will check if it is known by the database and ask the
- user to place the needed disk in the drive.
-
-Network If a file is not found in the described database, the program
- fallbacks to the network, fetching the file from there (the usual
- method in pkgsrc).
-
-Support for more methods may be added in the future, like for DVD-ROM.
diff --git a/pkgtools/dfdisk/MESSAGE b/pkgtools/dfdisk/MESSAGE
deleted file mode 100644
index 8195d1f5043..00000000000
--- a/pkgtools/dfdisk/MESSAGE
+++ /dev/null
@@ -1,14 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2003/04/17 11:17:15 jmmv Exp $
-
-In order to use dfdisk(1) to automatically fetch distfiles for pkgsrc, add
-the following lines to your /etc/mk.conf file (without indentation):
-
- .if exists(${PREFIX}/bin/dfdisk)
- FETCH_CMD= ${PREFIX}/bin/dfdisk fetch
- .endif
-
-Note that while dfdisk(1) remains unconfigured, your pkgsrc system will
-behave as usual, even if you have added the lines shown above.
-
-===========================================================================
diff --git a/pkgtools/dfdisk/Makefile b/pkgtools/dfdisk/Makefile
deleted file mode 100644
index ac818d61431..00000000000
--- a/pkgtools/dfdisk/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-# $NetBSD: Makefile,v 1.10 2007/01/07 09:14:08 rillig Exp $
-#
-
-DISTNAME= dfdisk-1.0
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= jmmv@NetBSD.org
-COMMENT= Fetch distfiles from multiple locations
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-NO_BUILD= yes
-
-EGDIR= ${PREFIX}/share/examples/dfdisk
-CONF_FILES= ${EGDIR}/dfdisk.conf ${PKG_SYSCONFDIR}/dfdisk.conf
-
-.include "../../mk/bsd.prefs.mk"
-
-.if exists(${ZOULARISBASE}/bin/ftp)
-FILES_SUBST+= FTP="${ZOULARISBASE}/bin/ftp -p"
-.else
-FILES_SUBST+= FTP="/usr/bin/ftp -p"
-.endif
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-
-SUBST_CLASSES+= paths
-SUBST_FILES.paths= dfdisk.sh dfdisk.1 dfdisk.conf
-SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_SED.paths+= -e 's,@PKGVERSION@,${PKGVERSION},g'
-SUBST_SED.paths+= -e 's,@PKGBASE@,${PKGBASE},g'
-SUBST_SED.paths+= -e 's,@FTP@,${FTP},g'
-SUBST_SED.paths+= -e 's,@SH@,${SH},g'
-SUBST_STAGE.paths= post-patch
-
-post-extract:
-.for f in dfdisk.sh dfdisk.1 dfdisk.conf
- ${CP} ${FILESDIR}/${f} ${WRKDIR}/${f}
-.endfor
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/dfdisk.sh ${PREFIX}/bin/dfdisk
- ${INSTALL_DATA} ${WRKDIR}/dfdisk.1 ${PREFIX}/${PKGMANDIR}/man1/dfdisk.1
- ${INSTALL_DATA_DIR} ${EGDIR}
- ${INSTALL_DATA} ${WRKDIR}/dfdisk.conf ${EGDIR}
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/dfdisk/PLIST b/pkgtools/dfdisk/PLIST
deleted file mode 100644
index a24cef14f8d..00000000000
--- a/pkgtools/dfdisk/PLIST
+++ /dev/null
@@ -1,5 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2003/04/17 08:42:00 jmmv Exp $
-bin/dfdisk
-man/man1/dfdisk.1
-share/examples/dfdisk/dfdisk.conf
-@dirrm share/examples/dfdisk
diff --git a/pkgtools/dfdisk/files/TODO b/pkgtools/dfdisk/files/TODO
deleted file mode 100644
index 70ecfdd0e1e..00000000000
--- a/pkgtools/dfdisk/files/TODO
+++ /dev/null
@@ -1,22 +0,0 @@
-- Add a target which determines which are the new distfiles in the DISTDIR
- directory, even if "old" distfiles are there. The target should be able
- to move, copy, link or list those files. For example: "dfdisk new CMD"
- where CMD is a random command (like mv, cp, ln or echo) to run on those
- files.
-
-- Handle distfiles with bad checksums in disks. The program should store
- a checksum of each file (SHA1) in the database and compare it against
- the one in the respective distinfo file before fetching it from that
- specific disk. This means that dfdisk needs a way to know which distinfo
- file to look at...
-
-- If a distfile appears in multiple disks and has different checksums,
- dfdisk should choose the right one.
-
-- If a distfile appears in multiple disks, dfdisk should check if the disk
- in the drive has it before asking the user to change the media.
-
-- Add a way to sort disks by preference when it comes to fetch files.
- Sorting them by date seems the most reasonable choice.
-
-- Clean up the code and fix bugs, of course ;-)
diff --git a/pkgtools/dfdisk/files/dfdisk.1 b/pkgtools/dfdisk/files/dfdisk.1
deleted file mode 100644
index 7c333674fd8..00000000000
--- a/pkgtools/dfdisk/files/dfdisk.1
+++ /dev/null
@@ -1,219 +0,0 @@
-.\" $NetBSD: dfdisk.1,v 1.1.1.1 2003/04/17 11:10:41 jmmv Exp $
-.\"
-.\" dfdisk - Fetch distfiles from multiple locations
-.\" Copyright (c) 2003, Julio Merino <jmmv@netbsd.org>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd April 17, 2003
-.Dt DFDISK 1
-.Os
-.Sh NAME
-.Nm dfdisk
-.Nd fetch distfiles from multiple locations
-.Sh SYNOPSIS
-.Nm
-.Op Fl c Ar conf_file
-.Ar target
-.Op Ar target_args
-.Sh DESCRIPTION
-.Nm
-is an utility that adds extra functionality to pkgsrc, allowing it to
-fetch distfiles from multiple locations.
-It currently supports the following methods:
-.Bl -tag -width XXXXXXX
-.It CD-ROM
-The program manages a CD database where every disk is matched to a
-series of distfiles.
-Whenever a distfile is requested, the program will check if it is known
-by the database and ask the user to place the needed disk in the drive.
-.It Network
-If a file is not found in the described database, the program fallbacks
-to the network, fetching the file from there (the usual method in pkgsrc).
-.El
-.Pp
-The following options are available:
-.Bl -tag -width flag
-.It Fl c
-Path to the configuration file to use.
-Overrides the default
-.Pa @PKG_SYSCONFDIR@/dfdisk.conf .
-.El
-.Ss Configuration file details: dfdisk.conf
-The configuration file is a simple shell script that sets some variable
-values.
-If the
-.Fl c
-flag is not given,
-.Pa @PKG_SYSCONFDIR@/dfdisk.conf
-is used as the default configuration file.
-.Pp
-The following variables ara available:
-.Bl -tag -width XXXXXXXXX
-.It Va CD_DIR
-CD mount point.
-Defaults to
-.Pa /cdrom .
-.It Va CD_MOUNT
-Command to mount the CD media.
-Defaults to
-.Sq mount ${CD_DIR} .
-.It Va CD_UMOUNT
-Command to unmount the CD media.
-Defaults to
-.Sq umount ${CD_DIR} .
-.It Va DBDIR
-Database directory where all disk information is stored.
-Defaults to
-.Pa /var/db/dfdisk .
-.It Va DISTDIR
-Path to pkgsrc's distribution directory, where distfiles are stored
-after downloading them.
-Defaults to
-.Pa /usr/pkgsrc/distfiles .
-This
-.Em must
-match pkgsrc's
-.Va DISTDIR
-variable, as the program uses it to guess the
-.Va DIST_SUBDIR
-for some packages.
-.It Va FTP_CMD
-Command to fetch files from the network, if they were not found in the
-disk database.
-Defaults to
-.Sq @FTP@ .
-.El
-.Ss Disk information file details: dfdisk.info
-Every disk can contain a control file which is read by
-.Nm
-to automatically get information from it.
-That file is called
-.Pa dfdisk.info
-and can be placed anywhere in the disk.
-.Pp
-This file can define the following variables:
-.Bl -tag -width indent
-.It Va dfdisk_name
-Full name of disk.
-Free form text field.
-.It Va dfdisk_subdir
-Relative path to where distfiles are stored in the CD.
-.It Va dfdisk_type
-Disk type.
-The only value allowed for now is
-.Sq cd .
-This variable is not used for now, but must be there for future
-compatibility.
-.El
-.Pp
-WARNING: this file is a shell script and is directly sourced by
-.Nm
-to read its information.
-Therefore it may contain malicious commands that will be executed
-by this program whenever it is read.
-If you have not authored the disk yourself, check the contents of
-this file (if present) before proceeding.
-.Ss Target description
-.Nm
-bases its behavior on the target given to it.
-The following list details all work modes:
-.Bl -tag -width indent
-.It Ar add
-Add the CD disk currently placed in the drive to the database.
-If the disk contains a
-.Pa dfdisk.info
-file, it is automatically read; otherwise, all disk information is
-requested to the user interactively.
-.It Ar clean
-Remove all local distfiles that are known to be stored in some disk.
-This will leave all new files under
-.Va DISTDIR ,
-so you can easily burn them to a new disk after creating a disk
-information file with the
-.Sq mkinfo
-target.
-.It Ar fetch Ar url
-Fetch a distfile, given as an URL.
-The program will search the database for the given file.
-If it is found, the user will be required to put the requested media
-on the drive.
-If it is not found,
-.Va FTP_CMD
-will be used to fetch it from the network; this is why you need to pass
-an URL to this target.
-.It Ar mkinfo Op Ar info_file
-Interactively create a
-.Pa dfdisk.info
-file.
-It will be saved as
-.Ar info_file
-if given; if not, its name will be asked.
-.It Ar remove
-Interactively remove a disk from the database.
-You will not want to use this target.
-.El
-.Sh EXAMPLES
-To enable
-.Nm
-by default within pkgsrc, add the following lines to your
-.Pa /etc/mk.conf
-file:
-.Bd -literal -offset indent
-\&.if exists(@PREFIX@/bin/dfdisk)
-FETCH_CMD= @PREFIX@/bin/dfdisk fetch
-\&.endif
-.Ed
-.Pp
-If you would like any user to be able to fetch files, you can use
-.Xr sudo 8
-to allow them mount the CD drive.
-To do it:
-.Bd -literal -offset indent
-CD_MOUNT="sudo mount /cdrom"
-CD_UMOUNT="sudo umount /cdrom"
-.Ed
-.Pp
-If you have more than one disk registered in your database and you
-plan to leave your computer building stuff for a large period of time,
-it is recommended that you fetch all required distfiles before starting
-the build.
-This way, it will not be interrupted waiting for any user action.
-To do this, you can use pkgsrc's
-.Sq fetch-list
-target, which will call
-.Nm
-for each required file:
-.Bd -literal -offset indent
-$ cd category/package && make fetch-list | sh
-.Ed
-.Sh SEE ALSO
-.Xr ftp 1 ,
-.Xr packages 7 ,
-.Xr sudo 8
-.Sh AUTHORS
-.Nm
-was written by
-.An Julio Merino Aq jmmv@netbsd.org .
diff --git a/pkgtools/dfdisk/files/dfdisk.conf b/pkgtools/dfdisk/files/dfdisk.conf
deleted file mode 100644
index b5bb3081534..00000000000
--- a/pkgtools/dfdisk/files/dfdisk.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-# $NetBSD: dfdisk.conf,v 1.1.1.1 2003/04/17 11:11:42 jmmv Exp $
-#
-# dfdisk.conf - system wide configuration file. See dfdisk(1) for more details.
-#
-
-# Absolute path to database's directory.
-#DBDIR="/var/db/dfdisk"
-
-# Path to pkgsrc's distdir.
-#DISTDIR="/usr/pkgsrc/distfiles"
-
-# CD configuration.
-#CD_DIR="/cdrom"
-#CD_MOUNT="mount ${CD_DIR}"
-#CD_UMOUNT="umount ${CD_DIR}"
-
-# Command to fetch files through the network.
-#FTP_CMD="@FTP@"
diff --git a/pkgtools/dfdisk/files/dfdisk.sh b/pkgtools/dfdisk/files/dfdisk.sh
deleted file mode 100644
index fcdd2c65496..00000000000
--- a/pkgtools/dfdisk/files/dfdisk.sh
+++ /dev/null
@@ -1,501 +0,0 @@
-#!@SH@
-#
-# $NetBSD: dfdisk.sh,v 1.1.1.1 2003/04/17 11:12:52 jmmv Exp $
-#
-# dfdisk - Fetch distfiles from multiple locations
-# Copyright (c) 2003, Julio Merino <jmmv@netbsd.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-ProgName="`basename $0`"
-ProgVersion="@PKGVERSION@"
-ConfFile="@PKG_SYSCONFDIR@/dfdisk.conf"
-# dfdisk_* variables are also considered global
-
-# ------------------------------------------------------------------------
-# Miscellaneous functions
-# ------------------------------------------------------------------------
-
-err() {
- local _code
-
- $CD_UMOUNT 2>/dev/null || true
- _code=$1; shift
- echo "$ProgName: $*"
- exit $_code
-}
-
-warn() {
- echo "WARNING: $*"
-}
-
-quotemeta() {
- local qm_var qm_value
-
- qm_var="$1"
- eval qm_value=\"\$$qm_var\"
-
- qm_char='-e s|\/|\\\/|g'
- qm_char="$qm_char -e s/\./\\\./g"
- qm_char="$qm_char -e s/\?/\\\?/g"
- qm_char="$qm_char -e s/\+/\\\+/g"
- qm_char="$qm_char -e s/\*/\\\*/g"
- qm_char="$qm_char -e s/\\\"/\\\\\"/g"
-
- qm_value="`echo $qm_value | sed $qm_char`"
- eval $qm_var=\"\$qm_value\"
-}
-
-# ------------------------------------------------------------------------
-# CD routines
-# ------------------------------------------------------------------------
-
-cd_mount() {
- $CD_MOUNT
- if [ $? -ne 0 ]; then
- err 1 "mount failed: $CD_MOUNT"
- fi
-}
-
-cd_umount() {
- $CD_UMOUNT
- if [ $? -ne 0 ]; then
- err 1 "umount failed: $CD_UMOUNT"
- fi
-}
-
-cd_current_is() {
- local _mounted _ret _cd _cds
-
- _mounted=yes
- if [ -z "`mount | grep $CD_DIR`" ]; then
- _mounted=no
- $CD_MOUNT 2>/dev/null
- if [ $? -ne 0 ]; then
- return 1
- fi
- fi
-
- _ret=1
- _cds="`cd $DBDIR; ls`"
- for _cd in $_cds; do
- _stamp="`md5 $CD_DIR | cut -d ' ' -f 4`"
- if [ -n "`grep $_stamp $DBDIR/$_cd/info`" ]; then
- _ret=0
- break
- fi
- done
-
- if [ "$_mounted" = "no" ]; then
- $CD_UMOUNT 2>/dev/null
- fi
-
- return $_ret
-}
-
-# ------------------------------------------------------------------------
-# Add target
-# ------------------------------------------------------------------------
-
-do_add() {
- local _info _stamp _dir
-
- if [ ! -d "$DBDIR" ]; then
- mkdir -p "$DBDIR" >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- err 1 "cannot create \`$DBDIR'; permission denied?"
- fi
- elif [ ! -w "$DBDIR" ]; then
- err 1 "cannot write to \`$DBDIR'; permission denied?"
- fi
-
- cd_mount
- _stamp="`md5 $CD_DIR | cut -d ' ' -f 4`"
- echo "Media ID: $_stamp"
-
- _dir="$DBDIR/$_stamp"
- if [ -d "$_dir" ]; then
- cd_umount
- err 1 "this CD is already registered"
- fi
-
- echo "Scanning CD (searching a dfdisk.info file)..."
- _info="`find $CD_DIR -name dfdisk.info -print`"
-
- # Fill in the CD info file
- if [ -n "$_info" ]; then
- echo "Found, using $_info:"
- . "$_info"
- echo "- Disk name: $dfdisk_name"
- echo "- Path to distfiles: $dfdisk_subdir"
- mkdir -p $_dir
- cp -f "$_info" $_dir/info
- chmod 644 $_dir/info
- else
- echo "No dfdisk.info file found; enter data manually."
- ask_info
- if [ ! -d "$CD_DIR/$dfdisk_subdir" ]; then
- err 1 "the specified directory cannot be found"
- fi
- mkdir -p $_dir
- write_info $_dir/info
- fi
-
- # Store stamp in local control file
- echo >> $_dir/info
- echo "# Appended by @PKGBASE@ @PKGVERSION@" >> $_dir/info
- echo "# `date`" >> $_dir/info
- echo "dfdisk_stamp=$_stamp" >> $_dir/info
-
- # Generate file list
- echo "Generating file list..."
- ( cd $CD_DIR && find $dfdisk_subdir -type f -print > $_dir/contents )
- chmod 644 $_dir/contents
- cd_umount
-}
-
-# ------------------------------------------------------------------------
-# Clean target
-# ------------------------------------------------------------------------
-
-do_clean() {
- local _cds _cd _files _file _f _found
-
- if [ -d $DBDIR ]; then
- _cds="`cd $DBDIR; ls`"
- if [ -z "$_cds" ]; then
- echo "No known disks; nothing to be done."
- else
- echo "Removing files..."
- _files="`find $DISTDIR -type f -print`"
- for _file in $_files; do
- _f="`echo $_file | sed -e s,$DISTDIR,,`"
- quotemeta _f
- _found=""
- for _cd in $_cds; do
- if [ -n "`egrep $_f\$ $DBDIR/$_cd/contents`" ]; then
- _found=yes
- break
- fi
- done
- if [ -n "$_found" ]; then
- rm -f $_file
- fi
- done
- echo "Removing empty directories..."
- rmdir -p `find $DISTDIR -type d -print` 2>/dev/null || true
- fi
- else
- echo "No known disks; nothing to be done."
- fi
-}
-
-# ------------------------------------------------------------------------
-# Fetch target
-# ------------------------------------------------------------------------
-
-do_fetch() {
- local _cds _cd _qdn _url _subdir _distname _found _res _key
-
- _url="$1"
-
- if [ -z "`pwd | grep $DISTDIR`" ]; then
- warn "you are not inside the distdir tree!"
- echo
- _subdir=""
- else
- _subdir="`pwd | sed -e s,$DISTDIR,,`/"
- fi
-
- set -- `echo $_url | tr '/' ' '`
- while [ $# -gt 1 ]; do shift; done
- _distname="$1"
-
- if [ ! -d $DBDIR ]; then
- echo "No disks registered in the database."
- fetch_ftp $_url
- return
- fi
-
- _cds="`cd $DBDIR; ls`"
- _found=""
- _qdn="$_distname"
- quotemeta _qdn
- for _cd in $_cds; do
- _res=`egrep "$_subdir$_qdn\$" $DBDIR/$_cd/contents`
- if [ -n "$_res" ]; then
- . $DBDIR/$_cd/info
- _found="$_cd"; break
- fi
- done
-
- if [ -z "$_found" ]; then
- echo "$_distname not found in the database."
- fetch_ftp $_url
- else
- . "$DBDIR/$_found/info"
- echo "$_distname found in the database."
-
- while ! cd_current_is $dfdisk_stamp; do
- echo "Wrong disk in drive (or no disk). You can:"
- echo "- Insert the CD given below and press [RETURN]"
- echo " $dfdisk_name"
- echo "- Type \`1' and press [RETURN] to refetch the file from the network"
- echo " $_url"
- printf "Your choice> "
- read _key
- if [ "$_key" = "1" ]; then
- fetch_ftp $_url
- return
- fi
- # The default action (fetch from CD) is handled outside the
- # while loop.
- done
-
- echo "Copying `basename $1` to `pwd`"
- cd_mount
- cp "$CD_DIR/$dfdisk_subdir/$_subdir/$_distname" .
- cd_umount
- fi
-}
-
-fetch_ftp() {
- echo "Using \`$FTPCMD' to fetch $1"
- $FTPCMD $1
-}
-
-# -------------------------------------------------------------------------
-# Mkinfo target
-# -------------------------------------------------------------------------
-
-do_mkinfo() {
- local _file
-
- _file="$1"
-
- ask_info
-
- if [ -z "$_file" ]; then
- printf "Enter file name [$DISTDIR/dfdisk.info]: "
- read _file
- if [ -z "$_file" ]; then
- _file="$DISTDIR/dfdisk.info"
- fi
- fi
-
- write_info $_file
- echo "File saved as \`$_file'"
-}
-
-write_info() {
- cat > $1 <<EOF
-#
-# File automatically generated by @PKGBASE@ @PKGVERSION@
-# `date`
-#
-
-dfdisk_name="$dfdisk_name"
-dfdisk_subdir="$dfdisk_subdir"
-dfdisk_type="cd"
-EOF
-}
-
-ask_info() {
- dfdisk_name=""
- printf "Enter disk name [pkgsrc distfiles `date +%Y%m%d`]: "
- read dfdisk_name
- if [ -z "$dfdisk_name" ]; then
- dfdisk_name="pkgsrc distfiles `date +%Y%m%d`"
- fi
-
- dfdisk_subdir=""
- while [ -z "$dfdisk_subdir" ]; do
- printf "Enter relative path to distfiles: "
- read dfdisk_subdir
- done
-}
-
-# ------------------------------------------------------------------------
-# Remove target
-# ------------------------------------------------------------------------
-
-do_remove() {
- local _cds _cd _count _ans
-
- if [ ! -d "$DBDIR" ]; then
- echo "No known disks; nothing to be done."
- return 0
- fi
-
- _cds="`cd $DBDIR; ls`"
- if [ -z "$_cds" ]; then
- echo "No known disks; nothing to be done."
- return 0
- fi
-
- if [ ! -w "$DBDIR" ]; then
- err 1 "cannot write to \`$DBDIR'; permission denied?"
- fi
-
- # Print menu
- echo "List of disks in the database:"
- echo "0 - Exit"
- _count=1
- for _cd in $_cds; do
- . $DBDIR/$_cd/info
- echo "$_count - $dfdisk_name"
- _count=$(($_count + 1))
- done
-
- # Wait for an answer
- _ans=""
- while [ -z "$_ans" ]; do
- printf "Remove> "
- read _ans
- done
-
- # Parse answer
- if [ "$_ans" -ne 0 ]; then
- _count=1
- for _cd in $_cds; do
- if [ "$_count" -eq "$_ans" ]; then
- . $DBDIR/$_cd/info
- rm -f $DBDIR/$_cd/contents
- rm -f $DBDIR/$_cd/info
- rmdir $DBDIR/$_cd
- echo "\`$dfdisk_name' removed successfully"
- break
- fi
- _count=$(($_count + 1))
- done
- fi
-}
-
-# ------------------------------------------------------------------------
-# Main program
-# ------------------------------------------------------------------------
-
-usage() {
- echo "usage: $ProgName [-c conf_file] target [target_args]"
- echo
- echo "Available targets:"
- echo " add Add a disk to the database interactively."
- echo " clean Remove local distfiles known to be in disks."
- echo " fetch url Fetch a distfile from a disk or the network."
- echo " mkinfo [file] Interactively create a dfdisk.info file."
- echo " remove Remove a disk from the database interactively."
- echo
- echo "See dfdisk(1) for more information."
- exit $1
-}
-
-show_banner() {
- echo "@PKGBASE@ $ProgVersion ==> $Target"
-}
-
-silent_umount() {
- $CD_UMOUNT 2>/dev/null || true
-}
-
-args=`getopt c: $*`
-if [ $? -ne 0 ]; then
- usage 2
-fi
-set -- $args
-while [ $# -gt 0 ]; do
- case "$1" in
- -c)
- ConfFile="$2"; shift
- ;;
- --)
- shift; break
- ;;
- esac
- shift
-done
-
-# Read configuration file
-if [ -f "$ConfFile" ]; then
- . $ConfFile
-fi
-
-# Set configuration defaults
-: ${DBDIR:=/var/db/dfdisk}
-: ${CD_DIR:=/cdrom}
-: ${CD_MOUNT:="mount ${CD_DIR}"}
-: ${CD_UMOUNT:="umount ${CD_DIR}"}
-: ${DISTDIR:=/usr/pkgsrc/distfiles}
-: ${FTPCMD:="@FTP@"}
-
-if [ $# -eq 0 ]; then
- echo "$ProgName: no target specified"
- usage 2
-fi
-
-Target="$1"; shift
-TargetArgs="$*"
-
-trap "silent_umount ; echo ; exit 1" INT QUIT
-
-case "$Target" in
- add)
- show_banner
- do_add
- ;;
- clean)
- show_banner
- do_clean
- ;;
- fetch)
- if [ -z "$TargetArgs" ]; then
- usage 2
- fi
-
- while [ $# -gt 0 -a -z "`echo $1 | egrep '^(ftp|http)://'`" ]; do
- shift
- done
- if [ $# -eq 0 ]; then
- err 1 "the \`fetch' target expects an url"
- fi
- show_banner
- do_fetch $1
- ;;
- mkinfo)
- show_banner
- do_mkinfo $1
- ;;
- remove)
- show_banner
- do_remove
- ;;
- *)
- echo "$ProgName: unknown target \`$Target'"
- usage 2
- ;;
-esac
-
-exit
diff --git a/pkgtools/digest/DESCR b/pkgtools/digest/DESCR
deleted file mode 100644
index 316f6a050fb..00000000000
--- a/pkgtools/digest/DESCR
+++ /dev/null
@@ -1,12 +0,0 @@
-This utility is a wrapper for the
-
- + md5(3),
- + rmd160(3),
- + sha1(3),
- + sha256,
- + sha384
- + sha512
- + tiger
- + whirlpool
-
-message digest routines.
diff --git a/pkgtools/digest/Makefile b/pkgtools/digest/Makefile
deleted file mode 100644
index 87d8c7aded9..00000000000
--- a/pkgtools/digest/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile,v 1.52 2006/11/02 18:02:07 joerg Exp $
-#
-# When adding new digest algorithms, please use rmd160 as the template,
-# and bump the VERSION definition.
-
-DISTNAME?= digest-${VERSION}
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER?= agc@NetBSD.org
-HOMEPAGE?= http://www.NetBSD.org/Documentation/software/packages.html
-COMMENT?= Message digest wrapper utility
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-PKG_DESTDIR_SUPPORT= user-destdir
-
-GNU_CONFIGURE= yes
-
-NO_PKGTOOLS_REQD_CHECK= yes
-NO_CHECKSUM= yes
-NO_MTREE= yes
-
-# XXX Remove the following line after pkgsrc/bootstrap is up and
-# XXX running.
-USE_NATIVE_GCC= yes
-
-.include "../../mk/bsd.prefs.mk"
-
-VERSION!= ${AWK} -F "'" '/^PACKAGE_VERSION=/ {print $$2}' \
- ${FILESDIR}/configure
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-pre-install:
- -@${MKDIR} ${DESTDIR}${PKG_DBDIR}
-
-do-test:
- @${ECHO} "No news is good news"
- @cd ${WRKSRC} && ${SETENV} DIGESTDIR=${WRKSRC} ${SH} ./regress.sh
- @${ECHO} "All tests completed"
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/digest/PLIST b/pkgtools/digest/PLIST
deleted file mode 100644
index 9a76c202660..00000000000
--- a/pkgtools/digest/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2002/12/21 04:06:10 schmonz Exp $
-bin/digest
-man/man1/digest.1
diff --git a/pkgtools/digest/files/AUTHORS b/pkgtools/digest/files/AUTHORS
deleted file mode 100644
index faece3bc8c5..00000000000
--- a/pkgtools/digest/files/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-The digest utility was written by Alistair G. Crooks (agc@netbsd.org).
diff --git a/pkgtools/digest/files/COPYING b/pkgtools/digest/files/COPYING
deleted file mode 100644
index 222b0f91010..00000000000
--- a/pkgtools/digest/files/COPYING
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Alistair G. Crooks.
- * 4. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
diff --git a/pkgtools/digest/files/DESCR b/pkgtools/digest/files/DESCR
deleted file mode 100644
index 3adfb61977e..00000000000
--- a/pkgtools/digest/files/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-This utility is a wrapper for the md5(3), rmd160(3), and sha1, sha256,
-sha384 and sha512 routines.
diff --git a/pkgtools/digest/files/INSTALL b/pkgtools/digest/files/INSTALL
deleted file mode 100644
index b42a17ac464..00000000000
--- a/pkgtools/digest/files/INSTALL
+++ /dev/null
@@ -1,182 +0,0 @@
-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, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
-
- 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 at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
-
- The file `configure.in' is used to create `configure' by a program
-called `autoconf'. You only need `configure.in' 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. You can give `configure'
-initial values for variables by setting them in the environment. Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
- CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-
-Or on systems that have the `env' program, you can do it like this:
- env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
-
-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 supports 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' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on. Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
- CPU-COMPANY-SYSTEM
-
-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 host type.
-
- If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
-
-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.
-
-Operation Controls
-==================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--cache-file=FILE'
- Use and save the results of the tests in FILE instead of
- `./config.cache'. Set FILE to `/dev/null' to disable caching, for
- debugging `configure'.
-
-`--help'
- Print a summary of the options to `configure', and exit.
-
-`--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.
-
-`--version'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`configure' also accepts some other, not widely useful, options.
diff --git a/pkgtools/digest/files/Makefile.in b/pkgtools/digest/files/Makefile.in
deleted file mode 100644
index e9ecb75dd89..00000000000
--- a/pkgtools/digest/files/Makefile.in
+++ /dev/null
@@ -1,168 +0,0 @@
-# $Id: Makefile.in,v 1.4 2005/03/23 14:32:19 agc Exp $
-
-@SET_MAKE@
-SHELL = @SHELL@
-VPATH=@srcdir@
-
-PACKAGE_NAME= @PACKAGE_NAME@
-PACKAGE_VERSION= @PACKAGE_VERSION@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-mandir = @mandir@
-top_builddir = .
-
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-mkinstalldirs = $(SHELL) $(srcdir)/mkinstalldirs
-install_sh = $(SHELL) $(srcdir)/install-sh
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
-host_alias = @host_alias@
-host_triplet = @host@
-CANONICAL_HOST = @CANONICAL_HOST@
-
-CC = @CC@
-CCLD= $(CC)
-LIBS= @LIBS@
-CPPFLAGS= @CPPFLAGS@
-DEFS= @DEFS@ -I. -I@srcdir@ -DHOST=\"$(CANONICAL_HOST)\" -DVERSION=\"$(PACKAGE_VERSION)\"
-CFLAGS= @CFLAGS@
-LDFLAGS= @LDFLAGS@
-
-LINK= $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
-COMPILE= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)
-
-digest_OBJS = digest.o md5c.o rmd160.o rmd160hl.o sha2.o sha2hl.o \
-md5hl.o sha1.o sha1hl.o tiger.o whirlpool.o
-bits_OBJS = bits.o
-
-SRCS= digest.c md5c.c rmd160.c rmd160hl.c sha2.c sha2hl.c md5hl.c sha1.c \
-sha1hl.c bits.c md5.h rmd160.h sha1.h sha2.h tiger.c tiger.h whirlpool.c \
-whirlpool.h
-
-DISTFILES= $(SRCS) AUTHORS COPYING DESCR INSTALL Makefile.in NEWS aclocal.m4 \
-config.guess config.h.in config.sub configure configure.ac install-sh \
-missing mkinstalldirs regress.sh
-
-.c.o:
- $(COMPILE) -c $< -o $@
-
-all: digest
-
-digest-types.h: bits
- ./bits digest-types.h
-
-bits: bits.o
- $(LINK) $(bits_OBJS) $(LIBS)
-
-digest: $(digest_OBJS)
- $(LINK) $(digest_OBJS) $(LIBS)
-
-check: digest
- @SHELL@ $(srcdir)/regress.sh
-
-digest.o: digest-types.h
-md5c.o: digest-types.h
-rmd160.o: digest-types.h
-rmd160hl.o: digest-types.h
-sha2.o: digest-types.h
-sha2hl.o: digest-types.h
-md5hl.o: digest-types.h
-sha1.o: digest-types.h
-sha1hl.o: digest-types.h
-tiger.o: digest-types.h
-whirlpool.o: digest-types.h
-
-clean:
- rm -f *.o digest bits digest-types.h
-
-distclean: clean
- rm -f Makefile config.h
- rm -f config.status config.cache config.log
-
-maintainer-clean: distclean
- rm -f configure config.h.in
-
-install: digest
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- @f=`echo digest|sed '$(transform)'`; \
- echo "$(INSTALL_PROGRAM) digest $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM) digest $(DESTDIR)$(bindir)/$$f
- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
- @f=`echo digest.1|sed '$(transform)'`; \
- echo "$(INSTALL_DATA) digest.1 $(DESTDIR)$(mandir)/man1/$$f"; \
- $(INSTALL_DATA) digest.1 $(DESTDIR)$(mandir)/man1/$$f
-
-uninstall:
- @f=`echo digest|sed '$(transform)'`; \
- echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
- rm -f $(DESTDIR)$(bindir)/$$f
-
-GZIP_ENV= --best
-TAR= tar
-distdir= $(PACKAGE_NAME)-$(PACKAGE_VERSION)
-
-distdir: $(DISTFILES)
- -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
- mkdir $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
- fi; \
- if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
-
-dist: distdir
- $(TAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
-
-distcheck: dist
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(TAR) xf -
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- chmod a-w $(distdir)
- dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
- && cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) uninstall \
- && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
- || (echo "Error: files left after uninstall" 1>&2; \
- exit 1) ) \
- && $(MAKE) dist \
- && $(MAKE) distclean \
- && rm -f $(distdir).tar.gz \
- && (test `find . -type f -print | wc -l` -eq 0 \
- || (echo "Error: files left after distclean" 1>&2; \
- exit 1) )
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
- @echo "$(distdir).tar.gz is ready for distribution" | \
- sed 'h;s/./=/g;p;x;p;x'
diff --git a/pkgtools/digest/files/NEWS b/pkgtools/digest/files/NEWS
deleted file mode 100644
index 9f5538d2400..00000000000
--- a/pkgtools/digest/files/NEWS
+++ /dev/null
@@ -1,29 +0,0 @@
-* 2002/09/23
- Bugfix only for OSF1 4.x. Thanks to Simon Burge <simonb@netbsd.org>
- for catching it.
-
-* version 20010807.1
- Sources synced with NetBSD digest version 20010807: minor bug fix.
-
- Automake is no more used.
- Memset/bzero, memcpy,bcopy usage cleanup.
- Version number is now <NetBSD-version-number>.<portable-version-number>
- this could help various things...
-
-* version 20010709p1
- Sources synced with NetBSD digest version 20010709: portability fixes.
-
- Tested on :
- hppa1.1-hp-hpux11.00 with gcc 2.92.2
- hppa1.1-hp-hpux11.00 with HP92453-01 A.11.01.21505.GP HP C Compiler
- hppa-hp-hpux10.20 with gcc 2.95.1
- hppa-hp-hpux10.20 with HP92453-01 A.10.32.20 HP C Compiler
- sparc-sun-solaris2.8 with gcc 2.95.2
- sparc-sun-solaris2.7 with gcc 2.95.2
- sparc-unknown-netbsdelf1.5.1 with egcs-1.1.2 (bundled cc)
- sparc-unknown-netbsd1.2.1 with gcc 2.7.2 (bundled cc)
- i386-unknown-openbsd2.9 with gcc 2.95.2 (bundled cc)
- i386-unknown-freebsd4.1.1 with gcc 2.95.2 (bundled cc)
-
-* version 20010320p1
- First release based on NetBSD digest version 20010320.
diff --git a/pkgtools/digest/files/PLIST b/pkgtools/digest/files/PLIST
deleted file mode 100644
index fb2eb8e2ea1..00000000000
--- a/pkgtools/digest/files/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2002/12/21 04:06:12 schmonz Exp $
-bin/digest
diff --git a/pkgtools/digest/files/README b/pkgtools/digest/files/README
deleted file mode 100644
index 2da2579e3b7..00000000000
--- a/pkgtools/digest/files/README
+++ /dev/null
@@ -1,2 +0,0 @@
-The digest utility is a wrapper for the md5, sha1, sha256, sha384, sha512 and
-rmd160 message digest algorithms. It first appeared in NetBSD 1.6.
diff --git a/pkgtools/digest/files/aclocal.m4 b/pkgtools/digest/files/aclocal.m4
deleted file mode 100644
index ac5b591a4d9..00000000000
--- a/pkgtools/digest/files/aclocal.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl $Id: aclocal.m4,v 1.2 2006/03/01 16:44:28 joerg Exp $
-
-dnl From heimdal sources
-dnl Id: c-attribute.m4,v 1.5 2004/08/26 12:35:41 joda Exp
-dnl
-
-dnl
-dnl Test for __attribute__
-dnl
-
-AC_DEFUN([AC_C___ATTRIBUTE__], [
-AC_MSG_CHECKING(for __attribute__)
-AC_CACHE_VAL(ac_cv___attribute__, [
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
- exit(1);
-}
-]])],
-[ac_cv___attribute__=yes],
-[ac_cv___attribute__=no])])
-if test "$ac_cv___attribute__" = "yes"; then
- AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
-fi
-AC_MSG_RESULT($ac_cv___attribute__)
-])
-
diff --git a/pkgtools/digest/files/bits.c b/pkgtools/digest/files/bits.c
deleted file mode 100644
index 9e4a82e0e1c..00000000000
--- a/pkgtools/digest/files/bits.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the Institute nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-__RCSID("$Id: bits.c,v 1.1 2002/12/21 04:06:13 schmonz Exp $");
-#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#define BITSIZE(TYPE) \
-{ \
- int b = 0; TYPE x = 1, zero = 0; char *pre = "u"; \
- char tmp[128], tmp2[128]; \
- while(x){ x <<= 1; b++; if(x < zero) pre=""; } \
- if(b >= len){ \
- int tabs; \
- sprintf(tmp, "%sint%d_t" , pre, len); \
- sprintf(tmp2, "typedef %s %s;", #TYPE, tmp); \
- tabs = 5 - strlen(tmp2) / 8; \
- fprintf(f, "%s", tmp2); \
- while(tabs-- > 0) fprintf(f, "\t"); \
- fprintf(f, "/* %2d bits */\n", b); \
- return; \
- } \
-}
-
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
-static void
-try_signed(FILE *f, int len) __attribute__ ((unused));
-
-static void
-try_unsigned(FILE *f, int len) __attribute__ ((unused));
-
-static int
-print_bt(FILE *f, int flag) __attribute__ ((unused));
-
-static void
-try_signed(FILE *f, int len)
-{
- BITSIZE(signed char);
- BITSIZE(short);
- BITSIZE(int);
- BITSIZE(long);
-#ifdef HAVE_LONG_LONG
- BITSIZE(long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-static void
-try_unsigned(FILE *f, int len)
-{
- BITSIZE(unsigned char);
- BITSIZE(unsigned short);
- BITSIZE(unsigned int);
- BITSIZE(unsigned long);
-#ifdef HAVE_LONG_LONG
- BITSIZE(unsigned long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-int main(int argc, char **argv)
-{
- FILE *f;
- char *fn, *hb;
-
- if(argc < 2){
- fn = "bits.h";
- hb = "__BITS_H__";
- f = stdout;
- } else {
- char *p;
- fn = argv[1];
- hb = malloc(strlen(fn) + 5);
- sprintf(hb, "__%s__", fn);
- for(p = hb; *p; p++){
- if(!isalnum((unsigned char)*p))
- *p = '_';
- }
- f = fopen(argv[1], "w");
- }
- fprintf(f, "/* %s -- this file was generated for %s by\n", fn, HOST);
- fprintf(f, " %*s %s */\n\n", (int)strlen(fn), "",
- "$Id: bits.c,v 1.1 2002/12/21 04:06:13 schmonz Exp $");
- fprintf(f, "#ifndef %s\n", hb);
- fprintf(f, "#define %s\n", hb);
- fprintf(f, "\n");
-#ifdef HAVE_SYS_TYPES_H
- fprintf(f, "#include <sys/types.h>\n");
-#endif
-#ifdef HAVE_INTTYPES_H
- fprintf(f, "#include <inttypes.h>\n");
-#endif
-#ifdef HAVE_SYS_BITYPES_H
- fprintf(f, "#include <sys/bitypes.h>\n");
-#endif
-#ifdef HAVE_BIND_BITYPES_H
- fprintf(f, "#include <bind/bitypes.h>\n");
-#endif
-#ifdef HAVE_NETINET_IN6_MACHTYPES_H
- fprintf(f, "#include <netinet/in6_machtypes.h>\n");
-#endif
- fprintf(f, "\n");
-
-#ifndef HAVE_INT8_T
- try_signed (f, 8);
-#endif /* HAVE_INT8_T */
-#ifndef HAVE_INT16_T
- try_signed (f, 16);
-#endif /* HAVE_INT16_T */
-#ifndef HAVE_INT32_T
- try_signed (f, 32);
-#endif /* HAVE_INT32_T */
-#ifndef HAVE_INT64_T
- try_signed (f, 64);
-#endif /* HAVE_INT64_T */
-
-#ifndef HAVE_UINT8_T
- try_unsigned (f, 8);
-#endif /* HAVE_UINT8_T */
-#ifndef HAVE_UINT16_T
- try_unsigned (f, 16);
-#endif /* HAVE_UINT16_T */
-#ifndef HAVE_UINT32_T
- try_unsigned (f, 32);
-#endif /* HAVE_UINT32_T */
-#ifndef HAVE_UINT64_T
- try_unsigned (f, 64);
-#endif /* HAVE_UINT64_T */
-
-#define X(S) fprintf(f, "typedef uint" #S "_t u_int" #S "_t;\n")
-#ifndef HAVE_U_INT8_T
- X(8);
-#endif /* HAVE_U_INT8_T */
-#ifndef HAVE_U_INT16_T
- X(16);
-#endif /* HAVE_U_INT16_T */
-#ifndef HAVE_U_INT32_T
- X(32);
-#endif /* HAVE_U_INT32_T */
-#ifndef HAVE_U_INT64_T
- X(64);
-#endif /* HAVE_U_INT64_T */
-
- fprintf(f, "#endif /* %s */\n", hb);
- return 0;
-}
diff --git a/pkgtools/digest/files/config.guess b/pkgtools/digest/files/config.guess
deleted file mode 100755
index 0f0fe712ae6..00000000000
--- a/pkgtools/digest/files/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /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 Free Software Foundation,
-# Inc.
-
-timestamp='2007-03-06'
-
-# 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted 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.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-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
-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' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# 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" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { 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 __ELF__ >/dev/null
- 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 ;;
- 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:SunOS:5.*:*)
- echo i386-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:*:[45])
- 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 __LP64__ >/dev/null
- 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*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-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 ;;
- 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 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- 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 ;;
- 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:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- 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 ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-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 ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*)
- 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 i386.
- echo i386-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; } ;;
- 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.0*:*)
- 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 ;;
- 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
- 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 ;;
- 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 ;;
-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://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-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/pkgtools/digest/files/config.h.in b/pkgtools/digest/files/config.h.in
deleted file mode 100644
index 50a9632454c..00000000000
--- a/pkgtools/digest/files/config.h.in
+++ /dev/null
@@ -1,271 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY
-
-/* Define to 1 if you have the `bzero' function. */
-#undef HAVE_BZERO
-
-/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
- don't. */
-#undef HAVE_DECL_STRERROR_R
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* 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 the system has the type `int16_t'. */
-#undef HAVE_INT16_T
-
-/* Define to 1 if the system has the type `int32_t'. */
-#undef HAVE_INT32_T
-
-/* Define to 1 if the system has the type `int64_t'. */
-#undef HAVE_INT64_T
-
-/* Define to 1 if the system has the type `int8_t'. */
-#undef HAVE_INT8_T
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if the system has the type `long long'. */
-#undef HAVE_LONG_LONG
-
-/* Define to 1 if you have the <machine/endian.h> header file. */
-#undef HAVE_MACHINE_ENDIAN_H
-
-/* Define to 1 if you have the `memcpy' function. */
-#undef HAVE_MEMCPY
-
-/* 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 `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strerror_r' function. */
-#undef HAVE_STRERROR_R
-
-/* 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 <sys/bitypes.h> header file. */
-#undef HAVE_SYS_BITYPES_H
-
-/* Define to 1 if you have the <sys/byteorder.h> header file. */
-#undef HAVE_SYS_BYTEORDER_H
-
-/* Define to 1 if you have the <sys/cdefs.h> header file. */
-#undef HAVE_SYS_CDEFS_H
-
-/* Define to 1 if you have the <sys/endian.h> header file. */
-#undef HAVE_SYS_ENDIAN_H
-
-/* Define to 1 if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_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/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if the system has the type `uint16_t'. */
-#undef HAVE_UINT16_T
-
-/* Define to 1 if the system has the type `uint32_t'. */
-#undef HAVE_UINT32_T
-
-/* Define to 1 if the system has the type `uint64_t'. */
-#undef HAVE_UINT64_T
-
-/* Define to 1 if the system has the type `uint8_t'. */
-#undef HAVE_UINT8_T
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if the system has the type `u_int16_t'. */
-#undef HAVE_U_INT16_T
-
-/* Define to 1 if the system has the type `u_int32_t'. */
-#undef HAVE_U_INT32_T
-
-/* Define to 1 if the system has the type `u_int64_t'. */
-#undef HAVE_U_INT64_T
-
-/* Define to 1 if the system has the type `u_int8_t'. */
-#undef HAVE_U_INT8_T
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* define if your compiler has __attribute__ */
-#undef HAVE___ATTRIBUTE__
-
-/* 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 version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if strerror_r returns char *. */
-#undef STRERROR_R_CHAR_P
-
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-
-
-#ifndef HAVE___ATTRIBUTE__
-# define __attribute__(x)
-#endif
-
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
-#ifndef __IDSTRING
-# define __IDSTRING(name,string) \
- static const char name[] __attribute__((__unused__)) = string
-#endif
-
-#ifndef __RCSID
-# define __RCSID(_s) __IDSTRING(rcsid,_s)
-#endif
-
-#ifndef __COPYRIGHT
-# define __COPYRIGHT(_s) __IDSTRING(copyright,_s)
-#endif
-
-#ifndef __P
-# if defined(__STDC__) || defined(__cplusplus)
-# define __P(protos) protos /* full-blown ANSI C */
-# else
-# define __P(protos) () /* traditional C preprocessor */
-# endif
-#endif
-
-#ifndef __CONCAT
-# if defined(__STDC__) || defined(__cplusplus)
-# define __CONCAT(x,y) x ## y
-# else
-# define __CONCAT(x,y) x/**/y
-# endif
-#endif
-
-#ifndef __BEGIN_DECLS
-# if defined(__cplusplus)
-# define __BEGIN_DECLS extern "C" {
-# else
-# define __BEGIN_DECLS
-# endif
-#endif
-
-#ifndef __END_DECLS
-# if defined(__cplusplus)
-# define __END_DECLS };
-# else
-# define __END_DECLS
-# endif
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#ifdef HAVE_SYS_ENDIAN_H
-#include <sys/endian.h>
-#endif
-
-#ifdef HAVE_MACHINE_ENDIAN_H
-#include <machine/endian.h>
-#endif
-
-#ifdef HAVE_SYS_BYTEORDER_H
-#include <sys/byteorder.h>
-#endif
-
-#ifndef LITTLE_ENDIAN
-# define LITTLE_ENDIAN 1234
-#endif
-
-#ifndef BIG_ENDIAN
-# define BIG_ENDIAN 4321
-#endif
-
-#ifndef BYTE_ORDER
-# if defined(_BIG_ENDIAN)
-# define BYTE_ORDER BIG_ENDIAN
-# elif defined(_LITTE_ENDIAN)
-# define BYTE_ORDER LITTLE_ENDIAN
-# elif defined(WORDS_BIGENDIAN)
-# define BYTE_ORDER BIG_ENDIAN
-# else
-# define BYTE_ORDER LITTLE_ENDIAN
-# endif
-#endif
-
-#if defined(HAVE_MEMSET)
-#define MEMSET_BZERO(p,l) memset((p), 0, (l))
-#else
-# if defined(HAVE_BZERO)
-#define MEMSET_BZERO(p,l) bzero((p), (l))
-# else
-#error You need either memset or bzero
-# endif
-#endif
-
-#if defined(HAVE_MEMCPY)
-#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l))
-#else
-# if defined(HAVE_BCOPY)
-#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l))
-# else
-#error You need either memcpy or bcopy
-# endif
-#endif
-
diff --git a/pkgtools/digest/files/config.sub b/pkgtools/digest/files/config.sub
deleted file mode 100755
index 5defff65a6e..00000000000
--- a/pkgtools/digest/files/config.sub
+++ /dev/null
@@ -1,1622 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-01-18'
-
-# 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 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.
-
-# 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
-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-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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)
- os=
- basic_machine=$1
- ;;
- -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 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | 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 | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # 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-* | c54x-* | c55x-* | c6x-* \
- | 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-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | 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-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | 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-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # 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
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- 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
- ;;
- cr16c)
- basic_machine=cr16c-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
- ;;
- 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
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- 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
- ;;
- 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[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.
- -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* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -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* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -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*)
- # 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
- ;;
- -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
- ;;
- # 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
- ;;
- -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/pkgtools/digest/files/configure b/pkgtools/digest/files/configure
deleted file mode 100755
index fccf19849e2..00000000000
--- a/pkgtools/digest/files/configure
+++ /dev/null
@@ -1,6660 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for nbsd-digest 20060826.
-#
-# Report bugs to <agc@netbsd.org>.
-#
-# Copyright (C) 2003 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 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='nbsd-digest'
-PACKAGE_TARNAME='nbsd-digest'
-PACKAGE_VERSION='20060826'
-PACKAGE_STRING='nbsd-digest 20060826'
-PACKAGE_BUGREPORT='agc@netbsd.org'
-
-ac_unique_file="digest.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#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"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CANONICAL_HOST SET_MAKE AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S AUTOCONF AUTOHEADER CPP EGREP LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# 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.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-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
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -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 | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$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 ;;
-
- -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 ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- 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 ;;
-
- -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=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 ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- 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'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-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
- 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
-
-
-# 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 its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- 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
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# 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 nbsd-digest 20060826 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 \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-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]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --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]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_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]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of nbsd-digest 20060826:";;
- esac
- cat <<\_ACEOF
-
-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>
- CPPFLAGS 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 <agc@netbsd.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style 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
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-nbsd-digest configure 20060826
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by nbsd-digest $as_me 20060826, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-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`
-hostinfo = `(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=.
- echo "PATH: $as_dir"
-done
-
-} >&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_sep=
-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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$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
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >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
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- 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.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-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 `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-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
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`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.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-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_config_headers="$ac_config_headers config.h"
-
-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 $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-CANONICAL_HOST=$host
-
-
-# Checks for programs.
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$AWK" && break
-done
-
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-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
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- 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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; 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 | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$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
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 -std1 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 -std1. */
-int osf4_cc_array ['\x00' == 0 ? 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
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-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
-
-# 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.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- 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
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-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. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$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'
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-
-
-
-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
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
- echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-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
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.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))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-for ac_header in errno.h fcntl.h inttypes.h locale.h machine/endian.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to agc@netbsd.org ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-for ac_header in stdlib.h sys/bitypes.h sys/byteorder.h sys/cdefs.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to agc@netbsd.org ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-for ac_header in sys/endian.h sys/file.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to agc@netbsd.org ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-echo "$as_me:$LINENO: checking for __attribute__" >&5
-echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
-if test "${ac_cv___attribute__+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
- exit(1);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv___attribute__=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv___attribute__=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___ATTRIBUTE__ 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
-echo "${ECHO_T}$ac_cv___attribute__" >&6
-
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* 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";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 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;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for long long" >&5
-echo $ECHO_N "checking for long long... $ECHO_C" >&6
-if test "${ac_cv_type_long_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((long long *) 0)
- return 0;
-if (sizeof (long long))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_long_long=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long_long=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
-echo "${ECHO_T}$ac_cv_type_long_long" >&6
-if test $ac_cv_type_long_long = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_LONG 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int8_t" >&5
-echo $ECHO_N "checking for int8_t... $ECHO_C" >&6
-if test "${ac_cv_type_int8_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int8_t *) 0)
- return 0;
-if (sizeof (int8_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int8_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int8_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_int8_t" >&6
-if test $ac_cv_type_int8_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int16_t" >&5
-echo $ECHO_N "checking for int16_t... $ECHO_C" >&6
-if test "${ac_cv_type_int16_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int16_t *) 0)
- return 0;
-if (sizeof (int16_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int16_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int16_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_int16_t" >&6
-if test $ac_cv_type_int16_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT16_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int32_t" >&5
-echo $ECHO_N "checking for int32_t... $ECHO_C" >&6
-if test "${ac_cv_type_int32_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int32_t *) 0)
- return 0;
-if (sizeof (int32_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int32_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int32_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_int32_t" >&6
-if test $ac_cv_type_int32_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int64_t" >&5
-echo $ECHO_N "checking for int64_t... $ECHO_C" >&6
-if test "${ac_cv_type_int64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int64_t *) 0)
- return 0;
-if (sizeof (int64_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int64_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int64_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_int64_t" >&6
-if test $ac_cv_type_int64_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT64_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int8_t" >&5
-echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int8_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int8_t *) 0)
- return 0;
-if (sizeof (u_int8_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int8_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int8_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6
-if test $ac_cv_type_u_int8_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT8_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int16_t" >&5
-echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int16_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int16_t *) 0)
- return 0;
-if (sizeof (u_int16_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int16_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int16_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6
-if test $ac_cv_type_u_int16_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT16_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int32_t" >&5
-echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int32_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int32_t *) 0)
- return 0;
-if (sizeof (u_int32_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int32_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int32_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6
-if test $ac_cv_type_u_int32_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT32_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int64_t" >&5
-echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int64_t *) 0)
- return 0;
-if (sizeof (u_int64_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int64_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int64_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6
-if test $ac_cv_type_u_int64_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT64_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint8_t" >&5
-echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint8_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint8_t *) 0)
- return 0;
-if (sizeof (uint8_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint8_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint8_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint8_t" >&6
-if test $ac_cv_type_uint8_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint16_t" >&5
-echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint16_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint16_t *) 0)
- return 0;
-if (sizeof (uint16_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint16_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint16_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint16_t" >&6
-if test $ac_cv_type_uint16_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT16_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint32_t" >&5
-echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint32_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint32_t *) 0)
- return 0;
-if (sizeof (uint32_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint32_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint32_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint32_t" >&6
-if test $ac_cv_type_uint32_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT32_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint64_t" >&5
-echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint64_t *) 0)
- return 0;
-if (sizeof (uint64_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint64_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint64_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
-if test $ac_cv_type_uint64_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT64_T 1
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
-if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/param.h>
-
-int
-main ()
-{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- # It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_bigendian=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-int
-main ()
-{
- _ascii (); _ebcdic ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; 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
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=no
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_bigendian=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-
-
-# Checks for library functions.
-echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
-echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_strerror_r+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef strerror_r
- char *p = (char *) strerror_r;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_strerror_r=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_strerror_r=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
-echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
-if test $ac_cv_have_decl_strerror_r = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R 0
-_ACEOF
-
-
-fi
-
-
-
-for ac_func in strerror_r
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
-echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
-if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_cv_func_strerror_r_char_p=no
- if test $ac_cv_have_decl_strerror_r = yes; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-
- char buf[100];
- char x = *strerror_r (0, buf, sizeof buf);
- char *p = strerror_r (0, buf, sizeof buf);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_strerror_r_char_p=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- else
- # strerror_r is not declared. Choose between
- # systems that have relatively inaccessible declarations for the
- # function. BeOS and DEC UNIX 4.0 fall in this category, but the
- # former has a strerror_r that returns char*, while the latter
- # has a strerror_r that returns `int'.
- # This test should segfault on the DEC system.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
- extern char *strerror_r ();
-int
-main ()
-{
-char buf[100];
- char x = *strerror_r (0, buf, sizeof buf);
- exit (!isalpha (x));
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_strerror_r_char_p=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
- fi
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
-echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
-if test $ac_cv_func_strerror_r_char_p = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STRERROR_R_CHAR_P 1
-_ACEOF
-
-fi
-
-
-for ac_func in vprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-echo "$as_me:$LINENO: checking for _doprnt" >&5
-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
-if test "${ac_cv_func__doprnt+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define _doprnt innocuous__doprnt
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt (); 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 _doprnt
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char _doprnt ();
-/* 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__doprnt) || defined (__stub____doprnt)
-choke me
-#else
-char (*f) () = _doprnt;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != _doprnt;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func__doprnt=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__doprnt=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-if test $ac_cv_func__doprnt = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DOPRNT 1
-_ACEOF
-
-fi
-
-fi
-done
-
-
-
-
-
-
-
-for ac_func in bcopy bzero memset memcpy setlocale
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-#
-
-
-
- ac_config_files="$ac_config_files 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, don't put newlines in cache variables' values.
-# 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.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *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 \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!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" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- 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}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $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}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by nbsd-digest $as_me 20060826, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet 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
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-nbsd-digest config.status 20060826
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-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=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- 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
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- 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
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@CANONICAL_HOST@,$CANONICAL_HOST,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@AWK@,$AWK,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@LN_S@,$LN_S,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # 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. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #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.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # 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. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# 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 || { (exit 1); exit 1; }
-fi
-
diff --git a/pkgtools/digest/files/configure.ac b/pkgtools/digest/files/configure.ac
deleted file mode 100644
index 717256cef8d..00000000000
--- a/pkgtools/digest/files/configure.ac
+++ /dev/null
@@ -1,169 +0,0 @@
-dnl $Id: configure.ac,v 1.8 2006/08/29 13:43:11 joerg Exp $
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.57)
-AC_INIT([nbsd-digest],[20060826],[agc@netbsd.org])
-AC_CONFIG_SRCDIR([digest.c])
-AC_CONFIG_HEADER(config.h)
-AC_ARG_PROGRAM
-
-AC_CANONICAL_HOST
-CANONICAL_HOST=$host
-AC_SUBST(CANONICAL_HOST)
-
-# Checks for programs.
-AC_PROG_MAKE_SET
-AC_PROG_AWK
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_LN_S
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-AC_SUBST(AUTOCONF)
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-AC_SUBST(AUTOHEADER)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([errno.h fcntl.h inttypes.h locale.h machine/endian.h])
-AC_CHECK_HEADERS([stdlib.h sys/bitypes.h sys/byteorder.h sys/cdefs.h])
-AC_CHECK_HEADERS([sys/endian.h sys/file.h sys/param.h])
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C___ATTRIBUTE__
-AC_C_CONST
-AC_TYPE_SIZE_T
-AC_CHECK_TYPES([long long, int8_t, int16_t, int32_t, int64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t, uint8_t, uint16_t, uint32_t, uint64_t],[],[],
-[#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
-AC_C_BIGENDIAN
-
-# Checks for library functions.
-AC_FUNC_STRERROR_R
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([bcopy bzero memset memcpy setlocale])
-#
-AH_BOTTOM([
-
-#ifndef HAVE___ATTRIBUTE__
-# define __attribute__(x)
-#endif
-
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
-#ifndef __IDSTRING
-# define __IDSTRING(name,string) \
- static const char name[] __attribute__((__unused__)) = string
-#endif
-
-#ifndef __RCSID
-# define __RCSID(_s) __IDSTRING(rcsid,_s)
-#endif
-
-#ifndef __COPYRIGHT
-# define __COPYRIGHT(_s) __IDSTRING(copyright,_s)
-#endif
-
-#ifndef __P
-# if defined(__STDC__) || defined(__cplusplus)
-# define __P(protos) protos /* full-blown ANSI C */
-# else
-# define __P(protos) () /* traditional C preprocessor */
-# endif
-#endif
-
-#ifndef __CONCAT
-# if defined(__STDC__) || defined(__cplusplus)
-# define __CONCAT(x,y) x ## y
-# else
-# define __CONCAT(x,y) x/**/y
-# endif
-#endif
-
-#ifndef __BEGIN_DECLS
-# if defined(__cplusplus)
-# define __BEGIN_DECLS extern "C" {
-# else
-# define __BEGIN_DECLS
-# endif
-#endif
-
-#ifndef __END_DECLS
-# if defined(__cplusplus)
-# define __END_DECLS };
-# else
-# define __END_DECLS
-# endif
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#ifdef HAVE_SYS_ENDIAN_H
-#include <sys/endian.h>
-#endif
-
-#ifdef HAVE_MACHINE_ENDIAN_H
-#include <machine/endian.h>
-#endif
-
-#ifdef HAVE_SYS_BYTEORDER_H
-#include <sys/byteorder.h>
-#endif
-
-#ifndef LITTLE_ENDIAN
-# define LITTLE_ENDIAN 1234
-#endif
-
-#ifndef BIG_ENDIAN
-# define BIG_ENDIAN 4321
-#endif
-
-#ifndef BYTE_ORDER
-# if defined(_BIG_ENDIAN)
-# define BYTE_ORDER BIG_ENDIAN
-# elif defined(_LITTE_ENDIAN)
-# define BYTE_ORDER LITTLE_ENDIAN
-# elif defined(WORDS_BIGENDIAN)
-# define BYTE_ORDER BIG_ENDIAN
-# else
-# define BYTE_ORDER LITTLE_ENDIAN
-# endif
-#endif
-
-#if defined(HAVE_MEMSET)
-#define MEMSET_BZERO(p,l) memset((p), 0, (l))
-#else
-# if defined(HAVE_BZERO)
-#define MEMSET_BZERO(p,l) bzero((p), (l))
-# else
-#error You need either memset or bzero
-# endif
-#endif
-
-#if defined(HAVE_MEMCPY)
-#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l))
-#else
-# if defined(HAVE_BCOPY)
-#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l))
-# else
-#error You need either memcpy or bcopy
-# endif
-#endif
-])
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/pkgtools/digest/files/digest.1 b/pkgtools/digest/files/digest.1
deleted file mode 100644
index 211ac8b5ce0..00000000000
--- a/pkgtools/digest/files/digest.1
+++ /dev/null
@@ -1,109 +0,0 @@
-.\" $NetBSD: digest.1,v 1.6 2005/03/23 14:32:19 agc Exp $
-.\"
-.\"
-.\" Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Alistair G. Crooks.
-.\" 4. The name of the author may not be used to endorse or promote
-.\" products derived from this software without specific prior written
-.\" permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\"
-.Dd March 23, 2005
-.Dt DIGEST 1
-.Os
-.Sh NAME
-.Nm digest
-.Nd calculate message digests
-.Sh SYNOPSIS
-.Nm
-.Ar algorithm
-.Op file ...
-.Sh DESCRIPTION
-The
-.Nm
-utility calculates message digests of files or,
-if no file is specified, standard input.
-The list of possible algorithms is:
-.Bl -tag -width Ds
-.It md5
-the
-.Xr md5 3
-algorithm will be used.
-.It rmd160
-the
-.Xr rmd160 3
-algorithm will be used.
-.It sha1
-the
-.Xr sha1 3
-algorithm will be used.
-.It sha256
-the
-sha256
-algorithm will be used.
-.It sha384
-the
-sha384
-algorithm will be used.
-.It sha512
-the
-sha512
-algorithm will be used.
-.It tiger
-the
-tiger
-algorithm will be used.
-.It whirlpool
-the
-whirlpool
-algorithm will be used.
-.El
-.Pp
-The
-.Nm
-utility is a simple wrapper for the various different
-algorithm implementations, which are located in the standard
-C library, and was designed to be scalable as new message digest
-algorithms are developed.
-.Pp
-The
-.Nm
-utility exits 0 on success, and \*[Gt]0 if an error occurs.
-.Sh SEE ALSO
-.Xr cksum 1 ,
-.Xr md5 3 ,
-.Xr rmd160 3 ,
-.Xr sha1 3
-.Sh HISTORY
-The
-.Nm
-utility first appeared in
-.Nx 1.6 .
-.Sh AUTHORS
-The
-.Nm
-utility was written by
-.An Alistair G. Crooks Aq agc@netbsd.org .
diff --git a/pkgtools/digest/files/digest.c b/pkgtools/digest/files/digest.c
deleted file mode 100644
index 6c209dd96cc..00000000000
--- a/pkgtools/digest/files/digest.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/* $NetBSD: digest.c,v 1.11 2005/03/23 21:40:35 yamt Exp $ */
-
-/*
- * Copyright (c) 2001-2005 Alistair G. Crooks. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Alistair G. Crooks.
- * 4. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <digest-types.h>
-
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 2001-2005 \
- The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: digest.c,v 1.11 2005/03/23 21:40:35 yamt Exp $");
-#endif
-
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
-#endif
-#include <md5.h>
-#include <rmd160.h>
-#include <sha1.h>
-#include <sha2.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <tiger.h>
-#include <whirlpool.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-typedef void (*HASH_init)(void *);
-typedef void (*HASH_update)(void *, const unsigned char *, unsigned int);
-typedef char *(*HASH_end)(void *, char *);
-typedef char *(*HASH_file)(char *, char *);
-
-/* this struct defines a message digest algorithm */
-typedef struct alg_t {
- const char *name;
- int hash_len;
- HASH_init hash_init;
- HASH_update hash_update;
- HASH_end hash_end;
- HASH_file hash_file;
- union {
- MD5_CTX m;
- SHA1_CTX sha;
- RMD160_CTX rmd;
- SHA256_CTX sha256;
- SHA384_CTX sha384;
- SHA512_CTX sha512;
- tiger_context_t tiger;
- whirlpool_context_t whirlpool;
- } hash_ctx, hash_ctx2;
-} alg_t;
-
-/* list of supported message digest algorithms */
-static alg_t algorithms[] = {
- { "MD5", 16,
- (HASH_init) MD5Init, (HASH_update) MD5Update,
- (HASH_end) MD5End, (HASH_file) MD5File },
- { "RMD160", 20,
- (HASH_init) RMD160Init, (HASH_update) RMD160Update,
- (HASH_end) RMD160End, (HASH_file) RMD160File },
- { "SHA1", 20,
- (HASH_init) SHA1Init, (HASH_update) SHA1Update,
- (HASH_end) SHA1End, (HASH_file) SHA1File },
- { "SHA256", SHA256_DIGEST_LENGTH,
- (HASH_init) SHA256_Init, (HASH_update) SHA256_Update,
- (HASH_end) SHA256_End, (HASH_file) SHA256_File },
- { "SHA384", SHA384_DIGEST_LENGTH,
- (HASH_init) SHA384_Init, (HASH_update) SHA384_Update,
- (HASH_end) SHA384_End, (HASH_file) SHA384_File },
- { "SHA512", SHA512_DIGEST_LENGTH,
- (HASH_init) SHA512_Init, (HASH_update) SHA512_Update,
- (HASH_end) SHA512_End, (HASH_file) SHA512_File },
- { "TIGER", 20,
- (HASH_init) TIGERInit, (HASH_update) TIGERUpdate,
- (HASH_end) TIGEREnd, (HASH_file) TIGERFile },
- { "WHIRLPOOL", WHIRLPOOL_DIGEST_BYTES,
- (HASH_init) whirlpool_init, (HASH_update) whirlpool_update,
- (HASH_end) whirlpool_end, (HASH_file) whirlpool_file },
- { NULL }
-};
-
-/* find an algorithm, given a name */
-static alg_t *
-find_algorithm(const char *a)
-{
- alg_t *alg;
-
- for (alg = algorithms ; alg->name && strcasecmp(alg->name, a) != 0 ; alg++) {
- }
- return (alg->name) ? alg : NULL;
-}
-
-/* compute a digest, and print the results if successful */
-static int
-digest_file(char *fn, alg_t *alg)
-{
- char in[BUFSIZ * 20];
- char *digest;
- int cc, rc;
-
- digest = malloc(alg->hash_len * 2 + 1);
-
- if (fn == NULL) {
- (*alg->hash_init)(&alg->hash_ctx);
- while ((cc = read(STDIN_FILENO, in, sizeof(in))) > 0) {
- (*alg->hash_update)(&alg->hash_ctx, (u_char *)in,
- (unsigned) cc);
- }
- (void) printf("%s\n", (*alg->hash_end)(&alg->hash_ctx, digest));
- rc = 1;
- } else {
- if ((*alg->hash_file)(fn, digest) == NULL) {
- rc = 0;
- } else {
- (void) printf("%s (%s) = %s\n", alg->name, fn, digest);
- rc = 1;
- }
- }
-
- free(digest);
-
- return (rc);
-}
-
-int
-main(int argc, char **argv)
-{
- alg_t *alg;
- int rval;
- int i;
-
-#ifdef HAVE_SETLOCALE
- (void) setlocale(LC_ALL, "");
-#endif
- while ((i = getopt(argc, argv, "V")) != -1) {
- switch(i) {
- case 'V':
- printf("%s\n", VERSION);
- return EXIT_SUCCESS;
- }
- }
- argc -= optind;
- argv += optind;
-
- if (argc == 0) {
- (void) fprintf(stderr, "Usage: %s algorithm [file...]\n",
- argv[-optind]);
- return EXIT_FAILURE;
- }
- if ((alg = find_algorithm(argv[0])) == NULL) {
- (void) fprintf(stderr, "No such algorithm `%s'\n", argv[0]);
- exit(EXIT_FAILURE);
- }
- argc--;
- argv++;
- rval = EXIT_SUCCESS;
- if (argc == 0) {
- if (!digest_file(NULL, alg)) {
- (void) fprintf(stderr, "stdin\n");
- rval = EXIT_FAILURE;
- }
- } else {
- for (i = 0 ; i < argc ; i++) {
- if (!digest_file(argv[i], alg)) {
- (void) fprintf(stderr, "%s\n", argv[i]);
- rval = EXIT_FAILURE;
- }
- }
- }
- return rval;
-}
diff --git a/pkgtools/digest/files/install-sh b/pkgtools/digest/files/install-sh
deleted file mode 100755
index e9de23842dc..00000000000
--- a/pkgtools/digest/files/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# 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. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# 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 $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/pkgtools/digest/files/md5.h b/pkgtools/digest/files/md5.h
deleted file mode 100644
index ff4bd05fef8..00000000000
--- a/pkgtools/digest/files/md5.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $NetBSD: md5.h,v 1.2 2002/12/21 04:06:14 schmonz Exp $ */
-
-/*
- * This file is derived from the RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm and has been modified by Jason R. Thorpe <thorpej@NetBSD.ORG>
- * for portability and formatting.
- */
-
-/*
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
- *
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
- *
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD5 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- */
-
-#ifndef _SYS_MD5_H_
-#define _SYS_MD5_H_
-
-/* MD5 context. */
-typedef struct MD5Context {
- u_int32_t state[4]; /* state (ABCD) */
- u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
-} MD5_CTX;
-
-__BEGIN_DECLS
-void MD5Init __P((MD5_CTX *));
-void MD5Update __P((MD5_CTX *, const unsigned char *, unsigned int));
-void MD5Final __P((unsigned char[16], MD5_CTX *));
-#ifndef _KERNEL
-char *MD5End __P((MD5_CTX *, char *));
-char *MD5File __P((const char *, char *));
-char *MD5Data __P((const unsigned char *, unsigned int, char *));
-#endif /* _KERNEL */
-__END_DECLS
-
-#endif /* _SYS_MD5_H_ */
diff --git a/pkgtools/digest/files/md5c.c b/pkgtools/digest/files/md5c.c
deleted file mode 100644
index 5b8fcdaf6d5..00000000000
--- a/pkgtools/digest/files/md5c.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/* $NetBSD: md5c.c,v 1.3 2002/12/21 04:06:14 schmonz Exp $ */
-
-/*
- * This file is derived from the RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm and has been modifed by Jason R. Thorpe <thorpej@NetBSD.ORG>
- * for portability and formatting.
- */
-
-/*
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
- *
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
- *
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD5 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <digest-types.h>
-
-#if defined(_KERNEL) || defined(_STANDALONE)
-#include <lib/libkern/libkern.h>
-#include <sys/param.h>
-#include <sys/md5.h>
-#define _DIAGASSERT(x) (void)0
-#else
-/* #include "namespace.h" */
-#include <assert.h>
-#include <string.h>
-#include <md5.h>
-#endif /* _KERNEL || _STANDALONE */
-
-#if defined(HAVE_MEMSET)
-#define ZEROIZE(d, l) memset((d), 0, (l))
-#else
-# if defined(HAVE_BZERO)
-#define ZEROIZE(d, l) bzero((d), (l))
-# else
-#error You need either memset or bzero
-# endif
-#endif
-
-typedef unsigned char *POINTER;
-typedef u_int16_t UINT2;
-typedef u_int32_t UINT4;
-
-/*
- * Constants for MD5Transform routine.
- */
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-#if 0
-#if !defined(_KERNEL) && !defined(_STANDALONE) && defined(__weak_alias)
-__weak_alias(MD5Init,_MD5Init)
-__weak_alias(MD5Update,_MD5Update)
-__weak_alias(MD5Final,_MD5Final)
-#endif
-#endif
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-static void MD5Transform __P((UINT4 [4], const unsigned char [64]));
-
-static void Encode __P((unsigned char *, UINT4 *, unsigned int));
-static void Decode __P((UINT4 *, const unsigned char *, unsigned int));
-
-/*
- * Encodes input (UINT4) into output (unsigned char). Assumes len is
- * a multiple of 4.
- */
-static void
-Encode (output, input, len)
- unsigned char *output;
- UINT4 *input;
- unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
-
-/*
- * Decodes input (unsigned char) into output (UINT4). Assumes len is
- * a multiple of 4.
- */
-static void
-Decode (output, input, len)
- UINT4 *output;
- const unsigned char *input;
- unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
-}
-
-static const unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/*
- * F, G, H and I are basic MD5 functions.
- */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
-
-/*
- * ROTATE_LEFT rotates x left n bits.
- */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/*
- * FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
- * Rotation is separate from addition to prevent recomputation.
- */
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-/*
- * MD5 initialization. Begins an MD5 operation, writing a new context.
- */
-void
-MD5Init(context)
- MD5_CTX *context; /* context */
-{
-
- _DIAGASSERT(context != 0);
-
- context->count[0] = context->count[1] = 0;
-
- /* Load magic initialization constants. */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
-}
-
-/*
- * MD5 block update operation. Continues an MD5 message-digest
- * operation, processing another message block, and updating the
- * context.
- */
-void
-MD5Update(context, input, inputLen)
- MD5_CTX *context; /* context */
- const unsigned char *input; /* input block */
- unsigned int inputLen; /* length of input block */
-{
- unsigned int i, idx, partLen;
-
- _DIAGASSERT(context != 0);
- _DIAGASSERT(input != 0);
-
- /* Compute number of bytes mod 64 */
- idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
-
- /* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
-
- partLen = 64 - idx;
-
- /* Transform as many times as possible. */
- if (inputLen >= partLen) {
- /* LINTED const castaway ok */
- memcpy((POINTER)&context->buffer[idx],
- input, partLen);
- MD5Transform(context->state, context->buffer);
-
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD5Transform(context->state, &input[i]);
-
- idx = 0;
- } else
- i = 0;
-
- /* Buffer remaining input */
- /* LINTED const castaway ok */
- memcpy((POINTER)&context->buffer[idx], &input[i],
- inputLen - i);
-}
-
-/*
- * MD5 finalization. Ends an MD5 message-digest operation, writing the
- * message digest and zeroing the context.
- */
-void
-MD5Final(digest, context)
- unsigned char digest[16]; /* message digest */
- MD5_CTX *context; /* context */
-{
- unsigned char bits[8];
- unsigned int idx, padLen;
-
- _DIAGASSERT(digest != 0);
- _DIAGASSERT(context != 0);
-
- /* Save number of bits */
- Encode(bits, context->count, 8);
-
- /* Pad out to 56 mod 64. */
- idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (idx < 56) ? (56 - idx) : (120 - idx);
- MD5Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- MD5Update(context, bits, 8);
-
- /* Store state in digest */
- Encode(digest, context->state, 16);
-
- /* Zeroize sensitive information. */
- ZEROIZE((POINTER)(void *)context, sizeof(*context));
-}
-
-/*
- * MD5 basic transformation. Transforms state based on block.
- */
-static void
-MD5Transform(state, block)
- UINT4 state[4];
- const unsigned char block[64];
-{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode(x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
- II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information. */
- ZEROIZE((POINTER)(void *)x, sizeof (x));
-}
diff --git a/pkgtools/digest/files/md5hl.c b/pkgtools/digest/files/md5hl.c
deleted file mode 100644
index 7fdda5e7650..00000000000
--- a/pkgtools/digest/files/md5hl.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* $NetBSD: md5hl.c,v 1.4 2003/06/23 13:12:53 atatat Exp $ */
-
-/*
- * Written by Jason R. Thorpe <thorpej@netbsd.org>, April 29, 1997.
- * Public domain.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <digest-types.h>
-
-#define MDALGORITHM MD5
-
-/* #include "namespace.h" */
-#include <md5.h>
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-/* $NetBSD: md5hl.c,v 1.4 2003/06/23 13:12:53 atatat Exp $ */
-
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * from FreeBSD Id: mdXhl.c,v 1.8 1996/10/25 06:48:12 bde Exp
- */
-
-/*
- * Modifed April 29, 1997 by Jason R. Thorpe <thorpej@netbsd.org>
- */
-
-#include <assert.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#define CONCAT(x,y) __CONCAT(x,y)
-#define MDNAME(x) CONCAT(MDALGORITHM,x)
-
-char *
-MDNAME(End)(ctx, buf)
- MDNAME(_CTX) *ctx;
- char *buf;
-{
- int i;
- unsigned char digest[16];
- static const char hex[]="0123456789abcdef";
-
- _DIAGASSERT(ctx != 0);
-
- if (buf == NULL)
- buf = malloc(33);
- if (buf == NULL)
- return (NULL);
-
- MDNAME(Final)(digest, ctx);
-
- for (i = 0; i < 16; i++) {
- buf[i+i] = hex[(u_int32_t)digest[i] >> 4];
- buf[i+i+1] = hex[digest[i] & 0x0f];
- }
-
- buf[i+i] = '\0';
- return (buf);
-}
-
-char *
-MDNAME(File)(filename, buf)
- const char *filename;
- char *buf;
-{
- unsigned char buffer[BUFSIZ];
- MDNAME(_CTX) ctx;
- int f, i, j;
-
- _DIAGASSERT(filename != 0);
- /* buf may be NULL */
-
- MDNAME(Init)(&ctx);
- f = open(filename, O_RDONLY, 0666);
- if (f < 0)
- return NULL;
-
- while ((i = read(f, buffer, sizeof(buffer))) > 0)
- MDNAME(Update)(&ctx, buffer, (unsigned int)i);
-
- j = errno;
- close(f);
- errno = j;
-
- if (i < 0)
- return NULL;
-
- return (MDNAME(End)(&ctx, buf));
-}
-
-char *
-MDNAME(Data)(data, len, buf)
- const unsigned char *data;
- unsigned int len;
- char *buf;
-{
- MDNAME(_CTX) ctx;
-
- _DIAGASSERT(data != 0);
-
- MDNAME(Init)(&ctx);
- MDNAME(Update)(&ctx, data, len);
- return (MDNAME(End)(&ctx, buf));
-}
diff --git a/pkgtools/digest/files/missing b/pkgtools/digest/files/missing
deleted file mode 100755
index 0a7fb5a2ace..00000000000
--- a/pkgtools/digest/files/missing
+++ /dev/null
@@ -1,283 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright 1996, 1997, 1999, 2000 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, 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.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-case "$1" in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-
- -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'
- 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]"
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing 0.3 - GNU automake"
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
- aclocal)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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 missing on your system. 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
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. 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 [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if [ ! -f y.tab.h ]; then
- echo >y.tab.h
- fi
- if [ ! -f y.tab.c ]; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. 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 [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if [ ! -f lex.yy.c ]; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man)
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. 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 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit 1
- fi
- ;;
-
- makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
- echo 1>&2 "\
-WARNING: \`$1' is missing on your system. 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."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
- touch $file
- ;;
-
- tar)
- shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
-
- # 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 ${1+"$@"} && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar ${1+"$@"} && exit 0
- fi
- firstarg="$1"
- if shift; then
- case "$firstarg" in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" ${1+"$@"} && exit 0
- ;;
- esac
- case "$firstarg" in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" ${1+"$@"} && 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 you do not seem to have it handy on your
- system. 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 prerequirements 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
diff --git a/pkgtools/digest/files/mkinstalldirs b/pkgtools/digest/files/mkinstalldirs
deleted file mode 100755
index 614df60a55e..00000000000
--- a/pkgtools/digest/files/mkinstalldirs
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-# $Id: mkinstalldirs,v 1.1 2002/12/21 04:06:15 schmonz Exp $
-
-errstatus=0
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- 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
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/pkgtools/digest/files/regress.sh b/pkgtools/digest/files/regress.sh
deleted file mode 100644
index 921992310c6..00000000000
--- a/pkgtools/digest/files/regress.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#! /bin/sh
-#
-# From
-# $NetBSD: regress.sh,v 1.4 2006/08/29 13:43:11 joerg Exp $
-
-# one can do, for example to test with openssl:
-# DIGESTDIR=/path/to DIGESTCMD=openssl sh regress.sh
-DIGESTDIR=${DIGESTDIR:-.}
-DIGESTCMD=${DIGESTCMD:-digest}
-DIGEST=${DIGESTDIR}/${DIGESTCMD}
-
-# grabbed from GNU autoconf
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ;;
- *) ECHO_N= ECHO_C='\c' ;;
-esac
-
-
-cat > expected1 << EOF
-ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
-cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
-ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f
-EOF
-echo $ECHO_N "abc$ECHO_C" | ${DIGEST} sha256 > output1
-echo $ECHO_N "abc$ECHO_C" | ${DIGEST} sha384 >> output1
-echo $ECHO_N "abc$ECHO_C" | ${DIGEST} sha512 >> output1
-diff expected1 output1 || echo "*** WARNING: output differs in test 1 (sha256, sha384, sha512) ***"
-
-rm -f expected1 output1
-
-cat > expected2 << EOF
-248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1
-3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6b0455a8520bc4e6f5fe95b1fe3c8452b
-204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445
-EOF
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} sha256 > output2
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} sha384 >> output2
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} sha512 >> output2
-diff expected2 output2 || echo "*** WARNING: output differs in test 2 (sha256, sha384, sha512) ***"
-
-rm -f expected2 output2
-
-
-cat > expected3 << EOF
-8215ef0796a20bcaaae116d3876c664a
-EOF
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} md5 > output3
-diff expected3 output3 || echo "*** WARNING: output differs in test 3 (md5) ***"
-
-rm -f expected3 output3
-
-cat > expected4 << EOF
-12a053384a9c0c88e405a06c27dcf49ada62eb2b
-EOF
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} rmd160 > output4
-diff expected4 output4 || echo "*** WARNING: output differs in test 4 (rmd160) ***"
-
-rm -f expected4 output4
-
-cat > expected5 << EOF
-84983e441c3bd26ebaae4aa1f95129e5e54670f1
-EOF
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} sha1 > output5
-diff expected5 output5 || echo "*** WARNING: output differs in test 5 (sha1) ***"
-
-rm -f expected5 output5
-
-cat > expected6 << EOF
-f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951
-f2589c9ba1f97b0fc30a4fe8f70d61b78ef7537b1e631ca7
-3d9aeb03d1bd1a6357b2774dfd6d5b24dd68151d503974fc
-EOF
-echo $ECHO_N "abc$ECHO_C" | ${DIGEST} tiger > output6
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} tiger >> output6
-echo $ECHO_N "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham, proceedings of Fast Software Encryption 3, Cambridge, 1996.$ECHO_C" | ${DIGEST} tiger >> output6
-diff expected6 output6 || echo "*** WARNING: output differs in test 6 (tiger) ***"
-
-rm -f expected6 output6
-
-cat > expected7 << EOF
-4e2448a4c6f486bb16b6562c73b4020bf3043e3a731bce721ae1b303d97e6d4c7181eebdb6c57e277d0e34957114cbd6c797fc9d95d8b582d225292076d4eef5
-526b2394d85683e24b29acd0fd37f7d5027f61366a1407262dc2a6a345d9e240c017c1833db1e6db6a46bd444b0c69520c856e7c6e9c366d150a7da3aeb160d1
-b37cde686c51c3970a1fb22959b6e5fe4bef90a5262e63126fabaddd0d0969783e1969459078fe7fcf7fdaa9ffbf6db80963296596169274c4a236bafeb95e7e
-EOF
-echo $ECHO_N "abc$ECHO_C" | ${DIGEST} whirlpool > output7
-echo $ECHO_N "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq$ECHO_C" | ${DIGEST} whirlpool >> output7
-echo $ECHO_N "Whirlpool - The Whirlpool hashing function.$ECHO_C" | ${DIGEST} whirlpool >> output7
-diff expected7 output7 || echo "*** WARNING: output differs in test 7 (whirlpool) ***"
-
-rm -f expected7 output7
-
-
-
-exit 0
diff --git a/pkgtools/digest/files/rmd160.c b/pkgtools/digest/files/rmd160.c
deleted file mode 100644
index 1ddd8d47ac9..00000000000
--- a/pkgtools/digest/files/rmd160.c
+++ /dev/null
@@ -1,470 +0,0 @@
-/* $NetBSD: rmd160.c,v 1.3 2002/12/21 04:06:15 schmonz Exp $ */
-
-/********************************************************************\
- *
- * FILE: rmd160.c
- *
- * CONTENTS: A sample C-implementation of the RIPEMD-160
- * hash-function.
- * TARGET: any computer with an ANSI C compiler
- *
- * AUTHOR: Antoon Bosselaers, ESAT-COSIC
- * (Arranged for libc by Todd C. Miller)
- * DATE: 1 March 1996
- * VERSION: 1.0
- *
- * Copyright (c) Katholieke Universiteit Leuven
- * 1996, All Rights Reserved
- *
-\********************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <digest-types.h>
-
-#ifndef lint
-__RCSID("$NetBSD: rmd160.c,v 1.3 2002/12/21 04:06:15 schmonz Exp $");
-#endif /* not lint */
-
-/* header files */
-
-/* #include "namespace.h" */
-
-#include <assert.h>
-#include <rmd160.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-#if defined(HAVE_MEMSET)
-#define ZEROIZE(d, l) memset((d), 0, (l))
-#else
-# if defined(HAVE_BZERO)
-#define ZEROIZE(d, l) bzero((d), (l))
-# else
-#error You need either memset or bzero
-# endif
-#endif
-
-#if 0
-#if !defined(_KERNEL) && defined(__weak_alias)
-__weak_alias(RMD160Transform,_RMD160Transform)
-__weak_alias(RMD160Init,_RMD160Init)
-__weak_alias(RMD160Update,_RMD160Update)
-__weak_alias(RMD160Final,_RMD160Final)
-#endif
-#endif
-
-/********************************************************************/
-
-/* macro definitions */
-
-/* collect four bytes into one word: */
-#define BYTES_TO_DWORD(strptr) \
- (((u_int32_t) *((strptr)+3) << 24) | \
- ((u_int32_t) *((strptr)+2) << 16) | \
- ((u_int32_t) *((strptr)+1) << 8) | \
- ((u_int32_t) *(strptr)))
-
-/* ROL(x, n) cyclically rotates x over n bits to the left */
-/* x must be of an unsigned 32 bits type and 0 <= n < 32. */
-#define ROL(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* the three basic functions F(), G() and H() */
-#define F(x, y, z) ((x) ^ (y) ^ (z))
-#define G(x, y, z) (((x) & (y)) | (~(x) & (z)))
-#define H(x, y, z) (((x) | ~(y)) ^ (z))
-#define I(x, y, z) (((x) & (z)) | ((y) & ~(z)))
-#define J(x, y, z) ((x) ^ ((y) | ~(z)))
-
-/* the eight basic operations FF() through III() */
-#define FF(a, b, c, d, e, x, s) { \
- (a) += F((b), (c), (d)) + (x); \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define GG(a, b, c, d, e, x, s) { \
- (a) += G((b), (c), (d)) + (x) + 0x5a827999U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define HH(a, b, c, d, e, x, s) { \
- (a) += H((b), (c), (d)) + (x) + 0x6ed9eba1U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define II(a, b, c, d, e, x, s) { \
- (a) += I((b), (c), (d)) + (x) + 0x8f1bbcdcU; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define JJ(a, b, c, d, e, x, s) { \
- (a) += J((b), (c), (d)) + (x) + 0xa953fd4eU; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define FFF(a, b, c, d, e, x, s) { \
- (a) += F((b), (c), (d)) + (x); \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define GGG(a, b, c, d, e, x, s) { \
- (a) += G((b), (c), (d)) + (x) + 0x7a6d76e9U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define HHH(a, b, c, d, e, x, s) { \
- (a) += H((b), (c), (d)) + (x) + 0x6d703ef3U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define III(a, b, c, d, e, x, s) { \
- (a) += I((b), (c), (d)) + (x) + 0x5c4dd124U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define JJJ(a, b, c, d, e, x, s) { \
- (a) += J((b), (c), (d)) + (x) + 0x50a28be6U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-
-/********************************************************************/
-
-void
-RMD160Init(RMD160_CTX *context)
-{
-
- _DIAGASSERT(context != NULL);
-
- /* ripemd-160 initialization constants */
- context->state[0] = 0x67452301U;
- context->state[1] = 0xefcdab89U;
- context->state[2] = 0x98badcfeU;
- context->state[3] = 0x10325476U;
- context->state[4] = 0xc3d2e1f0U;
- context->length[0] = context->length[1] = 0;
- context->buflen = 0;
-}
-
-/********************************************************************/
-
-void
-RMD160Transform(u_int32_t state[5], const u_int32_t block[16])
-{
- u_int32_t aa, bb, cc, dd, ee;
- u_int32_t aaa, bbb, ccc, ddd, eee;
-
- _DIAGASSERT(state != NULL);
- _DIAGASSERT(block != NULL);
-
- aa = aaa = state[0];
- bb = bbb = state[1];
- cc = ccc = state[2];
- dd = ddd = state[3];
- ee = eee = state[4];
-
- /* round 1 */
- FF(aa, bb, cc, dd, ee, block[ 0], 11);
- FF(ee, aa, bb, cc, dd, block[ 1], 14);
- FF(dd, ee, aa, bb, cc, block[ 2], 15);
- FF(cc, dd, ee, aa, bb, block[ 3], 12);
- FF(bb, cc, dd, ee, aa, block[ 4], 5);
- FF(aa, bb, cc, dd, ee, block[ 5], 8);
- FF(ee, aa, bb, cc, dd, block[ 6], 7);
- FF(dd, ee, aa, bb, cc, block[ 7], 9);
- FF(cc, dd, ee, aa, bb, block[ 8], 11);
- FF(bb, cc, dd, ee, aa, block[ 9], 13);
- FF(aa, bb, cc, dd, ee, block[10], 14);
- FF(ee, aa, bb, cc, dd, block[11], 15);
- FF(dd, ee, aa, bb, cc, block[12], 6);
- FF(cc, dd, ee, aa, bb, block[13], 7);
- FF(bb, cc, dd, ee, aa, block[14], 9);
- FF(aa, bb, cc, dd, ee, block[15], 8);
-
- /* round 2 */
- GG(ee, aa, bb, cc, dd, block[ 7], 7);
- GG(dd, ee, aa, bb, cc, block[ 4], 6);
- GG(cc, dd, ee, aa, bb, block[13], 8);
- GG(bb, cc, dd, ee, aa, block[ 1], 13);
- GG(aa, bb, cc, dd, ee, block[10], 11);
- GG(ee, aa, bb, cc, dd, block[ 6], 9);
- GG(dd, ee, aa, bb, cc, block[15], 7);
- GG(cc, dd, ee, aa, bb, block[ 3], 15);
- GG(bb, cc, dd, ee, aa, block[12], 7);
- GG(aa, bb, cc, dd, ee, block[ 0], 12);
- GG(ee, aa, bb, cc, dd, block[ 9], 15);
- GG(dd, ee, aa, bb, cc, block[ 5], 9);
- GG(cc, dd, ee, aa, bb, block[ 2], 11);
- GG(bb, cc, dd, ee, aa, block[14], 7);
- GG(aa, bb, cc, dd, ee, block[11], 13);
- GG(ee, aa, bb, cc, dd, block[ 8], 12);
-
- /* round 3 */
- HH(dd, ee, aa, bb, cc, block[ 3], 11);
- HH(cc, dd, ee, aa, bb, block[10], 13);
- HH(bb, cc, dd, ee, aa, block[14], 6);
- HH(aa, bb, cc, dd, ee, block[ 4], 7);
- HH(ee, aa, bb, cc, dd, block[ 9], 14);
- HH(dd, ee, aa, bb, cc, block[15], 9);
- HH(cc, dd, ee, aa, bb, block[ 8], 13);
- HH(bb, cc, dd, ee, aa, block[ 1], 15);
- HH(aa, bb, cc, dd, ee, block[ 2], 14);
- HH(ee, aa, bb, cc, dd, block[ 7], 8);
- HH(dd, ee, aa, bb, cc, block[ 0], 13);
- HH(cc, dd, ee, aa, bb, block[ 6], 6);
- HH(bb, cc, dd, ee, aa, block[13], 5);
- HH(aa, bb, cc, dd, ee, block[11], 12);
- HH(ee, aa, bb, cc, dd, block[ 5], 7);
- HH(dd, ee, aa, bb, cc, block[12], 5);
-
- /* round 4 */
- II(cc, dd, ee, aa, bb, block[ 1], 11);
- II(bb, cc, dd, ee, aa, block[ 9], 12);
- II(aa, bb, cc, dd, ee, block[11], 14);
- II(ee, aa, bb, cc, dd, block[10], 15);
- II(dd, ee, aa, bb, cc, block[ 0], 14);
- II(cc, dd, ee, aa, bb, block[ 8], 15);
- II(bb, cc, dd, ee, aa, block[12], 9);
- II(aa, bb, cc, dd, ee, block[ 4], 8);
- II(ee, aa, bb, cc, dd, block[13], 9);
- II(dd, ee, aa, bb, cc, block[ 3], 14);
- II(cc, dd, ee, aa, bb, block[ 7], 5);
- II(bb, cc, dd, ee, aa, block[15], 6);
- II(aa, bb, cc, dd, ee, block[14], 8);
- II(ee, aa, bb, cc, dd, block[ 5], 6);
- II(dd, ee, aa, bb, cc, block[ 6], 5);
- II(cc, dd, ee, aa, bb, block[ 2], 12);
-
- /* round 5 */
- JJ(bb, cc, dd, ee, aa, block[ 4], 9);
- JJ(aa, bb, cc, dd, ee, block[ 0], 15);
- JJ(ee, aa, bb, cc, dd, block[ 5], 5);
- JJ(dd, ee, aa, bb, cc, block[ 9], 11);
- JJ(cc, dd, ee, aa, bb, block[ 7], 6);
- JJ(bb, cc, dd, ee, aa, block[12], 8);
- JJ(aa, bb, cc, dd, ee, block[ 2], 13);
- JJ(ee, aa, bb, cc, dd, block[10], 12);
- JJ(dd, ee, aa, bb, cc, block[14], 5);
- JJ(cc, dd, ee, aa, bb, block[ 1], 12);
- JJ(bb, cc, dd, ee, aa, block[ 3], 13);
- JJ(aa, bb, cc, dd, ee, block[ 8], 14);
- JJ(ee, aa, bb, cc, dd, block[11], 11);
- JJ(dd, ee, aa, bb, cc, block[ 6], 8);
- JJ(cc, dd, ee, aa, bb, block[15], 5);
- JJ(bb, cc, dd, ee, aa, block[13], 6);
-
- /* parallel round 1 */
- JJJ(aaa, bbb, ccc, ddd, eee, block[ 5], 8);
- JJJ(eee, aaa, bbb, ccc, ddd, block[14], 9);
- JJJ(ddd, eee, aaa, bbb, ccc, block[ 7], 9);
- JJJ(ccc, ddd, eee, aaa, bbb, block[ 0], 11);
- JJJ(bbb, ccc, ddd, eee, aaa, block[ 9], 13);
- JJJ(aaa, bbb, ccc, ddd, eee, block[ 2], 15);
- JJJ(eee, aaa, bbb, ccc, ddd, block[11], 15);
- JJJ(ddd, eee, aaa, bbb, ccc, block[ 4], 5);
- JJJ(ccc, ddd, eee, aaa, bbb, block[13], 7);
- JJJ(bbb, ccc, ddd, eee, aaa, block[ 6], 7);
- JJJ(aaa, bbb, ccc, ddd, eee, block[15], 8);
- JJJ(eee, aaa, bbb, ccc, ddd, block[ 8], 11);
- JJJ(ddd, eee, aaa, bbb, ccc, block[ 1], 14);
- JJJ(ccc, ddd, eee, aaa, bbb, block[10], 14);
- JJJ(bbb, ccc, ddd, eee, aaa, block[ 3], 12);
- JJJ(aaa, bbb, ccc, ddd, eee, block[12], 6);
-
- /* parallel round 2 */
- III(eee, aaa, bbb, ccc, ddd, block[ 6], 9);
- III(ddd, eee, aaa, bbb, ccc, block[11], 13);
- III(ccc, ddd, eee, aaa, bbb, block[ 3], 15);
- III(bbb, ccc, ddd, eee, aaa, block[ 7], 7);
- III(aaa, bbb, ccc, ddd, eee, block[ 0], 12);
- III(eee, aaa, bbb, ccc, ddd, block[13], 8);
- III(ddd, eee, aaa, bbb, ccc, block[ 5], 9);
- III(ccc, ddd, eee, aaa, bbb, block[10], 11);
- III(bbb, ccc, ddd, eee, aaa, block[14], 7);
- III(aaa, bbb, ccc, ddd, eee, block[15], 7);
- III(eee, aaa, bbb, ccc, ddd, block[ 8], 12);
- III(ddd, eee, aaa, bbb, ccc, block[12], 7);
- III(ccc, ddd, eee, aaa, bbb, block[ 4], 6);
- III(bbb, ccc, ddd, eee, aaa, block[ 9], 15);
- III(aaa, bbb, ccc, ddd, eee, block[ 1], 13);
- III(eee, aaa, bbb, ccc, ddd, block[ 2], 11);
-
- /* parallel round 3 */
- HHH(ddd, eee, aaa, bbb, ccc, block[15], 9);
- HHH(ccc, ddd, eee, aaa, bbb, block[ 5], 7);
- HHH(bbb, ccc, ddd, eee, aaa, block[ 1], 15);
- HHH(aaa, bbb, ccc, ddd, eee, block[ 3], 11);
- HHH(eee, aaa, bbb, ccc, ddd, block[ 7], 8);
- HHH(ddd, eee, aaa, bbb, ccc, block[14], 6);
- HHH(ccc, ddd, eee, aaa, bbb, block[ 6], 6);
- HHH(bbb, ccc, ddd, eee, aaa, block[ 9], 14);
- HHH(aaa, bbb, ccc, ddd, eee, block[11], 12);
- HHH(eee, aaa, bbb, ccc, ddd, block[ 8], 13);
- HHH(ddd, eee, aaa, bbb, ccc, block[12], 5);
- HHH(ccc, ddd, eee, aaa, bbb, block[ 2], 14);
- HHH(bbb, ccc, ddd, eee, aaa, block[10], 13);
- HHH(aaa, bbb, ccc, ddd, eee, block[ 0], 13);
- HHH(eee, aaa, bbb, ccc, ddd, block[ 4], 7);
- HHH(ddd, eee, aaa, bbb, ccc, block[13], 5);
-
- /* parallel round 4 */
- GGG(ccc, ddd, eee, aaa, bbb, block[ 8], 15);
- GGG(bbb, ccc, ddd, eee, aaa, block[ 6], 5);
- GGG(aaa, bbb, ccc, ddd, eee, block[ 4], 8);
- GGG(eee, aaa, bbb, ccc, ddd, block[ 1], 11);
- GGG(ddd, eee, aaa, bbb, ccc, block[ 3], 14);
- GGG(ccc, ddd, eee, aaa, bbb, block[11], 14);
- GGG(bbb, ccc, ddd, eee, aaa, block[15], 6);
- GGG(aaa, bbb, ccc, ddd, eee, block[ 0], 14);
- GGG(eee, aaa, bbb, ccc, ddd, block[ 5], 6);
- GGG(ddd, eee, aaa, bbb, ccc, block[12], 9);
- GGG(ccc, ddd, eee, aaa, bbb, block[ 2], 12);
- GGG(bbb, ccc, ddd, eee, aaa, block[13], 9);
- GGG(aaa, bbb, ccc, ddd, eee, block[ 9], 12);
- GGG(eee, aaa, bbb, ccc, ddd, block[ 7], 5);
- GGG(ddd, eee, aaa, bbb, ccc, block[10], 15);
- GGG(ccc, ddd, eee, aaa, bbb, block[14], 8);
-
- /* parallel round 5 */
- FFF(bbb, ccc, ddd, eee, aaa, block[12] , 8);
- FFF(aaa, bbb, ccc, ddd, eee, block[15] , 5);
- FFF(eee, aaa, bbb, ccc, ddd, block[10] , 12);
- FFF(ddd, eee, aaa, bbb, ccc, block[ 4] , 9);
- FFF(ccc, ddd, eee, aaa, bbb, block[ 1] , 12);
- FFF(bbb, ccc, ddd, eee, aaa, block[ 5] , 5);
- FFF(aaa, bbb, ccc, ddd, eee, block[ 8] , 14);
- FFF(eee, aaa, bbb, ccc, ddd, block[ 7] , 6);
- FFF(ddd, eee, aaa, bbb, ccc, block[ 6] , 8);
- FFF(ccc, ddd, eee, aaa, bbb, block[ 2] , 13);
- FFF(bbb, ccc, ddd, eee, aaa, block[13] , 6);
- FFF(aaa, bbb, ccc, ddd, eee, block[14] , 5);
- FFF(eee, aaa, bbb, ccc, ddd, block[ 0] , 15);
- FFF(ddd, eee, aaa, bbb, ccc, block[ 3] , 13);
- FFF(ccc, ddd, eee, aaa, bbb, block[ 9] , 11);
- FFF(bbb, ccc, ddd, eee, aaa, block[11] , 11);
-
- /* combine results */
- ddd += cc + state[1]; /* final result for state[0] */
- state[1] = state[2] + dd + eee;
- state[2] = state[3] + ee + aaa;
- state[3] = state[4] + aa + bbb;
- state[4] = state[0] + bb + ccc;
- state[0] = ddd;
-}
-
-/********************************************************************/
-
-void
-RMD160Update(RMD160_CTX *context, const u_char *data, u_int32_t nbytes)
-{
- u_int32_t X[16];
- u_int32_t ofs = 0;
- u_int32_t i;
-#if BYTE_ORDER != LITTLE_ENDIAN
- u_int32_t j;
-#endif
-
- _DIAGASSERT(context != NULL);
- _DIAGASSERT(data != NULL);
-
- /* update length[] */
- if (context->length[0] + nbytes < context->length[0])
- context->length[1]++; /* overflow to msb of length */
- context->length[0] += nbytes;
-
- ZEROIZE(X, sizeof(X));
-
- if ( context->buflen + nbytes < 64 )
- {
- (void)memcpy(context->bbuffer + context->buflen, data, nbytes);
- context->buflen += nbytes;
- }
- else
- {
- /* process first block */
- ofs = 64 - context->buflen;
- (void)memcpy(context->bbuffer + context->buflen, data, ofs);
-#if BYTE_ORDER == LITTLE_ENDIAN
- (void)memcpy(X, context->bbuffer, sizeof(X));
-#else
- for (j=0; j < 16; j++)
- X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));
-#endif
- RMD160Transform(context->state, X);
- nbytes -= ofs;
-
- /* process remaining complete blocks */
- for (i = 0; i < (nbytes >> 6); i++) {
-#if BYTE_ORDER == LITTLE_ENDIAN
- (void)memcpy(X, data + (64 * i) + ofs, sizeof(X));
-#else
- for (j=0; j < 16; j++)
- X[j] = BYTES_TO_DWORD(data + (64 * i) + (4 * j) + ofs);
-#endif
- RMD160Transform(context->state, X);
- }
-
- /*
- * Put last bytes from data into context's buffer
- */
- context->buflen = nbytes & 63;
- memcpy(context->bbuffer, data + (64 * i) + ofs, context->buflen);
- }
-}
-
-/********************************************************************/
-
-void
-RMD160Final(u_char digest[20], RMD160_CTX *context)
-{
- u_int32_t i;
- u_int32_t X[16];
-#if BYTE_ORDER != LITTLE_ENDIAN
- u_int32_t j;
-#endif
-
- _DIAGASSERT(digest != NULL);
- _DIAGASSERT(context != NULL);
-
- /* append the bit m_n == 1 */
- context->bbuffer[context->buflen] = (u_char)'\200';
-
- ZEROIZE(context->bbuffer + context->buflen + 1,
- 63 - context->buflen);
-#if BYTE_ORDER == LITTLE_ENDIAN
- (void)memcpy(X, context->bbuffer, sizeof(X));
-#else
- for (j=0; j < 16; j++)
- X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));
-#endif
- if ((context->buflen) > 55) {
- /* length goes to next block */
- RMD160Transform(context->state, X);
- ZEROIZE(X, sizeof(X));
- }
-
- /* append length in bits */
- X[14] = context->length[0] << 3;
- X[15] = (context->length[0] >> 29) |
- (context->length[1] << 3);
- RMD160Transform(context->state, X);
-
- if (digest != NULL) {
- for (i = 0; i < 20; i += 4) {
- /* extracts the 8 least significant bits. */
- digest[i] = context->state[i>>2];
- digest[i + 1] = (context->state[i>>2] >> 8);
- digest[i + 2] = (context->state[i>>2] >> 16);
- digest[i + 3] = (context->state[i>>2] >> 24);
- }
- }
-}
-
-/************************ end of file rmd160.c **********************/
diff --git a/pkgtools/digest/files/rmd160.h b/pkgtools/digest/files/rmd160.h
deleted file mode 100644
index e08a1574033..00000000000
--- a/pkgtools/digest/files/rmd160.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $NetBSD: rmd160.h,v 1.2 2002/12/21 04:06:15 schmonz Exp $ */
-
-/********************************************************************\
- *
- * FILE: rmd160.h
- *
- * CONTENTS: Header file for a sample C-implementation of the
- * RIPEMD-160 hash-function.
- * TARGET: any computer with an ANSI C compiler
- *
- * AUTHOR: Antoon Bosselaers, ESAT-COSIC
- * DATE: 1 March 1996
- * VERSION: 1.0
- *
- * Copyright (c) Katholieke Universiteit Leuven
- * 1996, All Rights Reserved
- *
-\********************************************************************/
-
-/*
- * from OpenBSD: rmd160.h,v 1.4 1999/08/16 09:59:04 millert Exp
- */
-
-#ifndef _RMD160_H_
-#define _RMD160_H_
-
-typedef struct {
- u_int32_t state[5]; /* state (ABCDE) */
- u_int32_t length[2]; /* number of bits */
- u_char bbuffer[64]; /* overflow buffer */
- u_int32_t buflen; /* number of chars in bbuffer */
-} RMD160_CTX;
-
-__BEGIN_DECLS
-void RMD160Init(RMD160_CTX *);
-void RMD160Transform(u_int32_t[5], const u_int32_t[16]);
-void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
-void RMD160Final(u_char[20], RMD160_CTX *);
-#ifndef _KERNEL
-char *RMD160End(RMD160_CTX *, char *);
-char *RMD160File(char *, char *);
-char *RMD160Data(const u_char *, size_t, char *);
-#endif /* _KERNEL */
-__END_DECLS
-
-#endif /* !_RMD160_H_ */
diff --git a/pkgtools/digest/files/rmd160hl.c b/pkgtools/digest/files/rmd160hl.c
deleted file mode 100644
index 81c5589fe4d..00000000000
--- a/pkgtools/digest/files/rmd160hl.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* $NetBSD: rmd160hl.c,v 1.3 2002/12/21 04:06:15 schmonz Exp $ */
-
-/* rmd160hl.c
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * from OpenBSD: rmd160hl.c,v 1.2 1999/08/17 09:13:12 millert Exp $
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <digest-types.h>
-
-#ifndef lint
-__RCSID("$NetBSD: rmd160hl.c,v 1.3 2002/12/21 04:06:15 schmonz Exp $");
-#endif /* not lint */
-
-
-/* #include "namespace.h" */
-
-#include <assert.h>
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <rmd160.h>
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-#if 0
-#if defined(__weak_alias)
-__weak_alias(RMD160End,_RMD160End)
-__weak_alias(RMD160File,_RMD160File)
-__weak_alias(RMD160Data,_RMD160Data)
-#endif
-#endif
-
-char *
-RMD160End(RMD160_CTX *ctx, char *buf)
-{
- int i;
- char *p = buf;
- u_char digest[20];
- static const char hex[]="0123456789abcdef";
-
- _DIAGASSERT(ctx != NULL);
- /* buf may be NULL */
-
- if (p == NULL && (p = malloc(41)) == NULL)
- return 0;
-
- RMD160Final(digest,ctx);
- for (i = 0; i < 20; i++) {
- p[i + i] = hex[(u_int32_t)digest[i] >> 4];
- p[i + i + 1] = hex[digest[i] & 0x0f];
- }
- p[i + i] = '\0';
- return(p);
-}
-
-char *
-RMD160File(char *filename, char *buf)
-{
- u_char buffer[BUFSIZ];
- RMD160_CTX ctx;
- int fd, num, oerrno;
-
- _DIAGASSERT(filename != NULL);
- /* XXX: buf may be NULL ? */
-
- RMD160Init(&ctx);
-
- if ((fd = open(filename, O_RDONLY)) < 0)
- return(0);
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0)
- RMD160Update(&ctx, buffer, (size_t)num);
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
- return(num < 0 ? 0 : RMD160End(&ctx, buf));
-}
-
-char *
-RMD160Data(const u_char *data, size_t len, char *buf)
-{
- RMD160_CTX ctx;
-
- _DIAGASSERT(data != NULL);
- /* XXX: buf may be NULL ? */
-
- RMD160Init(&ctx);
- RMD160Update(&ctx, data, len);
- return(RMD160End(&ctx, buf));
-}
diff --git a/pkgtools/digest/files/sha1.c b/pkgtools/digest/files/sha1.c
deleted file mode 100644
index 2e0c2c66e20..00000000000
--- a/pkgtools/digest/files/sha1.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/* $NetBSD: sha1.c,v 1.5 2002/12/21 04:06:15 schmonz Exp $ */
-/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
-
-/*
- * SHA-1 in C
- * By Steve Reid <steve@edmweb.com>
- * 100% Public Domain
- *
- * Test Vectors (from FIPS PUB 180-1)
- * "abc"
- * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
- * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
- * 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
- * A million repetitions of "a"
- * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <digest-types.h>
-
-#define SHA1HANDSOFF /* Copies data before messing with it. */
-
-#if defined(_KERNEL) || defined(_STANDALONE)
-#include <sys/param.h>
-#include <sys/systm.h>
-#define _DIAGASSERT(x) (void)0
-#else
-/* #include "namespace.h" */
-#include <assert.h>
-#include <string.h>
-#endif
-
-#include <sha1.h>
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-/*
- * XXX Kludge until there is resolution regarding mem*() functions
- * XXX in the kernel.
- */
-#if defined(_KERNEL) || defined(_STANDALONE)
-#define memcpy(s, d, l) bcopy((d), (s), (l))
-#endif
-
-#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
-
-/*
- * blk0() and blk() perform the initial expand.
- * I got the idea of expanding during the round function from SSLeay
- */
-#if BYTE_ORDER == LITTLE_ENDIAN
-# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
- |(rol(block->l[i],8)&0x00FF00FF))
-#else
-# define blk0(i) block->l[i]
-#endif
-#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
- ^block->l[(i+2)&15]^block->l[i&15],1))
-
-/*
- * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1
- */
-#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
-#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
-#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
-#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
-#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
-
-
-#if 0
-__weak_alias(SHA1Transform,_SHA1Transform)
-__weak_alias(SHA1Init,_SHA1Init)
-__weak_alias(SHA1Update,_SHA1Update)
-__weak_alias(SHA1Final,_SHA1Final)
-#endif
-
-typedef union {
- u_char c[64];
- u_int l[16];
-} CHAR64LONG16;
-
-#ifdef __sparc_v9__
-void do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-void do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-void do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-void do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-
-#define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i)
-#define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i)
-#define nR2(v,w,x,y,z,i) R2(*v,*w,*x,*y,*z,i)
-#define nR3(v,w,x,y,z,i) R3(*v,*w,*x,*y,*z,i)
-#define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i)
-
-void
-do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3);
- nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7);
- nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11);
- nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15);
- nR1(e,a,b,c,d,16); nR1(d,e,a,b,c,17); nR1(c,d,e,a,b,18); nR1(b,c,d,e,a,19);
-}
-
-void
-do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23);
- nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27);
- nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31);
- nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35);
- nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39);
-}
-
-void
-do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43);
- nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47);
- nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51);
- nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55);
- nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59);
-}
-
-void
-do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63);
- nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67);
- nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71);
- nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75);
- nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79);
-}
-#endif
-
-/*
- * Hash a single 512-bit block. This is the core of the algorithm.
- */
-void SHA1Transform(state, buffer)
- u_int32_t state[5];
- const u_char buffer[64];
-{
- u_int32_t a, b, c, d, e;
- CHAR64LONG16 *block;
-
-#ifdef SHA1HANDSOFF
- CHAR64LONG16 workspace;
-#endif
-
- _DIAGASSERT(buffer != 0);
- _DIAGASSERT(state != 0);
-
-#ifdef SHA1HANDSOFF
- block = &workspace;
- (void)memcpy(block, buffer, 64);
-#else
- block = (CHAR64LONG16 *)(void *)buffer;
-#endif
-
- /* Copy context->state[] to working vars */
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
-
-#ifdef __sparc_v9__
- do_R01(&a, &b, &c, &d, &e, block);
- do_R2(&a, &b, &c, &d, &e, block);
- do_R3(&a, &b, &c, &d, &e, block);
- do_R4(&a, &b, &c, &d, &e, block);
-#else
- /* 4 rounds of 20 operations each. Loop unrolled. */
- R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
- R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
- R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
- R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
- R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
- R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
- R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
- R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
- R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
- R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
- R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
- R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
- R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
- R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
- R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
- R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
- R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
- R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
- R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
- R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
-#endif
-
- /* Add the working vars back into context.state[] */
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
-
- /* Wipe variables */
- a = b = c = d = e = 0;
-}
-
-
-/*
- * SHA1Init - Initialize new context
- */
-void SHA1Init(context)
- SHA1_CTX *context;
-{
-
- _DIAGASSERT(context != 0);
-
- /* SHA1 initialization constants */
- context->state[0] = 0x67452301;
- context->state[1] = 0xEFCDAB89;
- context->state[2] = 0x98BADCFE;
- context->state[3] = 0x10325476;
- context->state[4] = 0xC3D2E1F0;
- context->count[0] = context->count[1] = 0;
-}
-
-
-/*
- * Run your data through this.
- */
-void SHA1Update(context, data, len)
- SHA1_CTX *context;
- const u_char *data;
- u_int len;
-{
- u_int i, j;
-
- _DIAGASSERT(context != 0);
- _DIAGASSERT(data != 0);
-
- j = context->count[0];
- if ((context->count[0] += len << 3) < j)
- context->count[1] += (len>>29)+1;
- j = (j >> 3) & 63;
- if ((j + len) > 63) {
- (void)memcpy(&context->buffer[j], data, (i = 64-j));
- SHA1Transform(context->state, context->buffer);
- for ( ; i + 63 < len; i += 64)
- SHA1Transform(context->state, &data[i]);
- j = 0;
- } else {
- i = 0;
- }
- (void)memcpy(&context->buffer[j], &data[i], len - i);
-}
-
-
-/*
- * Add padding and return the message digest.
- */
-void SHA1Final(digest, context)
- u_char digest[20];
- SHA1_CTX* context;
-{
- u_int i;
- u_char finalcount[8];
-
- _DIAGASSERT(digest != 0);
- _DIAGASSERT(context != 0);
-
- for (i = 0; i < 8; i++) {
- finalcount[i] = (u_char)((context->count[(i >= 4 ? 0 : 1)]
- >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
- }
- SHA1Update(context, (const u_char *)"\200", 1);
- while ((context->count[0] & 504) != 448)
- SHA1Update(context, (const u_char *)"\0", 1);
- SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
-
- if (digest) {
- for (i = 0; i < 20; i++)
- digest[i] = (u_char)
- ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
- }
-}
diff --git a/pkgtools/digest/files/sha1.h b/pkgtools/digest/files/sha1.h
deleted file mode 100644
index 991ab90cf75..00000000000
--- a/pkgtools/digest/files/sha1.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $NetBSD: sha1.h,v 1.2 2002/12/21 04:06:15 schmonz Exp $ */
-
-/*
- * SHA-1 in C
- * By Steve Reid <steve@edmweb.com>
- * 100% Public Domain
- */
-
-#ifndef _SYS_SHA1_H_
-#define _SYS_SHA1_H_
-
-typedef struct {
- u_int32_t state[5];
- u_int32_t count[2];
- u_char buffer[64];
-} SHA1_CTX;
-
-void SHA1Transform __P((u_int32_t state[5], const u_char buffer[64]));
-void SHA1Init __P((SHA1_CTX *context));
-void SHA1Update __P((SHA1_CTX *context, const u_char *data, u_int len));
-void SHA1Final __P((u_char digest[20], SHA1_CTX *context));
-#ifndef _KERNEL
-char *SHA1End __P((SHA1_CTX *, char *));
-char *SHA1File __P((char *, char *));
-char *SHA1Data __P((const u_char *, size_t, char *));
-#endif /* _KERNEL */
-
-#endif /* _SYS_SHA1_H_ */
diff --git a/pkgtools/digest/files/sha1hl.c b/pkgtools/digest/files/sha1hl.c
deleted file mode 100644
index b720f50b5c6..00000000000
--- a/pkgtools/digest/files/sha1hl.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* $NetBSD: sha1hl.c,v 1.4 2002/12/21 04:06:15 schmonz Exp $ */
-
-/* sha1hl.c
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-/* #include "namespace.h" */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <digest-types.h>
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_SYS_FILE_H
-#include <sys/file.h>
-#endif
-#include <sys/uio.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <sha1.h>
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: sha1hl.c,v 1.4 2002/12/21 04:06:15 schmonz Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-#if 0
-__weak_alias(SHA1End,_SHA1End)
-__weak_alias(SHA1File,_SHA1File)
-__weak_alias(SHA1Data,_SHA1Data)
-#endif
-
-/* ARGSUSED */
-char *
-SHA1End(ctx, buf)
- SHA1_CTX *ctx;
- char *buf;
-{
- int i;
- char *p = buf;
- u_char digest[20];
- static const char hex[]="0123456789abcdef";
-
- _DIAGASSERT(ctx != NULL);
- /* buf may be NULL */
-
- if (p == NULL && (p = malloc(41)) == NULL)
- return 0;
-
- SHA1Final(digest,ctx);
- for (i = 0; i < 20; i++) {
- p[i + i] = hex[((u_int32_t)digest[i]) >> 4];
- p[i + i + 1] = hex[digest[i] & 0x0f];
- }
- p[i + i] = '\0';
- return(p);
-}
-
-char *
-SHA1File (filename, buf)
- char *filename;
- char *buf;
-{
- u_char buffer[BUFSIZ];
- SHA1_CTX ctx;
- int fd, num, oerrno;
-
- _DIAGASSERT(filename != NULL);
- /* XXX: buf may be NULL ? */
-
- SHA1Init(&ctx);
-
- if ((fd = open(filename,O_RDONLY)) < 0)
- return(0);
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0)
- SHA1Update(&ctx, buffer, (size_t)num);
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
- return(num < 0 ? 0 : SHA1End(&ctx, buf));
-}
-
-char *
-SHA1Data (data, len, buf)
- const u_char *data;
- size_t len;
- char *buf;
-{
- SHA1_CTX ctx;
-
- _DIAGASSERT(data != NULL);
- /* XXX: buf may be NULL ? */
-
- SHA1Init(&ctx);
- SHA1Update(&ctx, data, len);
- return(SHA1End(&ctx, buf));
-}
diff --git a/pkgtools/digest/files/sha2.c b/pkgtools/digest/files/sha2.c
deleted file mode 100644
index 7312981d97b..00000000000
--- a/pkgtools/digest/files/sha2.c
+++ /dev/null
@@ -1,946 +0,0 @@
-/*
- * sha2.c
- *
- * Version 1.0.0beta1
- *
- * Written by Aaron D. Gifford <me@aarongifford.com>
- *
- * Copyright 2000 Aaron D. Gifford. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <digest-types.h>
-
-
-#include <stdio.h>
-#include <string.h> /* memcpy()/memset() or bcopy()/bzero() */
-#include <assert.h> /* assert() */
-#include "sha2.h"
-
-/*
- * ASSERT NOTE:
- * Some sanity checking code is included using assert(). On my FreeBSD
- * system, this additional code can be removed by compiling with NDEBUG
- * defined. Check your own systems manpage on assert() to see how to
- * compile WITHOUT the sanity checking code on your system.
- *
- * UNROLLED TRANSFORM LOOP NOTE:
- * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform
- * loop version for the hash transform rounds (defined using macros
- * later in this file). Either define on the command line, for example:
- *
- * cc -DSHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c
- *
- * or define below:
- *
- * #define SHA2_UNROLL_TRANSFORM
- *
- */
-
-
-/*** SHA-256/384/512 Machine Architecture Definitions *****************/
-/*
- * BYTE_ORDER NOTE:
- *
- * Please make sure that your system defines BYTE_ORDER. If your
- * architecture is little-endian, make sure it also defines
- * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
- * equivilent.
- *
- * If your system does not define the above, then you can do so by
- * hand like this:
- *
- * #define LITTLE_ENDIAN 1234
- * #define BIG_ENDIAN 4321
- *
- * And for little-endian machines, add:
- *
- * #define BYTE_ORDER LITTLE_ENDIAN
- *
- * Or for big-endian machines:
- *
- * #define BYTE_ORDER BIG_ENDIAN
- *
- * The FreeBSD machine this was written on defines BYTE_ORDER
- * appropriately by including <sys/types.h> (which in turn includes
- * <machine/endian.h> where the appropriate definitions are actually
- * made).
- */
-#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
-#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
-#endif
-
-/*** SHA-256/384/512 Various Length Definitions ***********************/
-/* NOTE: Most of these are in sha2.h */
-#define SHA256_SHORT_BLOCK_LENGTH (SHA256_BLOCK_LENGTH - 8)
-#define SHA384_SHORT_BLOCK_LENGTH (SHA384_BLOCK_LENGTH - 16)
-#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16)
-
-
-/*** ENDIAN REVERSAL MACROS *******************************************/
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define REVERSE32(w,x) { \
- sha2_word32 tmp = (w); \
- tmp = (tmp >> 16) | (tmp << 16); \
- (x) = ((tmp & 0xff00ff00UL) >> 8) | ((tmp & 0x00ff00ffUL) << 8); \
-}
-#define REVERSE64(w,x) { \
- sha2_word64 tmp = (w); \
- tmp = (tmp >> 32) | (tmp << 32); \
- tmp = ((tmp & 0xff00ff00ff00ff00ULL) >> 8) | \
- ((tmp & 0x00ff00ff00ff00ffULL) << 8); \
- (x) = ((tmp & 0xffff0000ffff0000ULL) >> 16) | \
- ((tmp & 0x0000ffff0000ffffULL) << 16); \
-}
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-/*
- * Macro for incrementally adding the unsigned 64-bit integer n to the
- * unsigned 128-bit integer (represented using a two-element array of
- * 64-bit words):
- */
-#define ADDINC128(w,n) { \
- (w)[0] += (sha2_word64)(n); \
- if ((w)[0] < (n)) { \
- (w)[1]++; \
- } \
-}
-
-#if !defined(MEMSET_BZERO) && !defined(MEMCPY_BCOPY)
-/*
- * Macros for copying blocks of memory and for zeroing out ranges
- * of memory. Using these macros makes it easy to switch from
- * using memset()/memcpy() and using bzero()/bcopy().
- *
- * Please define either SHA2_USE_MEMSET_MEMCPY or define
- * SHA2_USE_BZERO_BCOPY depending on which function set you
- * choose to use:
- */
-#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY)
-/* Default to memset()/memcpy() if no option is specified */
-#define SHA2_USE_MEMSET_MEMCPY 1
-#endif
-#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY)
-/* Abort with an error if BOTH options are defined */
-#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both!
-#endif
-
-#ifdef SHA2_USE_MEMSET_MEMCPY
-#define MEMSET_BZERO(p,l) memset((p), 0, (l))
-#define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l))
-#endif
-#ifdef SHA2_USE_BZERO_BCOPY
-#define MEMSET_BZERO(p,l) bzero((p), (l))
-#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l))
-#endif
-#endif /* !defined(MEMSET_BZERO) && !defined(MEMCPY_BCOPY) */
-
-/*** THE SIX LOGICAL FUNCTIONS ****************************************/
-/*
- * Bit shifting and rotation (used by the six SHA-XYZ logical functions:
- *
- * NOTE: The naming of R and S appears backwards here (R is a SHIFT and
- * S is a ROTATION) because the SHA-256/384/512 description document
- * (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this
- * same "backwards" definition.
- */
-/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */
-#define R(b,x) ((x) >> (b))
-/* 32-bit Rotate-right (used in SHA-256): */
-#define S32(b,x) (((x) >> (b)) | ((x) << (32 - (b))))
-/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */
-#define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b))))
-
-/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */
-#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
-#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
-
-/* Four of six logical functions used in SHA-256: */
-#define Sigma0_256(x) (S32(2, (x)) ^ S32(13, (x)) ^ S32(22, (x)))
-#define Sigma1_256(x) (S32(6, (x)) ^ S32(11, (x)) ^ S32(25, (x)))
-#define sigma0_256(x) (S32(7, (x)) ^ S32(18, (x)) ^ R(3 , (x)))
-#define sigma1_256(x) (S32(17, (x)) ^ S32(19, (x)) ^ R(10, (x)))
-
-/* Four of six logical functions used in SHA-384 and SHA-512: */
-#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
-#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
-#define sigma0_512(x) (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7, (x)))
-#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x)))
-
-/*** INTERNAL FUNCTION PROTOTYPES *************************************/
-/* NOTE: These should not be accessed directly from outside this
- * library -- they are intended for private internal visibility/use
- * only.
- */
-void SHA512_Last(SHA512_CTX*);
-void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
-void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
-
-
-/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
-/* Hash constant words K for SHA-256: */
-const static sha2_word32 K256[64] = {
- 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
- 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
- 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
- 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
- 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
- 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
- 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
- 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL,
- 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
- 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
- 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
- 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
- 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
- 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
- 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
- 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
-};
-
-/* Initial hash value H for SHA-256: */
-const static sha2_word32 sha256_initial_hash_value[8] = {
- 0x6a09e667UL,
- 0xbb67ae85UL,
- 0x3c6ef372UL,
- 0xa54ff53aUL,
- 0x510e527fUL,
- 0x9b05688cUL,
- 0x1f83d9abUL,
- 0x5be0cd19UL
-};
-
-/* Hash constant words K for SHA-384 and SHA-512: */
-const static sha2_word64 K512[80] = {
- 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
- 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
- 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
- 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
- 0xd807aa98a3030242ULL, 0x12835b0145706fbeULL,
- 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
- 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL,
- 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
- 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL,
- 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
- 0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL,
- 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
- 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL,
- 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
- 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL,
- 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
- 0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL,
- 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
- 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL,
- 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
- 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL,
- 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
- 0xd192e819d6ef5218ULL, 0xd69906245565a910ULL,
- 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
- 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL,
- 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
- 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL,
- 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
- 0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL,
- 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
- 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL,
- 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
- 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL,
- 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
- 0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL,
- 0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
- 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL,
- 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
- 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL,
- 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
-};
-
-/* Initial hash value H for SHA-384 */
-const static sha2_word64 sha384_initial_hash_value[8] = {
- 0xcbbb9d5dc1059ed8ULL,
- 0x629a292a367cd507ULL,
- 0x9159015a3070dd17ULL,
- 0x152fecd8f70e5939ULL,
- 0x67332667ffc00b31ULL,
- 0x8eb44a8768581511ULL,
- 0xdb0c2e0d64f98fa7ULL,
- 0x47b5481dbefa4fa4ULL
-};
-
-/* Initial hash value H for SHA-512 */
-const static sha2_word64 sha512_initial_hash_value[8] = {
- 0x6a09e667f3bcc908ULL,
- 0xbb67ae8584caa73bULL,
- 0x3c6ef372fe94f82bULL,
- 0xa54ff53a5f1d36f1ULL,
- 0x510e527fade682d1ULL,
- 0x9b05688c2b3e6c1fULL,
- 0x1f83d9abfb41bd6bULL,
- 0x5be0cd19137e2179ULL
-};
-
-
-/*** SHA-256: *********************************************************/
-void SHA256_Init(SHA256_CTX* context) {
- if (context == (SHA256_CTX*)0) {
- return;
- }
- MEMCPY_BCOPY(context->state, sha256_initial_hash_value, SHA256_DIGEST_LENGTH);
- MEMSET_BZERO(context->buffer, SHA256_BLOCK_LENGTH);
- context->bitcount = 0;
-}
-
-#ifdef SHA2_UNROLL_TRANSFORM
-
-/* Unrolled SHA-256 round macros: */
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-
-#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \
- REVERSE32(*data++, W256[j]); \
- T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
- K256[j] + W256[j]; \
- (d) += T1; \
- (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
- j++
-
-
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \
- T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
- K256[j] + (W256[j] = *data++); \
- (d) += T1; \
- (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
- j++
-
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND256(a,b,c,d,e,f,g,h) \
- s0 = W256[(j+1)&0x0f]; \
- s0 = sigma0_256(s0); \
- s1 = W256[(j+14)&0x0f]; \
- s1 = sigma1_256(s1); \
- T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \
- (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \
- (d) += T1; \
- (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
- j++
-
-void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
- sha2_word32 a, b, c, d, e, f, g, h, s0, s1;
- sha2_word32 T1, *W256;
- int j;
-
- W256 = (sha2_word32*)context->buffer;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
- /* Rounds 0 to 15 (unrolled): */
- ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
- ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
- ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
- ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
- ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
- ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
- ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
- ROUND256_0_TO_15(b,c,d,e,f,g,h,a);
- } while (j < 16);
-
- /* Now for the remaining rounds to 64: */
- do {
- ROUND256(a,b,c,d,e,f,g,h);
- ROUND256(h,a,b,c,d,e,f,g);
- ROUND256(g,h,a,b,c,d,e,f);
- ROUND256(f,g,h,a,b,c,d,e);
- ROUND256(e,f,g,h,a,b,c,d);
- ROUND256(d,e,f,g,h,a,b,c);
- ROUND256(c,d,e,f,g,h,a,b);
- ROUND256(b,c,d,e,f,g,h,a);
- } while (j < 64);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = 0;
-}
-
-#else /* SHA2_UNROLL_TRANSFORM */
-
-void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
- sha2_word32 a, b, c, d, e, f, g, h, s0, s1;
- sha2_word32 T1, T2, *W256;
- int j;
-
- W256 = (sha2_word32*)context->buffer;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Copy data while converting to host byte order */
- REVERSE32(*data++,W256[j]);
- /* Apply the SHA-256 compression function to update a..h */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
- /* Apply the SHA-256 compression function to update a..h with copy */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
- T2 = Sigma0_256(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 16);
-
- do {
- /* Part of the message block expansion: */
- s0 = W256[(j+1)&0x0f];
- s0 = sigma0_256(s0);
- s1 = W256[(j+14)&0x0f];
- s1 = sigma1_256(s1);
-
- /* Apply the SHA-256 compression function to update a..h */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
- (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
- T2 = Sigma0_256(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 64);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = T2 = 0;
-}
-
-#endif /* SHA2_UNROLL_TRANSFORM */
-
-void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
- unsigned int freespace, usedspace;
-
- if (len == 0) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- assert(context != NULL && data != NULL);
-
- usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
- if (usedspace > 0) {
- /* Calculate how much free space is available in the buffer */
- freespace = SHA256_BLOCK_LENGTH - usedspace;
-
- if (len >= freespace) {
- /* Fill the buffer completely and process it */
- MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
- context->bitcount += freespace << 3;
- len -= freespace;
- data += freespace;
- SHA256_Transform(context, (sha2_word32*)context->buffer);
- } else {
- /* The buffer is not yet full */
- MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
- context->bitcount += len << 3;
- /* Clean up: */
- usedspace = freespace = 0;
- return;
- }
- }
- while (len >= SHA256_BLOCK_LENGTH) {
- /* Process as many complete blocks as we can */
- SHA256_Transform(context, (const sha2_word32*)data);
- context->bitcount += SHA256_BLOCK_LENGTH << 3;
- len -= SHA256_BLOCK_LENGTH;
- data += SHA256_BLOCK_LENGTH;
- }
- if (len > 0) {
- /* There's left-overs, so save 'em */
- MEMCPY_BCOPY(context->buffer, data, len);
- context->bitcount += len << 3;
- }
- /* Clean up: */
- usedspace = freespace = 0;
-}
-
-void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
- sha2_word32 *d = (sha2_word32*)digest;
- unsigned int usedspace;
-
- /* Sanity check: */
- assert(context != NULL);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (sha2_byte*)0) {
- usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Convert FROM host byte order */
- REVERSE64(context->bitcount,context->bitcount);
-#endif
- if (usedspace > 0) {
- /* Begin padding with a 1 bit: */
- context->buffer[usedspace++] = 0x80;
-
- if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) {
- /* Set-up for the last transform: */
- MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
- } else {
- if (usedspace < SHA256_BLOCK_LENGTH) {
- MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
- }
- /* Do second-to-last transform: */
- SHA256_Transform(context, (sha2_word32*)context->buffer);
-
- /* And set-up for the last transform: */
- MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
- }
- } else {
- /* Set-up for the last transform: */
- MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
-
- /* Begin padding with a 1 bit: */
- *context->buffer = 0x80;
- }
- /* Set the bit count: */
- *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
-
- /* Final transform: */
- SHA256_Transform(context, (sha2_word32*)context->buffer);
-
-#if BYTE_ORDER == LITTLE_ENDIAN
- {
- /* Convert TO host byte order */
- int j;
- for (j = 0; j < 8; j++) {
- REVERSE32(context->state[j],context->state[j]);
- *d++ = context->state[j];
- }
- }
-#else
- MEMCPY_BCOPY(d, context->state, SHA256_DIGEST_LENGTH);
-#endif
- }
-
- /* Clean up state data: */
- MEMSET_BZERO(context, sizeof(SHA256_CTX));
- usedspace = 0;
-}
-
-/*** SHA-512: *********************************************************/
-void SHA512_Init(SHA512_CTX* context) {
- if (context == (SHA512_CTX*)0) {
- return;
- }
- MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH);
- MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH);
- context->bitcount[0] = context->bitcount[1] = 0;
-}
-
-#ifdef SHA2_UNROLL_TRANSFORM
-
-/* Unrolled SHA-512 round macros: */
-#if BYTE_ORDER == LITTLE_ENDIAN
-
-#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \
- REVERSE64(*data++, W512[j]); \
- T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
- K512[j] + W512[j]; \
- (d) += T1, \
- (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \
- j++
-
-
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \
- T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
- K512[j] + (W512[j] = *data++); \
- (d) += T1; \
- (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
- j++
-
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND512(a,b,c,d,e,f,g,h) \
- s0 = W512[(j+1)&0x0f]; \
- s0 = sigma0_512(s0); \
- s1 = W512[(j+14)&0x0f]; \
- s1 = sigma1_512(s1); \
- T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \
- (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \
- (d) += T1; \
- (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
- j++
-
-void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
- sha2_word64 a, b, c, d, e, f, g, h, s0, s1;
- sha2_word64 T1, *W512 = (sha2_word64*)context->buffer;
- int j;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
- ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
- ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
- ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
- ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
- ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
- ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
- ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
- ROUND512_0_TO_15(b,c,d,e,f,g,h,a);
- } while (j < 16);
-
- /* Now for the remaining rounds up to 79: */
- do {
- ROUND512(a,b,c,d,e,f,g,h);
- ROUND512(h,a,b,c,d,e,f,g);
- ROUND512(g,h,a,b,c,d,e,f);
- ROUND512(f,g,h,a,b,c,d,e);
- ROUND512(e,f,g,h,a,b,c,d);
- ROUND512(d,e,f,g,h,a,b,c);
- ROUND512(c,d,e,f,g,h,a,b);
- ROUND512(b,c,d,e,f,g,h,a);
- } while (j < 80);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = 0;
-}
-
-#else /* SHA2_UNROLL_TRANSFORM */
-
-void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
- sha2_word64 a, b, c, d, e, f, g, h, s0, s1;
- sha2_word64 T1, T2, *W512 = (sha2_word64*)context->buffer;
- int j;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Convert TO host byte order */
- REVERSE64(*data++, W512[j]);
- /* Apply the SHA-512 compression function to update a..h */
- T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
- /* Apply the SHA-512 compression function to update a..h with copy */
- T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
- T2 = Sigma0_512(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 16);
-
- do {
- /* Part of the message block expansion: */
- s0 = W512[(j+1)&0x0f];
- s0 = sigma0_512(s0);
- s1 = W512[(j+14)&0x0f];
- s1 = sigma1_512(s1);
-
- /* Apply the SHA-512 compression function to update a..h */
- T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
- (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0);
- T2 = Sigma0_512(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 80);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = T2 = 0;
-}
-
-#endif /* SHA2_UNROLL_TRANSFORM */
-
-void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) {
- unsigned int freespace, usedspace;
-
- if (len == 0) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- assert(context != NULL && data != NULL);
-
- usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
- if (usedspace > 0) {
- /* Calculate how much free space is available in the buffer */
- freespace = SHA512_BLOCK_LENGTH - usedspace;
-
- if (len >= freespace) {
- /* Fill the buffer completely and process it */
- MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
- ADDINC128(context->bitcount, freespace << 3);
- len -= freespace;
- data += freespace;
- SHA512_Transform(context, (const sha2_word64*)context->buffer);
- } else {
- /* The buffer is not yet full */
- MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
- ADDINC128(context->bitcount, len << 3);
- /* Clean up: */
- usedspace = freespace = 0;
- return;
- }
- }
- while (len >= SHA512_BLOCK_LENGTH) {
- /* Process as many complete blocks as we can */
- SHA512_Transform(context, (const sha2_word64*)data);
- ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3);
- len -= SHA512_BLOCK_LENGTH;
- data += SHA512_BLOCK_LENGTH;
- }
- if (len > 0) {
- /* There's left-overs, so save 'em */
- MEMCPY_BCOPY(context->buffer, data, len);
- ADDINC128(context->bitcount, len << 3);
- }
- /* Clean up: */
- usedspace = freespace = 0;
-}
-
-void SHA512_Last(SHA512_CTX* context) {
- unsigned int usedspace;
-
- usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Convert FROM host byte order */
- REVERSE64(context->bitcount[0],context->bitcount[0]);
- REVERSE64(context->bitcount[1],context->bitcount[1]);
-#endif
- if (usedspace > 0) {
- /* Begin padding with a 1 bit: */
- context->buffer[usedspace++] = 0x80;
-
- if (usedspace < SHA512_SHORT_BLOCK_LENGTH) {
- /* Set-up for the last transform: */
- MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
- } else {
- if (usedspace < SHA512_BLOCK_LENGTH) {
- MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
- }
- /* Do second-to-last transform: */
- SHA512_Transform(context, (const sha2_word64*)context->buffer);
-
- /* And set-up for the last transform: */
- MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2);
- }
- } else {
- /* Prepare for final transform: */
- MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH);
-
- /* Begin padding with a 1 bit: */
- *context->buffer = 0x80;
- }
- /* Store the length of input data (in bits): */
- *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
- *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
-
- /* Final transform: */
- SHA512_Transform(context, (const sha2_word64*)context->buffer);
-}
-
-void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
- sha2_word64 *d = (sha2_word64*)digest;
-
- /* Sanity check: */
- assert(context != NULL);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (sha2_byte*)0) {
- SHA512_Last(context);
-
- /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
- {
- /* Convert TO host byte order */
- int j;
- for (j = 0; j < 8; j++) {
- REVERSE64(context->state[j],context->state[j]);
- *d++ = context->state[j];
- }
- }
-#else
- MEMCPY_BCOPY(d, context->state, SHA512_DIGEST_LENGTH);
-#endif
- }
-
- /* Zero out state data */
- MEMSET_BZERO(context, sizeof(SHA512_CTX));
-}
-
-
-/*** SHA-384: *********************************************************/
-void SHA384_Init(SHA384_CTX* context) {
- if (context == (SHA384_CTX*)0) {
- return;
- }
- MEMCPY_BCOPY(context->state, sha384_initial_hash_value, SHA512_DIGEST_LENGTH);
- MEMSET_BZERO(context->buffer, SHA384_BLOCK_LENGTH);
- context->bitcount[0] = context->bitcount[1] = 0;
-}
-
-void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
- SHA512_Update((SHA512_CTX*)context, data, len);
-}
-
-void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
- sha2_word64 *d = (sha2_word64*)digest;
-
- /* Sanity check: */
- assert(context != NULL);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (sha2_byte*)0) {
- SHA512_Last((SHA512_CTX*)context);
-
- /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
- {
- /* Convert TO host byte order */
- int j;
- for (j = 0; j < 6; j++) {
- REVERSE64(context->state[j],context->state[j]);
- *d++ = context->state[j];
- }
- }
-#else
- MEMCPY_BCOPY(d, context->state, SHA384_DIGEST_LENGTH);
-#endif
- }
-
- /* Zero out state data */
- MEMSET_BZERO(context, sizeof(SHA384_CTX));
-}
diff --git a/pkgtools/digest/files/sha2.h b/pkgtools/digest/files/sha2.h
deleted file mode 100644
index 213d516769f..00000000000
--- a/pkgtools/digest/files/sha2.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * sha2.h
- *
- * Version 1.0.0beta1
- *
- * Written by Aaron D. Gifford <me@aarongifford.com>
- *
- * Copyright 2000 Aaron D. Gifford. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#ifndef __SHA2_H__
-#define __SHA2_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Define the following sha2_* types to types of the correct length on
- * the native archtecture. Most BSD systems and Linux define u_intXX_t
- * types. Machines with very recent ANSI C headers, can use the
- * uintXX_t definintions from inttypes.h by defining USE_INTTYPES_H
- * during compile or in the sha.h header file.
- *
- * Machines that support neither u_intXX_t nor inttypes.h's uintXX_t
- * will need to define these three typedefs below (and the appropriate
- * ones in sha.h too) by hand according to their system architecture.
- *
- * Thank you, Jun-ichiro itojun Hagino, for suggesting using u_intXX_t
- * types and pointing out recent ANSI C support for uintXX_t in inttypes.h.
- */
-#ifdef USE_INTTYPES_H
-
-typedef uint8_t sha2_byte; /* Exactly 1 byte */
-typedef uint32_t sha2_word32; /* Exactly 4 bytes */
-typedef uint64_t sha2_word64; /* Exactly 8 bytes */
-
-#else /* USE_INTTYPES_H */
-
-typedef u_int8_t sha2_byte; /* Exactly 1 byte */
-typedef u_int32_t sha2_word32; /* Exactly 4 bytes */
-typedef u_int64_t sha2_word64; /* Exactly 8 bytes */
-
-#endif /* USE_INTTYPES_H */
-
-
-/*** SHA-256/384/512 Various Length Definitions ***********************/
-#define SHA256_BLOCK_LENGTH 64
-#define SHA256_DIGEST_LENGTH 32
-#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1)
-#define SHA384_BLOCK_LENGTH 128
-#define SHA384_DIGEST_LENGTH 48
-#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1)
-#define SHA512_BLOCK_LENGTH 128
-#define SHA512_DIGEST_LENGTH 64
-#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
-
-
-/*** SHA-256/384/512 Context Structures *******************************/
-typedef struct _SHA256_CTX {
- uint32_t state[8];
- uint64_t bitcount;
- uint8_t buffer[SHA256_BLOCK_LENGTH];
-} SHA256_CTX;
-typedef struct _SHA512_CTX {
- uint64_t state[8];
- uint64_t bitcount[2];
- uint8_t buffer[SHA512_BLOCK_LENGTH];
-} SHA512_CTX;
-
-typedef SHA512_CTX SHA384_CTX;
-
-
-/*** SHA-256/384/512 Function Prototypes ******************************/
-#ifndef NOPROTO
-#ifdef SHA2_USE_INTTYPES_H
-
-void SHA256_Init(SHA256_CTX *);
-void SHA256_Update(SHA256_CTX*, const uint8_t*, size_t);
-void SHA256_Final(uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
-char* SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]);
-char* SHA256_Data(const uint8_t*, size_t, uint8_t *);
-char *SHA256_File(char *, char *);
-
-void SHA384_Init(SHA384_CTX*);
-void SHA384_Update(SHA384_CTX*, const uint8_t*, size_t);
-void SHA384_Final(uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
-char* SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]);
-char* SHA384_Data(const uint8_t*, size_t, char[SHA384_DIGEST_STRING_LENGTH]);
-char *SHA384_File(char *, char *);
-
-void SHA512_Init(SHA512_CTX*);
-void SHA512_Update(SHA512_CTX*, const uint8_t*, size_t);
-void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
-char* SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]);
-char* SHA512_Data(const uint8_t*, size_t, char[SHA512_DIGEST_STRING_LENGTH]);
-char *SHA512_File(char *, char *);
-
-#else /* SHA2_USE_INTTYPES_H */
-
-void SHA256_Init(SHA256_CTX *);
-void SHA256_Update(SHA256_CTX*, const u_int8_t*, size_t);
-void SHA256_Final(u_int8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
-char* SHA256_End(SHA256_CTX*, u_char *);
-char* SHA256_Data(const u_int8_t*, size_t, u_char *);
-char *SHA256_File(char *, char *);
-
-void SHA384_Init(SHA384_CTX*);
-void SHA384_Update(SHA384_CTX*, const u_int8_t*, size_t);
-void SHA384_Final(u_int8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
-char* SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]);
-char* SHA384_Data(const u_int8_t*, size_t, char[SHA384_DIGEST_STRING_LENGTH]);
-char *SHA384_File(char *, char *);
-
-void SHA512_Init(SHA512_CTX*);
-void SHA512_Update(SHA512_CTX*, const u_int8_t*, size_t);
-void SHA512_Final(u_int8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
-char* SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]);
-char* SHA512_Data(const u_int8_t*, size_t, char[SHA512_DIGEST_STRING_LENGTH]);
-char *SHA512_File(char *, char *);
-
-#endif /* SHA2_USE_INTTYPES_H */
-
-#else /* NOPROTO */
-
-void SHA256_Init();
-void SHA256_Update();
-void SHA256_Final();
-char* SHA256_End();
-char* SHA256_Data();
-char *SHA256_File();
-
-void SHA384_Init();
-void SHA384_Update();
-void SHA384_Final();
-char* SHA384_End();
-char* SHA384_Data();
-char *SHA384_File();
-
-void SHA512_Init();
-void SHA512_Update();
-void SHA512_Final();
-char* SHA512_End();
-char* SHA512_Data();
-char *SHA512_File();
-
-#endif /* NOPROTO */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __SHA2_H__ */
-
diff --git a/pkgtools/digest/files/sha2hl.c b/pkgtools/digest/files/sha2hl.c
deleted file mode 100644
index 2f341ddcdc4..00000000000
--- a/pkgtools/digest/files/sha2hl.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/* $NetBSD: sha2hl.c,v 1.4 2006/03/02 20:34:17 agc Exp $ */
-
-/*
- * sha2hl.c
- * This code includes some functions taken from sha2.c, hence the
- * following licence reproduction.
- *
- * This code is not a verbatim copy, since some routines have been added,
- * and some bugs have been fixed.
- *
- * Version 1.0.0beta1
- *
- * Written by Aaron D. Gifford <me@aarongifford.com>
- *
- * Copyright 2000 Aaron D. Gifford. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <digest-types.h>
-
-#ifndef lint
-__RCSID("$NetBSD: sha2hl.c,v 1.4 2006/03/02 20:34:17 agc Exp $");
-#endif /* not lint */
-
-
-/* #include "namespace.h" */
-
-#include <assert.h>
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <sha2.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-#ifndef MEMSET_BZERO
-#define MEMSET_BZERO(p,l) memset((p), 0, (l))
-#endif
-
-/*
- * Constant used by SHA256/384/512_End() functions for converting the
- * digest to a readable hexadecimal character string:
- */
-static const char sha2_hex_digits[] = "0123456789abcdef";
-
-char *
-SHA256_File(char *filename, char *buf)
-{
- u_char buffer[BUFSIZ * 20];
- SHA256_CTX ctx;
- int fd, num, oerrno;
-
- _DIAGASSERT(filename != NULL);
- /* XXX: buf may be NULL ? */
-
- SHA256_Init(&ctx);
-
- if ((fd = open(filename, O_RDONLY)) < 0)
- return (0);
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0)
- SHA256_Update(&ctx, buffer, (size_t) num);
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
- return (num < 0 ? 0 : SHA256_End(&ctx, buf));
-}
-
-
-char *
-SHA256_End(SHA256_CTX *ctx, u_char *buffer)
-{
- u_char digest[SHA256_DIGEST_LENGTH], *d = digest;
- u_char *ret;
- int i;
-
- /* Sanity check: */
- assert(ctx != NULL);
-
- if ((ret = buffer) != NULL) {
- SHA256_Final(digest, ctx);
-
- for (i = 0; i < SHA256_DIGEST_LENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char) 0;
- } else {
- (void) MEMSET_BZERO(ctx, sizeof(SHA256_CTX));
- }
- (void) MEMSET_BZERO(digest, SHA256_DIGEST_LENGTH);
- return ret;
-}
-
-char *
-SHA256_Data(const sha2_byte * data, size_t len, u_char *digest)
-{
- SHA256_CTX ctx;
-
- SHA256_Init(&ctx);
- SHA256_Update(&ctx, data, len);
- return SHA256_End(&ctx, digest);
-}
-
-char *
-SHA384_File(char *filename, char *buf)
-{
- SHA384_CTX ctx;
- u_char buffer[BUFSIZ * 20];
- int fd, num, oerrno;
-
- _DIAGASSERT(filename != NULL);
- /* XXX: buf may be NULL ? */
-
- SHA384_Init(&ctx);
-
- if ((fd = open(filename, O_RDONLY)) < 0)
- return (0);
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0)
- SHA384_Update(&ctx, buffer, (size_t) num);
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
- return (num < 0 ? 0 : SHA384_End(&ctx, buf));
-}
-
-char *
-SHA384_End(SHA384_CTX * ctx, char buffer[])
-{
- u_char digest[SHA384_DIGEST_LENGTH], *d = digest;
- u_char *ret;
- int i;
-
- /* Sanity check: */
- assert(ctx != NULL);
-
- if ((ret = buffer) != NULL) {
- SHA384_Final(digest, ctx);
-
- for (i = 0; i < SHA384_DIGEST_LENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char) 0;
- } else {
- (void) MEMSET_BZERO(ctx, sizeof(SHA384_CTX));
- }
- (void) MEMSET_BZERO(digest, SHA384_DIGEST_LENGTH);
- return ret;
-}
-
-char *
-SHA384_Data(const sha2_byte * data, size_t len, char digest[SHA384_DIGEST_STRING_LENGTH])
-{
- SHA384_CTX ctx;
-
- SHA384_Init(&ctx);
- SHA384_Update(&ctx, data, len);
- return SHA384_End(&ctx, digest);
-}
-
-char *
-SHA512_File(char *filename, char *buf)
-{
- SHA512_CTX ctx;
- u_char buffer[BUFSIZ * 20];
- int fd, num, oerrno;
-
- _DIAGASSERT(filename != NULL);
- /* XXX: buf may be NULL ? */
-
- SHA512_Init(&ctx);
-
- if ((fd = open(filename, O_RDONLY)) < 0)
- return (0);
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0)
- SHA512_Update(&ctx, buffer, (size_t) num);
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
- return (num < 0 ? 0 : SHA512_End(&ctx, buf));
-}
-
-char *
-SHA512_End(SHA512_CTX * ctx, char buffer[])
-{
- u_char digest[SHA512_DIGEST_LENGTH], *d = digest;
- u_char *ret;
- int i;
-
- /* Sanity check: */
- assert(ctx != NULL);
-
- if ((ret = buffer) != NULL) {
- SHA512_Final(digest, ctx);
-
- for (i = 0; i < SHA512_DIGEST_LENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char) 0;
- } else {
- (void) MEMSET_BZERO(ctx, sizeof(SHA512_CTX));
- }
- (void) MEMSET_BZERO(digest, SHA512_DIGEST_LENGTH);
- return ret;
-}
-
-char *
-SHA512_Data(const sha2_byte * data, size_t len, char *digest)
-{
- SHA512_CTX ctx;
-
- SHA512_Init(&ctx);
- SHA512_Update(&ctx, data, len);
- return SHA512_End(&ctx, digest);
-}
diff --git a/pkgtools/digest/files/tiger.c b/pkgtools/digest/files/tiger.c
deleted file mode 100644
index f45180f11dc..00000000000
--- a/pkgtools/digest/files/tiger.c
+++ /dev/null
@@ -1,781 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <digest-types.h>
-
-#include "tiger.h"
-
-/* NOTE that this code is NOT FULLY OPTIMIZED for any */
-/* machine. Assembly code might be much faster on some */
-/* machines, especially if the code is compiled with */
-/* gcc. */
-
-/* The number of passes of the hash function. */
-/* Three passes are recommended. */
-/* Use four passes when you need extra security. */
-/* Must be at least three. */
-#define PASSES 3
-
-/* from sboxes.c: Tiger S boxes */
-uint64_t table[4*256] = {
- 0x02AAB17CF7E90C5ELL /* 0 */, 0xAC424B03E243A8ECLL /* 1 */,
- 0x72CD5BE30DD5FCD3LL /* 2 */, 0x6D019B93F6F97F3ALL /* 3 */,
- 0xCD9978FFD21F9193LL /* 4 */, 0x7573A1C9708029E2LL /* 5 */,
- 0xB164326B922A83C3LL /* 6 */, 0x46883EEE04915870LL /* 7 */,
- 0xEAACE3057103ECE6LL /* 8 */, 0xC54169B808A3535CLL /* 9 */,
- 0x4CE754918DDEC47CLL /* 10 */, 0x0AA2F4DFDC0DF40CLL /* 11 */,
- 0x10B76F18A74DBEFALL /* 12 */, 0xC6CCB6235AD1AB6ALL /* 13 */,
- 0x13726121572FE2FFLL /* 14 */, 0x1A488C6F199D921ELL /* 15 */,
- 0x4BC9F9F4DA0007CALL /* 16 */, 0x26F5E6F6E85241C7LL /* 17 */,
- 0x859079DBEA5947B6LL /* 18 */, 0x4F1885C5C99E8C92LL /* 19 */,
- 0xD78E761EA96F864BLL /* 20 */, 0x8E36428C52B5C17DLL /* 21 */,
- 0x69CF6827373063C1LL /* 22 */, 0xB607C93D9BB4C56ELL /* 23 */,
- 0x7D820E760E76B5EALL /* 24 */, 0x645C9CC6F07FDC42LL /* 25 */,
- 0xBF38A078243342E0LL /* 26 */, 0x5F6B343C9D2E7D04LL /* 27 */,
- 0xF2C28AEB600B0EC6LL /* 28 */, 0x6C0ED85F7254BCACLL /* 29 */,
- 0x71592281A4DB4FE5LL /* 30 */, 0x1967FA69CE0FED9FLL /* 31 */,
- 0xFD5293F8B96545DBLL /* 32 */, 0xC879E9D7F2A7600BLL /* 33 */,
- 0x860248920193194ELL /* 34 */, 0xA4F9533B2D9CC0B3LL /* 35 */,
- 0x9053836C15957613LL /* 36 */, 0xDB6DCF8AFC357BF1LL /* 37 */,
- 0x18BEEA7A7A370F57LL /* 38 */, 0x037117CA50B99066LL /* 39 */,
- 0x6AB30A9774424A35LL /* 40 */, 0xF4E92F02E325249BLL /* 41 */,
- 0x7739DB07061CCAE1LL /* 42 */, 0xD8F3B49CECA42A05LL /* 43 */,
- 0xBD56BE3F51382F73LL /* 44 */, 0x45FAED5843B0BB28LL /* 45 */,
- 0x1C813D5C11BF1F83LL /* 46 */, 0x8AF0E4B6D75FA169LL /* 47 */,
- 0x33EE18A487AD9999LL /* 48 */, 0x3C26E8EAB1C94410LL /* 49 */,
- 0xB510102BC0A822F9LL /* 50 */, 0x141EEF310CE6123BLL /* 51 */,
- 0xFC65B90059DDB154LL /* 52 */, 0xE0158640C5E0E607LL /* 53 */,
- 0x884E079826C3A3CFLL /* 54 */, 0x930D0D9523C535FDLL /* 55 */,
- 0x35638D754E9A2B00LL /* 56 */, 0x4085FCCF40469DD5LL /* 57 */,
- 0xC4B17AD28BE23A4CLL /* 58 */, 0xCAB2F0FC6A3E6A2ELL /* 59 */,
- 0x2860971A6B943FCDLL /* 60 */, 0x3DDE6EE212E30446LL /* 61 */,
- 0x6222F32AE01765AELL /* 62 */, 0x5D550BB5478308FELL /* 63 */,
- 0xA9EFA98DA0EDA22ALL /* 64 */, 0xC351A71686C40DA7LL /* 65 */,
- 0x1105586D9C867C84LL /* 66 */, 0xDCFFEE85FDA22853LL /* 67 */,
- 0xCCFBD0262C5EEF76LL /* 68 */, 0xBAF294CB8990D201LL /* 69 */,
- 0xE69464F52AFAD975LL /* 70 */, 0x94B013AFDF133E14LL /* 71 */,
- 0x06A7D1A32823C958LL /* 72 */, 0x6F95FE5130F61119LL /* 73 */,
- 0xD92AB34E462C06C0LL /* 74 */, 0xED7BDE33887C71D2LL /* 75 */,
- 0x79746D6E6518393ELL /* 76 */, 0x5BA419385D713329LL /* 77 */,
- 0x7C1BA6B948A97564LL /* 78 */, 0x31987C197BFDAC67LL /* 79 */,
- 0xDE6C23C44B053D02LL /* 80 */, 0x581C49FED002D64DLL /* 81 */,
- 0xDD474D6338261571LL /* 82 */, 0xAA4546C3E473D062LL /* 83 */,
- 0x928FCE349455F860LL /* 84 */, 0x48161BBACAAB94D9LL /* 85 */,
- 0x63912430770E6F68LL /* 86 */, 0x6EC8A5E602C6641CLL /* 87 */,
- 0x87282515337DDD2BLL /* 88 */, 0x2CDA6B42034B701BLL /* 89 */,
- 0xB03D37C181CB096DLL /* 90 */, 0xE108438266C71C6FLL /* 91 */,
- 0x2B3180C7EB51B255LL /* 92 */, 0xDF92B82F96C08BBCLL /* 93 */,
- 0x5C68C8C0A632F3BALL /* 94 */, 0x5504CC861C3D0556LL /* 95 */,
- 0xABBFA4E55FB26B8FLL /* 96 */, 0x41848B0AB3BACEB4LL /* 97 */,
- 0xB334A273AA445D32LL /* 98 */, 0xBCA696F0A85AD881LL /* 99 */,
- 0x24F6EC65B528D56CLL /* 100 */, 0x0CE1512E90F4524ALL /* 101 */,
- 0x4E9DD79D5506D35ALL /* 102 */, 0x258905FAC6CE9779LL /* 103 */,
- 0x2019295B3E109B33LL /* 104 */, 0xF8A9478B73A054CCLL /* 105 */,
- 0x2924F2F934417EB0LL /* 106 */, 0x3993357D536D1BC4LL /* 107 */,
- 0x38A81AC21DB6FF8BLL /* 108 */, 0x47C4FBF17D6016BFLL /* 109 */,
- 0x1E0FAADD7667E3F5LL /* 110 */, 0x7ABCFF62938BEB96LL /* 111 */,
- 0xA78DAD948FC179C9LL /* 112 */, 0x8F1F98B72911E50DLL /* 113 */,
- 0x61E48EAE27121A91LL /* 114 */, 0x4D62F7AD31859808LL /* 115 */,
- 0xECEBA345EF5CEAEBLL /* 116 */, 0xF5CEB25EBC9684CELL /* 117 */,
- 0xF633E20CB7F76221LL /* 118 */, 0xA32CDF06AB8293E4LL /* 119 */,
- 0x985A202CA5EE2CA4LL /* 120 */, 0xCF0B8447CC8A8FB1LL /* 121 */,
- 0x9F765244979859A3LL /* 122 */, 0xA8D516B1A1240017LL /* 123 */,
- 0x0BD7BA3EBB5DC726LL /* 124 */, 0xE54BCA55B86ADB39LL /* 125 */,
- 0x1D7A3AFD6C478063LL /* 126 */, 0x519EC608E7669EDDLL /* 127 */,
- 0x0E5715A2D149AA23LL /* 128 */, 0x177D4571848FF194LL /* 129 */,
- 0xEEB55F3241014C22LL /* 130 */, 0x0F5E5CA13A6E2EC2LL /* 131 */,
- 0x8029927B75F5C361LL /* 132 */, 0xAD139FABC3D6E436LL /* 133 */,
- 0x0D5DF1A94CCF402FLL /* 134 */, 0x3E8BD948BEA5DFC8LL /* 135 */,
- 0xA5A0D357BD3FF77ELL /* 136 */, 0xA2D12E251F74F645LL /* 137 */,
- 0x66FD9E525E81A082LL /* 138 */, 0x2E0C90CE7F687A49LL /* 139 */,
- 0xC2E8BCBEBA973BC5LL /* 140 */, 0x000001BCE509745FLL /* 141 */,
- 0x423777BBE6DAB3D6LL /* 142 */, 0xD1661C7EAEF06EB5LL /* 143 */,
- 0xA1781F354DAACFD8LL /* 144 */, 0x2D11284A2B16AFFCLL /* 145 */,
- 0xF1FC4F67FA891D1FLL /* 146 */, 0x73ECC25DCB920ADALL /* 147 */,
- 0xAE610C22C2A12651LL /* 148 */, 0x96E0A810D356B78ALL /* 149 */,
- 0x5A9A381F2FE7870FLL /* 150 */, 0xD5AD62EDE94E5530LL /* 151 */,
- 0xD225E5E8368D1427LL /* 152 */, 0x65977B70C7AF4631LL /* 153 */,
- 0x99F889B2DE39D74FLL /* 154 */, 0x233F30BF54E1D143LL /* 155 */,
- 0x9A9675D3D9A63C97LL /* 156 */, 0x5470554FF334F9A8LL /* 157 */,
- 0x166ACB744A4F5688LL /* 158 */, 0x70C74CAAB2E4AEADLL /* 159 */,
- 0xF0D091646F294D12LL /* 160 */, 0x57B82A89684031D1LL /* 161 */,
- 0xEFD95A5A61BE0B6BLL /* 162 */, 0x2FBD12E969F2F29ALL /* 163 */,
- 0x9BD37013FEFF9FE8LL /* 164 */, 0x3F9B0404D6085A06LL /* 165 */,
- 0x4940C1F3166CFE15LL /* 166 */, 0x09542C4DCDF3DEFBLL /* 167 */,
- 0xB4C5218385CD5CE3LL /* 168 */, 0xC935B7DC4462A641LL /* 169 */,
- 0x3417F8A68ED3B63FLL /* 170 */, 0xB80959295B215B40LL /* 171 */,
- 0xF99CDAEF3B8C8572LL /* 172 */, 0x018C0614F8FCB95DLL /* 173 */,
- 0x1B14ACCD1A3ACDF3LL /* 174 */, 0x84D471F200BB732DLL /* 175 */,
- 0xC1A3110E95E8DA16LL /* 176 */, 0x430A7220BF1A82B8LL /* 177 */,
- 0xB77E090D39DF210ELL /* 178 */, 0x5EF4BD9F3CD05E9DLL /* 179 */,
- 0x9D4FF6DA7E57A444LL /* 180 */, 0xDA1D60E183D4A5F8LL /* 181 */,
- 0xB287C38417998E47LL /* 182 */, 0xFE3EDC121BB31886LL /* 183 */,
- 0xC7FE3CCC980CCBEFLL /* 184 */, 0xE46FB590189BFD03LL /* 185 */,
- 0x3732FD469A4C57DCLL /* 186 */, 0x7EF700A07CF1AD65LL /* 187 */,
- 0x59C64468A31D8859LL /* 188 */, 0x762FB0B4D45B61F6LL /* 189 */,
- 0x155BAED099047718LL /* 190 */, 0x68755E4C3D50BAA6LL /* 191 */,
- 0xE9214E7F22D8B4DFLL /* 192 */, 0x2ADDBF532EAC95F4LL /* 193 */,
- 0x32AE3909B4BD0109LL /* 194 */, 0x834DF537B08E3450LL /* 195 */,
- 0xFA209DA84220728DLL /* 196 */, 0x9E691D9B9EFE23F7LL /* 197 */,
- 0x0446D288C4AE8D7FLL /* 198 */, 0x7B4CC524E169785BLL /* 199 */,
- 0x21D87F0135CA1385LL /* 200 */, 0xCEBB400F137B8AA5LL /* 201 */,
- 0x272E2B66580796BELL /* 202 */, 0x3612264125C2B0DELL /* 203 */,
- 0x057702BDAD1EFBB2LL /* 204 */, 0xD4BABB8EACF84BE9LL /* 205 */,
- 0x91583139641BC67BLL /* 206 */, 0x8BDC2DE08036E024LL /* 207 */,
- 0x603C8156F49F68EDLL /* 208 */, 0xF7D236F7DBEF5111LL /* 209 */,
- 0x9727C4598AD21E80LL /* 210 */, 0xA08A0896670A5FD7LL /* 211 */,
- 0xCB4A8F4309EBA9CBLL /* 212 */, 0x81AF564B0F7036A1LL /* 213 */,
- 0xC0B99AA778199ABDLL /* 214 */, 0x959F1EC83FC8E952LL /* 215 */,
- 0x8C505077794A81B9LL /* 216 */, 0x3ACAAF8F056338F0LL /* 217 */,
- 0x07B43F50627A6778LL /* 218 */, 0x4A44AB49F5ECCC77LL /* 219 */,
- 0x3BC3D6E4B679EE98LL /* 220 */, 0x9CC0D4D1CF14108CLL /* 221 */,
- 0x4406C00B206BC8A0LL /* 222 */, 0x82A18854C8D72D89LL /* 223 */,
- 0x67E366B35C3C432CLL /* 224 */, 0xB923DD61102B37F2LL /* 225 */,
- 0x56AB2779D884271DLL /* 226 */, 0xBE83E1B0FF1525AFLL /* 227 */,
- 0xFB7C65D4217E49A9LL /* 228 */, 0x6BDBE0E76D48E7D4LL /* 229 */,
- 0x08DF828745D9179ELL /* 230 */, 0x22EA6A9ADD53BD34LL /* 231 */,
- 0xE36E141C5622200ALL /* 232 */, 0x7F805D1B8CB750EELL /* 233 */,
- 0xAFE5C7A59F58E837LL /* 234 */, 0xE27F996A4FB1C23CLL /* 235 */,
- 0xD3867DFB0775F0D0LL /* 236 */, 0xD0E673DE6E88891ALL /* 237 */,
- 0x123AEB9EAFB86C25LL /* 238 */, 0x30F1D5D5C145B895LL /* 239 */,
- 0xBB434A2DEE7269E7LL /* 240 */, 0x78CB67ECF931FA38LL /* 241 */,
- 0xF33B0372323BBF9CLL /* 242 */, 0x52D66336FB279C74LL /* 243 */,
- 0x505F33AC0AFB4EAALL /* 244 */, 0xE8A5CD99A2CCE187LL /* 245 */,
- 0x534974801E2D30BBLL /* 246 */, 0x8D2D5711D5876D90LL /* 247 */,
- 0x1F1A412891BC038ELL /* 248 */, 0xD6E2E71D82E56648LL /* 249 */,
- 0x74036C3A497732B7LL /* 250 */, 0x89B67ED96361F5ABLL /* 251 */,
- 0xFFED95D8F1EA02A2LL /* 252 */, 0xE72B3BD61464D43DLL /* 253 */,
- 0xA6300F170BDC4820LL /* 254 */, 0xEBC18760ED78A77ALL /* 255 */,
- 0xE6A6BE5A05A12138LL /* 256 */, 0xB5A122A5B4F87C98LL /* 257 */,
- 0x563C6089140B6990LL /* 258 */, 0x4C46CB2E391F5DD5LL /* 259 */,
- 0xD932ADDBC9B79434LL /* 260 */, 0x08EA70E42015AFF5LL /* 261 */,
- 0xD765A6673E478CF1LL /* 262 */, 0xC4FB757EAB278D99LL /* 263 */,
- 0xDF11C6862D6E0692LL /* 264 */, 0xDDEB84F10D7F3B16LL /* 265 */,
- 0x6F2EF604A665EA04LL /* 266 */, 0x4A8E0F0FF0E0DFB3LL /* 267 */,
- 0xA5EDEEF83DBCBA51LL /* 268 */, 0xFC4F0A2A0EA4371ELL /* 269 */,
- 0xE83E1DA85CB38429LL /* 270 */, 0xDC8FF882BA1B1CE2LL /* 271 */,
- 0xCD45505E8353E80DLL /* 272 */, 0x18D19A00D4DB0717LL /* 273 */,
- 0x34A0CFEDA5F38101LL /* 274 */, 0x0BE77E518887CAF2LL /* 275 */,
- 0x1E341438B3C45136LL /* 276 */, 0xE05797F49089CCF9LL /* 277 */,
- 0xFFD23F9DF2591D14LL /* 278 */, 0x543DDA228595C5CDLL /* 279 */,
- 0x661F81FD99052A33LL /* 280 */, 0x8736E641DB0F7B76LL /* 281 */,
- 0x15227725418E5307LL /* 282 */, 0xE25F7F46162EB2FALL /* 283 */,
- 0x48A8B2126C13D9FELL /* 284 */, 0xAFDC541792E76EEALL /* 285 */,
- 0x03D912BFC6D1898FLL /* 286 */, 0x31B1AAFA1B83F51BLL /* 287 */,
- 0xF1AC2796E42AB7D9LL /* 288 */, 0x40A3A7D7FCD2EBACLL /* 289 */,
- 0x1056136D0AFBBCC5LL /* 290 */, 0x7889E1DD9A6D0C85LL /* 291 */,
- 0xD33525782A7974AALL /* 292 */, 0xA7E25D09078AC09BLL /* 293 */,
- 0xBD4138B3EAC6EDD0LL /* 294 */, 0x920ABFBE71EB9E70LL /* 295 */,
- 0xA2A5D0F54FC2625CLL /* 296 */, 0xC054E36B0B1290A3LL /* 297 */,
- 0xF6DD59FF62FE932BLL /* 298 */, 0x3537354511A8AC7DLL /* 299 */,
- 0xCA845E9172FADCD4LL /* 300 */, 0x84F82B60329D20DCLL /* 301 */,
- 0x79C62CE1CD672F18LL /* 302 */, 0x8B09A2ADD124642CLL /* 303 */,
- 0xD0C1E96A19D9E726LL /* 304 */, 0x5A786A9B4BA9500CLL /* 305 */,
- 0x0E020336634C43F3LL /* 306 */, 0xC17B474AEB66D822LL /* 307 */,
- 0x6A731AE3EC9BAAC2LL /* 308 */, 0x8226667AE0840258LL /* 309 */,
- 0x67D4567691CAECA5LL /* 310 */, 0x1D94155C4875ADB5LL /* 311 */,
- 0x6D00FD985B813FDFLL /* 312 */, 0x51286EFCB774CD06LL /* 313 */,
- 0x5E8834471FA744AFLL /* 314 */, 0xF72CA0AEE761AE2ELL /* 315 */,
- 0xBE40E4CDAEE8E09ALL /* 316 */, 0xE9970BBB5118F665LL /* 317 */,
- 0x726E4BEB33DF1964LL /* 318 */, 0x703B000729199762LL /* 319 */,
- 0x4631D816F5EF30A7LL /* 320 */, 0xB880B5B51504A6BELL /* 321 */,
- 0x641793C37ED84B6CLL /* 322 */, 0x7B21ED77F6E97D96LL /* 323 */,
- 0x776306312EF96B73LL /* 324 */, 0xAE528948E86FF3F4LL /* 325 */,
- 0x53DBD7F286A3F8F8LL /* 326 */, 0x16CADCE74CFC1063LL /* 327 */,
- 0x005C19BDFA52C6DDLL /* 328 */, 0x68868F5D64D46AD3LL /* 329 */,
- 0x3A9D512CCF1E186ALL /* 330 */, 0x367E62C2385660AELL /* 331 */,
- 0xE359E7EA77DCB1D7LL /* 332 */, 0x526C0773749ABE6ELL /* 333 */,
- 0x735AE5F9D09F734BLL /* 334 */, 0x493FC7CC8A558BA8LL /* 335 */,
- 0xB0B9C1533041AB45LL /* 336 */, 0x321958BA470A59BDLL /* 337 */,
- 0x852DB00B5F46C393LL /* 338 */, 0x91209B2BD336B0E5LL /* 339 */,
- 0x6E604F7D659EF19FLL /* 340 */, 0xB99A8AE2782CCB24LL /* 341 */,
- 0xCCF52AB6C814C4C7LL /* 342 */, 0x4727D9AFBE11727BLL /* 343 */,
- 0x7E950D0C0121B34DLL /* 344 */, 0x756F435670AD471FLL /* 345 */,
- 0xF5ADD442615A6849LL /* 346 */, 0x4E87E09980B9957ALL /* 347 */,
- 0x2ACFA1DF50AEE355LL /* 348 */, 0xD898263AFD2FD556LL /* 349 */,
- 0xC8F4924DD80C8FD6LL /* 350 */, 0xCF99CA3D754A173ALL /* 351 */,
- 0xFE477BACAF91BF3CLL /* 352 */, 0xED5371F6D690C12DLL /* 353 */,
- 0x831A5C285E687094LL /* 354 */, 0xC5D3C90A3708A0A4LL /* 355 */,
- 0x0F7F903717D06580LL /* 356 */, 0x19F9BB13B8FDF27FLL /* 357 */,
- 0xB1BD6F1B4D502843LL /* 358 */, 0x1C761BA38FFF4012LL /* 359 */,
- 0x0D1530C4E2E21F3BLL /* 360 */, 0x8943CE69A7372C8ALL /* 361 */,
- 0xE5184E11FEB5CE66LL /* 362 */, 0x618BDB80BD736621LL /* 363 */,
- 0x7D29BAD68B574D0BLL /* 364 */, 0x81BB613E25E6FE5BLL /* 365 */,
- 0x071C9C10BC07913FLL /* 366 */, 0xC7BEEB7909AC2D97LL /* 367 */,
- 0xC3E58D353BC5D757LL /* 368 */, 0xEB017892F38F61E8LL /* 369 */,
- 0xD4EFFB9C9B1CC21ALL /* 370 */, 0x99727D26F494F7ABLL /* 371 */,
- 0xA3E063A2956B3E03LL /* 372 */, 0x9D4A8B9A4AA09C30LL /* 373 */,
- 0x3F6AB7D500090FB4LL /* 374 */, 0x9CC0F2A057268AC0LL /* 375 */,
- 0x3DEE9D2DEDBF42D1LL /* 376 */, 0x330F49C87960A972LL /* 377 */,
- 0xC6B2720287421B41LL /* 378 */, 0x0AC59EC07C00369CLL /* 379 */,
- 0xEF4EAC49CB353425LL /* 380 */, 0xF450244EEF0129D8LL /* 381 */,
- 0x8ACC46E5CAF4DEB6LL /* 382 */, 0x2FFEAB63989263F7LL /* 383 */,
- 0x8F7CB9FE5D7A4578LL /* 384 */, 0x5BD8F7644E634635LL /* 385 */,
- 0x427A7315BF2DC900LL /* 386 */, 0x17D0C4AA2125261CLL /* 387 */,
- 0x3992486C93518E50LL /* 388 */, 0xB4CBFEE0A2D7D4C3LL /* 389 */,
- 0x7C75D6202C5DDD8DLL /* 390 */, 0xDBC295D8E35B6C61LL /* 391 */,
- 0x60B369D302032B19LL /* 392 */, 0xCE42685FDCE44132LL /* 393 */,
- 0x06F3DDB9DDF65610LL /* 394 */, 0x8EA4D21DB5E148F0LL /* 395 */,
- 0x20B0FCE62FCD496FLL /* 396 */, 0x2C1B912358B0EE31LL /* 397 */,
- 0xB28317B818F5A308LL /* 398 */, 0xA89C1E189CA6D2CFLL /* 399 */,
- 0x0C6B18576AAADBC8LL /* 400 */, 0xB65DEAA91299FAE3LL /* 401 */,
- 0xFB2B794B7F1027E7LL /* 402 */, 0x04E4317F443B5BEBLL /* 403 */,
- 0x4B852D325939D0A6LL /* 404 */, 0xD5AE6BEEFB207FFCLL /* 405 */,
- 0x309682B281C7D374LL /* 406 */, 0xBAE309A194C3B475LL /* 407 */,
- 0x8CC3F97B13B49F05LL /* 408 */, 0x98A9422FF8293967LL /* 409 */,
- 0x244B16B01076FF7CLL /* 410 */, 0xF8BF571C663D67EELL /* 411 */,
- 0x1F0D6758EEE30DA1LL /* 412 */, 0xC9B611D97ADEB9B7LL /* 413 */,
- 0xB7AFD5887B6C57A2LL /* 414 */, 0x6290AE846B984FE1LL /* 415 */,
- 0x94DF4CDEACC1A5FDLL /* 416 */, 0x058A5BD1C5483AFFLL /* 417 */,
- 0x63166CC142BA3C37LL /* 418 */, 0x8DB8526EB2F76F40LL /* 419 */,
- 0xE10880036F0D6D4ELL /* 420 */, 0x9E0523C9971D311DLL /* 421 */,
- 0x45EC2824CC7CD691LL /* 422 */, 0x575B8359E62382C9LL /* 423 */,
- 0xFA9E400DC4889995LL /* 424 */, 0xD1823ECB45721568LL /* 425 */,
- 0xDAFD983B8206082FLL /* 426 */, 0xAA7D29082386A8CBLL /* 427 */,
- 0x269FCD4403B87588LL /* 428 */, 0x1B91F5F728BDD1E0LL /* 429 */,
- 0xE4669F39040201F6LL /* 430 */, 0x7A1D7C218CF04ADELL /* 431 */,
- 0x65623C29D79CE5CELL /* 432 */, 0x2368449096C00BB1LL /* 433 */,
- 0xAB9BF1879DA503BALL /* 434 */, 0xBC23ECB1A458058ELL /* 435 */,
- 0x9A58DF01BB401ECCLL /* 436 */, 0xA070E868A85F143DLL /* 437 */,
- 0x4FF188307DF2239ELL /* 438 */, 0x14D565B41A641183LL /* 439 */,
- 0xEE13337452701602LL /* 440 */, 0x950E3DCF3F285E09LL /* 441 */,
- 0x59930254B9C80953LL /* 442 */, 0x3BF299408930DA6DLL /* 443 */,
- 0xA955943F53691387LL /* 444 */, 0xA15EDECAA9CB8784LL /* 445 */,
- 0x29142127352BE9A0LL /* 446 */, 0x76F0371FFF4E7AFBLL /* 447 */,
- 0x0239F450274F2228LL /* 448 */, 0xBB073AF01D5E868BLL /* 449 */,
- 0xBFC80571C10E96C1LL /* 450 */, 0xD267088568222E23LL /* 451 */,
- 0x9671A3D48E80B5B0LL /* 452 */, 0x55B5D38AE193BB81LL /* 453 */,
- 0x693AE2D0A18B04B8LL /* 454 */, 0x5C48B4ECADD5335FLL /* 455 */,
- 0xFD743B194916A1CALL /* 456 */, 0x2577018134BE98C4LL /* 457 */,
- 0xE77987E83C54A4ADLL /* 458 */, 0x28E11014DA33E1B9LL /* 459 */,
- 0x270CC59E226AA213LL /* 460 */, 0x71495F756D1A5F60LL /* 461 */,
- 0x9BE853FB60AFEF77LL /* 462 */, 0xADC786A7F7443DBFLL /* 463 */,
- 0x0904456173B29A82LL /* 464 */, 0x58BC7A66C232BD5ELL /* 465 */,
- 0xF306558C673AC8B2LL /* 466 */, 0x41F639C6B6C9772ALL /* 467 */,
- 0x216DEFE99FDA35DALL /* 468 */, 0x11640CC71C7BE615LL /* 469 */,
- 0x93C43694565C5527LL /* 470 */, 0xEA038E6246777839LL /* 471 */,
- 0xF9ABF3CE5A3E2469LL /* 472 */, 0x741E768D0FD312D2LL /* 473 */,
- 0x0144B883CED652C6LL /* 474 */, 0xC20B5A5BA33F8552LL /* 475 */,
- 0x1AE69633C3435A9DLL /* 476 */, 0x97A28CA4088CFDECLL /* 477 */,
- 0x8824A43C1E96F420LL /* 478 */, 0x37612FA66EEEA746LL /* 479 */,
- 0x6B4CB165F9CF0E5ALL /* 480 */, 0x43AA1C06A0ABFB4ALL /* 481 */,
- 0x7F4DC26FF162796BLL /* 482 */, 0x6CBACC8E54ED9B0FLL /* 483 */,
- 0xA6B7FFEFD2BB253ELL /* 484 */, 0x2E25BC95B0A29D4FLL /* 485 */,
- 0x86D6A58BDEF1388CLL /* 486 */, 0xDED74AC576B6F054LL /* 487 */,
- 0x8030BDBC2B45805DLL /* 488 */, 0x3C81AF70E94D9289LL /* 489 */,
- 0x3EFF6DDA9E3100DBLL /* 490 */, 0xB38DC39FDFCC8847LL /* 491 */,
- 0x123885528D17B87ELL /* 492 */, 0xF2DA0ED240B1B642LL /* 493 */,
- 0x44CEFADCD54BF9A9LL /* 494 */, 0x1312200E433C7EE6LL /* 495 */,
- 0x9FFCC84F3A78C748LL /* 496 */, 0xF0CD1F72248576BBLL /* 497 */,
- 0xEC6974053638CFE4LL /* 498 */, 0x2BA7B67C0CEC4E4CLL /* 499 */,
- 0xAC2F4DF3E5CE32EDLL /* 500 */, 0xCB33D14326EA4C11LL /* 501 */,
- 0xA4E9044CC77E58BCLL /* 502 */, 0x5F513293D934FCEFLL /* 503 */,
- 0x5DC9645506E55444LL /* 504 */, 0x50DE418F317DE40ALL /* 505 */,
- 0x388CB31A69DDE259LL /* 506 */, 0x2DB4A83455820A86LL /* 507 */,
- 0x9010A91E84711AE9LL /* 508 */, 0x4DF7F0B7B1498371LL /* 509 */,
- 0xD62A2EABC0977179LL /* 510 */, 0x22FAC097AA8D5C0ELL /* 511 */,
- 0xF49FCC2FF1DAF39BLL /* 512 */, 0x487FD5C66FF29281LL /* 513 */,
- 0xE8A30667FCDCA83FLL /* 514 */, 0x2C9B4BE3D2FCCE63LL /* 515 */,
- 0xDA3FF74B93FBBBC2LL /* 516 */, 0x2FA165D2FE70BA66LL /* 517 */,
- 0xA103E279970E93D4LL /* 518 */, 0xBECDEC77B0E45E71LL /* 519 */,
- 0xCFB41E723985E497LL /* 520 */, 0xB70AAA025EF75017LL /* 521 */,
- 0xD42309F03840B8E0LL /* 522 */, 0x8EFC1AD035898579LL /* 523 */,
- 0x96C6920BE2B2ABC5LL /* 524 */, 0x66AF4163375A9172LL /* 525 */,
- 0x2174ABDCCA7127FBLL /* 526 */, 0xB33CCEA64A72FF41LL /* 527 */,
- 0xF04A4933083066A5LL /* 528 */, 0x8D970ACDD7289AF5LL /* 529 */,
- 0x8F96E8E031C8C25ELL /* 530 */, 0xF3FEC02276875D47LL /* 531 */,
- 0xEC7BF310056190DDLL /* 532 */, 0xF5ADB0AEBB0F1491LL /* 533 */,
- 0x9B50F8850FD58892LL /* 534 */, 0x4975488358B74DE8LL /* 535 */,
- 0xA3354FF691531C61LL /* 536 */, 0x0702BBE481D2C6EELL /* 537 */,
- 0x89FB24057DEDED98LL /* 538 */, 0xAC3075138596E902LL /* 539 */,
- 0x1D2D3580172772EDLL /* 540 */, 0xEB738FC28E6BC30DLL /* 541 */,
- 0x5854EF8F63044326LL /* 542 */, 0x9E5C52325ADD3BBELL /* 543 */,
- 0x90AA53CF325C4623LL /* 544 */, 0xC1D24D51349DD067LL /* 545 */,
- 0x2051CFEEA69EA624LL /* 546 */, 0x13220F0A862E7E4FLL /* 547 */,
- 0xCE39399404E04864LL /* 548 */, 0xD9C42CA47086FCB7LL /* 549 */,
- 0x685AD2238A03E7CCLL /* 550 */, 0x066484B2AB2FF1DBLL /* 551 */,
- 0xFE9D5D70EFBF79ECLL /* 552 */, 0x5B13B9DD9C481854LL /* 553 */,
- 0x15F0D475ED1509ADLL /* 554 */, 0x0BEBCD060EC79851LL /* 555 */,
- 0xD58C6791183AB7F8LL /* 556 */, 0xD1187C5052F3EEE4LL /* 557 */,
- 0xC95D1192E54E82FFLL /* 558 */, 0x86EEA14CB9AC6CA2LL /* 559 */,
- 0x3485BEB153677D5DLL /* 560 */, 0xDD191D781F8C492ALL /* 561 */,
- 0xF60866BAA784EBF9LL /* 562 */, 0x518F643BA2D08C74LL /* 563 */,
- 0x8852E956E1087C22LL /* 564 */, 0xA768CB8DC410AE8DLL /* 565 */,
- 0x38047726BFEC8E1ALL /* 566 */, 0xA67738B4CD3B45AALL /* 567 */,
- 0xAD16691CEC0DDE19LL /* 568 */, 0xC6D4319380462E07LL /* 569 */,
- 0xC5A5876D0BA61938LL /* 570 */, 0x16B9FA1FA58FD840LL /* 571 */,
- 0x188AB1173CA74F18LL /* 572 */, 0xABDA2F98C99C021FLL /* 573 */,
- 0x3E0580AB134AE816LL /* 574 */, 0x5F3B05B773645ABBLL /* 575 */,
- 0x2501A2BE5575F2F6LL /* 576 */, 0x1B2F74004E7E8BA9LL /* 577 */,
- 0x1CD7580371E8D953LL /* 578 */, 0x7F6ED89562764E30LL /* 579 */,
- 0xB15926FF596F003DLL /* 580 */, 0x9F65293DA8C5D6B9LL /* 581 */,
- 0x6ECEF04DD690F84CLL /* 582 */, 0x4782275FFF33AF88LL /* 583 */,
- 0xE41433083F820801LL /* 584 */, 0xFD0DFE409A1AF9B5LL /* 585 */,
- 0x4325A3342CDB396BLL /* 586 */, 0x8AE77E62B301B252LL /* 587 */,
- 0xC36F9E9F6655615ALL /* 588 */, 0x85455A2D92D32C09LL /* 589 */,
- 0xF2C7DEA949477485LL /* 590 */, 0x63CFB4C133A39EBALL /* 591 */,
- 0x83B040CC6EBC5462LL /* 592 */, 0x3B9454C8FDB326B0LL /* 593 */,
- 0x56F56A9E87FFD78CLL /* 594 */, 0x2DC2940D99F42BC6LL /* 595 */,
- 0x98F7DF096B096E2DLL /* 596 */, 0x19A6E01E3AD852BFLL /* 597 */,
- 0x42A99CCBDBD4B40BLL /* 598 */, 0xA59998AF45E9C559LL /* 599 */,
- 0x366295E807D93186LL /* 600 */, 0x6B48181BFAA1F773LL /* 601 */,
- 0x1FEC57E2157A0A1DLL /* 602 */, 0x4667446AF6201AD5LL /* 603 */,
- 0xE615EBCACFB0F075LL /* 604 */, 0xB8F31F4F68290778LL /* 605 */,
- 0x22713ED6CE22D11ELL /* 606 */, 0x3057C1A72EC3C93BLL /* 607 */,
- 0xCB46ACC37C3F1F2FLL /* 608 */, 0xDBB893FD02AAF50ELL /* 609 */,
- 0x331FD92E600B9FCFLL /* 610 */, 0xA498F96148EA3AD6LL /* 611 */,
- 0xA8D8426E8B6A83EALL /* 612 */, 0xA089B274B7735CDCLL /* 613 */,
- 0x87F6B3731E524A11LL /* 614 */, 0x118808E5CBC96749LL /* 615 */,
- 0x9906E4C7B19BD394LL /* 616 */, 0xAFED7F7E9B24A20CLL /* 617 */,
- 0x6509EADEEB3644A7LL /* 618 */, 0x6C1EF1D3E8EF0EDELL /* 619 */,
- 0xB9C97D43E9798FB4LL /* 620 */, 0xA2F2D784740C28A3LL /* 621 */,
- 0x7B8496476197566FLL /* 622 */, 0x7A5BE3E6B65F069DLL /* 623 */,
- 0xF96330ED78BE6F10LL /* 624 */, 0xEEE60DE77A076A15LL /* 625 */,
- 0x2B4BEE4AA08B9BD0LL /* 626 */, 0x6A56A63EC7B8894ELL /* 627 */,
- 0x02121359BA34FEF4LL /* 628 */, 0x4CBF99F8283703FCLL /* 629 */,
- 0x398071350CAF30C8LL /* 630 */, 0xD0A77A89F017687ALL /* 631 */,
- 0xF1C1A9EB9E423569LL /* 632 */, 0x8C7976282DEE8199LL /* 633 */,
- 0x5D1737A5DD1F7ABDLL /* 634 */, 0x4F53433C09A9FA80LL /* 635 */,
- 0xFA8B0C53DF7CA1D9LL /* 636 */, 0x3FD9DCBC886CCB77LL /* 637 */,
- 0xC040917CA91B4720LL /* 638 */, 0x7DD00142F9D1DCDFLL /* 639 */,
- 0x8476FC1D4F387B58LL /* 640 */, 0x23F8E7C5F3316503LL /* 641 */,
- 0x032A2244E7E37339LL /* 642 */, 0x5C87A5D750F5A74BLL /* 643 */,
- 0x082B4CC43698992ELL /* 644 */, 0xDF917BECB858F63CLL /* 645 */,
- 0x3270B8FC5BF86DDALL /* 646 */, 0x10AE72BB29B5DD76LL /* 647 */,
- 0x576AC94E7700362BLL /* 648 */, 0x1AD112DAC61EFB8FLL /* 649 */,
- 0x691BC30EC5FAA427LL /* 650 */, 0xFF246311CC327143LL /* 651 */,
- 0x3142368E30E53206LL /* 652 */, 0x71380E31E02CA396LL /* 653 */,
- 0x958D5C960AAD76F1LL /* 654 */, 0xF8D6F430C16DA536LL /* 655 */,
- 0xC8FFD13F1BE7E1D2LL /* 656 */, 0x7578AE66004DDBE1LL /* 657 */,
- 0x05833F01067BE646LL /* 658 */, 0xBB34B5AD3BFE586DLL /* 659 */,
- 0x095F34C9A12B97F0LL /* 660 */, 0x247AB64525D60CA8LL /* 661 */,
- 0xDCDBC6F3017477D1LL /* 662 */, 0x4A2E14D4DECAD24DLL /* 663 */,
- 0xBDB5E6D9BE0A1EEBLL /* 664 */, 0x2A7E70F7794301ABLL /* 665 */,
- 0xDEF42D8A270540FDLL /* 666 */, 0x01078EC0A34C22C1LL /* 667 */,
- 0xE5DE511AF4C16387LL /* 668 */, 0x7EBB3A52BD9A330ALL /* 669 */,
- 0x77697857AA7D6435LL /* 670 */, 0x004E831603AE4C32LL /* 671 */,
- 0xE7A21020AD78E312LL /* 672 */, 0x9D41A70C6AB420F2LL /* 673 */,
- 0x28E06C18EA1141E6LL /* 674 */, 0xD2B28CBD984F6B28LL /* 675 */,
- 0x26B75F6C446E9D83LL /* 676 */, 0xBA47568C4D418D7FLL /* 677 */,
- 0xD80BADBFE6183D8ELL /* 678 */, 0x0E206D7F5F166044LL /* 679 */,
- 0xE258A43911CBCA3ELL /* 680 */, 0x723A1746B21DC0BCLL /* 681 */,
- 0xC7CAA854F5D7CDD3LL /* 682 */, 0x7CAC32883D261D9CLL /* 683 */,
- 0x7690C26423BA942CLL /* 684 */, 0x17E55524478042B8LL /* 685 */,
- 0xE0BE477656A2389FLL /* 686 */, 0x4D289B5E67AB2DA0LL /* 687 */,
- 0x44862B9C8FBBFD31LL /* 688 */, 0xB47CC8049D141365LL /* 689 */,
- 0x822C1B362B91C793LL /* 690 */, 0x4EB14655FB13DFD8LL /* 691 */,
- 0x1ECBBA0714E2A97BLL /* 692 */, 0x6143459D5CDE5F14LL /* 693 */,
- 0x53A8FBF1D5F0AC89LL /* 694 */, 0x97EA04D81C5E5B00LL /* 695 */,
- 0x622181A8D4FDB3F3LL /* 696 */, 0xE9BCD341572A1208LL /* 697 */,
- 0x1411258643CCE58ALL /* 698 */, 0x9144C5FEA4C6E0A4LL /* 699 */,
- 0x0D33D06565CF620FLL /* 700 */, 0x54A48D489F219CA1LL /* 701 */,
- 0xC43E5EAC6D63C821LL /* 702 */, 0xA9728B3A72770DAFLL /* 703 */,
- 0xD7934E7B20DF87EFLL /* 704 */, 0xE35503B61A3E86E5LL /* 705 */,
- 0xCAE321FBC819D504LL /* 706 */, 0x129A50B3AC60BFA6LL /* 707 */,
- 0xCD5E68EA7E9FB6C3LL /* 708 */, 0xB01C90199483B1C7LL /* 709 */,
- 0x3DE93CD5C295376CLL /* 710 */, 0xAED52EDF2AB9AD13LL /* 711 */,
- 0x2E60F512C0A07884LL /* 712 */, 0xBC3D86A3E36210C9LL /* 713 */,
- 0x35269D9B163951CELL /* 714 */, 0x0C7D6E2AD0CDB5FALL /* 715 */,
- 0x59E86297D87F5733LL /* 716 */, 0x298EF221898DB0E7LL /* 717 */,
- 0x55000029D1A5AA7ELL /* 718 */, 0x8BC08AE1B5061B45LL /* 719 */,
- 0xC2C31C2B6C92703ALL /* 720 */, 0x94CC596BAF25EF42LL /* 721 */,
- 0x0A1D73DB22540456LL /* 722 */, 0x04B6A0F9D9C4179ALL /* 723 */,
- 0xEFFDAFA2AE3D3C60LL /* 724 */, 0xF7C8075BB49496C4LL /* 725 */,
- 0x9CC5C7141D1CD4E3LL /* 726 */, 0x78BD1638218E5534LL /* 727 */,
- 0xB2F11568F850246ALL /* 728 */, 0xEDFABCFA9502BC29LL /* 729 */,
- 0x796CE5F2DA23051BLL /* 730 */, 0xAAE128B0DC93537CLL /* 731 */,
- 0x3A493DA0EE4B29AELL /* 732 */, 0xB5DF6B2C416895D7LL /* 733 */,
- 0xFCABBD25122D7F37LL /* 734 */, 0x70810B58105DC4B1LL /* 735 */,
- 0xE10FDD37F7882A90LL /* 736 */, 0x524DCAB5518A3F5CLL /* 737 */,
- 0x3C9E85878451255BLL /* 738 */, 0x4029828119BD34E2LL /* 739 */,
- 0x74A05B6F5D3CECCBLL /* 740 */, 0xB610021542E13ECALL /* 741 */,
- 0x0FF979D12F59E2ACLL /* 742 */, 0x6037DA27E4F9CC50LL /* 743 */,
- 0x5E92975A0DF1847DLL /* 744 */, 0xD66DE190D3E623FELL /* 745 */,
- 0x5032D6B87B568048LL /* 746 */, 0x9A36B7CE8235216ELL /* 747 */,
- 0x80272A7A24F64B4ALL /* 748 */, 0x93EFED8B8C6916F7LL /* 749 */,
- 0x37DDBFF44CCE1555LL /* 750 */, 0x4B95DB5D4B99BD25LL /* 751 */,
- 0x92D3FDA169812FC0LL /* 752 */, 0xFB1A4A9A90660BB6LL /* 753 */,
- 0x730C196946A4B9B2LL /* 754 */, 0x81E289AA7F49DA68LL /* 755 */,
- 0x64669A0F83B1A05FLL /* 756 */, 0x27B3FF7D9644F48BLL /* 757 */,
- 0xCC6B615C8DB675B3LL /* 758 */, 0x674F20B9BCEBBE95LL /* 759 */,
- 0x6F31238275655982LL /* 760 */, 0x5AE488713E45CF05LL /* 761 */,
- 0xBF619F9954C21157LL /* 762 */, 0xEABAC46040A8EAE9LL /* 763 */,
- 0x454C6FE9F2C0C1CDLL /* 764 */, 0x419CF6496412691CLL /* 765 */,
- 0xD3DC3BEF265B0F70LL /* 766 */, 0x6D0E60F5C3578A9ELL /* 767 */,
- 0x5B0E608526323C55LL /* 768 */, 0x1A46C1A9FA1B59F5LL /* 769 */,
- 0xA9E245A17C4C8FFALL /* 770 */, 0x65CA5159DB2955D7LL /* 771 */,
- 0x05DB0A76CE35AFC2LL /* 772 */, 0x81EAC77EA9113D45LL /* 773 */,
- 0x528EF88AB6AC0A0DLL /* 774 */, 0xA09EA253597BE3FFLL /* 775 */,
- 0x430DDFB3AC48CD56LL /* 776 */, 0xC4B3A67AF45CE46FLL /* 777 */,
- 0x4ECECFD8FBE2D05ELL /* 778 */, 0x3EF56F10B39935F0LL /* 779 */,
- 0x0B22D6829CD619C6LL /* 780 */, 0x17FD460A74DF2069LL /* 781 */,
- 0x6CF8CC8E8510ED40LL /* 782 */, 0xD6C824BF3A6ECAA7LL /* 783 */,
- 0x61243D581A817049LL /* 784 */, 0x048BACB6BBC163A2LL /* 785 */,
- 0xD9A38AC27D44CC32LL /* 786 */, 0x7FDDFF5BAAF410ABLL /* 787 */,
- 0xAD6D495AA804824BLL /* 788 */, 0xE1A6A74F2D8C9F94LL /* 789 */,
- 0xD4F7851235DEE8E3LL /* 790 */, 0xFD4B7F886540D893LL /* 791 */,
- 0x247C20042AA4BFDALL /* 792 */, 0x096EA1C517D1327CLL /* 793 */,
- 0xD56966B4361A6685LL /* 794 */, 0x277DA5C31221057DLL /* 795 */,
- 0x94D59893A43ACFF7LL /* 796 */, 0x64F0C51CCDC02281LL /* 797 */,
- 0x3D33BCC4FF6189DBLL /* 798 */, 0xE005CB184CE66AF1LL /* 799 */,
- 0xFF5CCD1D1DB99BEALL /* 800 */, 0xB0B854A7FE42980FLL /* 801 */,
- 0x7BD46A6A718D4B9FLL /* 802 */, 0xD10FA8CC22A5FD8CLL /* 803 */,
- 0xD31484952BE4BD31LL /* 804 */, 0xC7FA975FCB243847LL /* 805 */,
- 0x4886ED1E5846C407LL /* 806 */, 0x28CDDB791EB70B04LL /* 807 */,
- 0xC2B00BE2F573417FLL /* 808 */, 0x5C9590452180F877LL /* 809 */,
- 0x7A6BDDFFF370EB00LL /* 810 */, 0xCE509E38D6D9D6A4LL /* 811 */,
- 0xEBEB0F00647FA702LL /* 812 */, 0x1DCC06CF76606F06LL /* 813 */,
- 0xE4D9F28BA286FF0ALL /* 814 */, 0xD85A305DC918C262LL /* 815 */,
- 0x475B1D8732225F54LL /* 816 */, 0x2D4FB51668CCB5FELL /* 817 */,
- 0xA679B9D9D72BBA20LL /* 818 */, 0x53841C0D912D43A5LL /* 819 */,
- 0x3B7EAA48BF12A4E8LL /* 820 */, 0x781E0E47F22F1DDFLL /* 821 */,
- 0xEFF20CE60AB50973LL /* 822 */, 0x20D261D19DFFB742LL /* 823 */,
- 0x16A12B03062A2E39LL /* 824 */, 0x1960EB2239650495LL /* 825 */,
- 0x251C16FED50EB8B8LL /* 826 */, 0x9AC0C330F826016ELL /* 827 */,
- 0xED152665953E7671LL /* 828 */, 0x02D63194A6369570LL /* 829 */,
- 0x5074F08394B1C987LL /* 830 */, 0x70BA598C90B25CE1LL /* 831 */,
- 0x794A15810B9742F6LL /* 832 */, 0x0D5925E9FCAF8C6CLL /* 833 */,
- 0x3067716CD868744ELL /* 834 */, 0x910AB077E8D7731BLL /* 835 */,
- 0x6A61BBDB5AC42F61LL /* 836 */, 0x93513EFBF0851567LL /* 837 */,
- 0xF494724B9E83E9D5LL /* 838 */, 0xE887E1985C09648DLL /* 839 */,
- 0x34B1D3C675370CFDLL /* 840 */, 0xDC35E433BC0D255DLL /* 841 */,
- 0xD0AAB84234131BE0LL /* 842 */, 0x08042A50B48B7EAFLL /* 843 */,
- 0x9997C4EE44A3AB35LL /* 844 */, 0x829A7B49201799D0LL /* 845 */,
- 0x263B8307B7C54441LL /* 846 */, 0x752F95F4FD6A6CA6LL /* 847 */,
- 0x927217402C08C6E5LL /* 848 */, 0x2A8AB754A795D9EELL /* 849 */,
- 0xA442F7552F72943DLL /* 850 */, 0x2C31334E19781208LL /* 851 */,
- 0x4FA98D7CEAEE6291LL /* 852 */, 0x55C3862F665DB309LL /* 853 */,
- 0xBD0610175D53B1F3LL /* 854 */, 0x46FE6CB840413F27LL /* 855 */,
- 0x3FE03792DF0CFA59LL /* 856 */, 0xCFE700372EB85E8FLL /* 857 */,
- 0xA7BE29E7ADBCE118LL /* 858 */, 0xE544EE5CDE8431DDLL /* 859 */,
- 0x8A781B1B41F1873ELL /* 860 */, 0xA5C94C78A0D2F0E7LL /* 861 */,
- 0x39412E2877B60728LL /* 862 */, 0xA1265EF3AFC9A62CLL /* 863 */,
- 0xBCC2770C6A2506C5LL /* 864 */, 0x3AB66DD5DCE1CE12LL /* 865 */,
- 0xE65499D04A675B37LL /* 866 */, 0x7D8F523481BFD216LL /* 867 */,
- 0x0F6F64FCEC15F389LL /* 868 */, 0x74EFBE618B5B13C8LL /* 869 */,
- 0xACDC82B714273E1DLL /* 870 */, 0xDD40BFE003199D17LL /* 871 */,
- 0x37E99257E7E061F8LL /* 872 */, 0xFA52626904775AAALL /* 873 */,
- 0x8BBBF63A463D56F9LL /* 874 */, 0xF0013F1543A26E64LL /* 875 */,
- 0xA8307E9F879EC898LL /* 876 */, 0xCC4C27A4150177CCLL /* 877 */,
- 0x1B432F2CCA1D3348LL /* 878 */, 0xDE1D1F8F9F6FA013LL /* 879 */,
- 0x606602A047A7DDD6LL /* 880 */, 0xD237AB64CC1CB2C7LL /* 881 */,
- 0x9B938E7225FCD1D3LL /* 882 */, 0xEC4E03708E0FF476LL /* 883 */,
- 0xFEB2FBDA3D03C12DLL /* 884 */, 0xAE0BCED2EE43889ALL /* 885 */,
- 0x22CB8923EBFB4F43LL /* 886 */, 0x69360D013CF7396DLL /* 887 */,
- 0x855E3602D2D4E022LL /* 888 */, 0x073805BAD01F784CLL /* 889 */,
- 0x33E17A133852F546LL /* 890 */, 0xDF4874058AC7B638LL /* 891 */,
- 0xBA92B29C678AA14ALL /* 892 */, 0x0CE89FC76CFAADCDLL /* 893 */,
- 0x5F9D4E0908339E34LL /* 894 */, 0xF1AFE9291F5923B9LL /* 895 */,
- 0x6E3480F60F4A265FLL /* 896 */, 0xEEBF3A2AB29B841CLL /* 897 */,
- 0xE21938A88F91B4ADLL /* 898 */, 0x57DFEFF845C6D3C3LL /* 899 */,
- 0x2F006B0BF62CAAF2LL /* 900 */, 0x62F479EF6F75EE78LL /* 901 */,
- 0x11A55AD41C8916A9LL /* 902 */, 0xF229D29084FED453LL /* 903 */,
- 0x42F1C27B16B000E6LL /* 904 */, 0x2B1F76749823C074LL /* 905 */,
- 0x4B76ECA3C2745360LL /* 906 */, 0x8C98F463B91691BDLL /* 907 */,
- 0x14BCC93CF1ADE66ALL /* 908 */, 0x8885213E6D458397LL /* 909 */,
- 0x8E177DF0274D4711LL /* 910 */, 0xB49B73B5503F2951LL /* 911 */,
- 0x10168168C3F96B6BLL /* 912 */, 0x0E3D963B63CAB0AELL /* 913 */,
- 0x8DFC4B5655A1DB14LL /* 914 */, 0xF789F1356E14DE5CLL /* 915 */,
- 0x683E68AF4E51DAC1LL /* 916 */, 0xC9A84F9D8D4B0FD9LL /* 917 */,
- 0x3691E03F52A0F9D1LL /* 918 */, 0x5ED86E46E1878E80LL /* 919 */,
- 0x3C711A0E99D07150LL /* 920 */, 0x5A0865B20C4E9310LL /* 921 */,
- 0x56FBFC1FE4F0682ELL /* 922 */, 0xEA8D5DE3105EDF9BLL /* 923 */,
- 0x71ABFDB12379187ALL /* 924 */, 0x2EB99DE1BEE77B9CLL /* 925 */,
- 0x21ECC0EA33CF4523LL /* 926 */, 0x59A4D7521805C7A1LL /* 927 */,
- 0x3896F5EB56AE7C72LL /* 928 */, 0xAA638F3DB18F75DCLL /* 929 */,
- 0x9F39358DABE9808ELL /* 930 */, 0xB7DEFA91C00B72ACLL /* 931 */,
- 0x6B5541FD62492D92LL /* 932 */, 0x6DC6DEE8F92E4D5BLL /* 933 */,
- 0x353F57ABC4BEEA7ELL /* 934 */, 0x735769D6DA5690CELL /* 935 */,
- 0x0A234AA642391484LL /* 936 */, 0xF6F9508028F80D9DLL /* 937 */,
- 0xB8E319A27AB3F215LL /* 938 */, 0x31AD9C1151341A4DLL /* 939 */,
- 0x773C22A57BEF5805LL /* 940 */, 0x45C7561A07968633LL /* 941 */,
- 0xF913DA9E249DBE36LL /* 942 */, 0xDA652D9B78A64C68LL /* 943 */,
- 0x4C27A97F3BC334EFLL /* 944 */, 0x76621220E66B17F4LL /* 945 */,
- 0x967743899ACD7D0BLL /* 946 */, 0xF3EE5BCAE0ED6782LL /* 947 */,
- 0x409F753600C879FCLL /* 948 */, 0x06D09A39B5926DB6LL /* 949 */,
- 0x6F83AEB0317AC588LL /* 950 */, 0x01E6CA4A86381F21LL /* 951 */,
- 0x66FF3462D19F3025LL /* 952 */, 0x72207C24DDFD3BFBLL /* 953 */,
- 0x4AF6B6D3E2ECE2EBLL /* 954 */, 0x9C994DBEC7EA08DELL /* 955 */,
- 0x49ACE597B09A8BC4LL /* 956 */, 0xB38C4766CF0797BALL /* 957 */,
- 0x131B9373C57C2A75LL /* 958 */, 0xB1822CCE61931E58LL /* 959 */,
- 0x9D7555B909BA1C0CLL /* 960 */, 0x127FAFDD937D11D2LL /* 961 */,
- 0x29DA3BADC66D92E4LL /* 962 */, 0xA2C1D57154C2ECBCLL /* 963 */,
- 0x58C5134D82F6FE24LL /* 964 */, 0x1C3AE3515B62274FLL /* 965 */,
- 0xE907C82E01CB8126LL /* 966 */, 0xF8ED091913E37FCBLL /* 967 */,
- 0x3249D8F9C80046C9LL /* 968 */, 0x80CF9BEDE388FB63LL /* 969 */,
- 0x1881539A116CF19ELL /* 970 */, 0x5103F3F76BD52457LL /* 971 */,
- 0x15B7E6F5AE47F7A8LL /* 972 */, 0xDBD7C6DED47E9CCFLL /* 973 */,
- 0x44E55C410228BB1ALL /* 974 */, 0xB647D4255EDB4E99LL /* 975 */,
- 0x5D11882BB8AAFC30LL /* 976 */, 0xF5098BBB29D3212ALL /* 977 */,
- 0x8FB5EA14E90296B3LL /* 978 */, 0x677B942157DD025ALL /* 979 */,
- 0xFB58E7C0A390ACB5LL /* 980 */, 0x89D3674C83BD4A01LL /* 981 */,
- 0x9E2DA4DF4BF3B93BLL /* 982 */, 0xFCC41E328CAB4829LL /* 983 */,
- 0x03F38C96BA582C52LL /* 984 */, 0xCAD1BDBD7FD85DB2LL /* 985 */,
- 0xBBB442C16082AE83LL /* 986 */, 0xB95FE86BA5DA9AB0LL /* 987 */,
- 0xB22E04673771A93FLL /* 988 */, 0x845358C9493152D8LL /* 989 */,
- 0xBE2A488697B4541ELL /* 990 */, 0x95A2DC2DD38E6966LL /* 991 */,
- 0xC02C11AC923C852BLL /* 992 */, 0x2388B1990DF2A87BLL /* 993 */,
- 0x7C8008FA1B4F37BELL /* 994 */, 0x1F70D0C84D54E503LL /* 995 */,
- 0x5490ADEC7ECE57D4LL /* 996 */, 0x002B3C27D9063A3ALL /* 997 */,
- 0x7EAEA3848030A2BFLL /* 998 */, 0xC602326DED2003C0LL /* 999 */,
- 0x83A7287D69A94086LL /* 1000 */, 0xC57A5FCB30F57A8ALL /* 1001 */,
- 0xB56844E479EBE779LL /* 1002 */, 0xA373B40F05DCBCE9LL /* 1003 */,
- 0xD71A786E88570EE2LL /* 1004 */, 0x879CBACDBDE8F6A0LL /* 1005 */,
- 0x976AD1BCC164A32FLL /* 1006 */, 0xAB21E25E9666D78BLL /* 1007 */,
- 0x901063AAE5E5C33CLL /* 1008 */, 0x9818B34448698D90LL /* 1009 */,
- 0xE36487AE3E1E8ABBLL /* 1010 */, 0xAFBDF931893BDCB4LL /* 1011 */,
- 0x6345A0DC5FBBD519LL /* 1012 */, 0x8628FE269B9465CALL /* 1013 */,
- 0x1E5D01603F9C51ECLL /* 1014 */, 0x4DE44006A15049B7LL /* 1015 */,
- 0xBF6C70E5F776CBB1LL /* 1016 */, 0x411218F2EF552BEDLL /* 1017 */,
- 0xCB0C0708705A36A3LL /* 1018 */, 0xE74D14754F986044LL /* 1019 */,
- 0xCD56D9430EA8280ELL /* 1020 */, 0xC12591D7535F5065LL /* 1021 */,
- 0xC83223F1720AEF96LL /* 1022 */, 0xC3A0396F7363A51FLL /* 1023 */
-};
-
-#define t1 (table)
-#define t2 (table+256)
-#define t3 (table+256*2)
-#define t4 (table+256*3)
-
-#define SAVE_ABC() do { \
- aa = a; \
- bb = b; \
- cc = c; \
-} while (/* CONSTCOND */ 0)
-
-#define ROUND(a,b,c,x,mul) \
- do { \
- c ^= x; \
- a -= t1[(uint8_t)(c)] ^ \
- t2[(uint8_t)(((uint32_t)(c))>>(2*8))] ^ \
- t3[(uint8_t)((c)>>(4*8))] ^ \
- t4[(uint8_t)(((uint32_t)((c)>>(4*8)))>>(2*8))]; \
- b += t4[(uint8_t)(((uint32_t)(c))>>(1*8))] ^ \
- t3[(uint8_t)(((uint32_t)(c))>>(3*8))] ^ \
- t2[(uint8_t)(((uint32_t)((c)>>(4*8)))>>(1*8))] ^ \
- t1[(uint8_t)(((uint32_t)((c)>>(4*8)))>>(3*8))]; \
- b *= mul; \
- } while (/* CONSTCOND */ 0)
-
-#define PASS(a,b,c,mul) \
- do { \
- ROUND(a,b,c,x0,mul); \
- ROUND(b,c,a,x1,mul); \
- ROUND(c,a,b,x2,mul); \
- ROUND(a,b,c,x3,mul); \
- ROUND(b,c,a,x4,mul); \
- ROUND(c,a,b,x5,mul); \
- ROUND(a,b,c,x6,mul); \
- ROUND(b,c,a,x7,mul); \
- } while (/* CONSTCOND */ 0)
-
-#define KEY_SCHEDULE() do { \
- x0 -= x7 ^ 0xA5A5A5A5A5A5A5A5LL; \
- x1 ^= x0; \
- x2 += x1; \
- x3 -= x2 ^ ((~x1)<<19); \
- x4 ^= x3; \
- x5 += x4; \
- x6 -= x5 ^ ((~x4)>>23); \
- x7 ^= x6; \
- x0 += x7; \
- x1 -= x0 ^ ((~x7)<<19); \
- x2 ^= x1; \
- x3 += x2; \
- x4 -= x3 ^ ((~x2)>>23); \
- x5 ^= x4; \
- x6 += x5; \
- x7 -= x6 ^ 0x0123456789ABCDEFLL; \
-} while (/* CONSTCOND */ 0)
-
-#define FEEDFORWARD() do { \
- a ^= aa; \
- b -= bb; \
- c += cc; \
-} while (/* CONSTCOND */ 0)
-
-#define COMPRESS() do { \
- SAVE_ABC(); \
- for(pass_no=0; pass_no < PASSES; pass_no++) { \
- if (pass_no != 0) { \
- KEY_SCHEDULE(); \
- } \
- PASS(a,b,c,(pass_no==0?5:pass_no==1?7:9)); \
- tmpa=a; \
- a=c; \
- c=b; \
- b=tmpa; \
- } \
- FEEDFORWARD(); \
-} while (/* CONSTCOND */ 0)
-
-#define TIGER_COMPRESS_MACRO(str, state) do { \
- uint64_t a, b, c, tmpa; \
- uint64_t aa, bb, cc; \
- uint64_t x0, x1, x2, x3, x4, x5, x6, x7; \
- int pass_no; \
- \
- a = state[0]; \
- b = state[1]; \
- c = state[2]; \
- \
- x0=str[0]; x1=str[1]; x2=str[2]; x3=str[3]; \
- x4=str[4]; x5=str[5]; x6=str[6]; x7=str[7]; \
- \
- COMPRESS(); \
- \
- state[0] = a; \
- state[1] = b; \
- state[2] = c; \
-} while (/* CONSTCOND */ 0)
-
-/* The compress function is a function. Requires smaller cache? */
-static void
-tiger_compress(const uint64_t * str, uint64_t state[3])
-{
- TIGER_COMPRESS_MACRO(((const uint64_t *) str), ((uint64_t *) state));
-}
-
-void
-TIGERInit(tiger_context_t *tp)
-{
- tp->ctx[0] = 0x0123456789ABCDEFLL;
- tp->ctx[1] = 0xFEDCBA9876543210LL;
- tp->ctx[2] = 0xF096A5B4C3B2E187LL;
-}
-
-void
-TIGERUpdate(tiger_context_t *tp, const uint8_t *data, uint32_t len)
-{
- const uint64_t *str = (const uint64_t *)data;
- uint64_t i;
- uint64_t j;
- uint8_t temp[64];
-
- for (i = len; i >= 64; i -= 64) {
-#if BYTE_ORDER == BIG_ENDIAN
- for (j = 0; j < 64; j++) {
- temp[j ^ 7] = ((uint8_t *) str)[j];
- }
- tiger_compress(((const uint64_t *) temp), tp->ctx);
-#else
- tiger_compress(str, tp->ctx);
-#endif
- str += 8;
- }
-
-#if BYTE_ORDER == BIG_ENDIAN
- for (j = 0; j < i; j++) {
- temp[j ^ 7] = ((uint8_t *) str)[j];
- }
-
- temp[j ^ 7] = 0x01;
- j++;
- for (; j & 7; j++) {
- temp[j ^ 7] = 0;
- }
-#else
- for (j = 0; j < i; j++) {
- temp[j] = ((const uint8_t *) str)[j];
- }
-
- temp[j++] = 0x01;
- for (; j & 7; j++) {
- temp[j] = 0;
- }
-#endif
- if (j > 56) {
- for (; j < 64; j++) {
- temp[j] = 0;
- }
- tiger_compress(((uint64_t *) temp), tp->ctx);
- j = 0;
- }
- for (; j < 56; j++) {
- temp[j] = 0;
- }
- ((uint64_t *) (&(temp[56])))[0] = ((uint64_t) len) << 3;
- tiger_compress(((uint64_t *) temp), tp->ctx);
-}
-
-void
-TIGERFinal(uint8_t *digest, tiger_context_t *tp)
-{
- /* nothing to do - included for compatibility with SHA* interface */
-}
-
-static void
-print_uint64(char *buf, uint64_t val)
-{
- int i = 0;
- static const char hexdigits[] = "0123456789abcdef";
-
- for (i = 0; i < 8; ++i) {
- buf[2 * i] = hexdigits[(val >> (56 - 8 * i + 4)) & 15];
- buf[2 * i + 1] = hexdigits[(val >> (56 - 8 * i)) & 15];
- }
-}
-
-char *
-TIGEREnd(tiger_context_t *tp, char *buf)
-{
- int i;
-
- if (buf == NULL && (buf = malloc(41)) == NULL) {
- return NULL;
- }
-
- for (i = 0; i < 3; ++i)
- print_uint64(buf + i * 16, tp->ctx[i]);
- buf[16 * i] = '\0';
-
- return buf;
-}
-
-
-char *
-TIGERFile(char *filename, char *buf)
-{
- tiger_context_t ctx;
- uint8_t buffer[BUFSIZ];
- int fd;
- int num;
- int oerrno;
-
- TIGERInit(&ctx);
-
- if ((fd = open(filename, O_RDONLY)) < 0) {
- return 0;
- }
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0) {
- TIGERUpdate(&ctx, buffer, (size_t)num);
- }
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
-
- return (num < 0) ? 0 : TIGEREnd(&ctx, buf);
-}
-
-
-char *
-TIGERData(const uint8_t *data, size_t len, char *buf)
-{
- tiger_context_t ctx;
-
- TIGERInit(&ctx);
- TIGERUpdate(&ctx, data, len);
- return(TIGEREnd(&ctx, buf));
-}
diff --git a/pkgtools/digest/files/tiger.h b/pkgtools/digest/files/tiger.h
deleted file mode 100644
index 055c5827610..00000000000
--- a/pkgtools/digest/files/tiger.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $NetBSD: tiger.h,v 1.1 2005/03/22 10:16:15 agc Exp $ */
-
-/*
- * Copyright © 2005 Alistair Crooks. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Alistair Crooks
- * for the NetBSD project.
- * 4. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef TIGER_H_
-#define TIGER_H_
-
-typedef struct tiger_context_t {
- uint64_t ctx[3];
-} tiger_context_t;
-
-void TIGERInit(tiger_context_t *);
-void TIGERUpdate(tiger_context_t *, const uint8_t *, uint32_t);
-void TIGERFinal(uint8_t *, tiger_context_t *);
-
-char *TIGEREnd(tiger_context_t *, char *);
-char *TIGERFile(char *, char *);
-char *TIGERData(const uint8_t *, size_t, char *);
-
-#endif
diff --git a/pkgtools/digest/files/whirlpool.c b/pkgtools/digest/files/whirlpool.c
deleted file mode 100644
index 437106e2e7c..00000000000
--- a/pkgtools/digest/files/whirlpool.c
+++ /dev/null
@@ -1,1852 +0,0 @@
-/**
- * The Whirlpool hashing function.
- *
- * <P>
- * <b>References</b>
- *
- * <P>
- * The Whirlpool algorithm was developed by
- * <a href="mailto:pbarreto@scopus.com.br">Paulo S. L. M. Barreto</a> and
- * <a href="mailto:vincent.rijmen@cryptomathic.com">Vincent Rijmen</a>.
- *
- * See
- * P.S.L.M. Barreto, V. Rijmen,
- * ``The Whirlpool hashing function,''
- * NESSIE submission, 2000 (tweaked version, 2001),
- * <https://www.cosic.esat.kuleuven.ac.be/nessie/workshop/submissions/whirlpool.zip>
- *
- * @author Paulo S.L.M. Barreto
- * @author Vincent Rijmen.
- *
- * @version 3.0 (2003.03.12)
- *
- * =============================================================================
- *
- * Differences from version 2.1:
- *
- * - Suboptimal diffusion matrix replaced by cir(1, 1, 4, 1, 8, 5, 2, 9).
- *
- * =============================================================================
- *
- * Differences from version 2.0:
- *
- * - Generation of ISO/IEC 10118-3 test vectors.
- * - Bug fix: nonzero carry was ignored when tallying the data length
- * (this bug apparently only manifested itself when feeding data
- * in pieces rather than in a single chunk at once).
- * - Support for MS Visual C++ 64-bit integer arithmetic.
- *
- * Differences from version 1.0:
- *
- * - Original S-box replaced by the tweaked, hardware-efficient version.
- *
- * =============================================================================
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <digest-types.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
-#include "whirlpool.h"
-
-/*
- * The number of rounds of the internal dedicated block cipher.
- */
-#define R 10
-
-/*
- * Though Whirlpool is endianness-neutral, the encryption tables are listed
- * in BIG-ENDIAN format, which is adopted throughout this implementation
- * (but little-endian notation would be equally suitable if consistently
- * employed).
- */
-
-static const u64 C0[256] = {
- LL(0x18186018c07830d8), LL(0x23238c2305af4626), LL(0xc6c63fc67ef991b8), LL(0xe8e887e8136fcdfb),
- LL(0x878726874ca113cb), LL(0xb8b8dab8a9626d11), LL(0x0101040108050209), LL(0x4f4f214f426e9e0d),
- LL(0x3636d836adee6c9b), LL(0xa6a6a2a6590451ff), LL(0xd2d26fd2debdb90c), LL(0xf5f5f3f5fb06f70e),
- LL(0x7979f979ef80f296), LL(0x6f6fa16f5fcede30), LL(0x91917e91fcef3f6d), LL(0x52525552aa07a4f8),
- LL(0x60609d6027fdc047), LL(0xbcbccabc89766535), LL(0x9b9b569baccd2b37), LL(0x8e8e028e048c018a),
- LL(0xa3a3b6a371155bd2), LL(0x0c0c300c603c186c), LL(0x7b7bf17bff8af684), LL(0x3535d435b5e16a80),
- LL(0x1d1d741de8693af5), LL(0xe0e0a7e05347ddb3), LL(0xd7d77bd7f6acb321), LL(0xc2c22fc25eed999c),
- LL(0x2e2eb82e6d965c43), LL(0x4b4b314b627a9629), LL(0xfefedffea321e15d), LL(0x575741578216aed5),
- LL(0x15155415a8412abd), LL(0x7777c1779fb6eee8), LL(0x3737dc37a5eb6e92), LL(0xe5e5b3e57b56d79e),
- LL(0x9f9f469f8cd92313), LL(0xf0f0e7f0d317fd23), LL(0x4a4a354a6a7f9420), LL(0xdada4fda9e95a944),
- LL(0x58587d58fa25b0a2), LL(0xc9c903c906ca8fcf), LL(0x2929a429558d527c), LL(0x0a0a280a5022145a),
- LL(0xb1b1feb1e14f7f50), LL(0xa0a0baa0691a5dc9), LL(0x6b6bb16b7fdad614), LL(0x85852e855cab17d9),
- LL(0xbdbdcebd8173673c), LL(0x5d5d695dd234ba8f), LL(0x1010401080502090), LL(0xf4f4f7f4f303f507),
- LL(0xcbcb0bcb16c08bdd), LL(0x3e3ef83eedc67cd3), LL(0x0505140528110a2d), LL(0x676781671fe6ce78),
- LL(0xe4e4b7e47353d597), LL(0x27279c2725bb4e02), LL(0x4141194132588273), LL(0x8b8b168b2c9d0ba7),
- LL(0xa7a7a6a7510153f6), LL(0x7d7de97dcf94fab2), LL(0x95956e95dcfb3749), LL(0xd8d847d88e9fad56),
- LL(0xfbfbcbfb8b30eb70), LL(0xeeee9fee2371c1cd), LL(0x7c7ced7cc791f8bb), LL(0x6666856617e3cc71),
- LL(0xdddd53dda68ea77b), LL(0x17175c17b84b2eaf), LL(0x4747014702468e45), LL(0x9e9e429e84dc211a),
- LL(0xcaca0fca1ec589d4), LL(0x2d2db42d75995a58), LL(0xbfbfc6bf9179632e), LL(0x07071c07381b0e3f),
- LL(0xadad8ead012347ac), LL(0x5a5a755aea2fb4b0), LL(0x838336836cb51bef), LL(0x3333cc3385ff66b6),
- LL(0x636391633ff2c65c), LL(0x02020802100a0412), LL(0xaaaa92aa39384993), LL(0x7171d971afa8e2de),
- LL(0xc8c807c80ecf8dc6), LL(0x19196419c87d32d1), LL(0x494939497270923b), LL(0xd9d943d9869aaf5f),
- LL(0xf2f2eff2c31df931), LL(0xe3e3abe34b48dba8), LL(0x5b5b715be22ab6b9), LL(0x88881a8834920dbc),
- LL(0x9a9a529aa4c8293e), LL(0x262698262dbe4c0b), LL(0x3232c8328dfa64bf), LL(0xb0b0fab0e94a7d59),
- LL(0xe9e983e91b6acff2), LL(0x0f0f3c0f78331e77), LL(0xd5d573d5e6a6b733), LL(0x80803a8074ba1df4),
- LL(0xbebec2be997c6127), LL(0xcdcd13cd26de87eb), LL(0x3434d034bde46889), LL(0x48483d487a759032),
- LL(0xffffdbffab24e354), LL(0x7a7af57af78ff48d), LL(0x90907a90f4ea3d64), LL(0x5f5f615fc23ebe9d),
- LL(0x202080201da0403d), LL(0x6868bd6867d5d00f), LL(0x1a1a681ad07234ca), LL(0xaeae82ae192c41b7),
- LL(0xb4b4eab4c95e757d), LL(0x54544d549a19a8ce), LL(0x93937693ece53b7f), LL(0x222288220daa442f),
- LL(0x64648d6407e9c863), LL(0xf1f1e3f1db12ff2a), LL(0x7373d173bfa2e6cc), LL(0x12124812905a2482),
- LL(0x40401d403a5d807a), LL(0x0808200840281048), LL(0xc3c32bc356e89b95), LL(0xecec97ec337bc5df),
- LL(0xdbdb4bdb9690ab4d), LL(0xa1a1bea1611f5fc0), LL(0x8d8d0e8d1c830791), LL(0x3d3df43df5c97ac8),
- LL(0x97976697ccf1335b), LL(0x0000000000000000), LL(0xcfcf1bcf36d483f9), LL(0x2b2bac2b4587566e),
- LL(0x7676c57697b3ece1), LL(0x8282328264b019e6), LL(0xd6d67fd6fea9b128), LL(0x1b1b6c1bd87736c3),
- LL(0xb5b5eeb5c15b7774), LL(0xafaf86af112943be), LL(0x6a6ab56a77dfd41d), LL(0x50505d50ba0da0ea),
- LL(0x45450945124c8a57), LL(0xf3f3ebf3cb18fb38), LL(0x3030c0309df060ad), LL(0xefef9bef2b74c3c4),
- LL(0x3f3ffc3fe5c37eda), LL(0x55554955921caac7), LL(0xa2a2b2a2791059db), LL(0xeaea8fea0365c9e9),
- LL(0x656589650fecca6a), LL(0xbabad2bab9686903), LL(0x2f2fbc2f65935e4a), LL(0xc0c027c04ee79d8e),
- LL(0xdede5fdebe81a160), LL(0x1c1c701ce06c38fc), LL(0xfdfdd3fdbb2ee746), LL(0x4d4d294d52649a1f),
- LL(0x92927292e4e03976), LL(0x7575c9758fbceafa), LL(0x06061806301e0c36), LL(0x8a8a128a249809ae),
- LL(0xb2b2f2b2f940794b), LL(0xe6e6bfe66359d185), LL(0x0e0e380e70361c7e), LL(0x1f1f7c1ff8633ee7),
- LL(0x6262956237f7c455), LL(0xd4d477d4eea3b53a), LL(0xa8a89aa829324d81), LL(0x96966296c4f43152),
- LL(0xf9f9c3f99b3aef62), LL(0xc5c533c566f697a3), LL(0x2525942535b14a10), LL(0x59597959f220b2ab),
- LL(0x84842a8454ae15d0), LL(0x7272d572b7a7e4c5), LL(0x3939e439d5dd72ec), LL(0x4c4c2d4c5a619816),
- LL(0x5e5e655eca3bbc94), LL(0x7878fd78e785f09f), LL(0x3838e038ddd870e5), LL(0x8c8c0a8c14860598),
- LL(0xd1d163d1c6b2bf17), LL(0xa5a5aea5410b57e4), LL(0xe2e2afe2434dd9a1), LL(0x616199612ff8c24e),
- LL(0xb3b3f6b3f1457b42), LL(0x2121842115a54234), LL(0x9c9c4a9c94d62508), LL(0x1e1e781ef0663cee),
- LL(0x4343114322528661), LL(0xc7c73bc776fc93b1), LL(0xfcfcd7fcb32be54f), LL(0x0404100420140824),
- LL(0x51515951b208a2e3), LL(0x99995e99bcc72f25), LL(0x6d6da96d4fc4da22), LL(0x0d0d340d68391a65),
- LL(0xfafacffa8335e979), LL(0xdfdf5bdfb684a369), LL(0x7e7ee57ed79bfca9), LL(0x242490243db44819),
- LL(0x3b3bec3bc5d776fe), LL(0xabab96ab313d4b9a), LL(0xcece1fce3ed181f0), LL(0x1111441188552299),
- LL(0x8f8f068f0c890383), LL(0x4e4e254e4a6b9c04), LL(0xb7b7e6b7d1517366), LL(0xebeb8beb0b60cbe0),
- LL(0x3c3cf03cfdcc78c1), LL(0x81813e817cbf1ffd), LL(0x94946a94d4fe3540), LL(0xf7f7fbf7eb0cf31c),
- LL(0xb9b9deb9a1676f18), LL(0x13134c13985f268b), LL(0x2c2cb02c7d9c5851), LL(0xd3d36bd3d6b8bb05),
- LL(0xe7e7bbe76b5cd38c), LL(0x6e6ea56e57cbdc39), LL(0xc4c437c46ef395aa), LL(0x03030c03180f061b),
- LL(0x565645568a13acdc), LL(0x44440d441a49885e), LL(0x7f7fe17fdf9efea0), LL(0xa9a99ea921374f88),
- LL(0x2a2aa82a4d825467), LL(0xbbbbd6bbb16d6b0a), LL(0xc1c123c146e29f87), LL(0x53535153a202a6f1),
- LL(0xdcdc57dcae8ba572), LL(0x0b0b2c0b58271653), LL(0x9d9d4e9d9cd32701), LL(0x6c6cad6c47c1d82b),
- LL(0x3131c43195f562a4), LL(0x7474cd7487b9e8f3), LL(0xf6f6fff6e309f115), LL(0x464605460a438c4c),
- LL(0xacac8aac092645a5), LL(0x89891e893c970fb5), LL(0x14145014a04428b4), LL(0xe1e1a3e15b42dfba),
- LL(0x16165816b04e2ca6), LL(0x3a3ae83acdd274f7), LL(0x6969b9696fd0d206), LL(0x09092409482d1241),
- LL(0x7070dd70a7ade0d7), LL(0xb6b6e2b6d954716f), LL(0xd0d067d0ceb7bd1e), LL(0xeded93ed3b7ec7d6),
- LL(0xcccc17cc2edb85e2), LL(0x424215422a578468), LL(0x98985a98b4c22d2c), LL(0xa4a4aaa4490e55ed),
- LL(0x2828a0285d885075), LL(0x5c5c6d5cda31b886), LL(0xf8f8c7f8933fed6b), LL(0x8686228644a411c2),
-};
-
-static const u64 C1[256] = {
- LL(0xd818186018c07830), LL(0x2623238c2305af46), LL(0xb8c6c63fc67ef991), LL(0xfbe8e887e8136fcd),
- LL(0xcb878726874ca113), LL(0x11b8b8dab8a9626d), LL(0x0901010401080502), LL(0x0d4f4f214f426e9e),
- LL(0x9b3636d836adee6c), LL(0xffa6a6a2a6590451), LL(0x0cd2d26fd2debdb9), LL(0x0ef5f5f3f5fb06f7),
- LL(0x967979f979ef80f2), LL(0x306f6fa16f5fcede), LL(0x6d91917e91fcef3f), LL(0xf852525552aa07a4),
- LL(0x4760609d6027fdc0), LL(0x35bcbccabc897665), LL(0x379b9b569baccd2b), LL(0x8a8e8e028e048c01),
- LL(0xd2a3a3b6a371155b), LL(0x6c0c0c300c603c18), LL(0x847b7bf17bff8af6), LL(0x803535d435b5e16a),
- LL(0xf51d1d741de8693a), LL(0xb3e0e0a7e05347dd), LL(0x21d7d77bd7f6acb3), LL(0x9cc2c22fc25eed99),
- LL(0x432e2eb82e6d965c), LL(0x294b4b314b627a96), LL(0x5dfefedffea321e1), LL(0xd5575741578216ae),
- LL(0xbd15155415a8412a), LL(0xe87777c1779fb6ee), LL(0x923737dc37a5eb6e), LL(0x9ee5e5b3e57b56d7),
- LL(0x139f9f469f8cd923), LL(0x23f0f0e7f0d317fd), LL(0x204a4a354a6a7f94), LL(0x44dada4fda9e95a9),
- LL(0xa258587d58fa25b0), LL(0xcfc9c903c906ca8f), LL(0x7c2929a429558d52), LL(0x5a0a0a280a502214),
- LL(0x50b1b1feb1e14f7f), LL(0xc9a0a0baa0691a5d), LL(0x146b6bb16b7fdad6), LL(0xd985852e855cab17),
- LL(0x3cbdbdcebd817367), LL(0x8f5d5d695dd234ba), LL(0x9010104010805020), LL(0x07f4f4f7f4f303f5),
- LL(0xddcbcb0bcb16c08b), LL(0xd33e3ef83eedc67c), LL(0x2d0505140528110a), LL(0x78676781671fe6ce),
- LL(0x97e4e4b7e47353d5), LL(0x0227279c2725bb4e), LL(0x7341411941325882), LL(0xa78b8b168b2c9d0b),
- LL(0xf6a7a7a6a7510153), LL(0xb27d7de97dcf94fa), LL(0x4995956e95dcfb37), LL(0x56d8d847d88e9fad),
- LL(0x70fbfbcbfb8b30eb), LL(0xcdeeee9fee2371c1), LL(0xbb7c7ced7cc791f8), LL(0x716666856617e3cc),
- LL(0x7bdddd53dda68ea7), LL(0xaf17175c17b84b2e), LL(0x454747014702468e), LL(0x1a9e9e429e84dc21),
- LL(0xd4caca0fca1ec589), LL(0x582d2db42d75995a), LL(0x2ebfbfc6bf917963), LL(0x3f07071c07381b0e),
- LL(0xacadad8ead012347), LL(0xb05a5a755aea2fb4), LL(0xef838336836cb51b), LL(0xb63333cc3385ff66),
- LL(0x5c636391633ff2c6), LL(0x1202020802100a04), LL(0x93aaaa92aa393849), LL(0xde7171d971afa8e2),
- LL(0xc6c8c807c80ecf8d), LL(0xd119196419c87d32), LL(0x3b49493949727092), LL(0x5fd9d943d9869aaf),
- LL(0x31f2f2eff2c31df9), LL(0xa8e3e3abe34b48db), LL(0xb95b5b715be22ab6), LL(0xbc88881a8834920d),
- LL(0x3e9a9a529aa4c829), LL(0x0b262698262dbe4c), LL(0xbf3232c8328dfa64), LL(0x59b0b0fab0e94a7d),
- LL(0xf2e9e983e91b6acf), LL(0x770f0f3c0f78331e), LL(0x33d5d573d5e6a6b7), LL(0xf480803a8074ba1d),
- LL(0x27bebec2be997c61), LL(0xebcdcd13cd26de87), LL(0x893434d034bde468), LL(0x3248483d487a7590),
- LL(0x54ffffdbffab24e3), LL(0x8d7a7af57af78ff4), LL(0x6490907a90f4ea3d), LL(0x9d5f5f615fc23ebe),
- LL(0x3d202080201da040), LL(0x0f6868bd6867d5d0), LL(0xca1a1a681ad07234), LL(0xb7aeae82ae192c41),
- LL(0x7db4b4eab4c95e75), LL(0xce54544d549a19a8), LL(0x7f93937693ece53b), LL(0x2f222288220daa44),
- LL(0x6364648d6407e9c8), LL(0x2af1f1e3f1db12ff), LL(0xcc7373d173bfa2e6), LL(0x8212124812905a24),
- LL(0x7a40401d403a5d80), LL(0x4808082008402810), LL(0x95c3c32bc356e89b), LL(0xdfecec97ec337bc5),
- LL(0x4ddbdb4bdb9690ab), LL(0xc0a1a1bea1611f5f), LL(0x918d8d0e8d1c8307), LL(0xc83d3df43df5c97a),
- LL(0x5b97976697ccf133), LL(0x0000000000000000), LL(0xf9cfcf1bcf36d483), LL(0x6e2b2bac2b458756),
- LL(0xe17676c57697b3ec), LL(0xe68282328264b019), LL(0x28d6d67fd6fea9b1), LL(0xc31b1b6c1bd87736),
- LL(0x74b5b5eeb5c15b77), LL(0xbeafaf86af112943), LL(0x1d6a6ab56a77dfd4), LL(0xea50505d50ba0da0),
- LL(0x5745450945124c8a), LL(0x38f3f3ebf3cb18fb), LL(0xad3030c0309df060), LL(0xc4efef9bef2b74c3),
- LL(0xda3f3ffc3fe5c37e), LL(0xc755554955921caa), LL(0xdba2a2b2a2791059), LL(0xe9eaea8fea0365c9),
- LL(0x6a656589650fecca), LL(0x03babad2bab96869), LL(0x4a2f2fbc2f65935e), LL(0x8ec0c027c04ee79d),
- LL(0x60dede5fdebe81a1), LL(0xfc1c1c701ce06c38), LL(0x46fdfdd3fdbb2ee7), LL(0x1f4d4d294d52649a),
- LL(0x7692927292e4e039), LL(0xfa7575c9758fbcea), LL(0x3606061806301e0c), LL(0xae8a8a128a249809),
- LL(0x4bb2b2f2b2f94079), LL(0x85e6e6bfe66359d1), LL(0x7e0e0e380e70361c), LL(0xe71f1f7c1ff8633e),
- LL(0x556262956237f7c4), LL(0x3ad4d477d4eea3b5), LL(0x81a8a89aa829324d), LL(0x5296966296c4f431),
- LL(0x62f9f9c3f99b3aef), LL(0xa3c5c533c566f697), LL(0x102525942535b14a), LL(0xab59597959f220b2),
- LL(0xd084842a8454ae15), LL(0xc57272d572b7a7e4), LL(0xec3939e439d5dd72), LL(0x164c4c2d4c5a6198),
- LL(0x945e5e655eca3bbc), LL(0x9f7878fd78e785f0), LL(0xe53838e038ddd870), LL(0x988c8c0a8c148605),
- LL(0x17d1d163d1c6b2bf), LL(0xe4a5a5aea5410b57), LL(0xa1e2e2afe2434dd9), LL(0x4e616199612ff8c2),
- LL(0x42b3b3f6b3f1457b), LL(0x342121842115a542), LL(0x089c9c4a9c94d625), LL(0xee1e1e781ef0663c),
- LL(0x6143431143225286), LL(0xb1c7c73bc776fc93), LL(0x4ffcfcd7fcb32be5), LL(0x2404041004201408),
- LL(0xe351515951b208a2), LL(0x2599995e99bcc72f), LL(0x226d6da96d4fc4da), LL(0x650d0d340d68391a),
- LL(0x79fafacffa8335e9), LL(0x69dfdf5bdfb684a3), LL(0xa97e7ee57ed79bfc), LL(0x19242490243db448),
- LL(0xfe3b3bec3bc5d776), LL(0x9aabab96ab313d4b), LL(0xf0cece1fce3ed181), LL(0x9911114411885522),
- LL(0x838f8f068f0c8903), LL(0x044e4e254e4a6b9c), LL(0x66b7b7e6b7d15173), LL(0xe0ebeb8beb0b60cb),
- LL(0xc13c3cf03cfdcc78), LL(0xfd81813e817cbf1f), LL(0x4094946a94d4fe35), LL(0x1cf7f7fbf7eb0cf3),
- LL(0x18b9b9deb9a1676f), LL(0x8b13134c13985f26), LL(0x512c2cb02c7d9c58), LL(0x05d3d36bd3d6b8bb),
- LL(0x8ce7e7bbe76b5cd3), LL(0x396e6ea56e57cbdc), LL(0xaac4c437c46ef395), LL(0x1b03030c03180f06),
- LL(0xdc565645568a13ac), LL(0x5e44440d441a4988), LL(0xa07f7fe17fdf9efe), LL(0x88a9a99ea921374f),
- LL(0x672a2aa82a4d8254), LL(0x0abbbbd6bbb16d6b), LL(0x87c1c123c146e29f), LL(0xf153535153a202a6),
- LL(0x72dcdc57dcae8ba5), LL(0x530b0b2c0b582716), LL(0x019d9d4e9d9cd327), LL(0x2b6c6cad6c47c1d8),
- LL(0xa43131c43195f562), LL(0xf37474cd7487b9e8), LL(0x15f6f6fff6e309f1), LL(0x4c464605460a438c),
- LL(0xa5acac8aac092645), LL(0xb589891e893c970f), LL(0xb414145014a04428), LL(0xbae1e1a3e15b42df),
- LL(0xa616165816b04e2c), LL(0xf73a3ae83acdd274), LL(0x066969b9696fd0d2), LL(0x4109092409482d12),
- LL(0xd77070dd70a7ade0), LL(0x6fb6b6e2b6d95471), LL(0x1ed0d067d0ceb7bd), LL(0xd6eded93ed3b7ec7),
- LL(0xe2cccc17cc2edb85), LL(0x68424215422a5784), LL(0x2c98985a98b4c22d), LL(0xeda4a4aaa4490e55),
- LL(0x752828a0285d8850), LL(0x865c5c6d5cda31b8), LL(0x6bf8f8c7f8933fed), LL(0xc28686228644a411),
-};
-
-static const u64 C2[256] = {
- LL(0x30d818186018c078), LL(0x462623238c2305af), LL(0x91b8c6c63fc67ef9), LL(0xcdfbe8e887e8136f),
- LL(0x13cb878726874ca1), LL(0x6d11b8b8dab8a962), LL(0x0209010104010805), LL(0x9e0d4f4f214f426e),
- LL(0x6c9b3636d836adee), LL(0x51ffa6a6a2a65904), LL(0xb90cd2d26fd2debd), LL(0xf70ef5f5f3f5fb06),
- LL(0xf2967979f979ef80), LL(0xde306f6fa16f5fce), LL(0x3f6d91917e91fcef), LL(0xa4f852525552aa07),
- LL(0xc04760609d6027fd), LL(0x6535bcbccabc8976), LL(0x2b379b9b569baccd), LL(0x018a8e8e028e048c),
- LL(0x5bd2a3a3b6a37115), LL(0x186c0c0c300c603c), LL(0xf6847b7bf17bff8a), LL(0x6a803535d435b5e1),
- LL(0x3af51d1d741de869), LL(0xddb3e0e0a7e05347), LL(0xb321d7d77bd7f6ac), LL(0x999cc2c22fc25eed),
- LL(0x5c432e2eb82e6d96), LL(0x96294b4b314b627a), LL(0xe15dfefedffea321), LL(0xaed5575741578216),
- LL(0x2abd15155415a841), LL(0xeee87777c1779fb6), LL(0x6e923737dc37a5eb), LL(0xd79ee5e5b3e57b56),
- LL(0x23139f9f469f8cd9), LL(0xfd23f0f0e7f0d317), LL(0x94204a4a354a6a7f), LL(0xa944dada4fda9e95),
- LL(0xb0a258587d58fa25), LL(0x8fcfc9c903c906ca), LL(0x527c2929a429558d), LL(0x145a0a0a280a5022),
- LL(0x7f50b1b1feb1e14f), LL(0x5dc9a0a0baa0691a), LL(0xd6146b6bb16b7fda), LL(0x17d985852e855cab),
- LL(0x673cbdbdcebd8173), LL(0xba8f5d5d695dd234), LL(0x2090101040108050), LL(0xf507f4f4f7f4f303),
- LL(0x8bddcbcb0bcb16c0), LL(0x7cd33e3ef83eedc6), LL(0x0a2d050514052811), LL(0xce78676781671fe6),
- LL(0xd597e4e4b7e47353), LL(0x4e0227279c2725bb), LL(0x8273414119413258), LL(0x0ba78b8b168b2c9d),
- LL(0x53f6a7a7a6a75101), LL(0xfab27d7de97dcf94), LL(0x374995956e95dcfb), LL(0xad56d8d847d88e9f),
- LL(0xeb70fbfbcbfb8b30), LL(0xc1cdeeee9fee2371), LL(0xf8bb7c7ced7cc791), LL(0xcc716666856617e3),
- LL(0xa77bdddd53dda68e), LL(0x2eaf17175c17b84b), LL(0x8e45474701470246), LL(0x211a9e9e429e84dc),
- LL(0x89d4caca0fca1ec5), LL(0x5a582d2db42d7599), LL(0x632ebfbfc6bf9179), LL(0x0e3f07071c07381b),
- LL(0x47acadad8ead0123), LL(0xb4b05a5a755aea2f), LL(0x1bef838336836cb5), LL(0x66b63333cc3385ff),
- LL(0xc65c636391633ff2), LL(0x041202020802100a), LL(0x4993aaaa92aa3938), LL(0xe2de7171d971afa8),
- LL(0x8dc6c8c807c80ecf), LL(0x32d119196419c87d), LL(0x923b494939497270), LL(0xaf5fd9d943d9869a),
- LL(0xf931f2f2eff2c31d), LL(0xdba8e3e3abe34b48), LL(0xb6b95b5b715be22a), LL(0x0dbc88881a883492),
- LL(0x293e9a9a529aa4c8), LL(0x4c0b262698262dbe), LL(0x64bf3232c8328dfa), LL(0x7d59b0b0fab0e94a),
- LL(0xcff2e9e983e91b6a), LL(0x1e770f0f3c0f7833), LL(0xb733d5d573d5e6a6), LL(0x1df480803a8074ba),
- LL(0x6127bebec2be997c), LL(0x87ebcdcd13cd26de), LL(0x68893434d034bde4), LL(0x903248483d487a75),
- LL(0xe354ffffdbffab24), LL(0xf48d7a7af57af78f), LL(0x3d6490907a90f4ea), LL(0xbe9d5f5f615fc23e),
- LL(0x403d202080201da0), LL(0xd00f6868bd6867d5), LL(0x34ca1a1a681ad072), LL(0x41b7aeae82ae192c),
- LL(0x757db4b4eab4c95e), LL(0xa8ce54544d549a19), LL(0x3b7f93937693ece5), LL(0x442f222288220daa),
- LL(0xc86364648d6407e9), LL(0xff2af1f1e3f1db12), LL(0xe6cc7373d173bfa2), LL(0x248212124812905a),
- LL(0x807a40401d403a5d), LL(0x1048080820084028), LL(0x9b95c3c32bc356e8), LL(0xc5dfecec97ec337b),
- LL(0xab4ddbdb4bdb9690), LL(0x5fc0a1a1bea1611f), LL(0x07918d8d0e8d1c83), LL(0x7ac83d3df43df5c9),
- LL(0x335b97976697ccf1), LL(0x0000000000000000), LL(0x83f9cfcf1bcf36d4), LL(0x566e2b2bac2b4587),
- LL(0xece17676c57697b3), LL(0x19e68282328264b0), LL(0xb128d6d67fd6fea9), LL(0x36c31b1b6c1bd877),
- LL(0x7774b5b5eeb5c15b), LL(0x43beafaf86af1129), LL(0xd41d6a6ab56a77df), LL(0xa0ea50505d50ba0d),
- LL(0x8a5745450945124c), LL(0xfb38f3f3ebf3cb18), LL(0x60ad3030c0309df0), LL(0xc3c4efef9bef2b74),
- LL(0x7eda3f3ffc3fe5c3), LL(0xaac755554955921c), LL(0x59dba2a2b2a27910), LL(0xc9e9eaea8fea0365),
- LL(0xca6a656589650fec), LL(0x6903babad2bab968), LL(0x5e4a2f2fbc2f6593), LL(0x9d8ec0c027c04ee7),
- LL(0xa160dede5fdebe81), LL(0x38fc1c1c701ce06c), LL(0xe746fdfdd3fdbb2e), LL(0x9a1f4d4d294d5264),
- LL(0x397692927292e4e0), LL(0xeafa7575c9758fbc), LL(0x0c3606061806301e), LL(0x09ae8a8a128a2498),
- LL(0x794bb2b2f2b2f940), LL(0xd185e6e6bfe66359), LL(0x1c7e0e0e380e7036), LL(0x3ee71f1f7c1ff863),
- LL(0xc4556262956237f7), LL(0xb53ad4d477d4eea3), LL(0x4d81a8a89aa82932), LL(0x315296966296c4f4),
- LL(0xef62f9f9c3f99b3a), LL(0x97a3c5c533c566f6), LL(0x4a102525942535b1), LL(0xb2ab59597959f220),
- LL(0x15d084842a8454ae), LL(0xe4c57272d572b7a7), LL(0x72ec3939e439d5dd), LL(0x98164c4c2d4c5a61),
- LL(0xbc945e5e655eca3b), LL(0xf09f7878fd78e785), LL(0x70e53838e038ddd8), LL(0x05988c8c0a8c1486),
- LL(0xbf17d1d163d1c6b2), LL(0x57e4a5a5aea5410b), LL(0xd9a1e2e2afe2434d), LL(0xc24e616199612ff8),
- LL(0x7b42b3b3f6b3f145), LL(0x42342121842115a5), LL(0x25089c9c4a9c94d6), LL(0x3cee1e1e781ef066),
- LL(0x8661434311432252), LL(0x93b1c7c73bc776fc), LL(0xe54ffcfcd7fcb32b), LL(0x0824040410042014),
- LL(0xa2e351515951b208), LL(0x2f2599995e99bcc7), LL(0xda226d6da96d4fc4), LL(0x1a650d0d340d6839),
- LL(0xe979fafacffa8335), LL(0xa369dfdf5bdfb684), LL(0xfca97e7ee57ed79b), LL(0x4819242490243db4),
- LL(0x76fe3b3bec3bc5d7), LL(0x4b9aabab96ab313d), LL(0x81f0cece1fce3ed1), LL(0x2299111144118855),
- LL(0x03838f8f068f0c89), LL(0x9c044e4e254e4a6b), LL(0x7366b7b7e6b7d151), LL(0xcbe0ebeb8beb0b60),
- LL(0x78c13c3cf03cfdcc), LL(0x1ffd81813e817cbf), LL(0x354094946a94d4fe), LL(0xf31cf7f7fbf7eb0c),
- LL(0x6f18b9b9deb9a167), LL(0x268b13134c13985f), LL(0x58512c2cb02c7d9c), LL(0xbb05d3d36bd3d6b8),
- LL(0xd38ce7e7bbe76b5c), LL(0xdc396e6ea56e57cb), LL(0x95aac4c437c46ef3), LL(0x061b03030c03180f),
- LL(0xacdc565645568a13), LL(0x885e44440d441a49), LL(0xfea07f7fe17fdf9e), LL(0x4f88a9a99ea92137),
- LL(0x54672a2aa82a4d82), LL(0x6b0abbbbd6bbb16d), LL(0x9f87c1c123c146e2), LL(0xa6f153535153a202),
- LL(0xa572dcdc57dcae8b), LL(0x16530b0b2c0b5827), LL(0x27019d9d4e9d9cd3), LL(0xd82b6c6cad6c47c1),
- LL(0x62a43131c43195f5), LL(0xe8f37474cd7487b9), LL(0xf115f6f6fff6e309), LL(0x8c4c464605460a43),
- LL(0x45a5acac8aac0926), LL(0x0fb589891e893c97), LL(0x28b414145014a044), LL(0xdfbae1e1a3e15b42),
- LL(0x2ca616165816b04e), LL(0x74f73a3ae83acdd2), LL(0xd2066969b9696fd0), LL(0x124109092409482d),
- LL(0xe0d77070dd70a7ad), LL(0x716fb6b6e2b6d954), LL(0xbd1ed0d067d0ceb7), LL(0xc7d6eded93ed3b7e),
- LL(0x85e2cccc17cc2edb), LL(0x8468424215422a57), LL(0x2d2c98985a98b4c2), LL(0x55eda4a4aaa4490e),
- LL(0x50752828a0285d88), LL(0xb8865c5c6d5cda31), LL(0xed6bf8f8c7f8933f), LL(0x11c28686228644a4),
-};
-
-static const u64 C3[256] = {
- LL(0x7830d818186018c0), LL(0xaf462623238c2305), LL(0xf991b8c6c63fc67e), LL(0x6fcdfbe8e887e813),
- LL(0xa113cb878726874c), LL(0x626d11b8b8dab8a9), LL(0x0502090101040108), LL(0x6e9e0d4f4f214f42),
- LL(0xee6c9b3636d836ad), LL(0x0451ffa6a6a2a659), LL(0xbdb90cd2d26fd2de), LL(0x06f70ef5f5f3f5fb),
- LL(0x80f2967979f979ef), LL(0xcede306f6fa16f5f), LL(0xef3f6d91917e91fc), LL(0x07a4f852525552aa),
- LL(0xfdc04760609d6027), LL(0x766535bcbccabc89), LL(0xcd2b379b9b569bac), LL(0x8c018a8e8e028e04),
- LL(0x155bd2a3a3b6a371), LL(0x3c186c0c0c300c60), LL(0x8af6847b7bf17bff), LL(0xe16a803535d435b5),
- LL(0x693af51d1d741de8), LL(0x47ddb3e0e0a7e053), LL(0xacb321d7d77bd7f6), LL(0xed999cc2c22fc25e),
- LL(0x965c432e2eb82e6d), LL(0x7a96294b4b314b62), LL(0x21e15dfefedffea3), LL(0x16aed55757415782),
- LL(0x412abd15155415a8), LL(0xb6eee87777c1779f), LL(0xeb6e923737dc37a5), LL(0x56d79ee5e5b3e57b),
- LL(0xd923139f9f469f8c), LL(0x17fd23f0f0e7f0d3), LL(0x7f94204a4a354a6a), LL(0x95a944dada4fda9e),
- LL(0x25b0a258587d58fa), LL(0xca8fcfc9c903c906), LL(0x8d527c2929a42955), LL(0x22145a0a0a280a50),
- LL(0x4f7f50b1b1feb1e1), LL(0x1a5dc9a0a0baa069), LL(0xdad6146b6bb16b7f), LL(0xab17d985852e855c),
- LL(0x73673cbdbdcebd81), LL(0x34ba8f5d5d695dd2), LL(0x5020901010401080), LL(0x03f507f4f4f7f4f3),
- LL(0xc08bddcbcb0bcb16), LL(0xc67cd33e3ef83eed), LL(0x110a2d0505140528), LL(0xe6ce78676781671f),
- LL(0x53d597e4e4b7e473), LL(0xbb4e0227279c2725), LL(0x5882734141194132), LL(0x9d0ba78b8b168b2c),
- LL(0x0153f6a7a7a6a751), LL(0x94fab27d7de97dcf), LL(0xfb374995956e95dc), LL(0x9fad56d8d847d88e),
- LL(0x30eb70fbfbcbfb8b), LL(0x71c1cdeeee9fee23), LL(0x91f8bb7c7ced7cc7), LL(0xe3cc716666856617),
- LL(0x8ea77bdddd53dda6), LL(0x4b2eaf17175c17b8), LL(0x468e454747014702), LL(0xdc211a9e9e429e84),
- LL(0xc589d4caca0fca1e), LL(0x995a582d2db42d75), LL(0x79632ebfbfc6bf91), LL(0x1b0e3f07071c0738),
- LL(0x2347acadad8ead01), LL(0x2fb4b05a5a755aea), LL(0xb51bef838336836c), LL(0xff66b63333cc3385),
- LL(0xf2c65c636391633f), LL(0x0a04120202080210), LL(0x384993aaaa92aa39), LL(0xa8e2de7171d971af),
- LL(0xcf8dc6c8c807c80e), LL(0x7d32d119196419c8), LL(0x70923b4949394972), LL(0x9aaf5fd9d943d986),
- LL(0x1df931f2f2eff2c3), LL(0x48dba8e3e3abe34b), LL(0x2ab6b95b5b715be2), LL(0x920dbc88881a8834),
- LL(0xc8293e9a9a529aa4), LL(0xbe4c0b262698262d), LL(0xfa64bf3232c8328d), LL(0x4a7d59b0b0fab0e9),
- LL(0x6acff2e9e983e91b), LL(0x331e770f0f3c0f78), LL(0xa6b733d5d573d5e6), LL(0xba1df480803a8074),
- LL(0x7c6127bebec2be99), LL(0xde87ebcdcd13cd26), LL(0xe468893434d034bd), LL(0x75903248483d487a),
- LL(0x24e354ffffdbffab), LL(0x8ff48d7a7af57af7), LL(0xea3d6490907a90f4), LL(0x3ebe9d5f5f615fc2),
- LL(0xa0403d202080201d), LL(0xd5d00f6868bd6867), LL(0x7234ca1a1a681ad0), LL(0x2c41b7aeae82ae19),
- LL(0x5e757db4b4eab4c9), LL(0x19a8ce54544d549a), LL(0xe53b7f93937693ec), LL(0xaa442f222288220d),
- LL(0xe9c86364648d6407), LL(0x12ff2af1f1e3f1db), LL(0xa2e6cc7373d173bf), LL(0x5a24821212481290),
- LL(0x5d807a40401d403a), LL(0x2810480808200840), LL(0xe89b95c3c32bc356), LL(0x7bc5dfecec97ec33),
- LL(0x90ab4ddbdb4bdb96), LL(0x1f5fc0a1a1bea161), LL(0x8307918d8d0e8d1c), LL(0xc97ac83d3df43df5),
- LL(0xf1335b97976697cc), LL(0x0000000000000000), LL(0xd483f9cfcf1bcf36), LL(0x87566e2b2bac2b45),
- LL(0xb3ece17676c57697), LL(0xb019e68282328264), LL(0xa9b128d6d67fd6fe), LL(0x7736c31b1b6c1bd8),
- LL(0x5b7774b5b5eeb5c1), LL(0x2943beafaf86af11), LL(0xdfd41d6a6ab56a77), LL(0x0da0ea50505d50ba),
- LL(0x4c8a574545094512), LL(0x18fb38f3f3ebf3cb), LL(0xf060ad3030c0309d), LL(0x74c3c4efef9bef2b),
- LL(0xc37eda3f3ffc3fe5), LL(0x1caac75555495592), LL(0x1059dba2a2b2a279), LL(0x65c9e9eaea8fea03),
- LL(0xecca6a656589650f), LL(0x686903babad2bab9), LL(0x935e4a2f2fbc2f65), LL(0xe79d8ec0c027c04e),
- LL(0x81a160dede5fdebe), LL(0x6c38fc1c1c701ce0), LL(0x2ee746fdfdd3fdbb), LL(0x649a1f4d4d294d52),
- LL(0xe0397692927292e4), LL(0xbceafa7575c9758f), LL(0x1e0c360606180630), LL(0x9809ae8a8a128a24),
- LL(0x40794bb2b2f2b2f9), LL(0x59d185e6e6bfe663), LL(0x361c7e0e0e380e70), LL(0x633ee71f1f7c1ff8),
- LL(0xf7c4556262956237), LL(0xa3b53ad4d477d4ee), LL(0x324d81a8a89aa829), LL(0xf4315296966296c4),
- LL(0x3aef62f9f9c3f99b), LL(0xf697a3c5c533c566), LL(0xb14a102525942535), LL(0x20b2ab59597959f2),
- LL(0xae15d084842a8454), LL(0xa7e4c57272d572b7), LL(0xdd72ec3939e439d5), LL(0x6198164c4c2d4c5a),
- LL(0x3bbc945e5e655eca), LL(0x85f09f7878fd78e7), LL(0xd870e53838e038dd), LL(0x8605988c8c0a8c14),
- LL(0xb2bf17d1d163d1c6), LL(0x0b57e4a5a5aea541), LL(0x4dd9a1e2e2afe243), LL(0xf8c24e616199612f),
- LL(0x457b42b3b3f6b3f1), LL(0xa542342121842115), LL(0xd625089c9c4a9c94), LL(0x663cee1e1e781ef0),
- LL(0x5286614343114322), LL(0xfc93b1c7c73bc776), LL(0x2be54ffcfcd7fcb3), LL(0x1408240404100420),
- LL(0x08a2e351515951b2), LL(0xc72f2599995e99bc), LL(0xc4da226d6da96d4f), LL(0x391a650d0d340d68),
- LL(0x35e979fafacffa83), LL(0x84a369dfdf5bdfb6), LL(0x9bfca97e7ee57ed7), LL(0xb44819242490243d),
- LL(0xd776fe3b3bec3bc5), LL(0x3d4b9aabab96ab31), LL(0xd181f0cece1fce3e), LL(0x5522991111441188),
- LL(0x8903838f8f068f0c), LL(0x6b9c044e4e254e4a), LL(0x517366b7b7e6b7d1), LL(0x60cbe0ebeb8beb0b),
- LL(0xcc78c13c3cf03cfd), LL(0xbf1ffd81813e817c), LL(0xfe354094946a94d4), LL(0x0cf31cf7f7fbf7eb),
- LL(0x676f18b9b9deb9a1), LL(0x5f268b13134c1398), LL(0x9c58512c2cb02c7d), LL(0xb8bb05d3d36bd3d6),
- LL(0x5cd38ce7e7bbe76b), LL(0xcbdc396e6ea56e57), LL(0xf395aac4c437c46e), LL(0x0f061b03030c0318),
- LL(0x13acdc565645568a), LL(0x49885e44440d441a), LL(0x9efea07f7fe17fdf), LL(0x374f88a9a99ea921),
- LL(0x8254672a2aa82a4d), LL(0x6d6b0abbbbd6bbb1), LL(0xe29f87c1c123c146), LL(0x02a6f153535153a2),
- LL(0x8ba572dcdc57dcae), LL(0x2716530b0b2c0b58), LL(0xd327019d9d4e9d9c), LL(0xc1d82b6c6cad6c47),
- LL(0xf562a43131c43195), LL(0xb9e8f37474cd7487), LL(0x09f115f6f6fff6e3), LL(0x438c4c464605460a),
- LL(0x2645a5acac8aac09), LL(0x970fb589891e893c), LL(0x4428b414145014a0), LL(0x42dfbae1e1a3e15b),
- LL(0x4e2ca616165816b0), LL(0xd274f73a3ae83acd), LL(0xd0d2066969b9696f), LL(0x2d12410909240948),
- LL(0xade0d77070dd70a7), LL(0x54716fb6b6e2b6d9), LL(0xb7bd1ed0d067d0ce), LL(0x7ec7d6eded93ed3b),
- LL(0xdb85e2cccc17cc2e), LL(0x578468424215422a), LL(0xc22d2c98985a98b4), LL(0x0e55eda4a4aaa449),
- LL(0x8850752828a0285d), LL(0x31b8865c5c6d5cda), LL(0x3fed6bf8f8c7f893), LL(0xa411c28686228644),
-};
-
-static const u64 C4[256] = {
- LL(0xc07830d818186018), LL(0x05af462623238c23), LL(0x7ef991b8c6c63fc6), LL(0x136fcdfbe8e887e8),
- LL(0x4ca113cb87872687), LL(0xa9626d11b8b8dab8), LL(0x0805020901010401), LL(0x426e9e0d4f4f214f),
- LL(0xadee6c9b3636d836), LL(0x590451ffa6a6a2a6), LL(0xdebdb90cd2d26fd2), LL(0xfb06f70ef5f5f3f5),
- LL(0xef80f2967979f979), LL(0x5fcede306f6fa16f), LL(0xfcef3f6d91917e91), LL(0xaa07a4f852525552),
- LL(0x27fdc04760609d60), LL(0x89766535bcbccabc), LL(0xaccd2b379b9b569b), LL(0x048c018a8e8e028e),
- LL(0x71155bd2a3a3b6a3), LL(0x603c186c0c0c300c), LL(0xff8af6847b7bf17b), LL(0xb5e16a803535d435),
- LL(0xe8693af51d1d741d), LL(0x5347ddb3e0e0a7e0), LL(0xf6acb321d7d77bd7), LL(0x5eed999cc2c22fc2),
- LL(0x6d965c432e2eb82e), LL(0x627a96294b4b314b), LL(0xa321e15dfefedffe), LL(0x8216aed557574157),
- LL(0xa8412abd15155415), LL(0x9fb6eee87777c177), LL(0xa5eb6e923737dc37), LL(0x7b56d79ee5e5b3e5),
- LL(0x8cd923139f9f469f), LL(0xd317fd23f0f0e7f0), LL(0x6a7f94204a4a354a), LL(0x9e95a944dada4fda),
- LL(0xfa25b0a258587d58), LL(0x06ca8fcfc9c903c9), LL(0x558d527c2929a429), LL(0x5022145a0a0a280a),
- LL(0xe14f7f50b1b1feb1), LL(0x691a5dc9a0a0baa0), LL(0x7fdad6146b6bb16b), LL(0x5cab17d985852e85),
- LL(0x8173673cbdbdcebd), LL(0xd234ba8f5d5d695d), LL(0x8050209010104010), LL(0xf303f507f4f4f7f4),
- LL(0x16c08bddcbcb0bcb), LL(0xedc67cd33e3ef83e), LL(0x28110a2d05051405), LL(0x1fe6ce7867678167),
- LL(0x7353d597e4e4b7e4), LL(0x25bb4e0227279c27), LL(0x3258827341411941), LL(0x2c9d0ba78b8b168b),
- LL(0x510153f6a7a7a6a7), LL(0xcf94fab27d7de97d), LL(0xdcfb374995956e95), LL(0x8e9fad56d8d847d8),
- LL(0x8b30eb70fbfbcbfb), LL(0x2371c1cdeeee9fee), LL(0xc791f8bb7c7ced7c), LL(0x17e3cc7166668566),
- LL(0xa68ea77bdddd53dd), LL(0xb84b2eaf17175c17), LL(0x02468e4547470147), LL(0x84dc211a9e9e429e),
- LL(0x1ec589d4caca0fca), LL(0x75995a582d2db42d), LL(0x9179632ebfbfc6bf), LL(0x381b0e3f07071c07),
- LL(0x012347acadad8ead), LL(0xea2fb4b05a5a755a), LL(0x6cb51bef83833683), LL(0x85ff66b63333cc33),
- LL(0x3ff2c65c63639163), LL(0x100a041202020802), LL(0x39384993aaaa92aa), LL(0xafa8e2de7171d971),
- LL(0x0ecf8dc6c8c807c8), LL(0xc87d32d119196419), LL(0x7270923b49493949), LL(0x869aaf5fd9d943d9),
- LL(0xc31df931f2f2eff2), LL(0x4b48dba8e3e3abe3), LL(0xe22ab6b95b5b715b), LL(0x34920dbc88881a88),
- LL(0xa4c8293e9a9a529a), LL(0x2dbe4c0b26269826), LL(0x8dfa64bf3232c832), LL(0xe94a7d59b0b0fab0),
- LL(0x1b6acff2e9e983e9), LL(0x78331e770f0f3c0f), LL(0xe6a6b733d5d573d5), LL(0x74ba1df480803a80),
- LL(0x997c6127bebec2be), LL(0x26de87ebcdcd13cd), LL(0xbde468893434d034), LL(0x7a75903248483d48),
- LL(0xab24e354ffffdbff), LL(0xf78ff48d7a7af57a), LL(0xf4ea3d6490907a90), LL(0xc23ebe9d5f5f615f),
- LL(0x1da0403d20208020), LL(0x67d5d00f6868bd68), LL(0xd07234ca1a1a681a), LL(0x192c41b7aeae82ae),
- LL(0xc95e757db4b4eab4), LL(0x9a19a8ce54544d54), LL(0xece53b7f93937693), LL(0x0daa442f22228822),
- LL(0x07e9c86364648d64), LL(0xdb12ff2af1f1e3f1), LL(0xbfa2e6cc7373d173), LL(0x905a248212124812),
- LL(0x3a5d807a40401d40), LL(0x4028104808082008), LL(0x56e89b95c3c32bc3), LL(0x337bc5dfecec97ec),
- LL(0x9690ab4ddbdb4bdb), LL(0x611f5fc0a1a1bea1), LL(0x1c8307918d8d0e8d), LL(0xf5c97ac83d3df43d),
- LL(0xccf1335b97976697), LL(0x0000000000000000), LL(0x36d483f9cfcf1bcf), LL(0x4587566e2b2bac2b),
- LL(0x97b3ece17676c576), LL(0x64b019e682823282), LL(0xfea9b128d6d67fd6), LL(0xd87736c31b1b6c1b),
- LL(0xc15b7774b5b5eeb5), LL(0x112943beafaf86af), LL(0x77dfd41d6a6ab56a), LL(0xba0da0ea50505d50),
- LL(0x124c8a5745450945), LL(0xcb18fb38f3f3ebf3), LL(0x9df060ad3030c030), LL(0x2b74c3c4efef9bef),
- LL(0xe5c37eda3f3ffc3f), LL(0x921caac755554955), LL(0x791059dba2a2b2a2), LL(0x0365c9e9eaea8fea),
- LL(0x0fecca6a65658965), LL(0xb9686903babad2ba), LL(0x65935e4a2f2fbc2f), LL(0x4ee79d8ec0c027c0),
- LL(0xbe81a160dede5fde), LL(0xe06c38fc1c1c701c), LL(0xbb2ee746fdfdd3fd), LL(0x52649a1f4d4d294d),
- LL(0xe4e0397692927292), LL(0x8fbceafa7575c975), LL(0x301e0c3606061806), LL(0x249809ae8a8a128a),
- LL(0xf940794bb2b2f2b2), LL(0x6359d185e6e6bfe6), LL(0x70361c7e0e0e380e), LL(0xf8633ee71f1f7c1f),
- LL(0x37f7c45562629562), LL(0xeea3b53ad4d477d4), LL(0x29324d81a8a89aa8), LL(0xc4f4315296966296),
- LL(0x9b3aef62f9f9c3f9), LL(0x66f697a3c5c533c5), LL(0x35b14a1025259425), LL(0xf220b2ab59597959),
- LL(0x54ae15d084842a84), LL(0xb7a7e4c57272d572), LL(0xd5dd72ec3939e439), LL(0x5a6198164c4c2d4c),
- LL(0xca3bbc945e5e655e), LL(0xe785f09f7878fd78), LL(0xddd870e53838e038), LL(0x148605988c8c0a8c),
- LL(0xc6b2bf17d1d163d1), LL(0x410b57e4a5a5aea5), LL(0x434dd9a1e2e2afe2), LL(0x2ff8c24e61619961),
- LL(0xf1457b42b3b3f6b3), LL(0x15a5423421218421), LL(0x94d625089c9c4a9c), LL(0xf0663cee1e1e781e),
- LL(0x2252866143431143), LL(0x76fc93b1c7c73bc7), LL(0xb32be54ffcfcd7fc), LL(0x2014082404041004),
- LL(0xb208a2e351515951), LL(0xbcc72f2599995e99), LL(0x4fc4da226d6da96d), LL(0x68391a650d0d340d),
- LL(0x8335e979fafacffa), LL(0xb684a369dfdf5bdf), LL(0xd79bfca97e7ee57e), LL(0x3db4481924249024),
- LL(0xc5d776fe3b3bec3b), LL(0x313d4b9aabab96ab), LL(0x3ed181f0cece1fce), LL(0x8855229911114411),
- LL(0x0c8903838f8f068f), LL(0x4a6b9c044e4e254e), LL(0xd1517366b7b7e6b7), LL(0x0b60cbe0ebeb8beb),
- LL(0xfdcc78c13c3cf03c), LL(0x7cbf1ffd81813e81), LL(0xd4fe354094946a94), LL(0xeb0cf31cf7f7fbf7),
- LL(0xa1676f18b9b9deb9), LL(0x985f268b13134c13), LL(0x7d9c58512c2cb02c), LL(0xd6b8bb05d3d36bd3),
- LL(0x6b5cd38ce7e7bbe7), LL(0x57cbdc396e6ea56e), LL(0x6ef395aac4c437c4), LL(0x180f061b03030c03),
- LL(0x8a13acdc56564556), LL(0x1a49885e44440d44), LL(0xdf9efea07f7fe17f), LL(0x21374f88a9a99ea9),
- LL(0x4d8254672a2aa82a), LL(0xb16d6b0abbbbd6bb), LL(0x46e29f87c1c123c1), LL(0xa202a6f153535153),
- LL(0xae8ba572dcdc57dc), LL(0x582716530b0b2c0b), LL(0x9cd327019d9d4e9d), LL(0x47c1d82b6c6cad6c),
- LL(0x95f562a43131c431), LL(0x87b9e8f37474cd74), LL(0xe309f115f6f6fff6), LL(0x0a438c4c46460546),
- LL(0x092645a5acac8aac), LL(0x3c970fb589891e89), LL(0xa04428b414145014), LL(0x5b42dfbae1e1a3e1),
- LL(0xb04e2ca616165816), LL(0xcdd274f73a3ae83a), LL(0x6fd0d2066969b969), LL(0x482d124109092409),
- LL(0xa7ade0d77070dd70), LL(0xd954716fb6b6e2b6), LL(0xceb7bd1ed0d067d0), LL(0x3b7ec7d6eded93ed),
- LL(0x2edb85e2cccc17cc), LL(0x2a57846842421542), LL(0xb4c22d2c98985a98), LL(0x490e55eda4a4aaa4),
- LL(0x5d8850752828a028), LL(0xda31b8865c5c6d5c), LL(0x933fed6bf8f8c7f8), LL(0x44a411c286862286),
-};
-
-static const u64 C5[256] = {
- LL(0x18c07830d8181860), LL(0x2305af462623238c), LL(0xc67ef991b8c6c63f), LL(0xe8136fcdfbe8e887),
- LL(0x874ca113cb878726), LL(0xb8a9626d11b8b8da), LL(0x0108050209010104), LL(0x4f426e9e0d4f4f21),
- LL(0x36adee6c9b3636d8), LL(0xa6590451ffa6a6a2), LL(0xd2debdb90cd2d26f), LL(0xf5fb06f70ef5f5f3),
- LL(0x79ef80f2967979f9), LL(0x6f5fcede306f6fa1), LL(0x91fcef3f6d91917e), LL(0x52aa07a4f8525255),
- LL(0x6027fdc04760609d), LL(0xbc89766535bcbcca), LL(0x9baccd2b379b9b56), LL(0x8e048c018a8e8e02),
- LL(0xa371155bd2a3a3b6), LL(0x0c603c186c0c0c30), LL(0x7bff8af6847b7bf1), LL(0x35b5e16a803535d4),
- LL(0x1de8693af51d1d74), LL(0xe05347ddb3e0e0a7), LL(0xd7f6acb321d7d77b), LL(0xc25eed999cc2c22f),
- LL(0x2e6d965c432e2eb8), LL(0x4b627a96294b4b31), LL(0xfea321e15dfefedf), LL(0x578216aed5575741),
- LL(0x15a8412abd151554), LL(0x779fb6eee87777c1), LL(0x37a5eb6e923737dc), LL(0xe57b56d79ee5e5b3),
- LL(0x9f8cd923139f9f46), LL(0xf0d317fd23f0f0e7), LL(0x4a6a7f94204a4a35), LL(0xda9e95a944dada4f),
- LL(0x58fa25b0a258587d), LL(0xc906ca8fcfc9c903), LL(0x29558d527c2929a4), LL(0x0a5022145a0a0a28),
- LL(0xb1e14f7f50b1b1fe), LL(0xa0691a5dc9a0a0ba), LL(0x6b7fdad6146b6bb1), LL(0x855cab17d985852e),
- LL(0xbd8173673cbdbdce), LL(0x5dd234ba8f5d5d69), LL(0x1080502090101040), LL(0xf4f303f507f4f4f7),
- LL(0xcb16c08bddcbcb0b), LL(0x3eedc67cd33e3ef8), LL(0x0528110a2d050514), LL(0x671fe6ce78676781),
- LL(0xe47353d597e4e4b7), LL(0x2725bb4e0227279c), LL(0x4132588273414119), LL(0x8b2c9d0ba78b8b16),
- LL(0xa7510153f6a7a7a6), LL(0x7dcf94fab27d7de9), LL(0x95dcfb374995956e), LL(0xd88e9fad56d8d847),
- LL(0xfb8b30eb70fbfbcb), LL(0xee2371c1cdeeee9f), LL(0x7cc791f8bb7c7ced), LL(0x6617e3cc71666685),
- LL(0xdda68ea77bdddd53), LL(0x17b84b2eaf17175c), LL(0x4702468e45474701), LL(0x9e84dc211a9e9e42),
- LL(0xca1ec589d4caca0f), LL(0x2d75995a582d2db4), LL(0xbf9179632ebfbfc6), LL(0x07381b0e3f07071c),
- LL(0xad012347acadad8e), LL(0x5aea2fb4b05a5a75), LL(0x836cb51bef838336), LL(0x3385ff66b63333cc),
- LL(0x633ff2c65c636391), LL(0x02100a0412020208), LL(0xaa39384993aaaa92), LL(0x71afa8e2de7171d9),
- LL(0xc80ecf8dc6c8c807), LL(0x19c87d32d1191964), LL(0x497270923b494939), LL(0xd9869aaf5fd9d943),
- LL(0xf2c31df931f2f2ef), LL(0xe34b48dba8e3e3ab), LL(0x5be22ab6b95b5b71), LL(0x8834920dbc88881a),
- LL(0x9aa4c8293e9a9a52), LL(0x262dbe4c0b262698), LL(0x328dfa64bf3232c8), LL(0xb0e94a7d59b0b0fa),
- LL(0xe91b6acff2e9e983), LL(0x0f78331e770f0f3c), LL(0xd5e6a6b733d5d573), LL(0x8074ba1df480803a),
- LL(0xbe997c6127bebec2), LL(0xcd26de87ebcdcd13), LL(0x34bde468893434d0), LL(0x487a75903248483d),
- LL(0xffab24e354ffffdb), LL(0x7af78ff48d7a7af5), LL(0x90f4ea3d6490907a), LL(0x5fc23ebe9d5f5f61),
- LL(0x201da0403d202080), LL(0x6867d5d00f6868bd), LL(0x1ad07234ca1a1a68), LL(0xae192c41b7aeae82),
- LL(0xb4c95e757db4b4ea), LL(0x549a19a8ce54544d), LL(0x93ece53b7f939376), LL(0x220daa442f222288),
- LL(0x6407e9c86364648d), LL(0xf1db12ff2af1f1e3), LL(0x73bfa2e6cc7373d1), LL(0x12905a2482121248),
- LL(0x403a5d807a40401d), LL(0x0840281048080820), LL(0xc356e89b95c3c32b), LL(0xec337bc5dfecec97),
- LL(0xdb9690ab4ddbdb4b), LL(0xa1611f5fc0a1a1be), LL(0x8d1c8307918d8d0e), LL(0x3df5c97ac83d3df4),
- LL(0x97ccf1335b979766), LL(0x0000000000000000), LL(0xcf36d483f9cfcf1b), LL(0x2b4587566e2b2bac),
- LL(0x7697b3ece17676c5), LL(0x8264b019e6828232), LL(0xd6fea9b128d6d67f), LL(0x1bd87736c31b1b6c),
- LL(0xb5c15b7774b5b5ee), LL(0xaf112943beafaf86), LL(0x6a77dfd41d6a6ab5), LL(0x50ba0da0ea50505d),
- LL(0x45124c8a57454509), LL(0xf3cb18fb38f3f3eb), LL(0x309df060ad3030c0), LL(0xef2b74c3c4efef9b),
- LL(0x3fe5c37eda3f3ffc), LL(0x55921caac7555549), LL(0xa2791059dba2a2b2), LL(0xea0365c9e9eaea8f),
- LL(0x650fecca6a656589), LL(0xbab9686903babad2), LL(0x2f65935e4a2f2fbc), LL(0xc04ee79d8ec0c027),
- LL(0xdebe81a160dede5f), LL(0x1ce06c38fc1c1c70), LL(0xfdbb2ee746fdfdd3), LL(0x4d52649a1f4d4d29),
- LL(0x92e4e03976929272), LL(0x758fbceafa7575c9), LL(0x06301e0c36060618), LL(0x8a249809ae8a8a12),
- LL(0xb2f940794bb2b2f2), LL(0xe66359d185e6e6bf), LL(0x0e70361c7e0e0e38), LL(0x1ff8633ee71f1f7c),
- LL(0x6237f7c455626295), LL(0xd4eea3b53ad4d477), LL(0xa829324d81a8a89a), LL(0x96c4f43152969662),
- LL(0xf99b3aef62f9f9c3), LL(0xc566f697a3c5c533), LL(0x2535b14a10252594), LL(0x59f220b2ab595979),
- LL(0x8454ae15d084842a), LL(0x72b7a7e4c57272d5), LL(0x39d5dd72ec3939e4), LL(0x4c5a6198164c4c2d),
- LL(0x5eca3bbc945e5e65), LL(0x78e785f09f7878fd), LL(0x38ddd870e53838e0), LL(0x8c148605988c8c0a),
- LL(0xd1c6b2bf17d1d163), LL(0xa5410b57e4a5a5ae), LL(0xe2434dd9a1e2e2af), LL(0x612ff8c24e616199),
- LL(0xb3f1457b42b3b3f6), LL(0x2115a54234212184), LL(0x9c94d625089c9c4a), LL(0x1ef0663cee1e1e78),
- LL(0x4322528661434311), LL(0xc776fc93b1c7c73b), LL(0xfcb32be54ffcfcd7), LL(0x0420140824040410),
- LL(0x51b208a2e3515159), LL(0x99bcc72f2599995e), LL(0x6d4fc4da226d6da9), LL(0x0d68391a650d0d34),
- LL(0xfa8335e979fafacf), LL(0xdfb684a369dfdf5b), LL(0x7ed79bfca97e7ee5), LL(0x243db44819242490),
- LL(0x3bc5d776fe3b3bec), LL(0xab313d4b9aabab96), LL(0xce3ed181f0cece1f), LL(0x1188552299111144),
- LL(0x8f0c8903838f8f06), LL(0x4e4a6b9c044e4e25), LL(0xb7d1517366b7b7e6), LL(0xeb0b60cbe0ebeb8b),
- LL(0x3cfdcc78c13c3cf0), LL(0x817cbf1ffd81813e), LL(0x94d4fe354094946a), LL(0xf7eb0cf31cf7f7fb),
- LL(0xb9a1676f18b9b9de), LL(0x13985f268b13134c), LL(0x2c7d9c58512c2cb0), LL(0xd3d6b8bb05d3d36b),
- LL(0xe76b5cd38ce7e7bb), LL(0x6e57cbdc396e6ea5), LL(0xc46ef395aac4c437), LL(0x03180f061b03030c),
- LL(0x568a13acdc565645), LL(0x441a49885e44440d), LL(0x7fdf9efea07f7fe1), LL(0xa921374f88a9a99e),
- LL(0x2a4d8254672a2aa8), LL(0xbbb16d6b0abbbbd6), LL(0xc146e29f87c1c123), LL(0x53a202a6f1535351),
- LL(0xdcae8ba572dcdc57), LL(0x0b582716530b0b2c), LL(0x9d9cd327019d9d4e), LL(0x6c47c1d82b6c6cad),
- LL(0x3195f562a43131c4), LL(0x7487b9e8f37474cd), LL(0xf6e309f115f6f6ff), LL(0x460a438c4c464605),
- LL(0xac092645a5acac8a), LL(0x893c970fb589891e), LL(0x14a04428b4141450), LL(0xe15b42dfbae1e1a3),
- LL(0x16b04e2ca6161658), LL(0x3acdd274f73a3ae8), LL(0x696fd0d2066969b9), LL(0x09482d1241090924),
- LL(0x70a7ade0d77070dd), LL(0xb6d954716fb6b6e2), LL(0xd0ceb7bd1ed0d067), LL(0xed3b7ec7d6eded93),
- LL(0xcc2edb85e2cccc17), LL(0x422a578468424215), LL(0x98b4c22d2c98985a), LL(0xa4490e55eda4a4aa),
- LL(0x285d8850752828a0), LL(0x5cda31b8865c5c6d), LL(0xf8933fed6bf8f8c7), LL(0x8644a411c2868622),
-};
-
-static const u64 C6[256] = {
- LL(0x6018c07830d81818), LL(0x8c2305af46262323), LL(0x3fc67ef991b8c6c6), LL(0x87e8136fcdfbe8e8),
- LL(0x26874ca113cb8787), LL(0xdab8a9626d11b8b8), LL(0x0401080502090101), LL(0x214f426e9e0d4f4f),
- LL(0xd836adee6c9b3636), LL(0xa2a6590451ffa6a6), LL(0x6fd2debdb90cd2d2), LL(0xf3f5fb06f70ef5f5),
- LL(0xf979ef80f2967979), LL(0xa16f5fcede306f6f), LL(0x7e91fcef3f6d9191), LL(0x5552aa07a4f85252),
- LL(0x9d6027fdc0476060), LL(0xcabc89766535bcbc), LL(0x569baccd2b379b9b), LL(0x028e048c018a8e8e),
- LL(0xb6a371155bd2a3a3), LL(0x300c603c186c0c0c), LL(0xf17bff8af6847b7b), LL(0xd435b5e16a803535),
- LL(0x741de8693af51d1d), LL(0xa7e05347ddb3e0e0), LL(0x7bd7f6acb321d7d7), LL(0x2fc25eed999cc2c2),
- LL(0xb82e6d965c432e2e), LL(0x314b627a96294b4b), LL(0xdffea321e15dfefe), LL(0x41578216aed55757),
- LL(0x5415a8412abd1515), LL(0xc1779fb6eee87777), LL(0xdc37a5eb6e923737), LL(0xb3e57b56d79ee5e5),
- LL(0x469f8cd923139f9f), LL(0xe7f0d317fd23f0f0), LL(0x354a6a7f94204a4a), LL(0x4fda9e95a944dada),
- LL(0x7d58fa25b0a25858), LL(0x03c906ca8fcfc9c9), LL(0xa429558d527c2929), LL(0x280a5022145a0a0a),
- LL(0xfeb1e14f7f50b1b1), LL(0xbaa0691a5dc9a0a0), LL(0xb16b7fdad6146b6b), LL(0x2e855cab17d98585),
- LL(0xcebd8173673cbdbd), LL(0x695dd234ba8f5d5d), LL(0x4010805020901010), LL(0xf7f4f303f507f4f4),
- LL(0x0bcb16c08bddcbcb), LL(0xf83eedc67cd33e3e), LL(0x140528110a2d0505), LL(0x81671fe6ce786767),
- LL(0xb7e47353d597e4e4), LL(0x9c2725bb4e022727), LL(0x1941325882734141), LL(0x168b2c9d0ba78b8b),
- LL(0xa6a7510153f6a7a7), LL(0xe97dcf94fab27d7d), LL(0x6e95dcfb37499595), LL(0x47d88e9fad56d8d8),
- LL(0xcbfb8b30eb70fbfb), LL(0x9fee2371c1cdeeee), LL(0xed7cc791f8bb7c7c), LL(0x856617e3cc716666),
- LL(0x53dda68ea77bdddd), LL(0x5c17b84b2eaf1717), LL(0x014702468e454747), LL(0x429e84dc211a9e9e),
- LL(0x0fca1ec589d4caca), LL(0xb42d75995a582d2d), LL(0xc6bf9179632ebfbf), LL(0x1c07381b0e3f0707),
- LL(0x8ead012347acadad), LL(0x755aea2fb4b05a5a), LL(0x36836cb51bef8383), LL(0xcc3385ff66b63333),
- LL(0x91633ff2c65c6363), LL(0x0802100a04120202), LL(0x92aa39384993aaaa), LL(0xd971afa8e2de7171),
- LL(0x07c80ecf8dc6c8c8), LL(0x6419c87d32d11919), LL(0x39497270923b4949), LL(0x43d9869aaf5fd9d9),
- LL(0xeff2c31df931f2f2), LL(0xabe34b48dba8e3e3), LL(0x715be22ab6b95b5b), LL(0x1a8834920dbc8888),
- LL(0x529aa4c8293e9a9a), LL(0x98262dbe4c0b2626), LL(0xc8328dfa64bf3232), LL(0xfab0e94a7d59b0b0),
- LL(0x83e91b6acff2e9e9), LL(0x3c0f78331e770f0f), LL(0x73d5e6a6b733d5d5), LL(0x3a8074ba1df48080),
- LL(0xc2be997c6127bebe), LL(0x13cd26de87ebcdcd), LL(0xd034bde468893434), LL(0x3d487a7590324848),
- LL(0xdbffab24e354ffff), LL(0xf57af78ff48d7a7a), LL(0x7a90f4ea3d649090), LL(0x615fc23ebe9d5f5f),
- LL(0x80201da0403d2020), LL(0xbd6867d5d00f6868), LL(0x681ad07234ca1a1a), LL(0x82ae192c41b7aeae),
- LL(0xeab4c95e757db4b4), LL(0x4d549a19a8ce5454), LL(0x7693ece53b7f9393), LL(0x88220daa442f2222),
- LL(0x8d6407e9c8636464), LL(0xe3f1db12ff2af1f1), LL(0xd173bfa2e6cc7373), LL(0x4812905a24821212),
- LL(0x1d403a5d807a4040), LL(0x2008402810480808), LL(0x2bc356e89b95c3c3), LL(0x97ec337bc5dfecec),
- LL(0x4bdb9690ab4ddbdb), LL(0xbea1611f5fc0a1a1), LL(0x0e8d1c8307918d8d), LL(0xf43df5c97ac83d3d),
- LL(0x6697ccf1335b9797), LL(0x0000000000000000), LL(0x1bcf36d483f9cfcf), LL(0xac2b4587566e2b2b),
- LL(0xc57697b3ece17676), LL(0x328264b019e68282), LL(0x7fd6fea9b128d6d6), LL(0x6c1bd87736c31b1b),
- LL(0xeeb5c15b7774b5b5), LL(0x86af112943beafaf), LL(0xb56a77dfd41d6a6a), LL(0x5d50ba0da0ea5050),
- LL(0x0945124c8a574545), LL(0xebf3cb18fb38f3f3), LL(0xc0309df060ad3030), LL(0x9bef2b74c3c4efef),
- LL(0xfc3fe5c37eda3f3f), LL(0x4955921caac75555), LL(0xb2a2791059dba2a2), LL(0x8fea0365c9e9eaea),
- LL(0x89650fecca6a6565), LL(0xd2bab9686903baba), LL(0xbc2f65935e4a2f2f), LL(0x27c04ee79d8ec0c0),
- LL(0x5fdebe81a160dede), LL(0x701ce06c38fc1c1c), LL(0xd3fdbb2ee746fdfd), LL(0x294d52649a1f4d4d),
- LL(0x7292e4e039769292), LL(0xc9758fbceafa7575), LL(0x1806301e0c360606), LL(0x128a249809ae8a8a),
- LL(0xf2b2f940794bb2b2), LL(0xbfe66359d185e6e6), LL(0x380e70361c7e0e0e), LL(0x7c1ff8633ee71f1f),
- LL(0x956237f7c4556262), LL(0x77d4eea3b53ad4d4), LL(0x9aa829324d81a8a8), LL(0x6296c4f431529696),
- LL(0xc3f99b3aef62f9f9), LL(0x33c566f697a3c5c5), LL(0x942535b14a102525), LL(0x7959f220b2ab5959),
- LL(0x2a8454ae15d08484), LL(0xd572b7a7e4c57272), LL(0xe439d5dd72ec3939), LL(0x2d4c5a6198164c4c),
- LL(0x655eca3bbc945e5e), LL(0xfd78e785f09f7878), LL(0xe038ddd870e53838), LL(0x0a8c148605988c8c),
- LL(0x63d1c6b2bf17d1d1), LL(0xaea5410b57e4a5a5), LL(0xafe2434dd9a1e2e2), LL(0x99612ff8c24e6161),
- LL(0xf6b3f1457b42b3b3), LL(0x842115a542342121), LL(0x4a9c94d625089c9c), LL(0x781ef0663cee1e1e),
- LL(0x1143225286614343), LL(0x3bc776fc93b1c7c7), LL(0xd7fcb32be54ffcfc), LL(0x1004201408240404),
- LL(0x5951b208a2e35151), LL(0x5e99bcc72f259999), LL(0xa96d4fc4da226d6d), LL(0x340d68391a650d0d),
- LL(0xcffa8335e979fafa), LL(0x5bdfb684a369dfdf), LL(0xe57ed79bfca97e7e), LL(0x90243db448192424),
- LL(0xec3bc5d776fe3b3b), LL(0x96ab313d4b9aabab), LL(0x1fce3ed181f0cece), LL(0x4411885522991111),
- LL(0x068f0c8903838f8f), LL(0x254e4a6b9c044e4e), LL(0xe6b7d1517366b7b7), LL(0x8beb0b60cbe0ebeb),
- LL(0xf03cfdcc78c13c3c), LL(0x3e817cbf1ffd8181), LL(0x6a94d4fe35409494), LL(0xfbf7eb0cf31cf7f7),
- LL(0xdeb9a1676f18b9b9), LL(0x4c13985f268b1313), LL(0xb02c7d9c58512c2c), LL(0x6bd3d6b8bb05d3d3),
- LL(0xbbe76b5cd38ce7e7), LL(0xa56e57cbdc396e6e), LL(0x37c46ef395aac4c4), LL(0x0c03180f061b0303),
- LL(0x45568a13acdc5656), LL(0x0d441a49885e4444), LL(0xe17fdf9efea07f7f), LL(0x9ea921374f88a9a9),
- LL(0xa82a4d8254672a2a), LL(0xd6bbb16d6b0abbbb), LL(0x23c146e29f87c1c1), LL(0x5153a202a6f15353),
- LL(0x57dcae8ba572dcdc), LL(0x2c0b582716530b0b), LL(0x4e9d9cd327019d9d), LL(0xad6c47c1d82b6c6c),
- LL(0xc43195f562a43131), LL(0xcd7487b9e8f37474), LL(0xfff6e309f115f6f6), LL(0x05460a438c4c4646),
- LL(0x8aac092645a5acac), LL(0x1e893c970fb58989), LL(0x5014a04428b41414), LL(0xa3e15b42dfbae1e1),
- LL(0x5816b04e2ca61616), LL(0xe83acdd274f73a3a), LL(0xb9696fd0d2066969), LL(0x2409482d12410909),
- LL(0xdd70a7ade0d77070), LL(0xe2b6d954716fb6b6), LL(0x67d0ceb7bd1ed0d0), LL(0x93ed3b7ec7d6eded),
- LL(0x17cc2edb85e2cccc), LL(0x15422a5784684242), LL(0x5a98b4c22d2c9898), LL(0xaaa4490e55eda4a4),
- LL(0xa0285d8850752828), LL(0x6d5cda31b8865c5c), LL(0xc7f8933fed6bf8f8), LL(0x228644a411c28686),
-};
-
-static const u64 C7[256] = {
- LL(0x186018c07830d818), LL(0x238c2305af462623), LL(0xc63fc67ef991b8c6), LL(0xe887e8136fcdfbe8),
- LL(0x8726874ca113cb87), LL(0xb8dab8a9626d11b8), LL(0x0104010805020901), LL(0x4f214f426e9e0d4f),
- LL(0x36d836adee6c9b36), LL(0xa6a2a6590451ffa6), LL(0xd26fd2debdb90cd2), LL(0xf5f3f5fb06f70ef5),
- LL(0x79f979ef80f29679), LL(0x6fa16f5fcede306f), LL(0x917e91fcef3f6d91), LL(0x525552aa07a4f852),
- LL(0x609d6027fdc04760), LL(0xbccabc89766535bc), LL(0x9b569baccd2b379b), LL(0x8e028e048c018a8e),
- LL(0xa3b6a371155bd2a3), LL(0x0c300c603c186c0c), LL(0x7bf17bff8af6847b), LL(0x35d435b5e16a8035),
- LL(0x1d741de8693af51d), LL(0xe0a7e05347ddb3e0), LL(0xd77bd7f6acb321d7), LL(0xc22fc25eed999cc2),
- LL(0x2eb82e6d965c432e), LL(0x4b314b627a96294b), LL(0xfedffea321e15dfe), LL(0x5741578216aed557),
- LL(0x155415a8412abd15), LL(0x77c1779fb6eee877), LL(0x37dc37a5eb6e9237), LL(0xe5b3e57b56d79ee5),
- LL(0x9f469f8cd923139f), LL(0xf0e7f0d317fd23f0), LL(0x4a354a6a7f94204a), LL(0xda4fda9e95a944da),
- LL(0x587d58fa25b0a258), LL(0xc903c906ca8fcfc9), LL(0x29a429558d527c29), LL(0x0a280a5022145a0a),
- LL(0xb1feb1e14f7f50b1), LL(0xa0baa0691a5dc9a0), LL(0x6bb16b7fdad6146b), LL(0x852e855cab17d985),
- LL(0xbdcebd8173673cbd), LL(0x5d695dd234ba8f5d), LL(0x1040108050209010), LL(0xf4f7f4f303f507f4),
- LL(0xcb0bcb16c08bddcb), LL(0x3ef83eedc67cd33e), LL(0x05140528110a2d05), LL(0x6781671fe6ce7867),
- LL(0xe4b7e47353d597e4), LL(0x279c2725bb4e0227), LL(0x4119413258827341), LL(0x8b168b2c9d0ba78b),
- LL(0xa7a6a7510153f6a7), LL(0x7de97dcf94fab27d), LL(0x956e95dcfb374995), LL(0xd847d88e9fad56d8),
- LL(0xfbcbfb8b30eb70fb), LL(0xee9fee2371c1cdee), LL(0x7ced7cc791f8bb7c), LL(0x66856617e3cc7166),
- LL(0xdd53dda68ea77bdd), LL(0x175c17b84b2eaf17), LL(0x47014702468e4547), LL(0x9e429e84dc211a9e),
- LL(0xca0fca1ec589d4ca), LL(0x2db42d75995a582d), LL(0xbfc6bf9179632ebf), LL(0x071c07381b0e3f07),
- LL(0xad8ead012347acad), LL(0x5a755aea2fb4b05a), LL(0x8336836cb51bef83), LL(0x33cc3385ff66b633),
- LL(0x6391633ff2c65c63), LL(0x020802100a041202), LL(0xaa92aa39384993aa), LL(0x71d971afa8e2de71),
- LL(0xc807c80ecf8dc6c8), LL(0x196419c87d32d119), LL(0x4939497270923b49), LL(0xd943d9869aaf5fd9),
- LL(0xf2eff2c31df931f2), LL(0xe3abe34b48dba8e3), LL(0x5b715be22ab6b95b), LL(0x881a8834920dbc88),
- LL(0x9a529aa4c8293e9a), LL(0x2698262dbe4c0b26), LL(0x32c8328dfa64bf32), LL(0xb0fab0e94a7d59b0),
- LL(0xe983e91b6acff2e9), LL(0x0f3c0f78331e770f), LL(0xd573d5e6a6b733d5), LL(0x803a8074ba1df480),
- LL(0xbec2be997c6127be), LL(0xcd13cd26de87ebcd), LL(0x34d034bde4688934), LL(0x483d487a75903248),
- LL(0xffdbffab24e354ff), LL(0x7af57af78ff48d7a), LL(0x907a90f4ea3d6490), LL(0x5f615fc23ebe9d5f),
- LL(0x2080201da0403d20), LL(0x68bd6867d5d00f68), LL(0x1a681ad07234ca1a), LL(0xae82ae192c41b7ae),
- LL(0xb4eab4c95e757db4), LL(0x544d549a19a8ce54), LL(0x937693ece53b7f93), LL(0x2288220daa442f22),
- LL(0x648d6407e9c86364), LL(0xf1e3f1db12ff2af1), LL(0x73d173bfa2e6cc73), LL(0x124812905a248212),
- LL(0x401d403a5d807a40), LL(0x0820084028104808), LL(0xc32bc356e89b95c3), LL(0xec97ec337bc5dfec),
- LL(0xdb4bdb9690ab4ddb), LL(0xa1bea1611f5fc0a1), LL(0x8d0e8d1c8307918d), LL(0x3df43df5c97ac83d),
- LL(0x976697ccf1335b97), LL(0x0000000000000000), LL(0xcf1bcf36d483f9cf), LL(0x2bac2b4587566e2b),
- LL(0x76c57697b3ece176), LL(0x82328264b019e682), LL(0xd67fd6fea9b128d6), LL(0x1b6c1bd87736c31b),
- LL(0xb5eeb5c15b7774b5), LL(0xaf86af112943beaf), LL(0x6ab56a77dfd41d6a), LL(0x505d50ba0da0ea50),
- LL(0x450945124c8a5745), LL(0xf3ebf3cb18fb38f3), LL(0x30c0309df060ad30), LL(0xef9bef2b74c3c4ef),
- LL(0x3ffc3fe5c37eda3f), LL(0x554955921caac755), LL(0xa2b2a2791059dba2), LL(0xea8fea0365c9e9ea),
- LL(0x6589650fecca6a65), LL(0xbad2bab9686903ba), LL(0x2fbc2f65935e4a2f), LL(0xc027c04ee79d8ec0),
- LL(0xde5fdebe81a160de), LL(0x1c701ce06c38fc1c), LL(0xfdd3fdbb2ee746fd), LL(0x4d294d52649a1f4d),
- LL(0x927292e4e0397692), LL(0x75c9758fbceafa75), LL(0x061806301e0c3606), LL(0x8a128a249809ae8a),
- LL(0xb2f2b2f940794bb2), LL(0xe6bfe66359d185e6), LL(0x0e380e70361c7e0e), LL(0x1f7c1ff8633ee71f),
- LL(0x62956237f7c45562), LL(0xd477d4eea3b53ad4), LL(0xa89aa829324d81a8), LL(0x966296c4f4315296),
- LL(0xf9c3f99b3aef62f9), LL(0xc533c566f697a3c5), LL(0x25942535b14a1025), LL(0x597959f220b2ab59),
- LL(0x842a8454ae15d084), LL(0x72d572b7a7e4c572), LL(0x39e439d5dd72ec39), LL(0x4c2d4c5a6198164c),
- LL(0x5e655eca3bbc945e), LL(0x78fd78e785f09f78), LL(0x38e038ddd870e538), LL(0x8c0a8c148605988c),
- LL(0xd163d1c6b2bf17d1), LL(0xa5aea5410b57e4a5), LL(0xe2afe2434dd9a1e2), LL(0x6199612ff8c24e61),
- LL(0xb3f6b3f1457b42b3), LL(0x21842115a5423421), LL(0x9c4a9c94d625089c), LL(0x1e781ef0663cee1e),
- LL(0x4311432252866143), LL(0xc73bc776fc93b1c7), LL(0xfcd7fcb32be54ffc), LL(0x0410042014082404),
- LL(0x515951b208a2e351), LL(0x995e99bcc72f2599), LL(0x6da96d4fc4da226d), LL(0x0d340d68391a650d),
- LL(0xfacffa8335e979fa), LL(0xdf5bdfb684a369df), LL(0x7ee57ed79bfca97e), LL(0x2490243db4481924),
- LL(0x3bec3bc5d776fe3b), LL(0xab96ab313d4b9aab), LL(0xce1fce3ed181f0ce), LL(0x1144118855229911),
- LL(0x8f068f0c8903838f), LL(0x4e254e4a6b9c044e), LL(0xb7e6b7d1517366b7), LL(0xeb8beb0b60cbe0eb),
- LL(0x3cf03cfdcc78c13c), LL(0x813e817cbf1ffd81), LL(0x946a94d4fe354094), LL(0xf7fbf7eb0cf31cf7),
- LL(0xb9deb9a1676f18b9), LL(0x134c13985f268b13), LL(0x2cb02c7d9c58512c), LL(0xd36bd3d6b8bb05d3),
- LL(0xe7bbe76b5cd38ce7), LL(0x6ea56e57cbdc396e), LL(0xc437c46ef395aac4), LL(0x030c03180f061b03),
- LL(0x5645568a13acdc56), LL(0x440d441a49885e44), LL(0x7fe17fdf9efea07f), LL(0xa99ea921374f88a9),
- LL(0x2aa82a4d8254672a), LL(0xbbd6bbb16d6b0abb), LL(0xc123c146e29f87c1), LL(0x535153a202a6f153),
- LL(0xdc57dcae8ba572dc), LL(0x0b2c0b582716530b), LL(0x9d4e9d9cd327019d), LL(0x6cad6c47c1d82b6c),
- LL(0x31c43195f562a431), LL(0x74cd7487b9e8f374), LL(0xf6fff6e309f115f6), LL(0x4605460a438c4c46),
- LL(0xac8aac092645a5ac), LL(0x891e893c970fb589), LL(0x145014a04428b414), LL(0xe1a3e15b42dfbae1),
- LL(0x165816b04e2ca616), LL(0x3ae83acdd274f73a), LL(0x69b9696fd0d20669), LL(0x092409482d124109),
- LL(0x70dd70a7ade0d770), LL(0xb6e2b6d954716fb6), LL(0xd067d0ceb7bd1ed0), LL(0xed93ed3b7ec7d6ed),
- LL(0xcc17cc2edb85e2cc), LL(0x4215422a57846842), LL(0x985a98b4c22d2c98), LL(0xa4aaa4490e55eda4),
- LL(0x28a0285d88507528), LL(0x5c6d5cda31b8865c), LL(0xf8c7f8933fed6bf8), LL(0x86228644a411c286),
-};
-
-#ifdef OBSOLETE
-static const u64 C0[256] = {
- LL(0x1818281878c0d878), LL(0x23236523af0526af), LL(0xc6c657c6f97eb8f9), LL(0xe8e825e86f13fb6f),
- LL(0x87879487a14ccba1), LL(0xb8b8d5b862a91162), LL(0x0101030105080905), LL(0x4f4fd14f6e420d6e),
- LL(0x36365a36eead9bee), LL(0xa6a6f7a60459ff04), LL(0xd2d26bd2bdde0cbd), LL(0xf5f502f506fb0e06),
- LL(0x79798b7980ef9680), LL(0x6f6fb16fce5f30ce), LL(0x9191ae91effc6def), LL(0x5252f65207aaf807),
- LL(0x6060a060fd2747fd), LL(0xbcbcd9bc76893576), LL(0x9b9bb09bcdac37cd), LL(0x8e8e8f8e8c048a8c),
- LL(0xa3a3f8a31571d215), LL(0x0c0c140c3c606c3c), LL(0x7b7b8d7b8aff848a), LL(0x35355f35e1b580e1),
- LL(0x1d1d271d69e8f569), LL(0xe0e03de04753b347), LL(0xd7d764d7acf621ac), LL(0xc2c25bc2ed5e9ced),
- LL(0x2e2e722e966d4396), LL(0x4b4bdd4b7a62297a), LL(0xfefe1ffe21a35d21), LL(0x5757f9571682d516),
- LL(0x15153f1541a8bd41), LL(0x77779977b69fe8b6), LL(0x37375937eba592eb), LL(0xe5e532e5567b9e56),
- LL(0x9f9fbc9fd98c13d9), LL(0xf0f00df017d32317), LL(0x4a4ade4a7f6a207f), LL(0xdada73da959e4495),
- LL(0x5858e85825faa225), LL(0xc9c946c9ca06cfca), LL(0x29297b298d557c8d), LL(0x0a0a1e0a22505a22),
- LL(0xb1b1ceb14fe1504f), LL(0xa0a0fda01a69c91a), LL(0x6b6bbd6bda7f14da), LL(0x85859285ab5cd9ab),
- LL(0xbdbddabd73813c73), LL(0x5d5de75d34d28f34), LL(0x1010301050809050), LL(0xf4f401f403f30703),
- LL(0xcbcb40cbc016ddc0), LL(0x3e3e423ec6edd3c6), LL(0x05050f0511282d11), LL(0x6767a967e61f78e6),
- LL(0xe4e431e453739753), LL(0x27276927bb2502bb), LL(0x4141c34158327358), LL(0x8b8b808b9d2ca79d),
- LL(0xa7a7f4a70151f601), LL(0x7d7d877d94cfb294), LL(0x9595a295fbdc49fb), LL(0xd8d875d89f8e569f),
- LL(0xfbfb10fb308b7030), LL(0xeeee2fee7123cd71), LL(0x7c7c847c91c7bb91), LL(0x6666aa66e31771e3),
- LL(0xdddd7add8ea67b8e), LL(0x171739174bb8af4b), LL(0x4747c94746024546), LL(0x9e9ebf9edc841adc),
- LL(0xcaca43cac51ed4c5), LL(0x2d2d772d99755899), LL(0xbfbfdcbf79912e79), LL(0x070709071b383f1b),
- LL(0xadadeaad2301ac23), LL(0x5a5aee5a2feab02f), LL(0x83839883b56cefb5), LL(0x33335533ff85b6ff),
- LL(0x6363a563f23f5cf2), LL(0x020206020a10120a), LL(0xaaaae3aa38399338), LL(0x71719371a8afdea8),
- LL(0xc8c845c8cf0ec6cf), LL(0x19192b197dc8d17d), LL(0x4949db4970723b70), LL(0xd9d976d99a865f9a),
- LL(0xf2f20bf21dc3311d), LL(0xe3e338e3484ba848), LL(0x5b5bed5b2ae2b92a), LL(0x888885889234bc92),
- LL(0x9a9ab39ac8a43ec8), LL(0x26266a26be2d0bbe), LL(0x32325632fa8dbffa), LL(0xb0b0cdb04ae9594a),
- LL(0xe9e926e96a1bf26a), LL(0x0f0f110f33787733), LL(0xd5d562d5a6e633a6), LL(0x80809d80ba74f4ba),
- LL(0xbebedfbe7c99277c), LL(0xcdcd4acdde26ebde), LL(0x34345c34e4bd89e4), LL(0x4848d848757a3275),
- LL(0xffff1cff24ab5424), LL(0x7a7a8e7a8ff78d8f), LL(0x9090ad90eaf464ea), LL(0x5f5fe15f3ec29d3e),
- LL(0x20206020a01d3da0), LL(0x6868b868d5670fd5), LL(0x1a1a2e1a72d0ca72), LL(0xaeaeefae2c19b72c),
- LL(0xb4b4c1b45ec97d5e), LL(0x5454fc54199ace19), LL(0x9393a893e5ec7fe5), LL(0x22226622aa0d2faa),
- LL(0x6464ac64e90763e9), LL(0xf1f10ef112db2a12), LL(0x73739573a2bfcca2), LL(0x121236125a90825a),
- LL(0x4040c0405d3a7a5d), LL(0x0808180828404828), LL(0xc3c358c3e85695e8), LL(0xecec29ec7b33df7b),
- LL(0xdbdb70db90964d90), LL(0xa1a1fea11f61c01f), LL(0x8d8d8a8d831c9183), LL(0x3d3d473dc9f5c8c9),
- LL(0x9797a497f1cc5bf1), LL(0x0000000000000000), LL(0xcfcf4ccfd436f9d4), LL(0x2b2b7d2b87456e87),
- LL(0x76769a76b397e1b3), LL(0x82829b82b064e6b0), LL(0xd6d667d6a9fe28a9), LL(0x1b1b2d1b77d8c377),
- LL(0xb5b5c2b55bc1745b), LL(0xafafecaf2911be29), LL(0x6a6abe6adf771ddf), LL(0x5050f0500dbaea0d),
- LL(0x4545cf454c12574c), LL(0xf3f308f318cb3818), LL(0x30305030f09dadf0), LL(0xefef2cef742bc474),
- LL(0x3f3f413fc3e5dac3), LL(0x5555ff551c92c71c), LL(0xa2a2fba21079db10), LL(0xeaea23ea6503e965),
- LL(0x6565af65ec0f6aec), LL(0xbabad3ba68b90368), LL(0x2f2f712f93654a93), LL(0xc0c05dc0e74e8ee7),
- LL(0xdede7fde81be6081), LL(0x1c1c241c6ce0fc6c), LL(0xfdfd1afd2ebb462e), LL(0x4d4dd74d64521f64),
- LL(0x9292ab92e0e476e0), LL(0x75759f75bc8ffabc), LL(0x06060a061e30361e), LL(0x8a8a838a9824ae98),
- LL(0xb2b2cbb240f94b40), LL(0xe6e637e659638559), LL(0x0e0e120e36707e36), LL(0x1f1f211f63f8e763),
- LL(0x6262a662f73755f7), LL(0xd4d461d4a3ee3aa3), LL(0xa8a8e5a832298132), LL(0x9696a796f4c452f4),
- LL(0xf9f916f93a9b623a), LL(0xc5c552c5f666a3f6), LL(0x25256f25b13510b1), LL(0x5959eb5920f2ab20),
- LL(0x84849184ae54d0ae), LL(0x72729672a7b7c5a7), LL(0x39394b39ddd5ecdd), LL(0x4c4cd44c615a1661),
- LL(0x5e5ee25e3bca943b), LL(0x7878887885e79f85), LL(0x38384838d8dde5d8), LL(0x8c8c898c86149886),
- LL(0xd1d16ed1b2c617b2), LL(0xa5a5f2a50b41e40b), LL(0xe2e23be24d43a14d), LL(0x6161a361f82f4ef8),
- LL(0xb3b3c8b345f14245), LL(0x21216321a51534a5), LL(0x9c9cb99cd69408d6), LL(0x1e1e221e66f0ee66),
- LL(0x4343c54352226152), LL(0xc7c754c7fc76b1fc), LL(0xfcfc19fc2bb34f2b), LL(0x04040c0414202414),
- LL(0x5151f35108b2e308), LL(0x9999b699c7bc25c7), LL(0x6d6db76dc44f22c4), LL(0x0d0d170d39686539),
- LL(0xfafa13fa35837935), LL(0xdfdf7cdf84b66984), LL(0x7e7e827e9bd7a99b), LL(0x24246c24b43d19b4),
- LL(0x3b3b4d3bd7c5fed7), LL(0xababe0ab3d319a3d), LL(0xcece4fced13ef0d1), LL(0x1111331155889955),
- LL(0x8f8f8c8f890c8389), LL(0x4e4ed24e6b4a046b), LL(0xb7b7c4b751d16651), LL(0xebeb20eb600be060),
- LL(0x3c3c443cccfdc1cc), LL(0x81819e81bf7cfdbf), LL(0x9494a194fed440fe), LL(0xf7f704f70ceb1c0c),
- LL(0xb9b9d6b967a11867), LL(0x131335135f988b5f), LL(0x2c2c742c9c7d519c), LL(0xd3d368d3b8d605b8),
- LL(0xe7e734e75c6b8c5c), LL(0x6e6eb26ecb5739cb), LL(0xc4c451c4f36eaaf3), LL(0x030305030f181b0f),
- LL(0x5656fa56138adc13), LL(0x4444cc44491a5e49), LL(0x7f7f817f9edfa09e), LL(0xa9a9e6a937218837),
- LL(0x2a2a7e2a824d6782), LL(0xbbbbd0bb6db10a6d), LL(0xc1c15ec1e24687e2), LL(0x5353f55302a2f102),
- LL(0xdcdc79dc8bae728b), LL(0x0b0b1d0b27585327), LL(0x9d9dba9dd39c01d3), LL(0x6c6cb46cc1472bc1),
- LL(0x31315331f595a4f5), LL(0x74749c74b987f3b9), LL(0xf6f607f609e31509), LL(0x4646ca46430a4c43),
- LL(0xacace9ac2609a526), LL(0x89898689973cb597), LL(0x14143c1444a0b444), LL(0xe1e13ee1425bba42),
- LL(0x16163a164eb0a64e), LL(0x3a3a4e3ad2cdf7d2), LL(0x6969bb69d06f06d0), LL(0x09091b092d48412d),
- LL(0x70709070ada7d7ad), LL(0xb6b6c7b654d96f54), LL(0xd0d06dd0b7ce1eb7), LL(0xeded2aed7e3bd67e),
- LL(0xcccc49ccdb2ee2db), LL(0x4242c642572a6857), LL(0x9898b598c2b42cc2), LL(0xa4a4f1a40e49ed0e),
- LL(0x28287828885d7588), LL(0x5c5ce45c31da8631), LL(0xf8f815f83f936b3f), LL(0x86869786a444c2a4),
-};
-
-static const u64 C1[256] = {
- LL(0x781818281878c0d8), LL(0xaf23236523af0526), LL(0xf9c6c657c6f97eb8), LL(0x6fe8e825e86f13fb),
- LL(0xa187879487a14ccb), LL(0x62b8b8d5b862a911), LL(0x0501010301050809), LL(0x6e4f4fd14f6e420d),
- LL(0xee36365a36eead9b), LL(0x04a6a6f7a60459ff), LL(0xbdd2d26bd2bdde0c), LL(0x06f5f502f506fb0e),
- LL(0x8079798b7980ef96), LL(0xce6f6fb16fce5f30), LL(0xef9191ae91effc6d), LL(0x075252f65207aaf8),
- LL(0xfd6060a060fd2747), LL(0x76bcbcd9bc768935), LL(0xcd9b9bb09bcdac37), LL(0x8c8e8e8f8e8c048a),
- LL(0x15a3a3f8a31571d2), LL(0x3c0c0c140c3c606c), LL(0x8a7b7b8d7b8aff84), LL(0xe135355f35e1b580),
- LL(0x691d1d271d69e8f5), LL(0x47e0e03de04753b3), LL(0xacd7d764d7acf621), LL(0xedc2c25bc2ed5e9c),
- LL(0x962e2e722e966d43), LL(0x7a4b4bdd4b7a6229), LL(0x21fefe1ffe21a35d), LL(0x165757f9571682d5),
- LL(0x4115153f1541a8bd), LL(0xb677779977b69fe8), LL(0xeb37375937eba592), LL(0x56e5e532e5567b9e),
- LL(0xd99f9fbc9fd98c13), LL(0x17f0f00df017d323), LL(0x7f4a4ade4a7f6a20), LL(0x95dada73da959e44),
- LL(0x255858e85825faa2), LL(0xcac9c946c9ca06cf), LL(0x8d29297b298d557c), LL(0x220a0a1e0a22505a),
- LL(0x4fb1b1ceb14fe150), LL(0x1aa0a0fda01a69c9), LL(0xda6b6bbd6bda7f14), LL(0xab85859285ab5cd9),
- LL(0x73bdbddabd73813c), LL(0x345d5de75d34d28f), LL(0x5010103010508090), LL(0x03f4f401f403f307),
- LL(0xc0cbcb40cbc016dd), LL(0xc63e3e423ec6edd3), LL(0x1105050f0511282d), LL(0xe66767a967e61f78),
- LL(0x53e4e431e4537397), LL(0xbb27276927bb2502), LL(0x584141c341583273), LL(0x9d8b8b808b9d2ca7),
- LL(0x01a7a7f4a70151f6), LL(0x947d7d877d94cfb2), LL(0xfb9595a295fbdc49), LL(0x9fd8d875d89f8e56),
- LL(0x30fbfb10fb308b70), LL(0x71eeee2fee7123cd), LL(0x917c7c847c91c7bb), LL(0xe36666aa66e31771),
- LL(0x8edddd7add8ea67b), LL(0x4b171739174bb8af), LL(0x464747c947460245), LL(0xdc9e9ebf9edc841a),
- LL(0xc5caca43cac51ed4), LL(0x992d2d772d997558), LL(0x79bfbfdcbf79912e), LL(0x1b070709071b383f),
- LL(0x23adadeaad2301ac), LL(0x2f5a5aee5a2feab0), LL(0xb583839883b56cef), LL(0xff33335533ff85b6),
- LL(0xf26363a563f23f5c), LL(0x0a020206020a1012), LL(0x38aaaae3aa383993), LL(0xa871719371a8afde),
- LL(0xcfc8c845c8cf0ec6), LL(0x7d19192b197dc8d1), LL(0x704949db4970723b), LL(0x9ad9d976d99a865f),
- LL(0x1df2f20bf21dc331), LL(0x48e3e338e3484ba8), LL(0x2a5b5bed5b2ae2b9), LL(0x92888885889234bc),
- LL(0xc89a9ab39ac8a43e), LL(0xbe26266a26be2d0b), LL(0xfa32325632fa8dbf), LL(0x4ab0b0cdb04ae959),
- LL(0x6ae9e926e96a1bf2), LL(0x330f0f110f337877), LL(0xa6d5d562d5a6e633), LL(0xba80809d80ba74f4),
- LL(0x7cbebedfbe7c9927), LL(0xdecdcd4acdde26eb), LL(0xe434345c34e4bd89), LL(0x754848d848757a32),
- LL(0x24ffff1cff24ab54), LL(0x8f7a7a8e7a8ff78d), LL(0xea9090ad90eaf464), LL(0x3e5f5fe15f3ec29d),
- LL(0xa020206020a01d3d), LL(0xd56868b868d5670f), LL(0x721a1a2e1a72d0ca), LL(0x2caeaeefae2c19b7),
- LL(0x5eb4b4c1b45ec97d), LL(0x195454fc54199ace), LL(0xe59393a893e5ec7f), LL(0xaa22226622aa0d2f),
- LL(0xe96464ac64e90763), LL(0x12f1f10ef112db2a), LL(0xa273739573a2bfcc), LL(0x5a121236125a9082),
- LL(0x5d4040c0405d3a7a), LL(0x2808081808284048), LL(0xe8c3c358c3e85695), LL(0x7becec29ec7b33df),
- LL(0x90dbdb70db90964d), LL(0x1fa1a1fea11f61c0), LL(0x838d8d8a8d831c91), LL(0xc93d3d473dc9f5c8),
- LL(0xf19797a497f1cc5b), LL(0x0000000000000000), LL(0xd4cfcf4ccfd436f9), LL(0x872b2b7d2b87456e),
- LL(0xb376769a76b397e1), LL(0xb082829b82b064e6), LL(0xa9d6d667d6a9fe28), LL(0x771b1b2d1b77d8c3),
- LL(0x5bb5b5c2b55bc174), LL(0x29afafecaf2911be), LL(0xdf6a6abe6adf771d), LL(0x0d5050f0500dbaea),
- LL(0x4c4545cf454c1257), LL(0x18f3f308f318cb38), LL(0xf030305030f09dad), LL(0x74efef2cef742bc4),
- LL(0xc33f3f413fc3e5da), LL(0x1c5555ff551c92c7), LL(0x10a2a2fba21079db), LL(0x65eaea23ea6503e9),
- LL(0xec6565af65ec0f6a), LL(0x68babad3ba68b903), LL(0x932f2f712f93654a), LL(0xe7c0c05dc0e74e8e),
- LL(0x81dede7fde81be60), LL(0x6c1c1c241c6ce0fc), LL(0x2efdfd1afd2ebb46), LL(0x644d4dd74d64521f),
- LL(0xe09292ab92e0e476), LL(0xbc75759f75bc8ffa), LL(0x1e06060a061e3036), LL(0x988a8a838a9824ae),
- LL(0x40b2b2cbb240f94b), LL(0x59e6e637e6596385), LL(0x360e0e120e36707e), LL(0x631f1f211f63f8e7),
- LL(0xf76262a662f73755), LL(0xa3d4d461d4a3ee3a), LL(0x32a8a8e5a8322981), LL(0xf49696a796f4c452),
- LL(0x3af9f916f93a9b62), LL(0xf6c5c552c5f666a3), LL(0xb125256f25b13510), LL(0x205959eb5920f2ab),
- LL(0xae84849184ae54d0), LL(0xa772729672a7b7c5), LL(0xdd39394b39ddd5ec), LL(0x614c4cd44c615a16),
- LL(0x3b5e5ee25e3bca94), LL(0x857878887885e79f), LL(0xd838384838d8dde5), LL(0x868c8c898c861498),
- LL(0xb2d1d16ed1b2c617), LL(0x0ba5a5f2a50b41e4), LL(0x4de2e23be24d43a1), LL(0xf86161a361f82f4e),
- LL(0x45b3b3c8b345f142), LL(0xa521216321a51534), LL(0xd69c9cb99cd69408), LL(0x661e1e221e66f0ee),
- LL(0x524343c543522261), LL(0xfcc7c754c7fc76b1), LL(0x2bfcfc19fc2bb34f), LL(0x1404040c04142024),
- LL(0x085151f35108b2e3), LL(0xc79999b699c7bc25), LL(0xc46d6db76dc44f22), LL(0x390d0d170d396865),
- LL(0x35fafa13fa358379), LL(0x84dfdf7cdf84b669), LL(0x9b7e7e827e9bd7a9), LL(0xb424246c24b43d19),
- LL(0xd73b3b4d3bd7c5fe), LL(0x3dababe0ab3d319a), LL(0xd1cece4fced13ef0), LL(0x5511113311558899),
- LL(0x898f8f8c8f890c83), LL(0x6b4e4ed24e6b4a04), LL(0x51b7b7c4b751d166), LL(0x60ebeb20eb600be0),
- LL(0xcc3c3c443cccfdc1), LL(0xbf81819e81bf7cfd), LL(0xfe9494a194fed440), LL(0x0cf7f704f70ceb1c),
- LL(0x67b9b9d6b967a118), LL(0x5f131335135f988b), LL(0x9c2c2c742c9c7d51), LL(0xb8d3d368d3b8d605),
- LL(0x5ce7e734e75c6b8c), LL(0xcb6e6eb26ecb5739), LL(0xf3c4c451c4f36eaa), LL(0x0f030305030f181b),
- LL(0x135656fa56138adc), LL(0x494444cc44491a5e), LL(0x9e7f7f817f9edfa0), LL(0x37a9a9e6a9372188),
- LL(0x822a2a7e2a824d67), LL(0x6dbbbbd0bb6db10a), LL(0xe2c1c15ec1e24687), LL(0x025353f55302a2f1),
- LL(0x8bdcdc79dc8bae72), LL(0x270b0b1d0b275853), LL(0xd39d9dba9dd39c01), LL(0xc16c6cb46cc1472b),
- LL(0xf531315331f595a4), LL(0xb974749c74b987f3), LL(0x09f6f607f609e315), LL(0x434646ca46430a4c),
- LL(0x26acace9ac2609a5), LL(0x9789898689973cb5), LL(0x4414143c1444a0b4), LL(0x42e1e13ee1425bba),
- LL(0x4e16163a164eb0a6), LL(0xd23a3a4e3ad2cdf7), LL(0xd06969bb69d06f06), LL(0x2d09091b092d4841),
- LL(0xad70709070ada7d7), LL(0x54b6b6c7b654d96f), LL(0xb7d0d06dd0b7ce1e), LL(0x7eeded2aed7e3bd6),
- LL(0xdbcccc49ccdb2ee2), LL(0x574242c642572a68), LL(0xc29898b598c2b42c), LL(0x0ea4a4f1a40e49ed),
- LL(0x8828287828885d75), LL(0x315c5ce45c31da86), LL(0x3ff8f815f83f936b), LL(0xa486869786a444c2),
-};
-
-static const u64 C2[256] = {
- LL(0xd8781818281878c0), LL(0x26af23236523af05), LL(0xb8f9c6c657c6f97e), LL(0xfb6fe8e825e86f13),
- LL(0xcba187879487a14c), LL(0x1162b8b8d5b862a9), LL(0x0905010103010508), LL(0x0d6e4f4fd14f6e42),
- LL(0x9bee36365a36eead), LL(0xff04a6a6f7a60459), LL(0x0cbdd2d26bd2bdde), LL(0x0e06f5f502f506fb),
- LL(0x968079798b7980ef), LL(0x30ce6f6fb16fce5f), LL(0x6def9191ae91effc), LL(0xf8075252f65207aa),
- LL(0x47fd6060a060fd27), LL(0x3576bcbcd9bc7689), LL(0x37cd9b9bb09bcdac), LL(0x8a8c8e8e8f8e8c04),
- LL(0xd215a3a3f8a31571), LL(0x6c3c0c0c140c3c60), LL(0x848a7b7b8d7b8aff), LL(0x80e135355f35e1b5),
- LL(0xf5691d1d271d69e8), LL(0xb347e0e03de04753), LL(0x21acd7d764d7acf6), LL(0x9cedc2c25bc2ed5e),
- LL(0x43962e2e722e966d), LL(0x297a4b4bdd4b7a62), LL(0x5d21fefe1ffe21a3), LL(0xd5165757f9571682),
- LL(0xbd4115153f1541a8), LL(0xe8b677779977b69f), LL(0x92eb37375937eba5), LL(0x9e56e5e532e5567b),
- LL(0x13d99f9fbc9fd98c), LL(0x2317f0f00df017d3), LL(0x207f4a4ade4a7f6a), LL(0x4495dada73da959e),
- LL(0xa2255858e85825fa), LL(0xcfcac9c946c9ca06), LL(0x7c8d29297b298d55), LL(0x5a220a0a1e0a2250),
- LL(0x504fb1b1ceb14fe1), LL(0xc91aa0a0fda01a69), LL(0x14da6b6bbd6bda7f), LL(0xd9ab85859285ab5c),
- LL(0x3c73bdbddabd7381), LL(0x8f345d5de75d34d2), LL(0x9050101030105080), LL(0x0703f4f401f403f3),
- LL(0xddc0cbcb40cbc016), LL(0xd3c63e3e423ec6ed), LL(0x2d1105050f051128), LL(0x78e66767a967e61f),
- LL(0x9753e4e431e45373), LL(0x02bb27276927bb25), LL(0x73584141c3415832), LL(0xa79d8b8b808b9d2c),
- LL(0xf601a7a7f4a70151), LL(0xb2947d7d877d94cf), LL(0x49fb9595a295fbdc), LL(0x569fd8d875d89f8e),
- LL(0x7030fbfb10fb308b), LL(0xcd71eeee2fee7123), LL(0xbb917c7c847c91c7), LL(0x71e36666aa66e317),
- LL(0x7b8edddd7add8ea6), LL(0xaf4b171739174bb8), LL(0x45464747c9474602), LL(0x1adc9e9ebf9edc84),
- LL(0xd4c5caca43cac51e), LL(0x58992d2d772d9975), LL(0x2e79bfbfdcbf7991), LL(0x3f1b070709071b38),
- LL(0xac23adadeaad2301), LL(0xb02f5a5aee5a2fea), LL(0xefb583839883b56c), LL(0xb6ff33335533ff85),
- LL(0x5cf26363a563f23f), LL(0x120a020206020a10), LL(0x9338aaaae3aa3839), LL(0xdea871719371a8af),
- LL(0xc6cfc8c845c8cf0e), LL(0xd17d19192b197dc8), LL(0x3b704949db497072), LL(0x5f9ad9d976d99a86),
- LL(0x311df2f20bf21dc3), LL(0xa848e3e338e3484b), LL(0xb92a5b5bed5b2ae2), LL(0xbc92888885889234),
- LL(0x3ec89a9ab39ac8a4), LL(0x0bbe26266a26be2d), LL(0xbffa32325632fa8d), LL(0x594ab0b0cdb04ae9),
- LL(0xf26ae9e926e96a1b), LL(0x77330f0f110f3378), LL(0x33a6d5d562d5a6e6), LL(0xf4ba80809d80ba74),
- LL(0x277cbebedfbe7c99), LL(0xebdecdcd4acdde26), LL(0x89e434345c34e4bd), LL(0x32754848d848757a),
- LL(0x5424ffff1cff24ab), LL(0x8d8f7a7a8e7a8ff7), LL(0x64ea9090ad90eaf4), LL(0x9d3e5f5fe15f3ec2),
- LL(0x3da020206020a01d), LL(0x0fd56868b868d567), LL(0xca721a1a2e1a72d0), LL(0xb72caeaeefae2c19),
- LL(0x7d5eb4b4c1b45ec9), LL(0xce195454fc54199a), LL(0x7fe59393a893e5ec), LL(0x2faa22226622aa0d),
- LL(0x63e96464ac64e907), LL(0x2a12f1f10ef112db), LL(0xcca273739573a2bf), LL(0x825a121236125a90),
- LL(0x7a5d4040c0405d3a), LL(0x4828080818082840), LL(0x95e8c3c358c3e856), LL(0xdf7becec29ec7b33),
- LL(0x4d90dbdb70db9096), LL(0xc01fa1a1fea11f61), LL(0x91838d8d8a8d831c), LL(0xc8c93d3d473dc9f5),
- LL(0x5bf19797a497f1cc), LL(0x0000000000000000), LL(0xf9d4cfcf4ccfd436), LL(0x6e872b2b7d2b8745),
- LL(0xe1b376769a76b397), LL(0xe6b082829b82b064), LL(0x28a9d6d667d6a9fe), LL(0xc3771b1b2d1b77d8),
- LL(0x745bb5b5c2b55bc1), LL(0xbe29afafecaf2911), LL(0x1ddf6a6abe6adf77), LL(0xea0d5050f0500dba),
- LL(0x574c4545cf454c12), LL(0x3818f3f308f318cb), LL(0xadf030305030f09d), LL(0xc474efef2cef742b),
- LL(0xdac33f3f413fc3e5), LL(0xc71c5555ff551c92), LL(0xdb10a2a2fba21079), LL(0xe965eaea23ea6503),
- LL(0x6aec6565af65ec0f), LL(0x0368babad3ba68b9), LL(0x4a932f2f712f9365), LL(0x8ee7c0c05dc0e74e),
- LL(0x6081dede7fde81be), LL(0xfc6c1c1c241c6ce0), LL(0x462efdfd1afd2ebb), LL(0x1f644d4dd74d6452),
- LL(0x76e09292ab92e0e4), LL(0xfabc75759f75bc8f), LL(0x361e06060a061e30), LL(0xae988a8a838a9824),
- LL(0x4b40b2b2cbb240f9), LL(0x8559e6e637e65963), LL(0x7e360e0e120e3670), LL(0xe7631f1f211f63f8),
- LL(0x55f76262a662f737), LL(0x3aa3d4d461d4a3ee), LL(0x8132a8a8e5a83229), LL(0x52f49696a796f4c4),
- LL(0x623af9f916f93a9b), LL(0xa3f6c5c552c5f666), LL(0x10b125256f25b135), LL(0xab205959eb5920f2),
- LL(0xd0ae84849184ae54), LL(0xc5a772729672a7b7), LL(0xecdd39394b39ddd5), LL(0x16614c4cd44c615a),
- LL(0x943b5e5ee25e3bca), LL(0x9f857878887885e7), LL(0xe5d838384838d8dd), LL(0x98868c8c898c8614),
- LL(0x17b2d1d16ed1b2c6), LL(0xe40ba5a5f2a50b41), LL(0xa14de2e23be24d43), LL(0x4ef86161a361f82f),
- LL(0x4245b3b3c8b345f1), LL(0x34a521216321a515), LL(0x08d69c9cb99cd694), LL(0xee661e1e221e66f0),
- LL(0x61524343c5435222), LL(0xb1fcc7c754c7fc76), LL(0x4f2bfcfc19fc2bb3), LL(0x241404040c041420),
- LL(0xe3085151f35108b2), LL(0x25c79999b699c7bc), LL(0x22c46d6db76dc44f), LL(0x65390d0d170d3968),
- LL(0x7935fafa13fa3583), LL(0x6984dfdf7cdf84b6), LL(0xa99b7e7e827e9bd7), LL(0x19b424246c24b43d),
- LL(0xfed73b3b4d3bd7c5), LL(0x9a3dababe0ab3d31), LL(0xf0d1cece4fced13e), LL(0x9955111133115588),
- LL(0x83898f8f8c8f890c), LL(0x046b4e4ed24e6b4a), LL(0x6651b7b7c4b751d1), LL(0xe060ebeb20eb600b),
- LL(0xc1cc3c3c443cccfd), LL(0xfdbf81819e81bf7c), LL(0x40fe9494a194fed4), LL(0x1c0cf7f704f70ceb),
- LL(0x1867b9b9d6b967a1), LL(0x8b5f131335135f98), LL(0x519c2c2c742c9c7d), LL(0x05b8d3d368d3b8d6),
- LL(0x8c5ce7e734e75c6b), LL(0x39cb6e6eb26ecb57), LL(0xaaf3c4c451c4f36e), LL(0x1b0f030305030f18),
- LL(0xdc135656fa56138a), LL(0x5e494444cc44491a), LL(0xa09e7f7f817f9edf), LL(0x8837a9a9e6a93721),
- LL(0x67822a2a7e2a824d), LL(0x0a6dbbbbd0bb6db1), LL(0x87e2c1c15ec1e246), LL(0xf1025353f55302a2),
- LL(0x728bdcdc79dc8bae), LL(0x53270b0b1d0b2758), LL(0x01d39d9dba9dd39c), LL(0x2bc16c6cb46cc147),
- LL(0xa4f531315331f595), LL(0xf3b974749c74b987), LL(0x1509f6f607f609e3), LL(0x4c434646ca46430a),
- LL(0xa526acace9ac2609), LL(0xb59789898689973c), LL(0xb44414143c1444a0), LL(0xba42e1e13ee1425b),
- LL(0xa64e16163a164eb0), LL(0xf7d23a3a4e3ad2cd), LL(0x06d06969bb69d06f), LL(0x412d09091b092d48),
- LL(0xd7ad70709070ada7), LL(0x6f54b6b6c7b654d9), LL(0x1eb7d0d06dd0b7ce), LL(0xd67eeded2aed7e3b),
- LL(0xe2dbcccc49ccdb2e), LL(0x68574242c642572a), LL(0x2cc29898b598c2b4), LL(0xed0ea4a4f1a40e49),
- LL(0x758828287828885d), LL(0x86315c5ce45c31da), LL(0x6b3ff8f815f83f93), LL(0xc2a486869786a444),
-};
-
-static const u64 C3[256] = {
- LL(0xc0d8781818281878), LL(0x0526af23236523af), LL(0x7eb8f9c6c657c6f9), LL(0x13fb6fe8e825e86f),
- LL(0x4ccba187879487a1), LL(0xa91162b8b8d5b862), LL(0x0809050101030105), LL(0x420d6e4f4fd14f6e),
- LL(0xad9bee36365a36ee), LL(0x59ff04a6a6f7a604), LL(0xde0cbdd2d26bd2bd), LL(0xfb0e06f5f502f506),
- LL(0xef968079798b7980), LL(0x5f30ce6f6fb16fce), LL(0xfc6def9191ae91ef), LL(0xaaf8075252f65207),
- LL(0x2747fd6060a060fd), LL(0x893576bcbcd9bc76), LL(0xac37cd9b9bb09bcd), LL(0x048a8c8e8e8f8e8c),
- LL(0x71d215a3a3f8a315), LL(0x606c3c0c0c140c3c), LL(0xff848a7b7b8d7b8a), LL(0xb580e135355f35e1),
- LL(0xe8f5691d1d271d69), LL(0x53b347e0e03de047), LL(0xf621acd7d764d7ac), LL(0x5e9cedc2c25bc2ed),
- LL(0x6d43962e2e722e96), LL(0x62297a4b4bdd4b7a), LL(0xa35d21fefe1ffe21), LL(0x82d5165757f95716),
- LL(0xa8bd4115153f1541), LL(0x9fe8b677779977b6), LL(0xa592eb37375937eb), LL(0x7b9e56e5e532e556),
- LL(0x8c13d99f9fbc9fd9), LL(0xd32317f0f00df017), LL(0x6a207f4a4ade4a7f), LL(0x9e4495dada73da95),
- LL(0xfaa2255858e85825), LL(0x06cfcac9c946c9ca), LL(0x557c8d29297b298d), LL(0x505a220a0a1e0a22),
- LL(0xe1504fb1b1ceb14f), LL(0x69c91aa0a0fda01a), LL(0x7f14da6b6bbd6bda), LL(0x5cd9ab85859285ab),
- LL(0x813c73bdbddabd73), LL(0xd28f345d5de75d34), LL(0x8090501010301050), LL(0xf30703f4f401f403),
- LL(0x16ddc0cbcb40cbc0), LL(0xedd3c63e3e423ec6), LL(0x282d1105050f0511), LL(0x1f78e66767a967e6),
- LL(0x739753e4e431e453), LL(0x2502bb27276927bb), LL(0x3273584141c34158), LL(0x2ca79d8b8b808b9d),
- LL(0x51f601a7a7f4a701), LL(0xcfb2947d7d877d94), LL(0xdc49fb9595a295fb), LL(0x8e569fd8d875d89f),
- LL(0x8b7030fbfb10fb30), LL(0x23cd71eeee2fee71), LL(0xc7bb917c7c847c91), LL(0x1771e36666aa66e3),
- LL(0xa67b8edddd7add8e), LL(0xb8af4b171739174b), LL(0x0245464747c94746), LL(0x841adc9e9ebf9edc),
- LL(0x1ed4c5caca43cac5), LL(0x7558992d2d772d99), LL(0x912e79bfbfdcbf79), LL(0x383f1b070709071b),
- LL(0x01ac23adadeaad23), LL(0xeab02f5a5aee5a2f), LL(0x6cefb583839883b5), LL(0x85b6ff33335533ff),
- LL(0x3f5cf26363a563f2), LL(0x10120a020206020a), LL(0x399338aaaae3aa38), LL(0xafdea871719371a8),
- LL(0x0ec6cfc8c845c8cf), LL(0xc8d17d19192b197d), LL(0x723b704949db4970), LL(0x865f9ad9d976d99a),
- LL(0xc3311df2f20bf21d), LL(0x4ba848e3e338e348), LL(0xe2b92a5b5bed5b2a), LL(0x34bc928888858892),
- LL(0xa43ec89a9ab39ac8), LL(0x2d0bbe26266a26be), LL(0x8dbffa32325632fa), LL(0xe9594ab0b0cdb04a),
- LL(0x1bf26ae9e926e96a), LL(0x7877330f0f110f33), LL(0xe633a6d5d562d5a6), LL(0x74f4ba80809d80ba),
- LL(0x99277cbebedfbe7c), LL(0x26ebdecdcd4acdde), LL(0xbd89e434345c34e4), LL(0x7a32754848d84875),
- LL(0xab5424ffff1cff24), LL(0xf78d8f7a7a8e7a8f), LL(0xf464ea9090ad90ea), LL(0xc29d3e5f5fe15f3e),
- LL(0x1d3da020206020a0), LL(0x670fd56868b868d5), LL(0xd0ca721a1a2e1a72), LL(0x19b72caeaeefae2c),
- LL(0xc97d5eb4b4c1b45e), LL(0x9ace195454fc5419), LL(0xec7fe59393a893e5), LL(0x0d2faa22226622aa),
- LL(0x0763e96464ac64e9), LL(0xdb2a12f1f10ef112), LL(0xbfcca273739573a2), LL(0x90825a121236125a),
- LL(0x3a7a5d4040c0405d), LL(0x4048280808180828), LL(0x5695e8c3c358c3e8), LL(0x33df7becec29ec7b),
- LL(0x964d90dbdb70db90), LL(0x61c01fa1a1fea11f), LL(0x1c91838d8d8a8d83), LL(0xf5c8c93d3d473dc9),
- LL(0xcc5bf19797a497f1), LL(0x0000000000000000), LL(0x36f9d4cfcf4ccfd4), LL(0x456e872b2b7d2b87),
- LL(0x97e1b376769a76b3), LL(0x64e6b082829b82b0), LL(0xfe28a9d6d667d6a9), LL(0xd8c3771b1b2d1b77),
- LL(0xc1745bb5b5c2b55b), LL(0x11be29afafecaf29), LL(0x771ddf6a6abe6adf), LL(0xbaea0d5050f0500d),
- LL(0x12574c4545cf454c), LL(0xcb3818f3f308f318), LL(0x9dadf030305030f0), LL(0x2bc474efef2cef74),
- LL(0xe5dac33f3f413fc3), LL(0x92c71c5555ff551c), LL(0x79db10a2a2fba210), LL(0x03e965eaea23ea65),
- LL(0x0f6aec6565af65ec), LL(0xb90368babad3ba68), LL(0x654a932f2f712f93), LL(0x4e8ee7c0c05dc0e7),
- LL(0xbe6081dede7fde81), LL(0xe0fc6c1c1c241c6c), LL(0xbb462efdfd1afd2e), LL(0x521f644d4dd74d64),
- LL(0xe476e09292ab92e0), LL(0x8ffabc75759f75bc), LL(0x30361e06060a061e), LL(0x24ae988a8a838a98),
- LL(0xf94b40b2b2cbb240), LL(0x638559e6e637e659), LL(0x707e360e0e120e36), LL(0xf8e7631f1f211f63),
- LL(0x3755f76262a662f7), LL(0xee3aa3d4d461d4a3), LL(0x298132a8a8e5a832), LL(0xc452f49696a796f4),
- LL(0x9b623af9f916f93a), LL(0x66a3f6c5c552c5f6), LL(0x3510b125256f25b1), LL(0xf2ab205959eb5920),
- LL(0x54d0ae84849184ae), LL(0xb7c5a772729672a7), LL(0xd5ecdd39394b39dd), LL(0x5a16614c4cd44c61),
- LL(0xca943b5e5ee25e3b), LL(0xe79f857878887885), LL(0xdde5d838384838d8), LL(0x1498868c8c898c86),
- LL(0xc617b2d1d16ed1b2), LL(0x41e40ba5a5f2a50b), LL(0x43a14de2e23be24d), LL(0x2f4ef86161a361f8),
- LL(0xf14245b3b3c8b345), LL(0x1534a521216321a5), LL(0x9408d69c9cb99cd6), LL(0xf0ee661e1e221e66),
- LL(0x2261524343c54352), LL(0x76b1fcc7c754c7fc), LL(0xb34f2bfcfc19fc2b), LL(0x20241404040c0414),
- LL(0xb2e3085151f35108), LL(0xbc25c79999b699c7), LL(0x4f22c46d6db76dc4), LL(0x6865390d0d170d39),
- LL(0x837935fafa13fa35), LL(0xb66984dfdf7cdf84), LL(0xd7a99b7e7e827e9b), LL(0x3d19b424246c24b4),
- LL(0xc5fed73b3b4d3bd7), LL(0x319a3dababe0ab3d), LL(0x3ef0d1cece4fced1), LL(0x8899551111331155),
- LL(0x0c83898f8f8c8f89), LL(0x4a046b4e4ed24e6b), LL(0xd16651b7b7c4b751), LL(0x0be060ebeb20eb60),
- LL(0xfdc1cc3c3c443ccc), LL(0x7cfdbf81819e81bf), LL(0xd440fe9494a194fe), LL(0xeb1c0cf7f704f70c),
- LL(0xa11867b9b9d6b967), LL(0x988b5f131335135f), LL(0x7d519c2c2c742c9c), LL(0xd605b8d3d368d3b8),
- LL(0x6b8c5ce7e734e75c), LL(0x5739cb6e6eb26ecb), LL(0x6eaaf3c4c451c4f3), LL(0x181b0f030305030f),
- LL(0x8adc135656fa5613), LL(0x1a5e494444cc4449), LL(0xdfa09e7f7f817f9e), LL(0x218837a9a9e6a937),
- LL(0x4d67822a2a7e2a82), LL(0xb10a6dbbbbd0bb6d), LL(0x4687e2c1c15ec1e2), LL(0xa2f1025353f55302),
- LL(0xae728bdcdc79dc8b), LL(0x5853270b0b1d0b27), LL(0x9c01d39d9dba9dd3), LL(0x472bc16c6cb46cc1),
- LL(0x95a4f531315331f5), LL(0x87f3b974749c74b9), LL(0xe31509f6f607f609), LL(0x0a4c434646ca4643),
- LL(0x09a526acace9ac26), LL(0x3cb5978989868997), LL(0xa0b44414143c1444), LL(0x5bba42e1e13ee142),
- LL(0xb0a64e16163a164e), LL(0xcdf7d23a3a4e3ad2), LL(0x6f06d06969bb69d0), LL(0x48412d09091b092d),
- LL(0xa7d7ad70709070ad), LL(0xd96f54b6b6c7b654), LL(0xce1eb7d0d06dd0b7), LL(0x3bd67eeded2aed7e),
- LL(0x2ee2dbcccc49ccdb), LL(0x2a68574242c64257), LL(0xb42cc29898b598c2), LL(0x49ed0ea4a4f1a40e),
- LL(0x5d75882828782888), LL(0xda86315c5ce45c31), LL(0x936b3ff8f815f83f), LL(0x44c2a486869786a4),
-};
-
-static const u64 C4[256] = {
- LL(0x78c0d87818182818), LL(0xaf0526af23236523), LL(0xf97eb8f9c6c657c6), LL(0x6f13fb6fe8e825e8),
- LL(0xa14ccba187879487), LL(0x62a91162b8b8d5b8), LL(0x0508090501010301), LL(0x6e420d6e4f4fd14f),
- LL(0xeead9bee36365a36), LL(0x0459ff04a6a6f7a6), LL(0xbdde0cbdd2d26bd2), LL(0x06fb0e06f5f502f5),
- LL(0x80ef968079798b79), LL(0xce5f30ce6f6fb16f), LL(0xeffc6def9191ae91), LL(0x07aaf8075252f652),
- LL(0xfd2747fd6060a060), LL(0x76893576bcbcd9bc), LL(0xcdac37cd9b9bb09b), LL(0x8c048a8c8e8e8f8e),
- LL(0x1571d215a3a3f8a3), LL(0x3c606c3c0c0c140c), LL(0x8aff848a7b7b8d7b), LL(0xe1b580e135355f35),
- LL(0x69e8f5691d1d271d), LL(0x4753b347e0e03de0), LL(0xacf621acd7d764d7), LL(0xed5e9cedc2c25bc2),
- LL(0x966d43962e2e722e), LL(0x7a62297a4b4bdd4b), LL(0x21a35d21fefe1ffe), LL(0x1682d5165757f957),
- LL(0x41a8bd4115153f15), LL(0xb69fe8b677779977), LL(0xeba592eb37375937), LL(0x567b9e56e5e532e5),
- LL(0xd98c13d99f9fbc9f), LL(0x17d32317f0f00df0), LL(0x7f6a207f4a4ade4a), LL(0x959e4495dada73da),
- LL(0x25faa2255858e858), LL(0xca06cfcac9c946c9), LL(0x8d557c8d29297b29), LL(0x22505a220a0a1e0a),
- LL(0x4fe1504fb1b1ceb1), LL(0x1a69c91aa0a0fda0), LL(0xda7f14da6b6bbd6b), LL(0xab5cd9ab85859285),
- LL(0x73813c73bdbddabd), LL(0x34d28f345d5de75d), LL(0x5080905010103010), LL(0x03f30703f4f401f4),
- LL(0xc016ddc0cbcb40cb), LL(0xc6edd3c63e3e423e), LL(0x11282d1105050f05), LL(0xe61f78e66767a967),
- LL(0x53739753e4e431e4), LL(0xbb2502bb27276927), LL(0x583273584141c341), LL(0x9d2ca79d8b8b808b),
- LL(0x0151f601a7a7f4a7), LL(0x94cfb2947d7d877d), LL(0xfbdc49fb9595a295), LL(0x9f8e569fd8d875d8),
- LL(0x308b7030fbfb10fb), LL(0x7123cd71eeee2fee), LL(0x91c7bb917c7c847c), LL(0xe31771e36666aa66),
- LL(0x8ea67b8edddd7add), LL(0x4bb8af4b17173917), LL(0x460245464747c947), LL(0xdc841adc9e9ebf9e),
- LL(0xc51ed4c5caca43ca), LL(0x997558992d2d772d), LL(0x79912e79bfbfdcbf), LL(0x1b383f1b07070907),
- LL(0x2301ac23adadeaad), LL(0x2feab02f5a5aee5a), LL(0xb56cefb583839883), LL(0xff85b6ff33335533),
- LL(0xf23f5cf26363a563), LL(0x0a10120a02020602), LL(0x38399338aaaae3aa), LL(0xa8afdea871719371),
- LL(0xcf0ec6cfc8c845c8), LL(0x7dc8d17d19192b19), LL(0x70723b704949db49), LL(0x9a865f9ad9d976d9),
- LL(0x1dc3311df2f20bf2), LL(0x484ba848e3e338e3), LL(0x2ae2b92a5b5bed5b), LL(0x9234bc9288888588),
- LL(0xc8a43ec89a9ab39a), LL(0xbe2d0bbe26266a26), LL(0xfa8dbffa32325632), LL(0x4ae9594ab0b0cdb0),
- LL(0x6a1bf26ae9e926e9), LL(0x337877330f0f110f), LL(0xa6e633a6d5d562d5), LL(0xba74f4ba80809d80),
- LL(0x7c99277cbebedfbe), LL(0xde26ebdecdcd4acd), LL(0xe4bd89e434345c34), LL(0x757a32754848d848),
- LL(0x24ab5424ffff1cff), LL(0x8ff78d8f7a7a8e7a), LL(0xeaf464ea9090ad90), LL(0x3ec29d3e5f5fe15f),
- LL(0xa01d3da020206020), LL(0xd5670fd56868b868), LL(0x72d0ca721a1a2e1a), LL(0x2c19b72caeaeefae),
- LL(0x5ec97d5eb4b4c1b4), LL(0x199ace195454fc54), LL(0xe5ec7fe59393a893), LL(0xaa0d2faa22226622),
- LL(0xe90763e96464ac64), LL(0x12db2a12f1f10ef1), LL(0xa2bfcca273739573), LL(0x5a90825a12123612),
- LL(0x5d3a7a5d4040c040), LL(0x2840482808081808), LL(0xe85695e8c3c358c3), LL(0x7b33df7becec29ec),
- LL(0x90964d90dbdb70db), LL(0x1f61c01fa1a1fea1), LL(0x831c91838d8d8a8d), LL(0xc9f5c8c93d3d473d),
- LL(0xf1cc5bf19797a497), LL(0x0000000000000000), LL(0xd436f9d4cfcf4ccf), LL(0x87456e872b2b7d2b),
- LL(0xb397e1b376769a76), LL(0xb064e6b082829b82), LL(0xa9fe28a9d6d667d6), LL(0x77d8c3771b1b2d1b),
- LL(0x5bc1745bb5b5c2b5), LL(0x2911be29afafecaf), LL(0xdf771ddf6a6abe6a), LL(0x0dbaea0d5050f050),
- LL(0x4c12574c4545cf45), LL(0x18cb3818f3f308f3), LL(0xf09dadf030305030), LL(0x742bc474efef2cef),
- LL(0xc3e5dac33f3f413f), LL(0x1c92c71c5555ff55), LL(0x1079db10a2a2fba2), LL(0x6503e965eaea23ea),
- LL(0xec0f6aec6565af65), LL(0x68b90368babad3ba), LL(0x93654a932f2f712f), LL(0xe74e8ee7c0c05dc0),
- LL(0x81be6081dede7fde), LL(0x6ce0fc6c1c1c241c), LL(0x2ebb462efdfd1afd), LL(0x64521f644d4dd74d),
- LL(0xe0e476e09292ab92), LL(0xbc8ffabc75759f75), LL(0x1e30361e06060a06), LL(0x9824ae988a8a838a),
- LL(0x40f94b40b2b2cbb2), LL(0x59638559e6e637e6), LL(0x36707e360e0e120e), LL(0x63f8e7631f1f211f),
- LL(0xf73755f76262a662), LL(0xa3ee3aa3d4d461d4), LL(0x32298132a8a8e5a8), LL(0xf4c452f49696a796),
- LL(0x3a9b623af9f916f9), LL(0xf666a3f6c5c552c5), LL(0xb13510b125256f25), LL(0x20f2ab205959eb59),
- LL(0xae54d0ae84849184), LL(0xa7b7c5a772729672), LL(0xddd5ecdd39394b39), LL(0x615a16614c4cd44c),
- LL(0x3bca943b5e5ee25e), LL(0x85e79f8578788878), LL(0xd8dde5d838384838), LL(0x861498868c8c898c),
- LL(0xb2c617b2d1d16ed1), LL(0x0b41e40ba5a5f2a5), LL(0x4d43a14de2e23be2), LL(0xf82f4ef86161a361),
- LL(0x45f14245b3b3c8b3), LL(0xa51534a521216321), LL(0xd69408d69c9cb99c), LL(0x66f0ee661e1e221e),
- LL(0x522261524343c543), LL(0xfc76b1fcc7c754c7), LL(0x2bb34f2bfcfc19fc), LL(0x1420241404040c04),
- LL(0x08b2e3085151f351), LL(0xc7bc25c79999b699), LL(0xc44f22c46d6db76d), LL(0x396865390d0d170d),
- LL(0x35837935fafa13fa), LL(0x84b66984dfdf7cdf), LL(0x9bd7a99b7e7e827e), LL(0xb43d19b424246c24),
- LL(0xd7c5fed73b3b4d3b), LL(0x3d319a3dababe0ab), LL(0xd13ef0d1cece4fce), LL(0x5588995511113311),
- LL(0x890c83898f8f8c8f), LL(0x6b4a046b4e4ed24e), LL(0x51d16651b7b7c4b7), LL(0x600be060ebeb20eb),
- LL(0xccfdc1cc3c3c443c), LL(0xbf7cfdbf81819e81), LL(0xfed440fe9494a194), LL(0x0ceb1c0cf7f704f7),
- LL(0x67a11867b9b9d6b9), LL(0x5f988b5f13133513), LL(0x9c7d519c2c2c742c), LL(0xb8d605b8d3d368d3),
- LL(0x5c6b8c5ce7e734e7), LL(0xcb5739cb6e6eb26e), LL(0xf36eaaf3c4c451c4), LL(0x0f181b0f03030503),
- LL(0x138adc135656fa56), LL(0x491a5e494444cc44), LL(0x9edfa09e7f7f817f), LL(0x37218837a9a9e6a9),
- LL(0x824d67822a2a7e2a), LL(0x6db10a6dbbbbd0bb), LL(0xe24687e2c1c15ec1), LL(0x02a2f1025353f553),
- LL(0x8bae728bdcdc79dc), LL(0x275853270b0b1d0b), LL(0xd39c01d39d9dba9d), LL(0xc1472bc16c6cb46c),
- LL(0xf595a4f531315331), LL(0xb987f3b974749c74), LL(0x09e31509f6f607f6), LL(0x430a4c434646ca46),
- LL(0x2609a526acace9ac), LL(0x973cb59789898689), LL(0x44a0b44414143c14), LL(0x425bba42e1e13ee1),
- LL(0x4eb0a64e16163a16), LL(0xd2cdf7d23a3a4e3a), LL(0xd06f06d06969bb69), LL(0x2d48412d09091b09),
- LL(0xada7d7ad70709070), LL(0x54d96f54b6b6c7b6), LL(0xb7ce1eb7d0d06dd0), LL(0x7e3bd67eeded2aed),
- LL(0xdb2ee2dbcccc49cc), LL(0x572a68574242c642), LL(0xc2b42cc29898b598), LL(0x0e49ed0ea4a4f1a4),
- LL(0x885d758828287828), LL(0x31da86315c5ce45c), LL(0x3f936b3ff8f815f8), LL(0xa444c2a486869786),
-};
-
-static const u64 C5[256] = {
- LL(0x1878c0d878181828), LL(0x23af0526af232365), LL(0xc6f97eb8f9c6c657), LL(0xe86f13fb6fe8e825),
- LL(0x87a14ccba1878794), LL(0xb862a91162b8b8d5), LL(0x0105080905010103), LL(0x4f6e420d6e4f4fd1),
- LL(0x36eead9bee36365a), LL(0xa60459ff04a6a6f7), LL(0xd2bdde0cbdd2d26b), LL(0xf506fb0e06f5f502),
- LL(0x7980ef968079798b), LL(0x6fce5f30ce6f6fb1), LL(0x91effc6def9191ae), LL(0x5207aaf8075252f6),
- LL(0x60fd2747fd6060a0), LL(0xbc76893576bcbcd9), LL(0x9bcdac37cd9b9bb0), LL(0x8e8c048a8c8e8e8f),
- LL(0xa31571d215a3a3f8), LL(0x0c3c606c3c0c0c14), LL(0x7b8aff848a7b7b8d), LL(0x35e1b580e135355f),
- LL(0x1d69e8f5691d1d27), LL(0xe04753b347e0e03d), LL(0xd7acf621acd7d764), LL(0xc2ed5e9cedc2c25b),
- LL(0x2e966d43962e2e72), LL(0x4b7a62297a4b4bdd), LL(0xfe21a35d21fefe1f), LL(0x571682d5165757f9),
- LL(0x1541a8bd4115153f), LL(0x77b69fe8b6777799), LL(0x37eba592eb373759), LL(0xe5567b9e56e5e532),
- LL(0x9fd98c13d99f9fbc), LL(0xf017d32317f0f00d), LL(0x4a7f6a207f4a4ade), LL(0xda959e4495dada73),
- LL(0x5825faa2255858e8), LL(0xc9ca06cfcac9c946), LL(0x298d557c8d29297b), LL(0x0a22505a220a0a1e),
- LL(0xb14fe1504fb1b1ce), LL(0xa01a69c91aa0a0fd), LL(0x6bda7f14da6b6bbd), LL(0x85ab5cd9ab858592),
- LL(0xbd73813c73bdbdda), LL(0x5d34d28f345d5de7), LL(0x1050809050101030), LL(0xf403f30703f4f401),
- LL(0xcbc016ddc0cbcb40), LL(0x3ec6edd3c63e3e42), LL(0x0511282d1105050f), LL(0x67e61f78e66767a9),
- LL(0xe453739753e4e431), LL(0x27bb2502bb272769), LL(0x41583273584141c3), LL(0x8b9d2ca79d8b8b80),
- LL(0xa70151f601a7a7f4), LL(0x7d94cfb2947d7d87), LL(0x95fbdc49fb9595a2), LL(0xd89f8e569fd8d875),
- LL(0xfb308b7030fbfb10), LL(0xee7123cd71eeee2f), LL(0x7c91c7bb917c7c84), LL(0x66e31771e36666aa),
- LL(0xdd8ea67b8edddd7a), LL(0x174bb8af4b171739), LL(0x47460245464747c9), LL(0x9edc841adc9e9ebf),
- LL(0xcac51ed4c5caca43), LL(0x2d997558992d2d77), LL(0xbf79912e79bfbfdc), LL(0x071b383f1b070709),
- LL(0xad2301ac23adadea), LL(0x5a2feab02f5a5aee), LL(0x83b56cefb5838398), LL(0x33ff85b6ff333355),
- LL(0x63f23f5cf26363a5), LL(0x020a10120a020206), LL(0xaa38399338aaaae3), LL(0x71a8afdea8717193),
- LL(0xc8cf0ec6cfc8c845), LL(0x197dc8d17d19192b), LL(0x4970723b704949db), LL(0xd99a865f9ad9d976),
- LL(0xf21dc3311df2f20b), LL(0xe3484ba848e3e338), LL(0x5b2ae2b92a5b5bed), LL(0x889234bc92888885),
- LL(0x9ac8a43ec89a9ab3), LL(0x26be2d0bbe26266a), LL(0x32fa8dbffa323256), LL(0xb04ae9594ab0b0cd),
- LL(0xe96a1bf26ae9e926), LL(0x0f337877330f0f11), LL(0xd5a6e633a6d5d562), LL(0x80ba74f4ba80809d),
- LL(0xbe7c99277cbebedf), LL(0xcdde26ebdecdcd4a), LL(0x34e4bd89e434345c), LL(0x48757a32754848d8),
- LL(0xff24ab5424ffff1c), LL(0x7a8ff78d8f7a7a8e), LL(0x90eaf464ea9090ad), LL(0x5f3ec29d3e5f5fe1),
- LL(0x20a01d3da0202060), LL(0x68d5670fd56868b8), LL(0x1a72d0ca721a1a2e), LL(0xae2c19b72caeaeef),
- LL(0xb45ec97d5eb4b4c1), LL(0x54199ace195454fc), LL(0x93e5ec7fe59393a8), LL(0x22aa0d2faa222266),
- LL(0x64e90763e96464ac), LL(0xf112db2a12f1f10e), LL(0x73a2bfcca2737395), LL(0x125a90825a121236),
- LL(0x405d3a7a5d4040c0), LL(0x0828404828080818), LL(0xc3e85695e8c3c358), LL(0xec7b33df7becec29),
- LL(0xdb90964d90dbdb70), LL(0xa11f61c01fa1a1fe), LL(0x8d831c91838d8d8a), LL(0x3dc9f5c8c93d3d47),
- LL(0x97f1cc5bf19797a4), LL(0x0000000000000000), LL(0xcfd436f9d4cfcf4c), LL(0x2b87456e872b2b7d),
- LL(0x76b397e1b376769a), LL(0x82b064e6b082829b), LL(0xd6a9fe28a9d6d667), LL(0x1b77d8c3771b1b2d),
- LL(0xb55bc1745bb5b5c2), LL(0xaf2911be29afafec), LL(0x6adf771ddf6a6abe), LL(0x500dbaea0d5050f0),
- LL(0x454c12574c4545cf), LL(0xf318cb3818f3f308), LL(0x30f09dadf0303050), LL(0xef742bc474efef2c),
- LL(0x3fc3e5dac33f3f41), LL(0x551c92c71c5555ff), LL(0xa21079db10a2a2fb), LL(0xea6503e965eaea23),
- LL(0x65ec0f6aec6565af), LL(0xba68b90368babad3), LL(0x2f93654a932f2f71), LL(0xc0e74e8ee7c0c05d),
- LL(0xde81be6081dede7f), LL(0x1c6ce0fc6c1c1c24), LL(0xfd2ebb462efdfd1a), LL(0x4d64521f644d4dd7),
- LL(0x92e0e476e09292ab), LL(0x75bc8ffabc75759f), LL(0x061e30361e06060a), LL(0x8a9824ae988a8a83),
- LL(0xb240f94b40b2b2cb), LL(0xe659638559e6e637), LL(0x0e36707e360e0e12), LL(0x1f63f8e7631f1f21),
- LL(0x62f73755f76262a6), LL(0xd4a3ee3aa3d4d461), LL(0xa832298132a8a8e5), LL(0x96f4c452f49696a7),
- LL(0xf93a9b623af9f916), LL(0xc5f666a3f6c5c552), LL(0x25b13510b125256f), LL(0x5920f2ab205959eb),
- LL(0x84ae54d0ae848491), LL(0x72a7b7c5a7727296), LL(0x39ddd5ecdd39394b), LL(0x4c615a16614c4cd4),
- LL(0x5e3bca943b5e5ee2), LL(0x7885e79f85787888), LL(0x38d8dde5d8383848), LL(0x8c861498868c8c89),
- LL(0xd1b2c617b2d1d16e), LL(0xa50b41e40ba5a5f2), LL(0xe24d43a14de2e23b), LL(0x61f82f4ef86161a3),
- LL(0xb345f14245b3b3c8), LL(0x21a51534a5212163), LL(0x9cd69408d69c9cb9), LL(0x1e66f0ee661e1e22),
- LL(0x43522261524343c5), LL(0xc7fc76b1fcc7c754), LL(0xfc2bb34f2bfcfc19), LL(0x041420241404040c),
- LL(0x5108b2e3085151f3), LL(0x99c7bc25c79999b6), LL(0x6dc44f22c46d6db7), LL(0x0d396865390d0d17),
- LL(0xfa35837935fafa13), LL(0xdf84b66984dfdf7c), LL(0x7e9bd7a99b7e7e82), LL(0x24b43d19b424246c),
- LL(0x3bd7c5fed73b3b4d), LL(0xab3d319a3dababe0), LL(0xced13ef0d1cece4f), LL(0x1155889955111133),
- LL(0x8f890c83898f8f8c), LL(0x4e6b4a046b4e4ed2), LL(0xb751d16651b7b7c4), LL(0xeb600be060ebeb20),
- LL(0x3cccfdc1cc3c3c44), LL(0x81bf7cfdbf81819e), LL(0x94fed440fe9494a1), LL(0xf70ceb1c0cf7f704),
- LL(0xb967a11867b9b9d6), LL(0x135f988b5f131335), LL(0x2c9c7d519c2c2c74), LL(0xd3b8d605b8d3d368),
- LL(0xe75c6b8c5ce7e734), LL(0x6ecb5739cb6e6eb2), LL(0xc4f36eaaf3c4c451), LL(0x030f181b0f030305),
- LL(0x56138adc135656fa), LL(0x44491a5e494444cc), LL(0x7f9edfa09e7f7f81), LL(0xa937218837a9a9e6),
- LL(0x2a824d67822a2a7e), LL(0xbb6db10a6dbbbbd0), LL(0xc1e24687e2c1c15e), LL(0x5302a2f1025353f5),
- LL(0xdc8bae728bdcdc79), LL(0x0b275853270b0b1d), LL(0x9dd39c01d39d9dba), LL(0x6cc1472bc16c6cb4),
- LL(0x31f595a4f5313153), LL(0x74b987f3b974749c), LL(0xf609e31509f6f607), LL(0x46430a4c434646ca),
- LL(0xac2609a526acace9), LL(0x89973cb597898986), LL(0x1444a0b44414143c), LL(0xe1425bba42e1e13e),
- LL(0x164eb0a64e16163a), LL(0x3ad2cdf7d23a3a4e), LL(0x69d06f06d06969bb), LL(0x092d48412d09091b),
- LL(0x70ada7d7ad707090), LL(0xb654d96f54b6b6c7), LL(0xd0b7ce1eb7d0d06d), LL(0xed7e3bd67eeded2a),
- LL(0xccdb2ee2dbcccc49), LL(0x42572a68574242c6), LL(0x98c2b42cc29898b5), LL(0xa40e49ed0ea4a4f1),
- LL(0x28885d7588282878), LL(0x5c31da86315c5ce4), LL(0xf83f936b3ff8f815), LL(0x86a444c2a4868697),
-};
-
-static const u64 C6[256] = {
- LL(0x281878c0d8781818), LL(0x6523af0526af2323), LL(0x57c6f97eb8f9c6c6), LL(0x25e86f13fb6fe8e8),
- LL(0x9487a14ccba18787), LL(0xd5b862a91162b8b8), LL(0x0301050809050101), LL(0xd14f6e420d6e4f4f),
- LL(0x5a36eead9bee3636), LL(0xf7a60459ff04a6a6), LL(0x6bd2bdde0cbdd2d2), LL(0x02f506fb0e06f5f5),
- LL(0x8b7980ef96807979), LL(0xb16fce5f30ce6f6f), LL(0xae91effc6def9191), LL(0xf65207aaf8075252),
- LL(0xa060fd2747fd6060), LL(0xd9bc76893576bcbc), LL(0xb09bcdac37cd9b9b), LL(0x8f8e8c048a8c8e8e),
- LL(0xf8a31571d215a3a3), LL(0x140c3c606c3c0c0c), LL(0x8d7b8aff848a7b7b), LL(0x5f35e1b580e13535),
- LL(0x271d69e8f5691d1d), LL(0x3de04753b347e0e0), LL(0x64d7acf621acd7d7), LL(0x5bc2ed5e9cedc2c2),
- LL(0x722e966d43962e2e), LL(0xdd4b7a62297a4b4b), LL(0x1ffe21a35d21fefe), LL(0xf9571682d5165757),
- LL(0x3f1541a8bd411515), LL(0x9977b69fe8b67777), LL(0x5937eba592eb3737), LL(0x32e5567b9e56e5e5),
- LL(0xbc9fd98c13d99f9f), LL(0x0df017d32317f0f0), LL(0xde4a7f6a207f4a4a), LL(0x73da959e4495dada),
- LL(0xe85825faa2255858), LL(0x46c9ca06cfcac9c9), LL(0x7b298d557c8d2929), LL(0x1e0a22505a220a0a),
- LL(0xceb14fe1504fb1b1), LL(0xfda01a69c91aa0a0), LL(0xbd6bda7f14da6b6b), LL(0x9285ab5cd9ab8585),
- LL(0xdabd73813c73bdbd), LL(0xe75d34d28f345d5d), LL(0x3010508090501010), LL(0x01f403f30703f4f4),
- LL(0x40cbc016ddc0cbcb), LL(0x423ec6edd3c63e3e), LL(0x0f0511282d110505), LL(0xa967e61f78e66767),
- LL(0x31e453739753e4e4), LL(0x6927bb2502bb2727), LL(0xc341583273584141), LL(0x808b9d2ca79d8b8b),
- LL(0xf4a70151f601a7a7), LL(0x877d94cfb2947d7d), LL(0xa295fbdc49fb9595), LL(0x75d89f8e569fd8d8),
- LL(0x10fb308b7030fbfb), LL(0x2fee7123cd71eeee), LL(0x847c91c7bb917c7c), LL(0xaa66e31771e36666),
- LL(0x7add8ea67b8edddd), LL(0x39174bb8af4b1717), LL(0xc947460245464747), LL(0xbf9edc841adc9e9e),
- LL(0x43cac51ed4c5caca), LL(0x772d997558992d2d), LL(0xdcbf79912e79bfbf), LL(0x09071b383f1b0707),
- LL(0xeaad2301ac23adad), LL(0xee5a2feab02f5a5a), LL(0x9883b56cefb58383), LL(0x5533ff85b6ff3333),
- LL(0xa563f23f5cf26363), LL(0x06020a10120a0202), LL(0xe3aa38399338aaaa), LL(0x9371a8afdea87171),
- LL(0x45c8cf0ec6cfc8c8), LL(0x2b197dc8d17d1919), LL(0xdb4970723b704949), LL(0x76d99a865f9ad9d9),
- LL(0x0bf21dc3311df2f2), LL(0x38e3484ba848e3e3), LL(0xed5b2ae2b92a5b5b), LL(0x85889234bc928888),
- LL(0xb39ac8a43ec89a9a), LL(0x6a26be2d0bbe2626), LL(0x5632fa8dbffa3232), LL(0xcdb04ae9594ab0b0),
- LL(0x26e96a1bf26ae9e9), LL(0x110f337877330f0f), LL(0x62d5a6e633a6d5d5), LL(0x9d80ba74f4ba8080),
- LL(0xdfbe7c99277cbebe), LL(0x4acdde26ebdecdcd), LL(0x5c34e4bd89e43434), LL(0xd848757a32754848),
- LL(0x1cff24ab5424ffff), LL(0x8e7a8ff78d8f7a7a), LL(0xad90eaf464ea9090), LL(0xe15f3ec29d3e5f5f),
- LL(0x6020a01d3da02020), LL(0xb868d5670fd56868), LL(0x2e1a72d0ca721a1a), LL(0xefae2c19b72caeae),
- LL(0xc1b45ec97d5eb4b4), LL(0xfc54199ace195454), LL(0xa893e5ec7fe59393), LL(0x6622aa0d2faa2222),
- LL(0xac64e90763e96464), LL(0x0ef112db2a12f1f1), LL(0x9573a2bfcca27373), LL(0x36125a90825a1212),
- LL(0xc0405d3a7a5d4040), LL(0x1808284048280808), LL(0x58c3e85695e8c3c3), LL(0x29ec7b33df7becec),
- LL(0x70db90964d90dbdb), LL(0xfea11f61c01fa1a1), LL(0x8a8d831c91838d8d), LL(0x473dc9f5c8c93d3d),
- LL(0xa497f1cc5bf19797), LL(0x0000000000000000), LL(0x4ccfd436f9d4cfcf), LL(0x7d2b87456e872b2b),
- LL(0x9a76b397e1b37676), LL(0x9b82b064e6b08282), LL(0x67d6a9fe28a9d6d6), LL(0x2d1b77d8c3771b1b),
- LL(0xc2b55bc1745bb5b5), LL(0xecaf2911be29afaf), LL(0xbe6adf771ddf6a6a), LL(0xf0500dbaea0d5050),
- LL(0xcf454c12574c4545), LL(0x08f318cb3818f3f3), LL(0x5030f09dadf03030), LL(0x2cef742bc474efef),
- LL(0x413fc3e5dac33f3f), LL(0xff551c92c71c5555), LL(0xfba21079db10a2a2), LL(0x23ea6503e965eaea),
- LL(0xaf65ec0f6aec6565), LL(0xd3ba68b90368baba), LL(0x712f93654a932f2f), LL(0x5dc0e74e8ee7c0c0),
- LL(0x7fde81be6081dede), LL(0x241c6ce0fc6c1c1c), LL(0x1afd2ebb462efdfd), LL(0xd74d64521f644d4d),
- LL(0xab92e0e476e09292), LL(0x9f75bc8ffabc7575), LL(0x0a061e30361e0606), LL(0x838a9824ae988a8a),
- LL(0xcbb240f94b40b2b2), LL(0x37e659638559e6e6), LL(0x120e36707e360e0e), LL(0x211f63f8e7631f1f),
- LL(0xa662f73755f76262), LL(0x61d4a3ee3aa3d4d4), LL(0xe5a832298132a8a8), LL(0xa796f4c452f49696),
- LL(0x16f93a9b623af9f9), LL(0x52c5f666a3f6c5c5), LL(0x6f25b13510b12525), LL(0xeb5920f2ab205959),
- LL(0x9184ae54d0ae8484), LL(0x9672a7b7c5a77272), LL(0x4b39ddd5ecdd3939), LL(0xd44c615a16614c4c),
- LL(0xe25e3bca943b5e5e), LL(0x887885e79f857878), LL(0x4838d8dde5d83838), LL(0x898c861498868c8c),
- LL(0x6ed1b2c617b2d1d1), LL(0xf2a50b41e40ba5a5), LL(0x3be24d43a14de2e2), LL(0xa361f82f4ef86161),
- LL(0xc8b345f14245b3b3), LL(0x6321a51534a52121), LL(0xb99cd69408d69c9c), LL(0x221e66f0ee661e1e),
- LL(0xc543522261524343), LL(0x54c7fc76b1fcc7c7), LL(0x19fc2bb34f2bfcfc), LL(0x0c04142024140404),
- LL(0xf35108b2e3085151), LL(0xb699c7bc25c79999), LL(0xb76dc44f22c46d6d), LL(0x170d396865390d0d),
- LL(0x13fa35837935fafa), LL(0x7cdf84b66984dfdf), LL(0x827e9bd7a99b7e7e), LL(0x6c24b43d19b42424),
- LL(0x4d3bd7c5fed73b3b), LL(0xe0ab3d319a3dabab), LL(0x4fced13ef0d1cece), LL(0x3311558899551111),
- LL(0x8c8f890c83898f8f), LL(0xd24e6b4a046b4e4e), LL(0xc4b751d16651b7b7), LL(0x20eb600be060ebeb),
- LL(0x443cccfdc1cc3c3c), LL(0x9e81bf7cfdbf8181), LL(0xa194fed440fe9494), LL(0x04f70ceb1c0cf7f7),
- LL(0xd6b967a11867b9b9), LL(0x35135f988b5f1313), LL(0x742c9c7d519c2c2c), LL(0x68d3b8d605b8d3d3),
- LL(0x34e75c6b8c5ce7e7), LL(0xb26ecb5739cb6e6e), LL(0x51c4f36eaaf3c4c4), LL(0x05030f181b0f0303),
- LL(0xfa56138adc135656), LL(0xcc44491a5e494444), LL(0x817f9edfa09e7f7f), LL(0xe6a937218837a9a9),
- LL(0x7e2a824d67822a2a), LL(0xd0bb6db10a6dbbbb), LL(0x5ec1e24687e2c1c1), LL(0xf55302a2f1025353),
- LL(0x79dc8bae728bdcdc), LL(0x1d0b275853270b0b), LL(0xba9dd39c01d39d9d), LL(0xb46cc1472bc16c6c),
- LL(0x5331f595a4f53131), LL(0x9c74b987f3b97474), LL(0x07f609e31509f6f6), LL(0xca46430a4c434646),
- LL(0xe9ac2609a526acac), LL(0x8689973cb5978989), LL(0x3c1444a0b4441414), LL(0x3ee1425bba42e1e1),
- LL(0x3a164eb0a64e1616), LL(0x4e3ad2cdf7d23a3a), LL(0xbb69d06f06d06969), LL(0x1b092d48412d0909),
- LL(0x9070ada7d7ad7070), LL(0xc7b654d96f54b6b6), LL(0x6dd0b7ce1eb7d0d0), LL(0x2aed7e3bd67eeded),
- LL(0x49ccdb2ee2dbcccc), LL(0xc642572a68574242), LL(0xb598c2b42cc29898), LL(0xf1a40e49ed0ea4a4),
- LL(0x7828885d75882828), LL(0xe45c31da86315c5c), LL(0x15f83f936b3ff8f8), LL(0x9786a444c2a48686),
-};
-
-static const u64 C7[256] = {
- LL(0x18281878c0d87818), LL(0x236523af0526af23), LL(0xc657c6f97eb8f9c6), LL(0xe825e86f13fb6fe8),
- LL(0x879487a14ccba187), LL(0xb8d5b862a91162b8), LL(0x0103010508090501), LL(0x4fd14f6e420d6e4f),
- LL(0x365a36eead9bee36), LL(0xa6f7a60459ff04a6), LL(0xd26bd2bdde0cbdd2), LL(0xf502f506fb0e06f5),
- LL(0x798b7980ef968079), LL(0x6fb16fce5f30ce6f), LL(0x91ae91effc6def91), LL(0x52f65207aaf80752),
- LL(0x60a060fd2747fd60), LL(0xbcd9bc76893576bc), LL(0x9bb09bcdac37cd9b), LL(0x8e8f8e8c048a8c8e),
- LL(0xa3f8a31571d215a3), LL(0x0c140c3c606c3c0c), LL(0x7b8d7b8aff848a7b), LL(0x355f35e1b580e135),
- LL(0x1d271d69e8f5691d), LL(0xe03de04753b347e0), LL(0xd764d7acf621acd7), LL(0xc25bc2ed5e9cedc2),
- LL(0x2e722e966d43962e), LL(0x4bdd4b7a62297a4b), LL(0xfe1ffe21a35d21fe), LL(0x57f9571682d51657),
- LL(0x153f1541a8bd4115), LL(0x779977b69fe8b677), LL(0x375937eba592eb37), LL(0xe532e5567b9e56e5),
- LL(0x9fbc9fd98c13d99f), LL(0xf00df017d32317f0), LL(0x4ade4a7f6a207f4a), LL(0xda73da959e4495da),
- LL(0x58e85825faa22558), LL(0xc946c9ca06cfcac9), LL(0x297b298d557c8d29), LL(0x0a1e0a22505a220a),
- LL(0xb1ceb14fe1504fb1), LL(0xa0fda01a69c91aa0), LL(0x6bbd6bda7f14da6b), LL(0x859285ab5cd9ab85),
- LL(0xbddabd73813c73bd), LL(0x5de75d34d28f345d), LL(0x1030105080905010), LL(0xf401f403f30703f4),
- LL(0xcb40cbc016ddc0cb), LL(0x3e423ec6edd3c63e), LL(0x050f0511282d1105), LL(0x67a967e61f78e667),
- LL(0xe431e453739753e4), LL(0x276927bb2502bb27), LL(0x41c3415832735841), LL(0x8b808b9d2ca79d8b),
- LL(0xa7f4a70151f601a7), LL(0x7d877d94cfb2947d), LL(0x95a295fbdc49fb95), LL(0xd875d89f8e569fd8),
- LL(0xfb10fb308b7030fb), LL(0xee2fee7123cd71ee), LL(0x7c847c91c7bb917c), LL(0x66aa66e31771e366),
- LL(0xdd7add8ea67b8edd), LL(0x1739174bb8af4b17), LL(0x47c9474602454647), LL(0x9ebf9edc841adc9e),
- LL(0xca43cac51ed4c5ca), LL(0x2d772d997558992d), LL(0xbfdcbf79912e79bf), LL(0x0709071b383f1b07),
- LL(0xadeaad2301ac23ad), LL(0x5aee5a2feab02f5a), LL(0x839883b56cefb583), LL(0x335533ff85b6ff33),
- LL(0x63a563f23f5cf263), LL(0x0206020a10120a02), LL(0xaae3aa38399338aa), LL(0x719371a8afdea871),
- LL(0xc845c8cf0ec6cfc8), LL(0x192b197dc8d17d19), LL(0x49db4970723b7049), LL(0xd976d99a865f9ad9),
- LL(0xf20bf21dc3311df2), LL(0xe338e3484ba848e3), LL(0x5bed5b2ae2b92a5b), LL(0x8885889234bc9288),
- LL(0x9ab39ac8a43ec89a), LL(0x266a26be2d0bbe26), LL(0x325632fa8dbffa32), LL(0xb0cdb04ae9594ab0),
- LL(0xe926e96a1bf26ae9), LL(0x0f110f337877330f), LL(0xd562d5a6e633a6d5), LL(0x809d80ba74f4ba80),
- LL(0xbedfbe7c99277cbe), LL(0xcd4acdde26ebdecd), LL(0x345c34e4bd89e434), LL(0x48d848757a327548),
- LL(0xff1cff24ab5424ff), LL(0x7a8e7a8ff78d8f7a), LL(0x90ad90eaf464ea90), LL(0x5fe15f3ec29d3e5f),
- LL(0x206020a01d3da020), LL(0x68b868d5670fd568), LL(0x1a2e1a72d0ca721a), LL(0xaeefae2c19b72cae),
- LL(0xb4c1b45ec97d5eb4), LL(0x54fc54199ace1954), LL(0x93a893e5ec7fe593), LL(0x226622aa0d2faa22),
- LL(0x64ac64e90763e964), LL(0xf10ef112db2a12f1), LL(0x739573a2bfcca273), LL(0x1236125a90825a12),
- LL(0x40c0405d3a7a5d40), LL(0x0818082840482808), LL(0xc358c3e85695e8c3), LL(0xec29ec7b33df7bec),
- LL(0xdb70db90964d90db), LL(0xa1fea11f61c01fa1), LL(0x8d8a8d831c91838d), LL(0x3d473dc9f5c8c93d),
- LL(0x97a497f1cc5bf197), LL(0x0000000000000000), LL(0xcf4ccfd436f9d4cf), LL(0x2b7d2b87456e872b),
- LL(0x769a76b397e1b376), LL(0x829b82b064e6b082), LL(0xd667d6a9fe28a9d6), LL(0x1b2d1b77d8c3771b),
- LL(0xb5c2b55bc1745bb5), LL(0xafecaf2911be29af), LL(0x6abe6adf771ddf6a), LL(0x50f0500dbaea0d50),
- LL(0x45cf454c12574c45), LL(0xf308f318cb3818f3), LL(0x305030f09dadf030), LL(0xef2cef742bc474ef),
- LL(0x3f413fc3e5dac33f), LL(0x55ff551c92c71c55), LL(0xa2fba21079db10a2), LL(0xea23ea6503e965ea),
- LL(0x65af65ec0f6aec65), LL(0xbad3ba68b90368ba), LL(0x2f712f93654a932f), LL(0xc05dc0e74e8ee7c0),
- LL(0xde7fde81be6081de), LL(0x1c241c6ce0fc6c1c), LL(0xfd1afd2ebb462efd), LL(0x4dd74d64521f644d),
- LL(0x92ab92e0e476e092), LL(0x759f75bc8ffabc75), LL(0x060a061e30361e06), LL(0x8a838a9824ae988a),
- LL(0xb2cbb240f94b40b2), LL(0xe637e659638559e6), LL(0x0e120e36707e360e), LL(0x1f211f63f8e7631f),
- LL(0x62a662f73755f762), LL(0xd461d4a3ee3aa3d4), LL(0xa8e5a832298132a8), LL(0x96a796f4c452f496),
- LL(0xf916f93a9b623af9), LL(0xc552c5f666a3f6c5), LL(0x256f25b13510b125), LL(0x59eb5920f2ab2059),
- LL(0x849184ae54d0ae84), LL(0x729672a7b7c5a772), LL(0x394b39ddd5ecdd39), LL(0x4cd44c615a16614c),
- LL(0x5ee25e3bca943b5e), LL(0x78887885e79f8578), LL(0x384838d8dde5d838), LL(0x8c898c861498868c),
- LL(0xd16ed1b2c617b2d1), LL(0xa5f2a50b41e40ba5), LL(0xe23be24d43a14de2), LL(0x61a361f82f4ef861),
- LL(0xb3c8b345f14245b3), LL(0x216321a51534a521), LL(0x9cb99cd69408d69c), LL(0x1e221e66f0ee661e),
- LL(0x43c5435222615243), LL(0xc754c7fc76b1fcc7), LL(0xfc19fc2bb34f2bfc), LL(0x040c041420241404),
- LL(0x51f35108b2e30851), LL(0x99b699c7bc25c799), LL(0x6db76dc44f22c46d), LL(0x0d170d396865390d),
- LL(0xfa13fa35837935fa), LL(0xdf7cdf84b66984df), LL(0x7e827e9bd7a99b7e), LL(0x246c24b43d19b424),
- LL(0x3b4d3bd7c5fed73b), LL(0xabe0ab3d319a3dab), LL(0xce4fced13ef0d1ce), LL(0x1133115588995511),
- LL(0x8f8c8f890c83898f), LL(0x4ed24e6b4a046b4e), LL(0xb7c4b751d16651b7), LL(0xeb20eb600be060eb),
- LL(0x3c443cccfdc1cc3c), LL(0x819e81bf7cfdbf81), LL(0x94a194fed440fe94), LL(0xf704f70ceb1c0cf7),
- LL(0xb9d6b967a11867b9), LL(0x1335135f988b5f13), LL(0x2c742c9c7d519c2c), LL(0xd368d3b8d605b8d3),
- LL(0xe734e75c6b8c5ce7), LL(0x6eb26ecb5739cb6e), LL(0xc451c4f36eaaf3c4), LL(0x0305030f181b0f03),
- LL(0x56fa56138adc1356), LL(0x44cc44491a5e4944), LL(0x7f817f9edfa09e7f), LL(0xa9e6a937218837a9),
- LL(0x2a7e2a824d67822a), LL(0xbbd0bb6db10a6dbb), LL(0xc15ec1e24687e2c1), LL(0x53f55302a2f10253),
- LL(0xdc79dc8bae728bdc), LL(0x0b1d0b275853270b), LL(0x9dba9dd39c01d39d), LL(0x6cb46cc1472bc16c),
- LL(0x315331f595a4f531), LL(0x749c74b987f3b974), LL(0xf607f609e31509f6), LL(0x46ca46430a4c4346),
- LL(0xace9ac2609a526ac), LL(0x898689973cb59789), LL(0x143c1444a0b44414), LL(0xe13ee1425bba42e1),
- LL(0x163a164eb0a64e16), LL(0x3a4e3ad2cdf7d23a), LL(0x69bb69d06f06d069), LL(0x091b092d48412d09),
- LL(0x709070ada7d7ad70), LL(0xb6c7b654d96f54b6), LL(0xd06dd0b7ce1eb7d0), LL(0xed2aed7e3bd67eed),
- LL(0xcc49ccdb2ee2dbcc), LL(0x42c642572a685742), LL(0x98b598c2b42cc298), LL(0xa4f1a40e49ed0ea4),
- LL(0x287828885d758828), LL(0x5ce45c31da86315c), LL(0xf815f83f936b3ff8), LL(0x869786a444c2a486),
-};
-#endif /* OBSOLETE */
-
-static const u64 rc[R + 1] = {
- LL(0x0000000000000000),
- LL(0x1823c6e887b8014f),
- LL(0x36a6d2f5796f9152),
- LL(0x60bc9b8ea30c7b35),
- LL(0x1de0d7c22e4bfe57),
- LL(0x157737e59ff04ada),
- LL(0x58c9290ab1a06b85),
- LL(0xbd5d10f4cb3e0567),
- LL(0xe427418ba77d95d8),
- LL(0xfbee7c66dd17479e),
- LL(0xca2dbf07ad5a8333),
-};
-
-/**
- * The core Whirlpool transform.
- */
-static void
-processBuffer(struct whirlpool_context_t * const structpointer)
-{
- int i, r;
- u64 K[8]; /* the round key */
- u64 block[8]; /* mu(buffer) */
- u64 state[8]; /* the cipher state */
- u64 L[8];
- u8 *buffer = structpointer->buffer;
-
-
- /*
- * map the buffer to a block:
- */
- for (i = 0; i < 8; i++, buffer += 8) {
- block[i] =
- (((u64)buffer[0] ) << 56) ^
- (((u64)buffer[1] & 0xffL) << 48) ^
- (((u64)buffer[2] & 0xffL) << 40) ^
- (((u64)buffer[3] & 0xffL) << 32) ^
- (((u64)buffer[4] & 0xffL) << 24) ^
- (((u64)buffer[5] & 0xffL) << 16) ^
- (((u64)buffer[6] & 0xffL) << 8) ^
- (((u64)buffer[7] & 0xffL) );
- }
- /*
- * compute and apply K^0 to the cipher state:
- */
- state[0] = block[0] ^ (K[0] = structpointer->hash[0]);
- state[1] = block[1] ^ (K[1] = structpointer->hash[1]);
- state[2] = block[2] ^ (K[2] = structpointer->hash[2]);
- state[3] = block[3] ^ (K[3] = structpointer->hash[3]);
- state[4] = block[4] ^ (K[4] = structpointer->hash[4]);
- state[5] = block[5] ^ (K[5] = structpointer->hash[5]);
- state[6] = block[6] ^ (K[6] = structpointer->hash[6]);
- state[7] = block[7] ^ (K[7] = structpointer->hash[7]);
- /*
- * iterate over all rounds:
- */
- for (r = 1; r <= R; r++) {
- /*
- * compute K^r from K^{r-1}:
- */
- L[0] =
- C0[(int)(K[0] >> 56) ] ^
- C1[(int)(K[7] >> 48) & 0xff] ^
- C2[(int)(K[6] >> 40) & 0xff] ^
- C3[(int)(K[5] >> 32) & 0xff] ^
- C4[(int)(K[4] >> 24) & 0xff] ^
- C5[(int)(K[3] >> 16) & 0xff] ^
- C6[(int)(K[2] >> 8) & 0xff] ^
- C7[(int)(K[1] ) & 0xff] ^
- rc[r];
- L[1] =
- C0[(int)(K[1] >> 56) ] ^
- C1[(int)(K[0] >> 48) & 0xff] ^
- C2[(int)(K[7] >> 40) & 0xff] ^
- C3[(int)(K[6] >> 32) & 0xff] ^
- C4[(int)(K[5] >> 24) & 0xff] ^
- C5[(int)(K[4] >> 16) & 0xff] ^
- C6[(int)(K[3] >> 8) & 0xff] ^
- C7[(int)(K[2] ) & 0xff];
- L[2] =
- C0[(int)(K[2] >> 56) ] ^
- C1[(int)(K[1] >> 48) & 0xff] ^
- C2[(int)(K[0] >> 40) & 0xff] ^
- C3[(int)(K[7] >> 32) & 0xff] ^
- C4[(int)(K[6] >> 24) & 0xff] ^
- C5[(int)(K[5] >> 16) & 0xff] ^
- C6[(int)(K[4] >> 8) & 0xff] ^
- C7[(int)(K[3] ) & 0xff];
- L[3] =
- C0[(int)(K[3] >> 56) ] ^
- C1[(int)(K[2] >> 48) & 0xff] ^
- C2[(int)(K[1] >> 40) & 0xff] ^
- C3[(int)(K[0] >> 32) & 0xff] ^
- C4[(int)(K[7] >> 24) & 0xff] ^
- C5[(int)(K[6] >> 16) & 0xff] ^
- C6[(int)(K[5] >> 8) & 0xff] ^
- C7[(int)(K[4] ) & 0xff];
- L[4] =
- C0[(int)(K[4] >> 56) ] ^
- C1[(int)(K[3] >> 48) & 0xff] ^
- C2[(int)(K[2] >> 40) & 0xff] ^
- C3[(int)(K[1] >> 32) & 0xff] ^
- C4[(int)(K[0] >> 24) & 0xff] ^
- C5[(int)(K[7] >> 16) & 0xff] ^
- C6[(int)(K[6] >> 8) & 0xff] ^
- C7[(int)(K[5] ) & 0xff];
- L[5] =
- C0[(int)(K[5] >> 56) ] ^
- C1[(int)(K[4] >> 48) & 0xff] ^
- C2[(int)(K[3] >> 40) & 0xff] ^
- C3[(int)(K[2] >> 32) & 0xff] ^
- C4[(int)(K[1] >> 24) & 0xff] ^
- C5[(int)(K[0] >> 16) & 0xff] ^
- C6[(int)(K[7] >> 8) & 0xff] ^
- C7[(int)(K[6] ) & 0xff];
- L[6] =
- C0[(int)(K[6] >> 56) ] ^
- C1[(int)(K[5] >> 48) & 0xff] ^
- C2[(int)(K[4] >> 40) & 0xff] ^
- C3[(int)(K[3] >> 32) & 0xff] ^
- C4[(int)(K[2] >> 24) & 0xff] ^
- C5[(int)(K[1] >> 16) & 0xff] ^
- C6[(int)(K[0] >> 8) & 0xff] ^
- C7[(int)(K[7] ) & 0xff];
- L[7] =
- C0[(int)(K[7] >> 56) ] ^
- C1[(int)(K[6] >> 48) & 0xff] ^
- C2[(int)(K[5] >> 40) & 0xff] ^
- C3[(int)(K[4] >> 32) & 0xff] ^
- C4[(int)(K[3] >> 24) & 0xff] ^
- C5[(int)(K[2] >> 16) & 0xff] ^
- C6[(int)(K[1] >> 8) & 0xff] ^
- C7[(int)(K[0] ) & 0xff];
- K[0] = L[0];
- K[1] = L[1];
- K[2] = L[2];
- K[3] = L[3];
- K[4] = L[4];
- K[5] = L[5];
- K[6] = L[6];
- K[7] = L[7];
- /*
- * apply the r-th round transformation:
- */
- L[0] =
- C0[(int)(state[0] >> 56) ] ^
- C1[(int)(state[7] >> 48) & 0xff] ^
- C2[(int)(state[6] >> 40) & 0xff] ^
- C3[(int)(state[5] >> 32) & 0xff] ^
- C4[(int)(state[4] >> 24) & 0xff] ^
- C5[(int)(state[3] >> 16) & 0xff] ^
- C6[(int)(state[2] >> 8) & 0xff] ^
- C7[(int)(state[1] ) & 0xff] ^
- K[0];
- L[1] =
- C0[(int)(state[1] >> 56) ] ^
- C1[(int)(state[0] >> 48) & 0xff] ^
- C2[(int)(state[7] >> 40) & 0xff] ^
- C3[(int)(state[6] >> 32) & 0xff] ^
- C4[(int)(state[5] >> 24) & 0xff] ^
- C5[(int)(state[4] >> 16) & 0xff] ^
- C6[(int)(state[3] >> 8) & 0xff] ^
- C7[(int)(state[2] ) & 0xff] ^
- K[1];
- L[2] =
- C0[(int)(state[2] >> 56) ] ^
- C1[(int)(state[1] >> 48) & 0xff] ^
- C2[(int)(state[0] >> 40) & 0xff] ^
- C3[(int)(state[7] >> 32) & 0xff] ^
- C4[(int)(state[6] >> 24) & 0xff] ^
- C5[(int)(state[5] >> 16) & 0xff] ^
- C6[(int)(state[4] >> 8) & 0xff] ^
- C7[(int)(state[3] ) & 0xff] ^
- K[2];
- L[3] =
- C0[(int)(state[3] >> 56) ] ^
- C1[(int)(state[2] >> 48) & 0xff] ^
- C2[(int)(state[1] >> 40) & 0xff] ^
- C3[(int)(state[0] >> 32) & 0xff] ^
- C4[(int)(state[7] >> 24) & 0xff] ^
- C5[(int)(state[6] >> 16) & 0xff] ^
- C6[(int)(state[5] >> 8) & 0xff] ^
- C7[(int)(state[4] ) & 0xff] ^
- K[3];
- L[4] =
- C0[(int)(state[4] >> 56) ] ^
- C1[(int)(state[3] >> 48) & 0xff] ^
- C2[(int)(state[2] >> 40) & 0xff] ^
- C3[(int)(state[1] >> 32) & 0xff] ^
- C4[(int)(state[0] >> 24) & 0xff] ^
- C5[(int)(state[7] >> 16) & 0xff] ^
- C6[(int)(state[6] >> 8) & 0xff] ^
- C7[(int)(state[5] ) & 0xff] ^
- K[4];
- L[5] =
- C0[(int)(state[5] >> 56) ] ^
- C1[(int)(state[4] >> 48) & 0xff] ^
- C2[(int)(state[3] >> 40) & 0xff] ^
- C3[(int)(state[2] >> 32) & 0xff] ^
- C4[(int)(state[1] >> 24) & 0xff] ^
- C5[(int)(state[0] >> 16) & 0xff] ^
- C6[(int)(state[7] >> 8) & 0xff] ^
- C7[(int)(state[6] ) & 0xff] ^
- K[5];
- L[6] =
- C0[(int)(state[6] >> 56) ] ^
- C1[(int)(state[5] >> 48) & 0xff] ^
- C2[(int)(state[4] >> 40) & 0xff] ^
- C3[(int)(state[3] >> 32) & 0xff] ^
- C4[(int)(state[2] >> 24) & 0xff] ^
- C5[(int)(state[1] >> 16) & 0xff] ^
- C6[(int)(state[0] >> 8) & 0xff] ^
- C7[(int)(state[7] ) & 0xff] ^
- K[6];
- L[7] =
- C0[(int)(state[7] >> 56) ] ^
- C1[(int)(state[6] >> 48) & 0xff] ^
- C2[(int)(state[5] >> 40) & 0xff] ^
- C3[(int)(state[4] >> 32) & 0xff] ^
- C4[(int)(state[3] >> 24) & 0xff] ^
- C5[(int)(state[2] >> 16) & 0xff] ^
- C6[(int)(state[1] >> 8) & 0xff] ^
- C7[(int)(state[0] ) & 0xff] ^
- K[7];
- state[0] = L[0];
- state[1] = L[1];
- state[2] = L[2];
- state[3] = L[3];
- state[4] = L[4];
- state[5] = L[5];
- state[6] = L[6];
- state[7] = L[7];
- }
- /*
- * apply the Miyaguchi-Preneel compression function:
- */
- structpointer->hash[0] ^= state[0] ^ block[0];
- structpointer->hash[1] ^= state[1] ^ block[1];
- structpointer->hash[2] ^= state[2] ^ block[2];
- structpointer->hash[3] ^= state[3] ^ block[3];
- structpointer->hash[4] ^= state[4] ^ block[4];
- structpointer->hash[5] ^= state[5] ^ block[5];
- structpointer->hash[6] ^= state[6] ^ block[6];
- structpointer->hash[7] ^= state[7] ^ block[7];
-}
-
-/**
- * Initialize the hashing state.
- */
-void
-whirlpool_init(struct whirlpool_context_t *structpointer)
-{
- int i;
-
- memset(structpointer->bitLength, 0, 32);
- structpointer->bufferBits = structpointer->bufferPos = 0;
- structpointer->buffer[0] = 0; /* it's only necessary to cleanup buffer[bufferPos] */
- for (i = 0; i < 8; i++) {
- structpointer->hash[i] = 0L; /* initial value */
- }
-}
-
-/**
- * Delivers input data to the hashing algorithm.
- *
- * @param source plaintext data to hash.
- * @param sourceBits how many bits of plaintext to process.
- *
- * This method maintains the invariant: bufferBits < WHIRLPOOL_DIGEST_BITS
- */
-void
-whirlpool_update(whirlpool_context_t *structpointer, const unsigned char *source, unsigned int sourceBytes)
-{
- /*
- sourcePos
- |
- +-------+-------+-------
- ||||||||||||||||||||| source
- +-------+-------+-------
- +-------+-------+-------+-------+-------+-------
- |||||||||||||||||||||| buffer
- +-------+-------+-------+-------+-------+-------
- |
- bufferPos
- */
- int64_t sourceBits = sourceBytes * 8;
- int sourcePos = 0; /* index of leftmost source u8 containing data (1 to 8 bits). */
- int sourceGap = (8 - ((int)sourceBits & 7)) & 7; /* space on source[sourcePos]. */
- int bufferRem = structpointer->bufferBits & 7; /* occupied bits on buffer[bufferPos]. */
- int i;
- u32 b, carry;
- u8 *buffer = structpointer->buffer;
- u8 *bitLength = structpointer->bitLength;
- int bufferBits = structpointer->bufferBits;
- int bufferPos = structpointer->bufferPos;
-
- /*
- * tally the length of the added data:
- */
- u64 value = sourceBits;
- for (i = 31, carry = 0; i >= 0 && (carry != 0 || value != LL(0)); i--) {
- carry += bitLength[i] + ((u32)value & 0xff);
- bitLength[i] = (u8)carry;
- carry >>= 8;
- value >>= 8;
- }
- /*
- * process data in chunks of 8 bits (a more efficient approach would be to take whole-word chunks):
- */
- while (sourceBits > 8) {
- /* N.B. at least source[sourcePos] and source[sourcePos+1] contain data. */
- /*
- * take a byte from the source:
- */
- b = ((source[sourcePos] << sourceGap) & 0xff) |
- ((source[sourcePos + 1] & 0xff) >> (8 - sourceGap));
- /*
- * process this byte:
- */
- buffer[bufferPos++] |= (u8)(b >> bufferRem);
- bufferBits += 8 - bufferRem; /* bufferBits = 8*bufferPos; */
- if (bufferBits == WHIRLPOOL_DIGEST_BITS) {
- /*
- * process data block:
- */
- processBuffer(structpointer);
- /*
- * reset buffer:
- */
- bufferBits = bufferPos = 0;
- }
- buffer[bufferPos] = b << (8 - bufferRem);
- bufferBits += bufferRem;
- /*
- * proceed to remaining data:
- */
- sourceBits -= 8;
- sourcePos++;
- }
- /* now 0 <= sourceBits <= 8;
- * furthermore, all data (if any is left) is in source[sourcePos].
- */
- if (sourceBits > 0) {
- b = (source[sourcePos] << sourceGap) & 0xff; /* bits are left-justified on b. */
- /*
- * process the remaining bits:
- */
- buffer[bufferPos] |= b >> bufferRem;
- } else {
- b = 0;
- }
- if (bufferRem + sourceBits < 8) {
- /*
- * all remaining data fits on buffer[bufferPos],
- * and there still remains some space.
- */
- bufferBits += sourceBits;
- } else {
- /*
- * buffer[bufferPos] is full:
- */
- bufferPos++;
- bufferBits += 8 - bufferRem; /* bufferBits = 8*bufferPos; */
- sourceBits -= 8 - bufferRem;
- /* now 0 <= sourceBits < 8;
- * furthermore, all data (if any is left) is in source[sourcePos].
- */
- if (bufferBits == WHIRLPOOL_DIGEST_BITS) {
- /*
- * process data block:
- */
- processBuffer(structpointer);
- /*
- * reset buffer:
- */
- bufferBits = bufferPos = 0;
- }
- buffer[bufferPos] = b << (8 - bufferRem);
- bufferBits += (int)sourceBits;
- }
- structpointer->bufferBits = bufferBits;
- structpointer->bufferPos = bufferPos;
-}
-
-/**
- * Get the hash value from the hashing state.
- *
- * This method uses the invariant: bufferBits < WHIRLPOOL_DIGEST_BITS
- */
-static void
-whirlpool_finalize(unsigned char *result, whirlpool_context_t *structpointer)
-{
- int i;
- u8 *buffer = structpointer->buffer;
- u8 *bitLength = structpointer->bitLength;
- int bufferBits = structpointer->bufferBits;
- int bufferPos = structpointer->bufferPos;
- u8 *digest = result;
-
- /*
- * append a '1'-bit:
- */
- buffer[bufferPos] |= 0x80U >> (bufferBits & 7);
- bufferPos++; /* all remaining bits on the current u8 are set to zero. */
- /*
- * pad with zero bits to complete (N*WHIRLPOOL_WBLOCK_BITS - WHIRLPOOL_LENGTH_BITS) bits:
- */
- if (bufferPos > WHIRLPOOL_WBLOCK_BYTES - WHIRLPOOL_LENGTH_BYTES) {
- if (bufferPos < WHIRLPOOL_WBLOCK_BYTES) {
- memset(&buffer[bufferPos], 0, WHIRLPOOL_WBLOCK_BYTES - bufferPos);
- }
- /*
- * process data block:
- */
- processBuffer(structpointer);
- /*
- * reset buffer:
- */
- bufferPos = 0;
- }
- if (bufferPos < WHIRLPOOL_WBLOCK_BYTES - WHIRLPOOL_LENGTH_BYTES) {
- memset(&buffer[bufferPos], 0, (WHIRLPOOL_WBLOCK_BYTES - WHIRLPOOL_LENGTH_BYTES) - bufferPos);
- }
- bufferPos = WHIRLPOOL_WBLOCK_BYTES - WHIRLPOOL_LENGTH_BYTES;
- /*
- * append bit length of hashed data:
- */
- memcpy(&buffer[WHIRLPOOL_WBLOCK_BYTES - WHIRLPOOL_LENGTH_BYTES], bitLength, WHIRLPOOL_LENGTH_BYTES);
- /*
- * process data block:
- */
- processBuffer(structpointer);
- /*
- * return the completed message digest:
- */
- for (i = 0; i < WHIRLPOOL_DIGEST_BYTES/8; i++) {
- digest[0] = (u8)(structpointer->hash[i] >> 56);
- digest[1] = (u8)(structpointer->hash[i] >> 48);
- digest[2] = (u8)(structpointer->hash[i] >> 40);
- digest[3] = (u8)(structpointer->hash[i] >> 32);
- digest[4] = (u8)(structpointer->hash[i] >> 24);
- digest[5] = (u8)(structpointer->hash[i] >> 16);
- digest[6] = (u8)(structpointer->hash[i] >> 8);
- digest[7] = (u8)(structpointer->hash[i] );
- digest += 8;
- }
- structpointer->bufferBits = bufferBits;
- structpointer->bufferPos = bufferPos;
-
-}
-
-static void
-print_uint64(char *buf, uint64_t val)
-{
- int i = 0;
- static const char hexdigits[] = "0123456789abcdef";
-
- for (i = 0; i < 8; ++i) {
- buf[2 * i] = hexdigits[(val >> (56 - 8 * i + 4)) & 15];
- buf[2 * i + 1] = hexdigits[(val >> (56 - 8 * i)) & 15];
- }
-}
-
-char *
-whirlpool_end(whirlpool_context_t *tp, char *buf)
-{
- int i;
-
- if (buf == NULL && (buf = malloc((2 * WHIRLPOOL_DIGEST_BYTES) + 1)) == NULL) {
- return NULL;
- }
-
- whirlpool_finalize(buf, tp);
-
- for (i = 0; i < 8; ++i)
- print_uint64(buf + i * 16, tp->hash[i]);
- buf[16 * i] = '\0';
-
- return buf;
-}
-
-#if 0
-static void
-display(const u8 array[], int length)
-{
- int i;
- for (i = 0; i < length; i++) {
- printf("%02X", array[i]);
- }
-}
-#endif
-
-char *
-whirlpool_file(char *filename, char *buf)
-{
- whirlpool_context_t ctx;
- uint8_t buffer[BUFSIZ];
- int fd;
- int num;
- int oerrno;
-
- whirlpool_init(&ctx);
-
- if ((fd = open(filename, O_RDONLY)) < 0) {
- return 0;
- }
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0) {
- whirlpool_update(&ctx, buffer, (size_t)num);
- }
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
-
- return (num < 0) ? 0 : whirlpool_end(&ctx, buf);
-}
-
-#ifdef WHIRLPOOL_MAIN
-
-#define LONG_ITERATION 100000000
-
-/**
- * Generate the test vector set for Whirlpool.
- *
- * The test consists of:
- * 1. hashing all bit strings containing only zero bits
- * for all lengths from 0 to 1023;
- * 2. hashing all 512-bit strings containing a single set bit;
- * 3. the iterated hashing of the 512-bit string of zero bits a large number of times.
- */
-#if 0
-static void
-makeNESSIETestVectors(void)
-{
- int i;
- struct whirlpool_context_t w;
- u8 digest[WHIRLPOOL_DIGEST_BYTES];
- u8 data[128];
-
- memset(data, 0, sizeof(data));
- printf("Message digests of strings of 0-bits and length L:\n");
- for (i = 0; i < 1024; i++) {
- whirlpool_init(&w);
- whirlpool_update(&w, data, i);
- printf(" L = %4d: %s\n", i, whirlpool_end(&w, digest));
- }
- printf("Message digests of all 512-bit strings S containing a single 1-bit:\n");
- memset(data, 0, sizeof(data));
- for (i = 0; i < 512; i++) {
- /* set bit i: */
- data[i/8] |= 0x80U >> (i % 8);
- whirlpool_init(&w);
- whirlpool_update(&w, data, 512);
- whirlpool_finalize(digest, &w);
- printf(" S = "); display(data, 512/8); printf(": ");
- display(digest, WHIRLPOOL_DIGEST_BYTES); printf("\n");
- /* reset bit i: */
- data[i/8] = 0;
- }
- memset(digest, 0, sizeof(digest));
- for (i = 0; i < LONG_ITERATION; i++) {
- whirlpool_init(&w);
- whirlpool_update(&w, digest, 512);
- }
- fflush(stdout);
- printf("Iterated message digest computation (%d times): %s\n", LONG_ITERATION, whirlpool_end(&w, digest));
-}
-#endif
-
-#if 0
-static void
-testAPI(void)
-{
- u32 pieceLen, totalLen, dataLen;
- whirlpool_context_t w;
- u8 dataBuf[512], expectedDigest[WHIRLPOOL_DIGEST_BYTES], computedDigest[WHIRLPOOL_DIGEST_BYTES];
-
- for (dataLen = 0; dataLen <= sizeof(dataBuf); dataLen++) {
- if ((dataLen & 0xff) == 0) {
- fprintf(stderr, "."); fflush(stderr);
- }
- /*
- * do the hashing in pieces of variable length:
- */
- whirlpool_init(&w);
- whirlpool_update(&w, dataBuf, dataLen);
- whirlpool_finalize(expectedDigest, &w);
- if (dataLen > 0) {
- for (pieceLen = 1; pieceLen <= dataLen; pieceLen++) {
- whirlpool_init(&w);
- for (totalLen = 0; totalLen + pieceLen <= dataLen; totalLen += pieceLen) {
- whirlpool_update(&w, dataBuf + totalLen, pieceLen);
- }
- if (totalLen < dataLen) {
- whirlpool_update(&w, dataBuf + totalLen, (dataLen - totalLen));
- }
- whirlpool_finalize(computedDigest, &w);
- if (memcmp(computedDigest, expectedDigest, WHIRLPOOL_DIGEST_BYTES) != 0) {
- fprintf(stderr, "API error @ pieceLen = %u\n%s\n\n", pieceLen, whirlpool_end(&w, computedDigest)); display(expectedDigest, WHIRLPOOL_DIGEST_BYTES); printf("\n\n");
- return;
- }
- }
- } else {
- whirlpool_init(&w);
- whirlpool_finalize(computedDigest, &w);
- if (memcmp(computedDigest, expectedDigest, WHIRLPOOL_DIGEST_BYTES) != 0) {
- fprintf(stderr, "API error @ pieceLen = 0\n");
- return;
- }
- }
- }
- printf("No error detected.\n");
-}
-#endif
-
-static void
-makeISOTestVectors(void)
-{
- struct whirlpool_context_t w;
- u8 digest[2 * WHIRLPOOL_DIGEST_BYTES + 1];
- static u8 data[1000000];
-
- memset(data, 0, sizeof(data));
-
- printf("1. In this example the data-string is the empty string, i.e. the string of length zero.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, data, 0);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
-
- printf("2. In this example the data-string consists of a single byte, namely the ASCII-coded version of the letter 'a'.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, "a", 1);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
-
- printf("3. In this example the data-string is the three-byte string consisting of the ASCII-coded version of 'abc'.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, "abc", 3);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
-
- printf("4. In this example the data-string is the 14-byte string consisting of the ASCII-coded version of 'message digest'.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, "message digest", 14);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
-
- printf("5. In this example the data-string is the 26-byte string consisting of the ASCII-coded version of 'abcdefghijklmnopqrstuvwxyz'.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, "abcdefghijklmnopqrstuvwxyz", 26);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
-
- printf("6. In this example the data-string is the 62-byte string consisting of the ASCII-coded version of 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 62);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
-
- printf("7. In this example the data-string is the 80-byte string consisting of the ASCII-coded version of eight repetitions of '1234567890'.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", 80);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
-
- printf("8. In this example the data-string is the 32-byte string consisting of the ASCII-coded version of 'abcdbcdecdefdefgefghfghighijhijk'.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, "abcdbcdecdefdefgefghfghighijhijk", 32);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
- fflush(stdout);
-
- memset(data, 'a', 1000000);
- printf("9. In this example the data-string is the 1000000-byte string consisting of the ASCII-coded version of 'a' repeated 10^6 times.\n\n");
- whirlpool_init(&w);
- whirlpool_update(&w, data, 1000000);
- printf("The hash-code is the following 512-bit string.\n\n%s\n\n", whirlpool_end(&w, digest));
- fflush(stdout);
-
- printf("\n");
- fflush(stdout);
-}
-
-
-int
-main(int argc, char *argv[])
-{
- /* testAPI(); */
- /* makeNESSIETestVectors(); */
- makeISOTestVectors();
- /* timing(); */
- return 0;
-}
-
-#endif /* WHIRLPOOL_MAIN */
diff --git a/pkgtools/digest/files/whirlpool.h b/pkgtools/digest/files/whirlpool.h
deleted file mode 100644
index b9f61ec3362..00000000000
--- a/pkgtools/digest/files/whirlpool.h
+++ /dev/null
@@ -1,133 +0,0 @@
-#ifndef PORTABLE_C__
-#define PORTABLE_C__
-
-#include <limits.h>
-
-/* Definition of minimum-width integer types
- *
- * u8 -> unsigned integer type, at least 8 bits, equivalent to unsigned char
- * u16 -> unsigned integer type, at least 16 bits
- * u32 -> unsigned integer type, at least 32 bits
- *
- * s8, s16, s32 -> signed counterparts of u8, u16, u32
- *
- * Always use macro's T8(), T16() or T32() to obtain exact-width results,
- * i.e., to specify the size of the result of each expression.
- */
-
-typedef signed char s8;
-typedef unsigned char u8;
-
-#if UINT_MAX >= 4294967295UL
-
-typedef signed short s16;
-typedef signed int s32;
-typedef unsigned short u16;
-typedef unsigned int u32;
-
-#define ONE32 0xffffffffU
-
-#else
-
-typedef signed int s16;
-typedef signed long s32;
-typedef unsigned int u16;
-typedef unsigned long u32;
-
-#define ONE32 0xffffffffUL
-
-#endif
-
-#define ONE8 0xffU
-#define ONE16 0xffffU
-
-#define T8(x) ((x) & ONE8)
-#define T16(x) ((x) & ONE16)
-#define T32(x) ((x) & ONE32)
-
-#ifdef _MSC_VER
-typedef unsigned __int64 u64;
-typedef signed __int64 s64;
-#define LL(v) (v##i64)
-#define ONE64 LL(0xffffffffffffffff)
-#else /* !_MSC_VER */
-typedef unsigned long long u64;
-typedef signed long long s64;
-#define LL(v) (v##ULL)
-#define ONE64 LL(0xffffffffffffffff)
-#endif /* ?_MSC_VER */
-#define T64(x) ((x) & ONE64)
-#define ROTR64(v, n) (((v) >> (n)) | T64((v) << (64 - (n))))
-/*
- * Note: the test is used to detect native 64-bit architectures;
- * if the unsigned long is strictly greater than 32-bit, it is
- * assumed to be at least 64-bit. This will not work correctly
- * on (old) 36-bit architectures (PDP-11 for instance).
- *
- * On non-64-bit architectures, "long long" is used.
- */
-
-/*
- * U8TO32_BIG(c) returns the 32-bit value stored in big-endian convention
- * in the unsigned char array pointed to by c.
- */
-#define U8TO32_BIG(c) (((u32)T8(*(c)) << 24) | ((u32)T8(*((c) + 1)) << 16) | ((u32)T8(*((c) + 2)) << 8) | ((u32)T8(*((c) + 3))))
-
-/*
- * U8TO32_LITTLE(c) returns the 32-bit value stored in little-endian convention
- * in the unsigned char array pointed to by c.
- */
-#define U8TO32_LITTLE(c) (((u32)T8(*(c))) | ((u32)T8(*((c) + 1)) << 8) | (u32)T8(*((c) + 2)) << 16) | ((u32)T8(*((c) + 3)) << 24))
-
-/*
- * U8TO32_BIG(c, v) stores the 32-bit-value v in big-endian convention
- * into the unsigned char array pointed to by c.
- */
-#define U32TO8_BIG(c, v) do { u32 x = (v); u8 *d = (c); d[0] = T8(x >> 24); d[1] = T8(x >> 16); d[2] = T8(x >> 8); d[3] = T8(x); } while (0)
-
-/*
- * U8TO32_LITTLE(c, v) stores the 32-bit-value v in little-endian convention
- * into the unsigned char array pointed to by c.
- */
-#define U32TO8_LITTLE(c, v) do { u32 x = (v); u8 *d = (c); d[0] = T8(x); d[1] = T8(x >> 8); d[2] = T8(x >> 16); d[3] = T8(x >> 24); } while (0)
-
-/*
- * ROTL32(v, n) returns the value of the 32-bit unsigned value v after
- * a rotation of n bits to the left. It might be replaced by the appropriate
- * architecture-specific macro.
- *
- * It evaluates v and n twice.
- *
- * The compiler might emit a warning if n is the constant 0. The result
- * is undefined if n is greater than 31.
- */
-#define ROTL32(v, n) (T32((v) << (n)) | ((v) >> (32 - (n))))
-
-/*
- * Whirlpool-specific definitions.
- */
-
-#define WHIRLPOOL_DIGEST_BYTES 64
-#define WHIRLPOOL_DIGEST_BITS (8*WHIRLPOOL_DIGEST_BYTES) /* 512 */
-
-#define WHIRLPOOL_WBLOCK_BYTES 64
-#define WHIRLPOOL_WBLOCK_BITS (8*WHIRLPOOL_WBLOCK_BYTES) /* 512 */
-
-#define WHIRLPOOL_LENGTH_BYTES 32
-#define WHIRLPOOL_LENGTH_BITS (8*WHIRLPOOL_LENGTH_BYTES) /* 256 */
-
-typedef struct whirlpool_context_t {
- u8 bitLength[WHIRLPOOL_LENGTH_BYTES]; /* global number of hashed bits (256-bit counter) */
- u8 buffer[WHIRLPOOL_WBLOCK_BYTES]; /* buffer of data to hash */
- int bufferBits; /* current number of bits on the buffer */
- int bufferPos; /* current (possibly incomplete) byte slot on the buffer */
- u64 hash[WHIRLPOOL_DIGEST_BYTES/8]; /* the hashing state */
-} whirlpool_context_t;
-
-void whirlpool_init(whirlpool_context_t *);
-void whirlpool_update(whirlpool_context_t *, const unsigned char *, unsigned int);
-char *whirlpool_end(whirlpool_context_t *, char *);
-char *whirlpool_file(char *, char *);
-
-#endif /* PORTABLE_C__ */
-
diff --git a/pkgtools/genrpm/DESCR b/pkgtools/genrpm/DESCR
deleted file mode 100644
index 7b796c3d930..00000000000
--- a/pkgtools/genrpm/DESCR
+++ /dev/null
@@ -1,8 +0,0 @@
-This package installs a script called genrpm, which is used to
-generate a Redhat Package Manager (RPM) package from an installed
-pkgsrc package. It does this by generating a spec file, and using
-that to identify the components of the RPM and package them.
-
-If a pkgsrc tree is present on the system, a source RPM (or srpm)
-can also be generated. This will include the distfile, any pkgsrc
-patches, and the files used to accomplish the pkgsrc packaging.
diff --git a/pkgtools/genrpm/Makefile b/pkgtools/genrpm/Makefile
deleted file mode 100644
index 02a10ae8991..00000000000
--- a/pkgtools/genrpm/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# $NetBSD: Makefile,v 1.4 2007/02/22 19:27:02 wiz Exp $
-
-DISTNAME= genrpm-1.0
-PKGREVISION= 1
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= agc@NetBSD.org
-HOMEPAGE= http://www.pkgsrc.org/
-COMMENT= Generate an RPM package from an installed pkgsrc package
-
-DEPENDS+= pkg_tarup-[0-9]*:../../pkgtools/pkg_tarup
-DEPENDS+= rpm-[0-9]*:../../misc/rpm
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-
-INSTALLATION_DIRS= ${PKGMANDIR}/cat8 ${PKGMANDIR}/man8 sbin
-
-.include "../../mk/bsd.prefs.mk"
-
-do-build:
- @for f in genrpm genrpm.8 genrpm.0; do \
- ${SED} -e 's|@PKGSRCDIR@|${PKGSRCDIR}|g' \
- -e 's|@SH@|${SH}|g' \
- ${FILESDIR}/$$f > ${WRKSRC}/$$f; \
- done
-.if ${OPSYS} == "SunOS" || ${OPSYS} == "AIX"
- # pre-created man-pages are "mandoc" pages, these OS need "man",
- # so regen the .0 page
- nroff -man ${WRKSRC}/genrpm.8 >${WRKSRC}/genrpm.0
-.endif
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/genrpm ${PREFIX}/sbin
- ${INSTALL_MAN} ${WRKSRC}/genrpm.0 ${PREFIX}/${PKGMANDIR}/cat8
- ${INSTALL_MAN} ${WRKSRC}/genrpm.8 ${PREFIX}/${PKGMANDIR}/man8
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/genrpm/PLIST b/pkgtools/genrpm/PLIST
deleted file mode 100644
index cc5ff676cac..00000000000
--- a/pkgtools/genrpm/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2005/04/20 09:36:00 agc Exp $
-man/cat8/genrpm.0
-man/man8/genrpm.8
-sbin/genrpm
diff --git a/pkgtools/genrpm/files/genrpm b/pkgtools/genrpm/files/genrpm
deleted file mode 100644
index 9b6bdbdd134..00000000000
--- a/pkgtools/genrpm/files/genrpm
+++ /dev/null
@@ -1,306 +0,0 @@
-#! @SH@
-
-# $NetBSD: genrpm,v 1.1.1.1 2005/04/20 09:36:00 agc Exp $
-
-#
-# Copyright © 2005 Alistair G. Crooks. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Alistair G. Crooks
-# 4. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# small shell script to convert from an installed NetBSD package to an rpm
-#
-# Usage: pkg2rpm [--distdir=distdir] [--objdir=objdir] [--rpmdir=rpmdir] [--srpmdir=srpmdir] [--sign] [-s] [-v] pkgname
-
-# find a program and set a global variable with its path
-check_prog()
-{
- _var="$1"; _name="$2"
-
- eval _tmp=\"\$$_var\"
- if [ "x$_tmp" != "x" ]; then
- # Variable is already set (by the user, for example)
- return 0
- fi
-
- for _d in `echo $PATH | tr ':' ' '`; do
- if [ -x "$_d/$_name" ]; then
- # Program found
- eval $_var=\""$_d/$_name"\"
- return 1
- fi
- done
-
- eval $_var=\"""\"
-}
-
-# our definitions
-DISTVENDOR=${DISTVENDOR:-"pkgsrc/genrpm"}
-DISTRIBUTION=${DISTRIBUTION:-"pkgsrc genrpm `date +%Y%m%d`"}
-
-# program definitions
-check_prog awk_cmd awk
-check_prog cp_cmd cp
-check_prog gzip_cmd gzip
-check_prog ln_cmd ln
-check_prog ls_cmd ls
-check_prog mkdir_cmd mkdir
-check_prog mv_cmd mv
-check_prog pkg_info_cmd pkg_info
-check_prog rm_cmd rm
-check_prog sed_cmd sed
-check_prog tar_cmd tar
-
-extract_cmd="${tar_cmd} xf -"
-
-# find the right name for make(1)
-opsys=`uname -s | tr -d /`
-case "${opsys}" in
-NetBSD) check_prog bmake_cmd make ;;
-*) check_prog bmake_cmd bmake ;;
-esac
-
-# set defaults
-DISTDIR=${DISTDIR:-@PKGSRCDIR@/distfiles}
-objdir=/usr/obj
-rpmdir=@PKGSRCDIR@/packages/rpms
-srpmdir=@PKGSRCDIR@/packages/srpms
-
-PKG_DBDIR=${PKG_DBDIR:-/var/db/pkg}
-PKGSRC=${PKGSRC:-@PKGSRCDIR@}
-
-verbose="" # by default, quiet running
-sign="" # by default, no signature
-genpat="-bb" # by default, just create a binary rpm
-
-# and the immutables
-redhatdir=/usr/pkg/src/redhat
-reqpkgs="pkg_tarup rpm"
-metafiles="+BUILD_INFO +BUILD_VERSION +COMMENT +CONTENTS +DESC +SIZE_ALL +SIZE_PKG"
-
-# check any given args
-while [ $# -gt 0 ]; do
- case "$1" in
- --distdir=*) DISTDIR=`echo "$1" | ${sed_cmd} -e 's|--distdir=||'` ;;
- --objdir=*) objdir=`echo "$1" | ${sed_cmd} -e 's|--objdir=||'` ;;
- --rpmdir=*) rpmdir=`echo "$1" | ${sed_cmd} -e 's|--rpmdir=||'` ;;
- --srpmdir=*) srpmdir=`echo "$1" | ${sed_cmd} -e 's|--srpmdir=||'` ;;
- --sign) sign="$1" ;;
- -s) genpat="-ba" ;;
- -v) verbose="-v"; set -x ;;
- *) break ;;
- esac
- shift
-done
-
-# check canonical directories are there on NetBSD
-if [ ! -d $redhatdir ]; then
- ${mkdir_cmd} -p $redhatdir
- (cd $redhatdir && ${ln_cmd} -s $objdir/rpm BUILD)
- (cd $redhatdir && ${ln_cmd} -s $rpmdir RPMS)
- (cd $redhatdir && ${ln_cmd} -s $srpmdir SRPMS)
- (cd $redhatdir && ${ln_cmd} -s $objdir/rpm/SOURCES SOURCES)
-fi
-
-# check that we have required packages installed
-for p in $reqpkgs; do
- if ${pkg_info_cmd} -qe $p; then
- echo "Using $p version `${pkg_info_cmd} -e $p`"
- else
- echo "The $p needs to be installed to use this rpm generator" 2>&1
- exit 1
- fi
-done
-
-# generate an rpm for each package
-while [ $# -gt 0 ]; do
- if ${pkg_info_cmd} -qe "$1"; then
-
- # expand the package name to include version information
- name=`${pkg_info_cmd} -e $1`
-
- # 3 components to package's name
- pkgbase=`echo $name | ${sed_cmd} -e 's|-[0-9].*||'`
- case "$name" in
- *-[0-9]*nb*)
- pkgversion=`echo $name | ${sed_cmd} -e 's|\(.*\)-\([0-9].*\)\(nb[0-9]*\)|\2|'`
- nb=`echo $name | ${sed_cmd} -e 's|\(.*\)-\([0-9].*\)nb\([0-9]*\)|\3|'`
- ;;
- *)
- pkgversion=`echo $name | ${sed_cmd} -e 's|\(.*\)-\([0-9].*\)|\2|'`
- nb=0
- ;;
- esac
-
- # retrieve information on prefix and pkgsrc directory from the package
- pkgprefix=`${pkg_info_cmd} -qp $name | ${awk_cmd} '{ print $2; exit }'`
- pkgpath=`${pkg_info_cmd} -B $name | ${awk_cmd} '/^PKGPATH=/ { sub("PKGPATH=", ""); print }'`
- pkgname=$pkgbase-$pkgversion
-
- # generate the rpm spec file first
- echo "Making an rpm spec file for $name - $pkgname - ($pkgbase-$pkgversion-$nb)"
-
- # make the build root
- ${mkdir_cmd} -p $objdir/rpm/BUILD/$pkgname/$pkgprefix
-
- # make the single source directory
- ${mkdir_cmd} -p $objdir/rpm/SOURCES
-
- # define the build directory
- builddir=$objdir/rpm/BUILD/$pkgname
- sourcesdir=$objdir/rpm/SOURCES/$pkgname
-
- # create the specfile in the right place
- specfile=$builddir/$pkgbase.spec
-
- echo "%define name $pkgbase" > $specfile
- echo "%define version $pkgversion" >> $specfile
- echo "%define release $nb" >> $specfile
- echo "%define prefix $pkgprefix" >> $specfile
- echo "" >> $specfile
- echo "" >> $specfile
-
- echo "Summary: %{name}, `${pkg_info_cmd} -qc $name`" >> $specfile
- echo "Name: %{name}" >> $specfile
- echo "Version: %{version}" >> $specfile
- echo "Release: %{release}" >> $specfile
- echo "Copyright: unknown" >> $specfile
- echo "URL: `${pkg_info_cmd} -d $name | ${awk_cmd} '/^Homepage:/ { getline; print; exit }'`" >> $specfile
- echo "Packager: Alistair Crooks <genrpm@alistaircrooks.com>" >> $specfile
- echo "Distribution: ${DISTRIBUTION}" >> $specfile
- echo "Vendor: ${DISTVENDOR}" >> $specfile
- echo "Prefix: ${pkgprefix}" >> $specfile
- for p in "" `${pkg_info_cmd} -qn $name`; do
- case "$p" in
- "") continue ;;
- *) case "$p" in
- *-[0-9]*) p=`echo "$p" | ${sed_cmd} -e 's|\(.*\)-\([0-9].*\)|\1=\2|'` ;;
- esac
- case "$p" in
- *nb[0-9]*) p=`echo "$p" | ${sed_cmd} -e 's|\(.*\)nb\([0-9]*\)|\1-\2|'` ;;
- esac
- echo "Requires: $p" >> $specfile ;;
- esac
- done
- for p in "" `${pkg_info_cmd} -qv $name | ${awk_cmd} '/conflicts with/ { print $4 }'`; do
- case "$p" in
- "") continue ;;
- *) case "$p" in
- *-[0-9]*) p=`echo "$p" | ${sed_cmd} -e 's|\(.*\)-\([0-9].*\)|\1=\2|'` ;;
- esac
- case "$p" in
- *nb[0-9]*) p=`echo "$p" | ${sed_cmd} -e 's|\(.*\)nb\([0-9]*\)|\1-\2|'` ;;
- esac
- echo "Conflicts: $p" >> $specfile ;;
- esac
- done
-
- echo "Buildroot: $builddir" >> $specfile
- echo "Group: $pkgpath" >> $specfile
- srcs="`${pkg_info_cmd} -Q _DISTFILES $name`"
- case "$srcs" in
- "") srcs="`cd $PKGSRC/$pkgpath && ${bmake_cmd} show-var VARNAME=_DISTFILES`" ;;
- esac
- i=0
- for f in "" $srcs; do
- case "$f" in
- "") continue ;;
- *) echo "Source$i: $f" >> $specfile
- ${cp_cmd} $DISTDIR/$f $objdir/rpm/SOURCES
- i=`expr $i + 1`
- ;;
- esac
- done
- if [ -d $PKGSRC/$pkgpath ]; then
- (cd $PKGSRC/$pkgpath && tar -cf $objdir/rpm/SOURCES/$pkgname-pkgsrc.tar .)
- echo "Source$i: $pkgname-pkgsrc.tar" >> $specfile
- fi
- echo "" >> $specfile
-
- i=0
- if [ -d $PKGSRC/$pkgpath/patches ]; then
- (cd $PKGSRC/$pkgpath/patches && for f in "" patch-*; do
- case "$f" in
- "") continue ;;
- *) echo "Patch$i: $pkgname-$f" >> $specfile
- ${cp_cmd} $f $objdir/rpm/SOURCES/$pkgname-$f
- i=`expr $i + 1`
- ;;
- esac
- done)
- echo "" >> $specfile
- echo "" >> $specfile
- fi
-
- echo "%description" >> $specfile
- ${pkg_info_cmd} -qd $name | ${awk_cmd} 'NF == 0 { next } { print }' >> $specfile
-
- echo "" >> $specfile
- echo "%prep" >> $specfile
- echo "echo prep finished" >> $specfile
-
- echo "" >> $specfile
- echo "%setup -c" >> $specfile
- echo "echo setup finished" >> $specfile
-
- echo "" >> $specfile
- echo "%build" >> $specfile
- echo "echo build finished" >> $specfile
-
- echo "" >> $specfile
- echo "%install" >> $specfile
- echo "(cd $builddir/$pkgprefix && ${gzip_cmd} -d -c $builddir/$name.tgz | ${extract_cmd} && ${mkdir_cmd} -p $builddir/${PKG_DBDIR}/$name && ${mv_cmd} ./+CONTENTS $builddir/${PKG_DBDIR}/$name)" >> $specfile
-
- echo "" >> $specfile
- echo "%clean" >> $specfile
- echo "${rm_cmd} -rf $builddir $objdir/rpm/$name" >> $specfile
-
- echo "" >> $specfile
- echo "%files" >> $specfile
- ${pkg_info_cmd} -qL $name | ${sed_cmd} -e "s|${pkgprefix}|%{prefix}|g" >> $specfile
- echo "${PKG_DBDIR}/$name/+CONTENTS" >> $specfile
-
- # make the build root, tarup the NetBSD binary package, and insert it in the build root
- ${mkdir_cmd} -p $builddir/$pkgprefix
- pkg_tarup -d $builddir $pkgbase
-
- # create the binary rpm itself
- (cd $builddir && rpm $verbose $genpat $sign $pkgbase.spec)
-
- # tell people where we've put it/them
- ${ls_cmd} -al $rpmdir/i386/$pkgname-*
-
- # cleanup
- ${rm_cmd} -rf $builddir $objdir/rpm/$pkgname
- else
- echo "genrpm: WARNING!!! Package \"$1\" not found" 2>&1
- fi
-
- shift
-done
-
-exit 0
diff --git a/pkgtools/genrpm/files/genrpm.0 b/pkgtools/genrpm/files/genrpm.0
deleted file mode 100644
index 1c37e973a3f..00000000000
--- a/pkgtools/genrpm/files/genrpm.0
+++ /dev/null
@@ -1,33 +0,0 @@
-GENRPM(8) NetBSD System Manager's Manual GENRPM(8)
-
-NNAAMMEE
- ggeennrrppmm
-
-SSYYNNOOPPSSIISS
- ggeennrrppmm [--ssvv] _p_a_c_k_a_g_e _._._.
-
-DDEESSCCRRIIPPTTIIOONN
- The ggeennrrppmm program takes an installed pkgsrc package and creates a Redhat
- Package Manager package from that, optionally creating an RPM-style src
- RPM in addition. If the --vv option is specified, ggeennrrppmm will carry out
- its work in a verbose manner (the rpm utility is already a fairly verbose
- utility).
-
- Package version extension will be done automatically by ggeennrrppmm so that
- rpm packages do not need to know the individual version numbers of pkgsrc
- packages.
-
- An optional source rpm package can also be created by using the --ss flag.
-
-SSEEEE AALLSSOO
- pkg_tarup(1), rpm(8) and
-
- _D_o_c_u_m_e_n_t_a_t_i_o_n _o_n _t_h_e _N_e_t_B_S_D _P_a_c_k_a_g_e _S_y_s_t_e_m. @PKGSRCDIR@/doc/pkgsrc.txt
-
-HHIISSTTOORRYY
- The ggeennrrppmm command was added to NetBSD's pkgsrc on April 20, 2005.
-
-AAUUTTHHOORRSS
- The ggeennrrppmm command was written by Alistair Crooks <agc@NetBSD.org>.
-
-NetBSD 3.0 April 20, 2005 NetBSD 3.0
diff --git a/pkgtools/genrpm/files/genrpm.8 b/pkgtools/genrpm/files/genrpm.8
deleted file mode 100644
index d2826e15b02..00000000000
--- a/pkgtools/genrpm/files/genrpm.8
+++ /dev/null
@@ -1,51 +0,0 @@
-.\" $NetBSD: genrpm.8,v 1.2 2005/04/21 14:55:44 wiz Exp $
-.Dd April 20, 2005
-.Os
-.Dt GENRPM 8
-.Sh NAME
-.Nm genrpm
-.Sh SYNOPSIS
-.Nm
-.Op Fl sv
-.Ar package ...
-.Sh DESCRIPTION
-The
-.Nm
-program takes an installed pkgsrc package and creates a
-Redhat Package Manager package from that, optionally creating
-an RPM-style src RPM in addition.
-If the
-.Fl v
-option is specified,
-.Nm
-will carry out its work in a verbose manner (the rpm utility is
-already a fairly verbose utility).
-.Pp
-Package version extension will be done automatically by
-.Nm
-so that rpm packages do not need to know the individual version
-numbers of pkgsrc packages.
-.Pp
-An optional source rpm package can also
-be created by using the
-.Fl s
-flag.
-.Sh SEE ALSO
-.Xr pkg_tarup 1 ,
-.Xr rpm 8
-and
-.Rs
-.%T "Documentation on the NetBSD Package System"
-.Re
-@PKGSRCDIR@/doc/pkgsrc.txt
-.Sh HISTORY
-The
-.Nm
-command was added to
-.Nx Ap s
-pkgsrc on April 20, 2005.
-.Sh AUTHORS
-The
-.Nm
-command was written by
-.An Alistair Crooks Aq agc@NetBSD.org .
diff --git a/pkgtools/gensolpkg/DESCR b/pkgtools/gensolpkg/DESCR
deleted file mode 100644
index ec61b5a9301..00000000000
--- a/pkgtools/gensolpkg/DESCR
+++ /dev/null
@@ -1,8 +0,0 @@
-This is a small utility to translate from NetBSD-derived pkgsrc
-packages into Solaris packages. I wrote this as an aid to
-understanding Solaris packages, and to provide some Solaris packages
-which can be used in jumpstart, and manipulated with the Solaris
-package manipulation tools, but still have the benefit of the original
-package being maintained by a number of people who know what they're
-doing, and put a lot of time into keeping abreast of latest versions
-and bug fix releases.
diff --git a/pkgtools/gensolpkg/Makefile b/pkgtools/gensolpkg/Makefile
deleted file mode 100644
index 4a41c6c87e4..00000000000
--- a/pkgtools/gensolpkg/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# $NetBSD: Makefile,v 1.20 2004/11/05 16:44:46 agc Exp $
-#
-
-DISTNAME= gensolpkg-1.10
-PKGREVISION= 2
-CATEGORIES= pkgtools
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-
-MAINTAINER= agc@NetBSD.org
-COMMENT= Utility to generate a Solaris package
-
-ONLY_FOR_PLATFORM= SunOS-*-* # uses Solaris pkgmk(1)
-
-MAKE_ENV+= CPPFLAGS="" CC=${CC:Q}
-MAKEFLAGS+= PREFIX=${PREFIX:Q}
-
-do-install:
- cd ${WRKSRC} && ${MAKE} install PREFIX=${PREFIX}
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/gensolpkg/PLIST b/pkgtools/gensolpkg/PLIST
deleted file mode 100644
index d5847dea4b9..00000000000
--- a/pkgtools/gensolpkg/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:19:00 zuntum Exp $
-sbin/gensolpkg
-man/man1/gensolpkg.1
diff --git a/pkgtools/gensolpkg/distinfo b/pkgtools/gensolpkg/distinfo
deleted file mode 100644
index 4f9b626a352..00000000000
--- a/pkgtools/gensolpkg/distinfo
+++ /dev/null
@@ -1,8 +0,0 @@
-$NetBSD: distinfo,v 1.7 2005/02/24 12:28:30 agc Exp $
-
-SHA1 (gensolpkg-1.10.tar.gz) = d7981f6c2159a1a2304a5e446185ce6b2ade7305
-RMD160 (gensolpkg-1.10.tar.gz) = 829d5078431b1f9f15f639ce13e124f77b00a6f2
-Size (gensolpkg-1.10.tar.gz) = 8430 bytes
-SHA1 (patch-aa) = ad9239f3b4a037402b785bf6c37d40208f786ade
-SHA1 (patch-ab) = 0ecef672900def2d2f2151943effdaaf16f8e221
-SHA1 (patch-ac) = 1da06afa9c8128d3334f7251e8e0bc21f7945d72
diff --git a/pkgtools/gensolpkg/patches/patch-aa b/pkgtools/gensolpkg/patches/patch-aa
deleted file mode 100644
index ca3ba96c5f4..00000000000
--- a/pkgtools/gensolpkg/patches/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2002/12/08 12:54:45 cjep Exp $
-
---- Makefile.orig Sun Jan 21 23:26:06 2001
-+++ Makefile
-@@ -1,6 +1,8 @@
- # Short makefile for gensolpkg
-
- PREFIX= /usr/local
-+ZOULARISBASE= /usr/local
-+
- CFLAGS= -O
- BIN= gensolpkg
- OBJS= gensolpkg.o
-@@ -13,7 +15,7 @@ ${BIN} : ${OBJS}
- ${CC} ${CFLAGS} ${LDFLAGS} ${OBJS} ${LIBS} -o ${BIN}
-
- gensolpkg.c: gensolpkg.c.in
-- sed -e 's|@PREFIX@|${PREFIX}|g' -e 's|@VENDOR@|${VENDOR}|g' -e 's|@SPOOLDIR@|${SPOOLDIR}|g' gensolpkg.c.in > gensolpkg.c
-+ sed -e 's|@PREFIX@|${PREFIX}|g' -e 's|@VENDOR@|${VENDOR}|g' -e 's|@SPOOLDIR@|${SPOOLDIR}|g' -e 's|@ZOULARISBASE@|${ZOULARISBASE}|g' gensolpkg.c.in > gensolpkg.c
-
- gensolpkg.1: gensolpkg.1.in
- sed -e 's|@PREFIX@|${PREFIX}|g' -e 's|@VENDOR@|${VENDOR}|g' -e 's|@SPOOLDIR@|${SPOOLDIR}|g' gensolpkg.1.in > gensolpkg.1
diff --git a/pkgtools/gensolpkg/patches/patch-ab b/pkgtools/gensolpkg/patches/patch-ab
deleted file mode 100644
index 7ff17c67e1b..00000000000
--- a/pkgtools/gensolpkg/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2002/12/08 12:54:46 cjep Exp $
-
---- gensolpkg.1.in.orig Sat May 5 14:44:31 2001
-+++ gensolpkg.1.in
-@@ -53,7 +53,7 @@ one of the package extraction/info utili
- The package must be installed using the Zoularis environment,
- so that a generated .PLIST file is present in the work directory.
- This is so that the package's
--files are guranateed to be present, manual pages are represented
-+files are guaranteed to be present, manual pages are represented
- correctly, and so that any necessary macro definitions have been expanded.
- .PP
- The \f3gensolpkg\f1 command should be run from within a package directory
diff --git a/pkgtools/gensolpkg/patches/patch-ac b/pkgtools/gensolpkg/patches/patch-ac
deleted file mode 100644
index ee86d456065..00000000000
--- a/pkgtools/gensolpkg/patches/patch-ac
+++ /dev/null
@@ -1,73 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2004/11/05 16:44:46 agc Exp $
-
---- gensolpkg.c.in.orig Sat May 5 15:44:31 2001
-+++ gensolpkg.c.in Fri Nov 5 16:19:24 2004
-@@ -79,7 +79,7 @@
- static char comment[256 + 1]; /* one line descr of pkg */
-
- static char prefix[MAXPATHLEN]; /* current prefix */
--static char *workdir; /* name of working directory */
-+static char workdir[MAXPATHLEN]; /* name of working directory */
- static char *category; /* category of package - default "application" */
- static int transform; /* transform the package - default "disabled" */
-
-@@ -357,9 +357,9 @@
- }
- (void) fprintf(fp, "!PKG=%s\n", pkg);
- (void) fprintf(fp, "!PREFIX=%s\n", prefix);
-- (void) fprintf(fp, "i pkginfo=%s/%s\n", getcwd(buf, sizeof(buf)), pkginfofile);
-- (void) fprintf(fp, "i version=%s/%s\n", getcwd(buf, sizeof(buf)), versionfile);
-- (void) fprintf(fp, "i depend=%s/%s\n", getcwd(buf, sizeof(buf)), dependfile);
-+ (void) fprintf(fp, "i pkginfo=%s\n", pkginfofile);
-+ (void) fprintf(fp, "i version=%s\n", versionfile);
-+ (void) fprintf(fp, "i depend=%s\n", dependfile);
- for (linec = 1 ; fgets(buf, sizeof(buf), plist) != (char *) NULL ; linec++) {
- /* trim leading whitespace from PLIST entries */
- for (cp = buf ; isspace(*cp) ; cp++) {
-@@ -463,7 +463,7 @@
- (void) fputc('\n', fp2);
- }
- (void) fclose(fp2);
-- (void) fprintf(fp, "i postinstall=%s/%s/.postinstall\n", getcwd(buf, sizeof(buf)), workdir);
-+ (void) fprintf(fp, "i postinstall=%s/.postinstall\n", workdir);
- }
- if (remove.s_c > 0) {
- (void) snprintf(f, sizeof(f), "%s/.postremove", workdir);
-@@ -493,7 +493,7 @@
- (void) fputc('\n', fp2);
- }
- (void) fclose(fp2);
-- (void) fprintf(fp, "i postremove=%s/%s/.postremove\n", getcwd(buf, sizeof(buf)), workdir);
-+ (void) fprintf(fp, "i postremove=%s/.postremove\n", workdir);
- }
- (void) fclose(fp);
- (void) fclose(plist);
-@@ -572,13 +572,17 @@
- int i;
-
- (void) strcpy(prefix, "@PREFIX@");
-- (void) strcpy(bmake, "@PREFIX@/bsd/bin/bmake");
-+ (void) strcpy(bmake, "@PREFIX@/bin/bmake");
- (void) strcpy(output, "/tmp");
- (void) strcpy(pkgdir, "@SPOOLDIR@");
- transform = 0;
-- workdir = "work";
- category = "application";
- pkg = (char *) NULL;
-+ (void) snprintf(cmd, sizeof(cmd), "%s show-var VARNAME=WRKDIR", bmake);
-+ if (!pipeit(workdir, sizeof(workdir), cmd, "r")) {
-+ (void) fprintf(stderr, "Warning: can't find package workdir\n");
-+ exit(1);
-+ }
- (void) snprintf(cmd, sizeof(cmd), "%s show-var VARNAME=PREFIX", bmake);
- if (!pipeit(prefix, sizeof(prefix), cmd, "r")) {
- (void) fprintf(stderr, "Can't find package prefix\n");
-@@ -633,7 +637,7 @@
- transform = 1;
- break;
- case 'w':
-- workdir = optarg;
-+ (void) strnncpy(workdir, sizeof(workdir), optarg, strlen(optarg));
- break;
- default:
- fprintf(stderr, "Usage:\n");
diff --git a/pkgtools/libkver/DEINSTALL b/pkgtools/libkver/DEINSTALL
deleted file mode 100644
index 4ffdaf91618..00000000000
--- a/pkgtools/libkver/DEINSTALL
+++ /dev/null
@@ -1,12 +0,0 @@
-# $NetBSD: DEINSTALL,v 1.1 2003/12/13 17:45:59 seb Exp $
-
-HAS_SYSCTL=@HAS_SYSCTL@
-
-case ${STAGE} in
-DEINSTALL)
- if ${HAS_SYSCTL} && [ -f /sbin/sysctl.pre-${PKGBASE} ]; then
- ${RM} -f /sbin/sysctl && \
- ${MV} /sbin/sysctl.pre-${PKGBASE} /sbin/sysctl && \
- ${ECHO} "/sbin/sysctl.pre-${PKGBASE} has been restored as /sbin/sysctl"
- fi
-esac
diff --git a/pkgtools/libkver/DESCR b/pkgtools/libkver/DESCR
deleted file mode 100644
index ea6b6664ac6..00000000000
--- a/pkgtools/libkver/DESCR
+++ /dev/null
@@ -1,9 +0,0 @@
-This package provides a shared library and a replacement for
-sysctl(1) (when needed i.e. when the original one is statically linked)
-so that the real version numbers and strings of the running NetBSD
-kernel as returned by sysctl(3) and uname(3) are overridden by
-those the library is configured to report.
-
-This is useful for -among other things- building packages in
-sandboxed/chrooted environment for a different NetBSD release than the
-system hosting the sandbox/chroot.
diff --git a/pkgtools/libkver/INSTALL b/pkgtools/libkver/INSTALL
deleted file mode 100644
index 8e39a5ea3e0..00000000000
--- a/pkgtools/libkver/INSTALL
+++ /dev/null
@@ -1,12 +0,0 @@
-# $NetBSD: INSTALL,v 1.1 2003/12/13 17:45:59 seb Exp $
-
-HAS_SYSCTL=@HAS_SYSCTL@
-
-case ${STAGE} in
-POST-INSTALL)
- if ${HAS_SYSCTL}; then
- ${MV} /sbin/sysctl /sbin/sysctl.pre-${PKGBASE} && \
- ${CP} -p ${PKG_PREFIX}/sbin/sysctl /sbin/sysctl && \
- ${ECHO} "/sbin/sysctl has been moved as /sbin/sysctl.pre-${PKGBASE}"
- fi
-esac
diff --git a/pkgtools/libkver/Makefile b/pkgtools/libkver/Makefile
deleted file mode 100644
index 1a707026d95..00000000000
--- a/pkgtools/libkver/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-# $NetBSD: Makefile,v 1.24 2007/02/22 19:27:02 wiz Exp $
-
-DISTNAME= libkver-${VERSION}
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= seb@NetBSD.org
-#HOMEPAGE=
-COMMENT= Shared library and sysctl(1) replacement to override system version
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-
-NO_PKGTOOLS_REQD_CHECK= yes
-NO_CHECKSUM= yes
-NO_MTREE= yes
-
-VERSION= 0.6
-
-ONLY_FOR_PLATFORM= NetBSD-*-*
-
-BUILDLINK_PASSTHRU_DIRS= ${BSDSRCDIR}/sys
-
-.include "../../mk/bsd.prefs.mk"
-
-LDD_SYSCTL!= ldd /sbin/sysctl 2>&1
-MAKE_ENV+= LDD_SYSCTL=${LDD_SYSCTL:Q} # save another ldd run
-.if empty(LDD_SYSCTL:M*libc*)
-PLIST_SUBST+= HAS_SYSCTL=
-FILES_SUBST+= HAS_SYSCTL=true
-.else
-PLIST_SUBST+= HAS_SYSCTL="@comment "
-FILES_SUBST+= HAS_SYSCTL=false
-.endif
-
-INSTALLATION_DIRS+= lib man/man3 man/cat3
-.if empty(LDD_SYSCTL:M*libc*)
-INSTALLATION_DIRS+= sbin
-.endif
-
-do-extract:
- ${CP} -R ${FILESDIR} ${WRKSRC}
-
-LIBKVER_STANDALONE_PREFIX?= /libkver
-standalone-install:
- ${MAKE} ${MAKEFLAGS} PKG_DBDIR=${LIBKVER_STANDALONE_PREFIX:Q}/pkg \
- PREFIX=${LIBKVER_STANDALONE_PREFIX:Q} install
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/libkver/PLIST b/pkgtools/libkver/PLIST
deleted file mode 100644
index 1303710dbb6..00000000000
--- a/pkgtools/libkver/PLIST
+++ /dev/null
@@ -1,8 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2003/12/13 17:45:59 seb Exp $
-lib/libkver.a
-lib/libkver.so
-lib/libkver.so.1
-lib/libkver.so.1.0
-man/cat3/kver.0
-man/man3/kver.3
-${HAS_SYSCTL}sbin/sysctl
diff --git a/pkgtools/libkver/files/Makefile b/pkgtools/libkver/files/Makefile
deleted file mode 100644
index 6fd0ea8fed4..00000000000
--- a/pkgtools/libkver/files/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-# $NetBSD: Makefile,v 1.3 2003/12/13 17:45:59 seb Exp $
-
-SUBDIR= lib
-
-.ifndef(LDD_SYSCTL)
-LDD_SYSCTL!= ldd /sbin/sysctl 2>&1
-.endif
-.if empty(LDD_SYSCTL:M*libc*)
-SUBDIR+= sysctl
-.endif
-
-.include <bsd.subdir.mk>
diff --git a/pkgtools/libkver/files/Makefile.inc b/pkgtools/libkver/files/Makefile.inc
deleted file mode 100644
index 06583e5125e..00000000000
--- a/pkgtools/libkver/files/Makefile.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-# $NetBSD: Makefile.inc,v 1.4 2003/12/13 17:45:59 seb Exp $
-
-.if defined(PREFIX)
-# build from pkgsrc
-LIBDIR= ${PREFIX}/lib
-BINDIR= ${PREFIX}/sbin
-MANDIR= ${PREFIX}/man
-.else
-# build outside pkgsrc
-BINDIR= /sbin
-.endif
diff --git a/pkgtools/libkver/files/lib/Makefile b/pkgtools/libkver/files/lib/Makefile
deleted file mode 100644
index 7be2ede610f..00000000000
--- a/pkgtools/libkver/files/lib/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# $NetBSD: Makefile,v 1.2 2003/12/13 17:45:59 seb Exp $
-
-NOPROFILE= # defined
-NOLINT= # defined
-MKPICINSTALL= no
-LIB= kver
-MAN= kver.3
-SRCS= kver.c
-
-.include <bsd.lib.mk>
diff --git a/pkgtools/libkver/files/lib/kver.3 b/pkgtools/libkver/files/lib/kver.3
deleted file mode 100644
index 56425ce07a1..00000000000
--- a/pkgtools/libkver/files/lib/kver.3
+++ /dev/null
@@ -1,47 +0,0 @@
-.\" $NetBSD: kver.3,v 1.2 2004/04/24 10:53:03 grant Exp $
-.\"
-.Dd December 13, 2003
-.Os
-.Dt KVER 3
-.Sh NAME
-.Nm kver
-.Nd override system version library
-.Sh SYNOPSIS
-LD_PRELOAD=.../libkver.so uname -a
-.Sh DESCRIPTION
-The
-.Nm
-library provides implementations of
-.Xr sysctl 3 and
-.Xr uname 3 that
-shadow the real implementation and could be configured to override the
-information identifying the current system.
-The library is usually loaded by the run-time link-editor via the
-LD_PRELOAD hook.
-.Pp
-This is useful for, among other things, building packages in a
-sandbox/chrooted environment for a different
-.Nx
-release then the system hosting the sandbox.
-.Pp
-The library must be configured for reporting a specific
-.Nx
-release or else it emits a warning message on the standard error output.
-The value of the environment variable
-.Ev LIBKVER_OSRELEASE
-or the ``name'' of the file referenced by the symbolic link named
-.Pa /libkver_osrelease
-are checked in that order for the
-.Nx
-release number the library should reports information for.
-.Sh EXAMPLES
-.Dl env LD_PRELOAD=/lib/libkver.so LIBKVER_OSRELEASE=1.5 uname -r
-.Pp
-.Dl ln -s 1.6.2 /libkver_osrelease
-.Dl env LD_PRELOAD=/lib/libkver.so uname -r
-.Sh SEE ALSO
-.Xr ld.so 1 ,
-.Xr sysctl 3 ,
-.Xr uname 3
-.Sh AUTHORS
-.An Stoned Elipot Aq seb@NetBSD.org
diff --git a/pkgtools/libkver/files/lib/kver.c b/pkgtools/libkver/files/lib/kver.c
deleted file mode 100644
index dbd848c5ad0..00000000000
--- a/pkgtools/libkver/files/lib/kver.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* $NetBSD: kver.c,v 1.9 2006/08/11 14:44:29 taca Exp $ */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#include <sys/utsname.h>
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <err.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#define KVER_VERSION_FMT "NetBSD %s (LIBKVER) #0: Tue Jan 19 00:00:00 UTC 2038 root@localhost:/sys/arch/%s/compile/LIBKVER"
-
-#define KVER_NOT_INITIALIZED_OSRELEASE -2
-#define KVER_INVALID_OSRELEASE -1
-
-#ifndef PATH_LIBKVER_OSRELEASE
-#define PATH_LIBKVER_OSRELEASE "/libkver_osrelease"
-#endif
-#ifndef VAR_LIBKVER_OSRELEASE
-#define VAR_LIBKVER_OSRELEASE "LIBKVER_OSRELEASE"
-#endif
-
-static struct kver {
- char osrelease[_SYS_NMLN];
- int osrevision;
- char version[_SYS_NMLN];
-} kver = {
- "", KVER_NOT_INITIALIZED_OSRELEASE, ""
-};
-
-static struct utsname real_utsname;
-
-#define KVER_NOT_INITIALIZED \
- (kver.osrevision == KVER_NOT_INITIALIZED_OSRELEASE)
-
-#define KVER_BADLY_INITIALIZED (kver.osrevision == KVER_INVALID_OSRELEASE)
-
-#define SYSCTL_STRING(oldp, oldlenp, str) \
- if (oldlenp) { \
- len = strlen(str) + 1; \
- if (!oldp) \
- *oldlenp = len; \
- else { \
- if (*oldlenp < len) { \
- r = ENOMEM; \
- len = *oldlenp; \
- } else \
- *oldlenp = len; \
- (void) strncpy(oldp, str, len); \
- } \
- }
-
-#if __NetBSD_Version__ >= 399001600
-#define SYSCTL_CONST const
-#else
-#define SYSCTL_CONST
-#endif
-
-static int
-str2osrevision(char *s)
-{
- char c;
- int n, r = 0;
-
- if (s == NULL || *s == 0)
- return KVER_INVALID_OSRELEASE;
-
- if (!isdigit(*s))
- return KVER_INVALID_OSRELEASE;
-
- /* first digit: major */
- for (n = 0; isdigit(*s); s++) {
- n = (n * 10) + (*s - '0');
- }
- if (*s == 0 || *s != '.')
- return KVER_INVALID_OSRELEASE;
- r += (n * 100000000);
-
- /* second digit: minor */
- for (s++, n = 0; isdigit(*s); s++) {
- n = (n * 10) + (*s - '0');
- }
- r += (n * 1000000);
-
- /* nothing more, return */
- if (*s == 0)
- return r;
-
- /* optional third digit: patchlevel */
- if (*s == '.') {
- for (s++, n = 0; isdigit(*s); s++) {
- n = (n * 10) + (*s - '0');
- }
- r += (n * 100);
- }
- /* nothing more, return */
- if (*s == 0)
- return r;
- /* or optional underscore followed by release status */
- if (*s == '_')
- /* ignore the trailing label */
- return r;
- /* or optional letters: release */
- n = 0;
- c = 'Z';
- while (*s >= 'A' && *s <= 'Z') {
- if (c != 'Z' && *s != 0)
- break;
- c = *s;
- n += *s++ - '@';
- }
- if (n > 99)
- return KVER_INVALID_OSRELEASE;
- if (*s == 0)
- return r + (n * 10000);
-
- /* return on error if we end up here */
- return KVER_INVALID_OSRELEASE;
-}
-
-static void
-kver_initialize(void)
-{
- char *v;
- int i;
- kver.osrevision = KVER_INVALID_OSRELEASE; /* init done */
- v = getenv(VAR_LIBKVER_OSRELEASE);
- if (v == NULL) {
- char b[MAXPATHLEN + 1];
- i = readlink(PATH_LIBKVER_OSRELEASE, b, sizeof b - 1);
- if (i <= 0) {
- v = NULL;
- } else {
- b[i] = '\0';
- v = b;
- }
- }
- if (v == NULL) {
- warnx("libkver: not configured");
- return;
- }
- if (_uname(&real_utsname) != 0) {
- warn("libkver: uname");
- return;
- }
- kver.osrevision = str2osrevision(v);
- if (kver.osrevision == KVER_INVALID_OSRELEASE) {
- warnx("libkver: invalid version: %s", v);
- return;
- }
- (void) strncpy(kver.osrelease, v, _SYS_NMLN);
- kver.osrelease[_SYS_NMLN - 1] = '\0';
- (void) snprintf(kver.version, _SYS_NMLN, KVER_VERSION_FMT,
- kver.osrelease, real_utsname.machine);
- return;
-}
-
-int
-sysctl(SYSCTL_CONST int *name, u_int namelen, void *oldp, size_t * oldlenp,
- const void *newp, size_t newlen)
-{
- _DIAGASSERT(name != NULL);
-
- if (newp != (void *) NULL)
- goto real;
-
- if (KVER_NOT_INITIALIZED)
- kver_initialize();
-
- if (KVER_BADLY_INITIALIZED || namelen != 2)
- goto real;
-
- if (name[0] == CTL_KERN) {
- size_t len;
- int r = 0;
- switch (name[1]) {
- case KERN_OSRELEASE:
- SYSCTL_STRING(oldp, oldlenp, kver.osrelease);
- return (r);
- case KERN_OSREV:
- if (oldlenp) {
- if (!oldp)
- *oldlenp = sizeof(int);
- else {
- if (*oldlenp < sizeof(int))
- return (ENOMEM);
- *oldlenp = sizeof(int);
- *((int *) oldp) = kver.osrevision;
- }
- }
- return (r);
- case KERN_VERSION:
- SYSCTL_STRING(oldp, oldlenp, kver.version);
- return (r);
- }
- }
-real: return (_sysctl(name, namelen, oldp, oldlenp, newp, newlen));
-}
-
-int
-uname(struct utsname * n)
-{
- if (KVER_NOT_INITIALIZED)
- kver_initialize();
-
- if (KVER_BADLY_INITIALIZED)
- return _uname(n);
-
- (void) strncpy(n->sysname, real_utsname.sysname, _SYS_NMLN);
- (void) strncpy(n->nodename, real_utsname.nodename, _SYS_NMLN);
- (void) strncpy(n->release, kver.osrelease, _SYS_NMLN);
- (void) strncpy(n->version, kver.version, _SYS_NMLN);
- (void) strncpy(n->machine, real_utsname.machine, _SYS_NMLN);
- return 0;
-}
diff --git a/pkgtools/libkver/files/lib/shlib_version b/pkgtools/libkver/files/lib/shlib_version
deleted file mode 100644
index 125979da08b..00000000000
--- a/pkgtools/libkver/files/lib/shlib_version
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: shlib_version,v 1.2 2003/12/13 17:45:59 seb Exp $
-
-major=1
-minor=0
diff --git a/pkgtools/libkver/files/sysctl/Makefile b/pkgtools/libkver/files/sysctl/Makefile
deleted file mode 100644
index f8e8d3d0944..00000000000
--- a/pkgtools/libkver/files/sysctl/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# $NetBSD: Makefile,v 1.2 2003/12/13 17:45:59 seb Exp $
-
-MKMAN= no
-
-.include <bsd.own.mk>
-
-.PATH: ${BSDSRCDIR}/sbin/sysctl
-
-.include "${BSDSRCDIR}/sbin/sysctl/Makefile"
-
-LDADD+= ${.CURDIR}/../lib/libkver.a
-CPPFLAGS+= -I${BSDSRCDIR}/sys
-LDSTATIC?= -static
diff --git a/pkgtools/libnbcompat/DESCR b/pkgtools/libnbcompat/DESCR
deleted file mode 100644
index fca7740e0c9..00000000000
--- a/pkgtools/libnbcompat/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-libnbcompat is a portable NetBSD compatibility library for use by
-the pkgsrc tools and other sources from NetBSD (and elsewhere).
-
-It is also helpful for providing definitions and functions missing from
-other Unix platforms.
diff --git a/pkgtools/libnbcompat/Makefile b/pkgtools/libnbcompat/Makefile
deleted file mode 100644
index 14036c19884..00000000000
--- a/pkgtools/libnbcompat/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-# $NetBSD: Makefile,v 1.47 2005/10/10 18:28:08 reed Exp $
-#
-# NOTE: If you update this package, it is *mandatory* that you update
-# pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual
-# list of tested and supported platforms.
-#
-
-DISTNAME= libnbcompat-20041024
-CATEGORIES= pkgtools devel
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= grant@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/
-COMMENT= Portable NetBSD compatibility library
-
-NO_PKGTOOLS_REQD_CHECK= yes
-NO_CHECKSUM= yes
-NO_MTREE= yes
-
-GNU_CONFIGURE= yes
-MAKE_ENV+= BINMODE=${BINMODE}
-
-PKG_INFO= PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO_CMD}
-PKG_CREATE= PKG_DBDIR=${_PKG_DBDIR} ${PKG_CREATE_CMD}
-PKG_DELETE= PKG_DBDIR=${_PKG_DBDIR} ${PKG_DELETE_CMD}
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/libnbcompat/PLIST b/pkgtools/libnbcompat/PLIST
deleted file mode 100644
index 29a5a82f7c1..00000000000
--- a/pkgtools/libnbcompat/PLIST
+++ /dev/null
@@ -1,41 +0,0 @@
-@comment $NetBSD: PLIST,v 1.13 2004/08/23 03:32:12 jlam Exp $
-include/nbcompat.h
-include/nbcompat/assert.h
-include/nbcompat/cdefs.h
-include/nbcompat/ctype.h
-include/nbcompat/dirent.h
-include/nbcompat/endian.h
-include/nbcompat/err.h
-include/nbcompat/fnmatch.h
-include/nbcompat/fts.h
-include/nbcompat/getopt.h
-include/nbcompat/glob.h
-include/nbcompat/grp.h
-include/nbcompat/limits.h
-include/nbcompat/md5.h
-include/nbcompat/nbconfig.h
-include/nbcompat/nbtypes.h
-include/nbcompat/param.h
-include/nbcompat/paths.h
-include/nbcompat/poll.h
-include/nbcompat/pwd.h
-include/nbcompat/queue.h
-include/nbcompat/regex.h
-include/nbcompat/rmd160.h
-include/nbcompat/sha1.h
-include/nbcompat/stat.h
-include/nbcompat/statvfs.h
-include/nbcompat/stdio.h
-include/nbcompat/stdlib.h
-include/nbcompat/string.h
-include/nbcompat/termcap.h
-include/nbcompat/time.h
-include/nbcompat/types.h
-include/nbcompat/tzfile.h
-include/nbcompat/unistd.h
-include/nbcompat/util.h
-include/nbcompat/vis.h
-lib/libnbcompat.a
-@dirrm include/nbcompat
-@unexec ${RMDIR} -p %D/include 2>/dev/null || ${TRUE}
-@unexec ${RMDIR} -p %D/lib 2>/dev/null || ${TRUE}
diff --git a/pkgtools/libnbcompat/buildlink3.mk b/pkgtools/libnbcompat/buildlink3.mk
deleted file mode 100644
index e36e73b65f9..00000000000
--- a/pkgtools/libnbcompat/buildlink3.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-# $NetBSD: buildlink3.mk,v 1.17 2006/07/08 23:11:05 jlam Exp $
-
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-LIBNBCOMPAT_BUILDLINK3_MK:= ${LIBNBCOMPAT_BUILDLINK3_MK}+
-
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= libnbcompat
-.endif
-
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibnbcompat}
-BUILDLINK_PACKAGES+= libnbcompat
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libnbcompat
-
-.if !empty(LIBNBCOMPAT_BUILDLINK3_MK:M+)
-BUILDLINK_API_DEPENDS.libnbcompat+= libnbcompat>=20040911
-BUILDLINK_PKGSRCDIR.libnbcompat?= ../../pkgtools/libnbcompat
-BUILDLINK_DEPMETHOD.libnbcompat?= build
-BUILDLINK_LDADD.libnbcompat= -lnbcompat
-
-. if defined(GNU_CONFIGURE)
-LIBS+= ${BUILDLINK_LDADD.libnbcompat}
-. endif
-.endif # LIBNBCOMPAT_BUILDLINK3_MK
-
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/pkgtools/libnbcompat/files/Makefile.in b/pkgtools/libnbcompat/files/Makefile.in
deleted file mode 100644
index 772805f96f5..00000000000
--- a/pkgtools/libnbcompat/files/Makefile.in
+++ /dev/null
@@ -1,101 +0,0 @@
-# $NetBSD: Makefile.in,v 1.32 2005/10/10 18:28:08 reed Exp $
-#
-
-srcdir= @srcdir@
-prefix= @prefix@
-VPATH= @srcdir@
-SHELL= /bin/sh
-
-CC= @CC@
-CCLD= @CC@
-CFLAGS= -I$(srcdir) -I. @INCLUDES@ @CFLAGS@
-CPPFLAGS= @CPPFLAGS@
-DEFS= @DEFS@
-INSTALL= @INSTALL@
-BINMODE?= 555
-LDFLAGS= @LDFLAGS@
-
-AWK= @AWK@
-AR= @AR@
-RANLIB= @RANLIB@
-
-LIB= libnbcompat.a
-
-INCS= nbcompat.h \
- nbcompat/assert.h \
- nbcompat/cdefs.h \
- nbcompat/ctype.h \
- nbcompat/dirent.h \
- nbcompat/endian.h \
- nbcompat/err.h \
- nbcompat/fnmatch.h \
- nbcompat/fts.h \
- nbcompat/getopt.h \
- nbcompat/glob.h \
- nbcompat/grp.h \
- nbcompat/limits.h \
- nbcompat/md5.h \
- nbcompat/nbconfig.h \
- nbcompat/nbtypes.h \
- nbcompat/param.h \
- nbcompat/paths.h \
- nbcompat/poll.h \
- nbcompat/pwd.h \
- nbcompat/queue.h \
- nbcompat/regex.h \
- nbcompat/rmd160.h \
- nbcompat/sha1.h \
- nbcompat/stat.h \
- nbcompat/statvfs.h \
- nbcompat/stdio.h \
- nbcompat/stdlib.h \
- nbcompat/string.h \
- nbcompat/termcap.h \
- nbcompat/time.h \
- nbcompat/types.h \
- nbcompat/tzfile.h \
- nbcompat/unistd.h \
- nbcompat/util.h \
- nbcompat/vis.h
-
-OBJS= @LIBOBJS@
-
-LINK= $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
-COMPILE= $(CC) $(CPPFLAGS) $(CFLAGS)
-
-all: nbcompat/nbtypes.h nbcompat/nbconfig.h $(LIB)
-
-.c.o: nbcompat/nbtypes.h
- $(COMPILE) $(DEFS) -c $<
-
-$(LIB): $(OBJS)
- $(AR) cr $@ $(OBJS)
- $(RANLIB) $@
-
-nbcompat/nbconfig.h: nbcompat/config.h nbcompat.awk
- $(AWK) -f nbcompat.awk nbcompat/config.h > $@
-
-nbcompat/nbtypes.h: bits
- ./bits $@
-
-bits: bits.c
- $(COMPILE) $(DEFS) -c bits.c
- $(LINK) bits.o
-
-install:
- $(INSTALL) -m 755 -d $(prefix)/lib
- $(INSTALL) -m $(BINMODE) ${LIB} $(prefix)/lib
- $(RANLIB) $(prefix)/lib/$(LIB)
- $(INSTALL) -m 755 -d $(prefix)/include
- $(INSTALL) -m 755 -d $(prefix)/include/nbcompat
- @for file in $(INCS); do \
- echo "$(INSTALL) -m 444 $$file $(prefix)/include/$$file"; \
- $(INSTALL) -m 444 $$file $(prefix)/include/$$file; \
- done
-
-clean:
- rm -f *.a *.o bits nbcompat/nbtypes.h nbcompat/nbcompat.h
-
-distclean: clean
- rm -f Makefile config.log config.status configure.lineno
- rm -f nbcompat/config.h nbcompat/nbconfig.h
diff --git a/pkgtools/libnbcompat/files/README b/pkgtools/libnbcompat/files/README
deleted file mode 100644
index 2af4174a9ab..00000000000
--- a/pkgtools/libnbcompat/files/README
+++ /dev/null
@@ -1,94 +0,0 @@
-$NetBSD: README,v 1.13 2006/12/17 19:27:57 jschauma Exp $
-
- 0 Introduction
- ==============
-
-libnbcompat builds and installs a portable NetBSD-compatibility library
-that supplies routines missing on operating systems that are used by
-the family of pkgsrc bootstrap tools. Note that libnbcompat is very
-much a work-in-progress. Only the functions that are directly used
-by the bootstrap tools are implemented in the library. At the moment,
-this includes the following packages:
-
- archivers/pax
- pkgtools/mtree
- pkgtools/pkg_install
- textproc/nbsed
-
-A script, src2nbcompat, is also included in the sources that simplifies
-importing software from the NetBSD src module into pkgsrc.
-
-
- 1 Updating this package
- =======================
-
-Please take care when updating this package. Do *not* simply commit
-changes to this package and ask for testers. This package is too
-fundamental to the proper bootstrapping of pkgsrc to let accidental
-breakage seep in. Proper methodology for updating this package is:
-
- (1) Post a tarball at a publicly accessible URL containing the
- pkgtools/libnbcompat directory.
-
- (2) Ask on the tech-pkg@NetBSD.org mailing list for testers.
-
- (3) Fix any breakage on non-NetBSD operating systems before
- committing.
-
-
- 2 Tested operating systems
- ==========================
-
-*NOTE*
-*NOTE* This section should be kept up-to-date with the results for
-*NOTE* the most recent libnbcompat.
-*NOTE*
-
-libnbcompat-20040911 has been tested to build and install correctly
-on the following operating systems:
-
- FreeBSD-4.8/i386 <jlam@NetBSD.org>
- NetBSD-1.6.2/i386 <jlam@NetBSD.org>
- Solaris 9/sparc <salo@NetBSD.org>
-
-libnbcompat-20041024 has been tested to build and install correctly
-on the following operating systems:
-
- FreeBSD-4.11/i386 <jschauma@NetBSD.org>
- FreeBSD-6.1/amd64 <jschauma@NetBSD.org>
- Darwin-8.3/powerpc <schwarz@NetBSD.org>
- IRIX-5.3/mipseb <schwarz@NetBSD.org>
- IRIX-6.5/mipseb <jschauma@NetBSD.org>
- Linux/i386 <schwarz@NetBSD.org>
- RHEL4 Linux 2.6/i386 <jschauma@NetBSD.org>
-
- 3 Usage
- =======
-
-This library is intended to simplify porting NetBSD software. To that
-end, the changes to NetBSD sources to use libnbcompat are minor. The
-procedure is:
-
- (1) Add #include <nbcompat.h> at the top of the source files that
- include system headers, but below the inclusion of any
- "config.h".
-
- (2) Surround each system header file included in the source file
- with #if HAVE_<header_name>_H ... #endif.
-
-You may need to add additional headers present on other operating
-systems that define any system-supplied functions, e.g. <sys/vfs.h>.
-
-The src2nbcompat script included in the libncompat sources can be used
-to automate this process to some extent. It is intended to import
-sources from a NetBSD src checkout into pkgsrc. It will copy the
-sources from a directory and automatically insert the proper lines
-into the files. For example, to import the pkg_install sources into
-pkgsrc, run:
-
- src2nbcompat \
- /usr/src/usr.sbin/pkg_install \
- /usr/pkgsrc/pkgtools/pkg_install/files
-
-You will need to run a "cvs diff" on the imported files to check that
-any local changes are preserved across imports.
diff --git a/pkgtools/libnbcompat/files/__fts13.c b/pkgtools/libnbcompat/files/__fts13.c
deleted file mode 100644
index 2d1bcff73cf..00000000000
--- a/pkgtools/libnbcompat/files/__fts13.c
+++ /dev/null
@@ -1,1221 +0,0 @@
-/* $NetBSD: __fts13.c,v 1.7 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
-#else
-__RCSID("$NetBSD: __fts13.c,v 1.7 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/param.h>
-#include <nbcompat/stat.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/dirent.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <nbcompat/fts.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-#include <nbcompat/unistd.h>
-
-#if 0
-#if ! HAVE_NBTOOL_CONFIG_H
-#define HAVE_STRUCT_DIRENT_D_NAMLEN 1
-#endif
-#endif
-
-#if 0
-#ifdef __weak_alias
-#ifdef __LIBC12_SOURCE__
-__weak_alias(fts_children,_fts_children)
-__weak_alias(fts_close,_fts_close)
-__weak_alias(fts_open,_fts_open)
-__weak_alias(fts_read,_fts_read)
-__weak_alias(fts_set,_fts_set)
-#endif /* __LIBC12_SOURCE__ */
-#endif /* __weak_alias */
-#endif
-
-#ifdef __LIBC12_SOURCE__
-#define STAT stat12
-#else
-#define STAT stat
-#endif
-
-#if 0
-#ifdef __LIBC12_SOURCE__
-__warn_references(fts_children,
- "warning: reference to compatibility fts_children();"
- " include <fts.h> for correct reference")
-__warn_references(fts_close,
- "warning: reference to compatibility fts_close();"
- " include <fts.h> for correct reference")
-__warn_references(fts_open,
- "warning: reference to compatibility fts_open();"
- " include <fts.h> for correct reference")
-__warn_references(fts_read,
- "warning: reference to compatibility fts_read();"
- " include <fts.h> for correct reference")
-__warn_references(fts_set,
- "warning: reference to compatibility fts_set();"
- " include <fts.h> for correct reference")
-#endif
-#endif
-
-static FTSENT *fts_alloc __P((FTS *, const char *, size_t));
-static FTSENT *fts_build __P((FTS *, int));
-static void fts_lfree __P((FTSENT *));
-static void fts_load __P((FTS *, FTSENT *));
-static size_t fts_maxarglen __P((char * const *));
-static size_t fts_pow2 __P((size_t));
-static int fts_palloc __P((FTS *, size_t));
-static void fts_padjust __P((FTS *, FTSENT *));
-static FTSENT *fts_sort __P((FTS *, FTSENT *, size_t));
-static u_short fts_stat __P((FTS *, FTSENT *, int));
-static int fts_safe_changedir __P((const FTS *, const FTSENT *, int,
- const char *));
-
-#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
-
-#define CLR(opt) (sp->fts_options &= ~(opt))
-#define ISSET(opt) (sp->fts_options & (opt))
-#define SET(opt) (sp->fts_options |= (opt))
-
-#define CHDIR(sp, path) (!ISSET(FTS_NOCHDIR) && chdir(path))
-#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
-
-/* fts_build flags */
-#define BCHILD 1 /* fts_children */
-#define BNAMES 2 /* fts_children, names only */
-#define BREAD 3 /* fts_read */
-
-#ifndef DTF_HIDEW
-#undef FTS_WHITEOUT
-#endif
-
-FTS *
-fts_open(argv, options, compar)
- char * const *argv;
- int options;
- int (*compar) __P((const FTSENT **, const FTSENT **));
-{
- FTS *sp;
- FTSENT *p, *root;
- size_t nitems;
- FTSENT *parent, *tmp = NULL; /* pacify gcc */
- size_t len;
-
- _DIAGASSERT(argv != NULL);
-
- /* Options check. */
- if (options & ~FTS_OPTIONMASK) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Allocate/initialize the stream */
- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
- return (NULL);
- memset(sp, 0, sizeof(FTS));
- sp->fts_compar = compar;
- sp->fts_options = options;
-
- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
- if (ISSET(FTS_LOGICAL))
- SET(FTS_NOCHDIR);
-
- /*
- * Start out with 1K of path space, and enough, in any case,
- * to hold the user's paths.
- */
- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
- goto mem1;
-
- /* Allocate/initialize root's parent. */
- if ((parent = fts_alloc(sp, "", 0)) == NULL)
- goto mem2;
- parent->fts_level = FTS_ROOTPARENTLEVEL;
-
- /* Allocate/initialize root(s). */
- for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
- /* Don't allow zero-length paths. */
- if ((len = strlen(*argv)) == 0) {
- errno = ENOENT;
- goto mem3;
- }
-
- if ((p = fts_alloc(sp, *argv, len)) == NULL)
- goto mem3;
- p->fts_level = FTS_ROOTLEVEL;
- p->fts_parent = parent;
- p->fts_accpath = p->fts_name;
- p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
-
- /* Command-line "." and ".." are real directories. */
- if (p->fts_info == FTS_DOT)
- p->fts_info = FTS_D;
-
- /*
- * If comparison routine supplied, traverse in sorted
- * order; otherwise traverse in the order specified.
- */
- if (compar) {
- p->fts_link = root;
- root = p;
- } else {
- p->fts_link = NULL;
- if (root == NULL)
- tmp = root = p;
- else {
- tmp->fts_link = p;
- tmp = p;
- }
- }
- }
- if (compar && nitems > 1)
- root = fts_sort(sp, root, nitems);
-
- /*
- * Allocate a dummy pointer and make fts_read think that we've just
- * finished the node before the root(s); set p->fts_info to FTS_INIT
- * so that everything about the "current" node is ignored.
- */
- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
- goto mem3;
- sp->fts_cur->fts_link = root;
- sp->fts_cur->fts_info = FTS_INIT;
-
- /*
- * If using chdir(2), grab a file descriptor pointing to dot to insure
- * that we can get back here; this could be avoided for some paths,
- * but almost certainly not worth the effort. Slashes, symbolic links,
- * and ".." are all fairly nasty problems. Note, if we can't get the
- * descriptor we run anyway, just more slowly.
- */
- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
- SET(FTS_NOCHDIR);
-
- return (sp);
-
-mem3: fts_lfree(root);
- free(parent);
-mem2: free(sp->fts_path);
-mem1: free(sp);
- return (NULL);
-}
-
-static void
-fts_load(sp, p)
- FTS *sp;
- FTSENT *p;
-{
- size_t len;
- char *cp;
-
- _DIAGASSERT(sp != NULL);
- _DIAGASSERT(p != NULL);
-
- /*
- * Load the stream structure for the next traversal. Since we don't
- * actually enter the directory until after the preorder visit, set
- * the fts_accpath field specially so the chdir gets done to the right
- * place and the user can access the first node. From fts_open it's
- * known that the path will fit.
- */
- len = p->fts_pathlen = p->fts_namelen;
- memmove(sp->fts_path, p->fts_name, len + 1);
- if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
- len = strlen(++cp);
- memmove(p->fts_name, cp, len + 1);
- p->fts_namelen = len;
- }
- p->fts_accpath = p->fts_path = sp->fts_path;
- sp->fts_dev = p->fts_dev;
-}
-
-int
-fts_close(sp)
- FTS *sp;
-{
- FTSENT *freep, *p;
- int saved_errno = 0;
-
- _DIAGASSERT(sp != NULL);
-
- /*
- * This still works if we haven't read anything -- the dummy structure
- * points to the root list, so we step through to the end of the root
- * list which has a valid parent pointer.
- */
- if (sp->fts_cur) {
- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
- freep = p;
- p = p->fts_link ? p->fts_link : p->fts_parent;
- free(freep);
- }
- free(p);
- }
-
- /* Free up child linked list, sort array, path buffer. */
- if (sp->fts_child)
- fts_lfree(sp->fts_child);
- if (sp->fts_array)
- free(sp->fts_array);
- free(sp->fts_path);
-
- /* Return to original directory, save errno if necessary. */
- if (!ISSET(FTS_NOCHDIR)) {
- if (fchdir(sp->fts_rfd))
- saved_errno = errno;
- (void)close(sp->fts_rfd);
- }
-
- /* Free up the stream pointer. */
- free(sp);
- /* ISSET() is illegal after this, since the macro touches sp */
-
- /* Set errno and return. */
- if (saved_errno) {
- errno = saved_errno;
- return (-1);
- }
- return (0);
-}
-
-/*
- * Special case a root of "/" so that slashes aren't appended which would
- * cause paths to be written as "//foo".
- */
-#define NAPPEND(p) \
- (p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 && \
- p->fts_path[0] == '/' ? 0 : p->fts_pathlen)
-
-FTSENT *
-fts_read(sp)
- FTS *sp;
-{
- FTSENT *p, *tmp;
- int instr;
- char *t;
- int saved_errno;
-
- _DIAGASSERT(sp != NULL);
-
- /* If finished or unrecoverable error, return NULL. */
- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
- return (NULL);
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /* Save and zero out user instructions. */
- instr = p->fts_instr;
- p->fts_instr = FTS_NOINSTR;
-
- /* Any type of file may be re-visited; re-stat and re-turn. */
- if (instr == FTS_AGAIN) {
- p->fts_info = fts_stat(sp, p, 0);
- return (p);
- }
-
- /*
- * Following a symlink -- SLNONE test allows application to see
- * SLNONE and recover. If indirecting through a symlink, have
- * keep a pointer to current location. If unable to get that
- * pointer, follow fails.
- */
- if (instr == FTS_FOLLOW &&
- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- }
- return (p);
- }
-
- /* Directory in pre-order. */
- if (p->fts_info == FTS_D) {
- /* If skipped or crossed mount point, do post-order visit. */
- if (instr == FTS_SKIP ||
- (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
- if (p->fts_flags & FTS_SYMFOLLOW)
- (void)close(p->fts_symfd);
- if (sp->fts_child) {
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
- p->fts_info = FTS_DP;
- return (p);
- }
-
- /* Rebuild if only read the names and now traversing. */
- if (sp->fts_child && ISSET(FTS_NAMEONLY)) {
- CLR(FTS_NAMEONLY);
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
-
- /*
- * Cd to the subdirectory.
- *
- * If have already read and now fail to chdir, whack the list
- * to make the names come out right, and set the parent errno
- * so the application will eventually get an error condition.
- * Set the FTS_DONTCHDIR flag so that when we logically change
- * directories back to the parent we don't do a chdir.
- *
- * If haven't read do so. If the read fails, fts_build sets
- * FTS_STOP or the fts_info field of the node.
- */
- if (sp->fts_child) {
- if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
- p->fts_errno = errno;
- p->fts_flags |= FTS_DONTCHDIR;
- for (p = sp->fts_child; p; p = p->fts_link)
- p->fts_accpath =
- p->fts_parent->fts_accpath;
- }
- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
- if (ISSET(FTS_STOP))
- return (NULL);
- return (p);
- }
- p = sp->fts_child;
- sp->fts_child = NULL;
- goto name;
- }
-
- /* Move to the next node on this level. */
-next: tmp = p;
- if ((p = p->fts_link) != NULL) {
- free(tmp);
-
- /*
- * If reached the top, return to the original directory, and
- * load the paths for the next root.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- fts_load(sp, p);
- return (sp->fts_cur = p);
- }
-
- /*
- * User may have called fts_set on the node. If skipped,
- * ignore. If followed, get a file descriptor so we can
- * get back if necessary.
- */
- if (p->fts_instr == FTS_SKIP)
- goto next;
- if (p->fts_instr == FTS_FOLLOW) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
- if ((p->fts_symfd =
- open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- }
- p->fts_instr = FTS_NOINSTR;
- }
-
-name: t = sp->fts_path + NAPPEND(p->fts_parent);
- *t++ = '/';
- memmove(t, p->fts_name, (size_t)(p->fts_namelen + 1));
- return (sp->fts_cur = p);
- }
-
- /* Move up to the parent node. */
- p = tmp->fts_parent;
- free(tmp);
-
- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
- * Done; free everything up and set errno to 0 so the user
- * can distinguish between error and EOF.
- */
- free(p);
- errno = 0;
- return (sp->fts_cur = NULL);
- }
-
- /* Nul terminate the pathname. */
- sp->fts_path[p->fts_pathlen] = '\0';
-
- /*
- * Return to the parent directory. If at a root node or came through
- * a symlink, go back through the file descriptor. Otherwise, cd up
- * one directory.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- } else if (p->fts_flags & FTS_SYMFOLLOW) {
- if (FCHDIR(sp, p->fts_symfd)) {
- saved_errno = errno;
- (void)close(p->fts_symfd);
- errno = saved_errno;
- SET(FTS_STOP);
- return (NULL);
- }
- (void)close(p->fts_symfd);
- } else if (!(p->fts_flags & FTS_DONTCHDIR) &&
- fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
- SET(FTS_STOP);
- return (NULL);
- }
- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
- return (sp->fts_cur = p);
-}
-
-/*
- * Fts_set takes the stream as an argument although it's not used in this
- * implementation; it would be necessary if anyone wanted to add global
- * semantics to fts using fts_set. An error return is allowed for similar
- * reasons.
- */
-/* ARGSUSED */
-int
-fts_set(sp, p, instr)
- FTS *sp;
- FTSENT *p;
- int instr;
-{
-
- _DIAGASSERT(sp != NULL);
- _DIAGASSERT(p != NULL);
-
- if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
- instr != FTS_NOINSTR && instr != FTS_SKIP) {
- errno = EINVAL;
- return (1);
- }
- p->fts_instr = instr;
- return (0);
-}
-
-FTSENT *
-fts_children(sp, instr)
- FTS *sp;
- int instr;
-{
- FTSENT *p;
- int fd;
-
- _DIAGASSERT(sp != NULL);
-
- if (instr && instr != FTS_NAMEONLY) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /*
- * Errno set to 0 so user can distinguish empty directory from
- * an error.
- */
- errno = 0;
-
- /* Fatal errors stop here. */
- if (ISSET(FTS_STOP))
- return (NULL);
-
- /* Return logical hierarchy of user's arguments. */
- if (p->fts_info == FTS_INIT)
- return (p->fts_link);
-
- /*
- * If not a directory being visited in pre-order, stop here. Could
- * allow FTS_DNR, assuming the user has fixed the problem, but the
- * same effect is available with FTS_AGAIN.
- */
- if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
- return (NULL);
-
- /* Free up any previous child list. */
- if (sp->fts_child)
- fts_lfree(sp->fts_child);
-
- if (instr == FTS_NAMEONLY) {
- SET(FTS_NAMEONLY);
- instr = BNAMES;
- } else
- instr = BCHILD;
-
- /*
- * If using chdir on a relative path and called BEFORE fts_read does
- * its chdir to the root of a traversal, we can lose -- we need to
- * chdir into the subdirectory, and we don't know where the current
- * directory is, so we can't get back so that the upcoming chdir by
- * fts_read will work.
- */
- if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
- ISSET(FTS_NOCHDIR))
- return (sp->fts_child = fts_build(sp, instr));
-
- if ((fd = open(".", O_RDONLY, 0)) < 0)
- return (sp->fts_child = NULL);
- sp->fts_child = fts_build(sp, instr);
- if (fchdir(fd)) {
- (void)close(fd);
- return (NULL);
- }
- (void)close(fd);
- return (sp->fts_child);
-}
-
-/*
- * This is the tricky part -- do not casually change *anything* in here. The
- * idea is to build the linked list of entries that are used by fts_children
- * and fts_read. There are lots of special cases.
- *
- * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is
- * set and it's a physical walk (so that symbolic links can't be directories),
- * we can do things quickly. First, if it's a 4.4BSD file system, the type
- * of the file is in the directory entry. Otherwise, we assume that the number
- * of subdirectories in a node is equal to the number of links to the parent.
- * The former skips all stat calls. The latter skips stat calls in any leaf
- * directories and for any files after the subdirectories in the directory have
- * been found, cutting the stat calls by about 2/3.
- */
-static FTSENT *
-fts_build(sp, type)
- FTS *sp;
- int type;
-{
- struct dirent *dp;
- FTSENT *p, *head;
- size_t nitems;
- FTSENT *cur, *tail;
- DIR *dirp;
- int adjust, cderrno, descend, len, level, nlinks, saved_errno, nostat;
- size_t maxlen;
-#ifdef FTS_WHITEOUT
- int oflag;
-#endif
- char *cp = NULL; /* pacify gcc */
-
- _DIAGASSERT(sp != NULL);
-
- /* Set current node pointer. */
- cur = sp->fts_cur;
-
- /*
- * Open the directory for reading. If this fails, we're done.
- * If being called from fts_read, set the fts_info field.
- */
-#ifdef FTS_WHITEOUT
- if (ISSET(FTS_WHITEOUT))
- oflag = DTF_NODUP|DTF_REWIND;
- else
- oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND;
-#else
-#define __opendir2(path, flag) opendir(path)
-#endif
- if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
- if (type == BREAD) {
- cur->fts_info = FTS_DNR;
- cur->fts_errno = errno;
- }
- return (NULL);
- }
-
- /*
- * Nlinks is the number of possible entries of type directory in the
- * directory if we're cheating on stat calls, 0 if we're not doing
- * any stat calls at all, -1 if we're doing stats on everything.
- */
- if (type == BNAMES) {
- nlinks = 0;
- nostat = 1;
- } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) {
- nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2);
- nostat = 1;
- } else {
- nlinks = -1;
- nostat = 0;
- }
-
-#ifdef notdef
- (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink);
- (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n",
- ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT));
-#endif
- /*
- * If we're going to need to stat anything or we want to descend
- * and stay in the directory, chdir. If this fails we keep going,
- * but set a flag so we don't chdir after the post-order visit.
- * We won't be able to stat anything, but we can still return the
- * names themselves. Note, that since fts_read won't be able to
- * chdir into the directory, it will have to return different path
- * names than before, i.e. "a/b" instead of "b". Since the node
- * has already been visited in pre-order, have to wait until the
- * post-order visit to return the error. There is a special case
- * here, if there was nothing to stat then it's not an error to
- * not be able to stat. This is all fairly nasty. If a program
- * needed sorted entries or stat information, they had better be
- * checking FTS_NS on the returned nodes.
- */
- cderrno = 0;
- if (nlinks || type == BREAD) {
- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
- if (nlinks && type == BREAD)
- cur->fts_errno = errno;
- cur->fts_flags |= FTS_DONTCHDIR;
- descend = 0;
- cderrno = errno;
- } else
- descend = 1;
- } else
- descend = 0;
-
- /*
- * Figure out the max file name length that can be stored in the
- * current path -- the inner loop allocates more path as necessary.
- * We really wouldn't have to do the maxlen calculations here, we
- * could do them in fts_read before returning the path, but it's a
- * lot easier here since the length is part of the dirent structure.
- *
- * If not changing directories set a pointer so that can just append
- * each new name into the path.
- */
- len = NAPPEND(cur);
- if (ISSET(FTS_NOCHDIR)) {
- cp = sp->fts_path + len;
- *cp++ = '/';
- }
- len++;
- maxlen = sp->fts_pathlen - len;
-
- level = cur->fts_level + 1;
-
- /* Read the directory, attaching each entry to the `link' pointer. */
- adjust = 0;
- for (head = tail = NULL, nitems = 0; (dp = readdir(dirp)) != NULL;) {
- size_t dlen;
-
- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
- continue;
-
-#if HAVE_STRUCT_DIRENT_D_NAMLEN
- dlen = dp->d_namlen;
-#else
- dlen = strlen(dp->d_name);
-#endif
- if ((p = fts_alloc(sp, dp->d_name, dlen)) == NULL)
- goto mem1;
- if (dlen >= maxlen) { /* include space for NUL */
- if (fts_palloc(sp, len + dlen + 1)) {
- /*
- * No more memory for path or structures. Save
- * errno, free up the current structure and the
- * structures already allocated.
- */
-mem1: saved_errno = errno;
- if (p)
- free(p);
- fts_lfree(head);
- (void)closedir(dirp);
- errno = saved_errno;
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- return (NULL);
- }
- adjust = 1;
- if (ISSET(FTS_NOCHDIR))
- cp = sp->fts_path + len;
- maxlen = sp->fts_pathlen - len;
- }
-
- p->fts_pathlen = len + dlen;
- p->fts_parent = sp->fts_cur;
- p->fts_level = level;
-
-#ifdef FTS_WHITEOUT
- if (dp->d_type == DT_WHT)
- p->fts_flags |= FTS_ISW;
-#endif
-
- if (cderrno) {
- if (nlinks) {
- p->fts_info = FTS_NS;
- p->fts_errno = cderrno;
- } else
- p->fts_info = FTS_NSOK;
- p->fts_accpath = cur->fts_accpath;
- } else if (nlinks == 0
-#ifdef DT_DIR
- || (nostat &&
- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
- ) {
- p->fts_accpath =
- ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
- p->fts_info = FTS_NSOK;
- } else {
- /* Build a file name for fts_stat to stat. */
- if (ISSET(FTS_NOCHDIR)) {
- p->fts_accpath = p->fts_path;
- memmove(cp, p->fts_name,
- (size_t)(p->fts_namelen + 1));
- } else
- p->fts_accpath = p->fts_name;
- /* Stat it. */
- p->fts_info = fts_stat(sp, p, 0);
-
- /* Decrement link count if applicable. */
- if (nlinks > 0 && (p->fts_info == FTS_D ||
- p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
- --nlinks;
- }
-
- /* We walk in directory order so "ls -f" doesn't get upset. */
- p->fts_link = NULL;
- if (head == NULL)
- head = tail = p;
- else {
- tail->fts_link = p;
- tail = p;
- }
- ++nitems;
- }
- (void)closedir(dirp);
-
- /*
- * If had to realloc the path, adjust the addresses for the rest
- * of the tree.
- */
- if (adjust)
- fts_padjust(sp, head);
-
- /*
- * If not changing directories, reset the path back to original
- * state.
- */
- if (ISSET(FTS_NOCHDIR)) {
- if (cp - 1 > sp->fts_path)
- --cp;
- *cp = '\0';
- }
-
- /*
- * If descended after called from fts_children or after called from
- * fts_read and nothing found, get back. At the root level we use
- * the saved fd; if one of fts_open()'s arguments is a relative path
- * to an empty directory, we wind up here with no other way back. If
- * can't get back, we're done.
- */
- if (descend && (type == BCHILD || !nitems) &&
- (cur->fts_level == FTS_ROOTLEVEL ?
- FCHDIR(sp, sp->fts_rfd) :
- fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- return (NULL);
- }
-
- /* If didn't find anything, return NULL. */
- if (!nitems) {
- if (type == BREAD)
- cur->fts_info = FTS_DP;
- return (NULL);
- }
-
- /* Sort the entries. */
- if (sp->fts_compar && nitems > 1)
- head = fts_sort(sp, head, nitems);
- return (head);
-}
-
-static u_short
-fts_stat(sp, p, follow)
- FTS *sp;
- FTSENT *p;
- int follow;
-{
- FTSENT *t;
- dev_t dev;
- ino_t ino;
- struct STAT *sbp, sb;
- int saved_errno;
-
- _DIAGASSERT(sp != NULL);
- _DIAGASSERT(p != NULL);
-
- /* If user needs stat info, stat buffer already allocated. */
- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-
-#ifdef FTS_WHITEOUT
- /* check for whiteout */
- if (p->fts_flags & FTS_ISW) {
- if (sbp != &sb) {
- memset(sbp, '\0', sizeof (*sbp));
- sbp->st_mode = S_IFWHT;
- }
- return (FTS_W);
- }
-#endif
-
- /*
- * If doing a logical walk, or application requested FTS_FOLLOW, do
- * a stat(2). If that fails, check for a non-existent symlink. If
- * fail, set the errno from the stat call.
- */
- if (ISSET(FTS_LOGICAL) || follow) {
- if (stat(p->fts_accpath, sbp)) {
- saved_errno = errno;
- if (!lstat(p->fts_accpath, sbp)) {
- errno = 0;
- return (FTS_SLNONE);
- }
- p->fts_errno = saved_errno;
- goto err;
- }
- } else if (lstat(p->fts_accpath, sbp)) {
- p->fts_errno = errno;
-err: memset(sbp, 0, sizeof(struct STAT));
- return (FTS_NS);
- }
-
- if (S_ISDIR(sbp->st_mode)) {
- /*
- * Set the device/inode. Used to find cycles and check for
- * crossing mount points. Also remember the link count, used
- * in fts_build to limit the number of stat calls. It is
- * understood that these fields are only referenced if fts_info
- * is set to FTS_D.
- */
- dev = p->fts_dev = sbp->st_dev;
- ino = p->fts_ino = sbp->st_ino;
- p->fts_nlink = sbp->st_nlink;
-
- if (ISDOT(p->fts_name))
- return (FTS_DOT);
-
- /*
- * Cycle detection is done by brute force when the directory
- * is first encountered. If the tree gets deep enough or the
- * number of symbolic links to directories is high enough,
- * something faster might be worthwhile.
- */
- for (t = p->fts_parent;
- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
- if (ino == t->fts_ino && dev == t->fts_dev) {
- p->fts_cycle = t;
- return (FTS_DC);
- }
- return (FTS_D);
- }
- if (S_ISLNK(sbp->st_mode))
- return (FTS_SL);
- if (S_ISREG(sbp->st_mode))
- return (FTS_F);
- return (FTS_DEFAULT);
-}
-
-static FTSENT *
-fts_sort(sp, head, nitems)
- FTS *sp;
- FTSENT *head;
- size_t nitems;
-{
- FTSENT **ap, *p;
-
- _DIAGASSERT(sp != NULL);
- _DIAGASSERT(head != NULL);
-
- /*
- * Construct an array of pointers to the structures and call qsort(3).
- * Reassemble the array in the order returned by qsort. If unable to
- * sort for memory reasons, return the directory entries in their
- * current order. Allocate enough space for the current needs plus
- * 40 so don't realloc one entry at a time.
- */
- if (nitems > sp->fts_nitems) {
- FTSENT **new;
-
- new = realloc(sp->fts_array, sizeof(FTSENT *) * (nitems + 40));
- if (new == 0)
- return (head);
- sp->fts_array = new;
- sp->fts_nitems = nitems + 40;
- }
- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
- *ap++ = p;
- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *),
- (int (*) __P((const void *, const void *)))sp->fts_compar);
- for (head = *(ap = sp->fts_array); --nitems; ++ap)
- ap[0]->fts_link = ap[1];
- ap[0]->fts_link = NULL;
- return (head);
-}
-
-static FTSENT *
-fts_alloc(sp, name, namelen)
- FTS *sp;
- const char *name;
- size_t namelen;
-{
- FTSENT *p;
- size_t len;
-
- _DIAGASSERT(sp != NULL);
- _DIAGASSERT(name != NULL);
-
-#if defined(ALIGNBYTES) && defined(ALIGN)
- /*
- * The file name is a variable length array and no stat structure is
- * necessary if the user has set the nostat bit. Allocate the FTSENT
- * structure, the file name and the stat structure in one chunk, but
- * be careful that the stat structure is reasonably aligned. Since the
- * fts_name field is declared to be of size 1, the fts_name pointer is
- * namelen + 2 before the first possible address of the stat structure.
- */
- len = sizeof(FTSENT) + namelen;
- if (!ISSET(FTS_NOSTAT))
- len += sizeof(struct STAT) + ALIGNBYTES;
- if ((p = malloc(len)) == NULL)
- return (NULL);
-
- if (!ISSET(FTS_NOSTAT))
- p->fts_statp =
- (struct STAT *)ALIGN((u_long)(p->fts_name + namelen + 2));
-#else
- if ((p = malloc(sizeof(FTSENT) + namelen)) == NULL)
- return (NULL);
-
- if (!ISSET(FTS_NOSTAT))
- if ((p->fts_statp = malloc(sizeof(struct STAT))) == NULL) {
- free(p);
- return (NULL);
- }
-#endif
-
- /* Copy the name plus the trailing NULL. */
- memmove(p->fts_name, name, namelen + 1);
-
- p->fts_namelen = namelen;
- p->fts_path = sp->fts_path;
- p->fts_errno = 0;
- p->fts_flags = 0;
- p->fts_instr = FTS_NOINSTR;
- p->fts_number = 0;
- p->fts_pointer = NULL;
- return (p);
-}
-
-static void
-fts_lfree(head)
- FTSENT *head;
-{
- FTSENT *p;
-
- /* XXX: head may be NULL ? */
-
- /* Free a linked list of structures. */
- while ((p = head) != NULL) {
- head = head->fts_link;
-
-#if !defined(ALIGNBYTES) || !defined(ALIGN)
- if (p->fts_statp)
- free(p->fts_statp);
-#endif
- free(p);
- }
-}
-
-static size_t
-fts_pow2(x)
- size_t x;
-{
-
- x--;
- x |= x>>1;
- x |= x>>2;
- x |= x>>4;
- x |= x>>8;
- x |= x>>16;
-#if LONG_BIT > 32
- x |= x>>32;
-#endif
-#if LONG_BIT > 64
- x |= x>>64;
-#endif
- x++;
- return (x);
-}
-
-/*
- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
- * though the kernel won't resolve them. Round up the new size to a power of 2,
- * so we don't realloc the path 2 bytes at a time.
- */
-static int
-fts_palloc(sp, size)
- FTS *sp;
- size_t size;
-{
- char *new;
-
- _DIAGASSERT(sp != NULL);
-
-#if 1
- /* Protect against fts_pathlen overflow. */
- if (size > USHRT_MAX + 1) {
- errno = ENOMEM;
- return (1);
- }
-#endif
- size = fts_pow2(size);
- new = realloc(sp->fts_path, size);
- if (new == 0)
- return (1);
- sp->fts_path = new;
- sp->fts_pathlen = size;
- return (0);
-}
-
-/*
- * When the path is realloc'd, have to fix all of the pointers in structures
- * already returned.
- */
-static void
-fts_padjust(sp, head)
- FTS *sp;
- FTSENT *head;
-{
- FTSENT *p;
- char *addr;
-
- _DIAGASSERT(sp != NULL);
-
-#define ADJUST(p) do { \
- if ((p)->fts_accpath != (p)->fts_name) \
- (p)->fts_accpath = \
- addr + ((p)->fts_accpath - (p)->fts_path); \
- (p)->fts_path = addr; \
-} while (/*CONSTCOND*/0)
-
- addr = sp->fts_path;
-
- /* Adjust the current set of children. */
- for (p = sp->fts_child; p; p = p->fts_link)
- ADJUST(p);
-
- /* Adjust the rest of the tree, including the current level. */
- for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
- ADJUST(p);
- p = p->fts_link ? p->fts_link : p->fts_parent;
- }
-}
-
-static size_t
-fts_maxarglen(argv)
- char * const *argv;
-{
- size_t len, max;
-
- _DIAGASSERT(argv != NULL);
-
- for (max = 0; *argv; ++argv)
- if ((len = strlen(*argv)) > max)
- max = len;
- return (max + 1);
-}
-
-/*
- * Change to dir specified by fd or p->fts_accpath without getting
- * tricked by someone changing the world out from underneath us.
- * Assumes p->fts_dev and p->fts_ino are filled in.
- */
-static int
-fts_safe_changedir(sp, p, fd, path)
- const FTS *sp;
- const FTSENT *p;
- int fd;
- const char *path;
-{
- int oldfd = fd, ret = -1;
- struct STAT sb;
-
- if (ISSET(FTS_NOCHDIR))
- return 0;
-
- if (fd < 0 && (fd = open(path, O_RDONLY)) == -1)
- return -1;
-
- if (fstat(fd, &sb) == -1)
- goto bail;
-
- if (sb.st_ino != p->fts_ino || sb.st_dev != p->fts_dev) {
- errno = ENOENT;
- goto bail;
- }
-
- ret = fchdir(fd);
-
-bail:
- if (oldfd < 0) {
- int save_errno = errno;
- (void)close(fd);
- errno = save_errno;
- }
- return ret;
-}
diff --git a/pkgtools/libnbcompat/files/__glob13.c b/pkgtools/libnbcompat/files/__glob13.c
deleted file mode 100644
index 43f7d3414c8..00000000000
--- a/pkgtools/libnbcompat/files/__glob13.c
+++ /dev/null
@@ -1,1040 +0,0 @@
-/* $NetBSD: __glob13.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
-#else
-__RCSID("$NetBSD: __glob13.c,v 1.1 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * glob(3) -- a superset of the one defined in POSIX 1003.2.
- *
- * The [!...] convention to negate a range is supported (SysV, Posix, ksh).
- *
- * Optional extra services, controlled by flags not defined by POSIX:
- *
- * GLOB_MAGCHAR:
- * Set in gl_flags if pattern contained a globbing character.
- * GLOB_NOMAGIC:
- * Same as GLOB_NOCHECK, but it will only append pattern if it did
- * not contain any magic characters. [Used in csh style globbing]
- * GLOB_ALTDIRFUNC:
- * Use alternately specified directory access functions.
- * GLOB_TILDE:
- * expand ~user/foo to the /home/dir/of/user/foo
- * GLOB_BRACE:
- * expand {1,2}{a,b} to 1a 1b 2a 2b
- * gl_matchc:
- * Number of matches in the current invocation of glob.
- */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/param.h>
-#include <nbcompat/stat.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#include <nbcompat/dirent.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/glob.h>
-#include <nbcompat/pwd.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-#include <nbcompat/unistd.h>
-
-#if 0
-#ifdef __weak_alias
-#ifdef __LIBC12_SOURCE__
-__weak_alias(glob,_glob)
-__weak_alias(globfree,_globfree)
-#endif /* __LIBC12_SOURCE__ */
-#endif /* __weak_alias */
-#endif
-
-/*
- * XXX: For NetBSD 1.4.x compatibility. (kill me l8r)
- */
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(a)
-#endif
-
-#ifdef __LIBC12_SOURCE__
-#define STAT stat12
-#else
-#define STAT stat
-#endif
-
-#ifdef __LIBC12_SOURCE__
-__warn_references(glob,
- "warning: reference to compatibility glob(); include <glob.h> for correct reference")
-__warn_references(globfree,
- "warning: reference to compatibility globfree(); include <glob.h> for correct reference")
-#endif
-
-#define DOLLAR '$'
-#define DOT '.'
-#define EOS '\0'
-#define LBRACKET '['
-#define NOT '!'
-#define QUESTION '?'
-#define QUOTE '\\'
-#define RANGE '-'
-#define RBRACKET ']'
-#define SEP '/'
-#define STAR '*'
-#define TILDE '~'
-#define UNDERSCORE '_'
-#define LBRACE '{'
-#define RBRACE '}'
-#define SLASH '/'
-#define COMMA ','
-
-#ifndef DEBUG
-
-#define M_QUOTE 0x8000
-#define M_PROTECT 0x4000
-#define M_MASK 0xffff
-#define M_ASCII 0x00ff
-
-typedef u_short Char;
-
-#else
-
-#define M_QUOTE 0x80
-#define M_PROTECT 0x40
-#define M_MASK 0xff
-#define M_ASCII 0x7f
-
-typedef char Char;
-
-#endif
-
-
-#define CHAR(c) ((Char)((c)&M_ASCII))
-#define META(c) ((Char)((c)|M_QUOTE))
-#define M_ALL META('*')
-#define M_END META(']')
-#define M_NOT META('!')
-#define M_ONE META('?')
-#define M_RNG META('-')
-#define M_SET META('[')
-#define ismeta(c) (((c)&M_QUOTE) != 0)
-
-
-static int compare __P((const void *, const void *));
-static int g_Ctoc __P((const Char *, char *, size_t));
-static int g_lstat __P((Char *, struct STAT *, glob_t *));
-static DIR *g_opendir __P((Char *, glob_t *));
-static Char *g_strchr __P((const Char *, int));
-static int g_stat __P((Char *, struct STAT *, glob_t *));
-static int glob0 __P((const Char *, glob_t *));
-static int glob1 __P((Char *, glob_t *, size_t *));
-static int glob2 __P((Char *, Char *, Char *, Char *, glob_t *,
- size_t *));
-static int glob3 __P((Char *, Char *, Char *, Char *, Char *, glob_t *,
- size_t *));
-static int globextend __P((const Char *, glob_t *, size_t *));
-static const Char *globtilde __P((const Char *, Char *, size_t, glob_t *));
-static int globexp1 __P((const Char *, glob_t *));
-static int globexp2 __P((const Char *, const Char *, glob_t *, int *));
-static int match __P((Char *, Char *, Char *));
-#ifdef DEBUG
-static void qprintf __P((const char *, Char *));
-#endif
-
-int
-glob(pattern, flags, errfunc, pglob)
- const char *pattern;
- int flags, (*errfunc) __P((const char *, int));
- glob_t *pglob;
-{
- const u_char *patnext;
- int c;
- Char *bufnext, *bufend, patbuf[MAXPATHLEN+1];
-
- _DIAGASSERT(pattern != NULL);
-
- patnext = (const u_char *) pattern;
- if (!(flags & GLOB_APPEND)) {
- pglob->gl_pathc = 0;
- pglob->gl_pathv = NULL;
- if (!(flags & GLOB_DOOFFS))
- pglob->gl_offs = 0;
- }
- pglob->gl_flags = flags & ~GLOB_MAGCHAR;
- pglob->gl_errfunc = errfunc;
- pglob->gl_matchc = 0;
-
- bufnext = patbuf;
- bufend = bufnext + MAXPATHLEN;
- if (flags & GLOB_NOESCAPE) {
- while (bufnext < bufend && (c = *patnext++) != EOS)
- *bufnext++ = c;
- } else {
- /* Protect the quoted characters. */
- while (bufnext < bufend && (c = *patnext++) != EOS)
- if (c == QUOTE) {
- if ((c = *patnext++) == EOS) {
- c = QUOTE;
- --patnext;
- }
- *bufnext++ = c | M_PROTECT;
- }
- else
- *bufnext++ = c;
- }
- *bufnext = EOS;
-
- if (flags & GLOB_BRACE)
- return globexp1(patbuf, pglob);
- else
- return glob0(patbuf, pglob);
-}
-
-/*
- * Expand recursively a glob {} pattern. When there is no more expansion
- * invoke the standard globbing routine to glob the rest of the magic
- * characters
- */
-static int
-globexp1(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
-{
- const Char* ptr = pattern;
- int rv;
-
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(pglob != NULL);
-
- /* Protect a single {}, for find(1), like csh */
- if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS)
- return glob0(pattern, pglob);
-
- while ((ptr = (const Char *) g_strchr(ptr, LBRACE)) != NULL)
- if (!globexp2(ptr, pattern, pglob, &rv))
- return rv;
-
- return glob0(pattern, pglob);
-}
-
-
-/*
- * Recursive brace globbing helper. Tries to expand a single brace.
- * If it succeeds then it invokes globexp1 with the new pattern.
- * If it fails then it tries to glob the rest of the pattern and returns.
- */
-static int
-globexp2(ptr, pattern, pglob, rv)
- const Char *ptr, *pattern;
- glob_t *pglob;
- int *rv;
-{
- int i;
- Char *lm, *ls;
- const Char *pe, *pm, *pl;
- Char patbuf[MAXPATHLEN + 1];
-
- _DIAGASSERT(ptr != NULL);
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(pglob != NULL);
- _DIAGASSERT(rv != NULL);
-
- /* copy part up to the brace */
- for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++)
- continue;
- ls = lm;
-
- /* Find the balanced brace */
- for (i = 0, pe = ++ptr; *pe; pe++)
- if (*pe == LBRACKET) {
- /* Ignore everything between [] */
- for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++)
- continue;
- if (*pe == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pe = pm;
- }
- }
- else if (*pe == LBRACE)
- i++;
- else if (*pe == RBRACE) {
- if (i == 0)
- break;
- i--;
- }
-
- /* Non matching braces; just glob the pattern */
- if (i != 0 || *pe == EOS) {
- /*
- * we use `pattern', not `patbuf' here so that that
- * unbalanced braces are passed to the match
- */
- *rv = glob0(pattern, pglob);
- return 0;
- }
-
- for (i = 0, pl = pm = ptr; pm <= pe; pm++) {
- switch (*pm) {
- case LBRACKET:
- /* Ignore everything between [] */
- for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
- continue;
- if (*pm == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pm = pl;
- }
- break;
-
- case LBRACE:
- i++;
- break;
-
- case RBRACE:
- if (i) {
- i--;
- break;
- }
- /* FALLTHROUGH */
- case COMMA:
- if (i && *pm == COMMA)
- break;
- else {
- /* Append the current string */
- for (lm = ls; (pl < pm); *lm++ = *pl++)
- continue;
- /*
- * Append the rest of the pattern after the
- * closing brace
- */
- for (pl = pe + 1; (*lm++ = *pl++) != EOS;)
- continue;
-
- /* Expand the current pattern */
-#ifdef DEBUG
- qprintf("globexp2:", patbuf);
-#endif
- *rv = globexp1(patbuf, pglob);
-
- /* move after the comma, to the next string */
- pl = pm + 1;
- }
- break;
-
- default:
- break;
- }
- }
- *rv = 0;
- return 0;
-}
-
-
-
-/*
- * expand tilde from the passwd file.
- */
-static const Char *
-globtilde(pattern, patbuf, patsize, pglob)
- const Char *pattern;
- Char *patbuf;
- size_t patsize;
- glob_t *pglob;
-{
- struct passwd *pwd;
- const char *h;
- const Char *p;
- Char *b;
- char *d;
- Char *pend = &patbuf[patsize / sizeof(Char)];
-
- pend--;
-
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(patbuf != NULL);
- _DIAGASSERT(pglob != NULL);
-
- if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
- return pattern;
-
- /* Copy up to the end of the string or / */
- for (p = pattern + 1, d = (char *)(void *)patbuf;
- d < (char *)(void *)pend && *p && *p != SLASH;
- *d++ = *p++)
- continue;
-
- if (d == (char *)(void *)pend)
- return NULL;
-
- *d = EOS;
- d = (char *)(void *)patbuf;
-
- if (*d == EOS) {
- /*
- * handle a plain ~ or ~/ by expanding $HOME
- * first and then trying the password file
- */
- if ((h = getenv("HOME")) == NULL) {
- if ((pwd = getpwuid(getuid())) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
- }
- else {
- /*
- * Expand a ~user
- */
- if ((pwd = getpwnam(d)) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
-
- /* Copy the home directory */
- for (b = patbuf; b < pend && *h; *b++ = *h++)
- continue;
-
- if (b == pend)
- return NULL;
-
- /* Append the rest of the pattern */
- while (b < pend && (*b++ = *p++) != EOS)
- continue;
-
- if (b == pend)
- return NULL;
-
- return patbuf;
-}
-
-
-/*
- * The main glob() routine: compiles the pattern (optionally processing
- * quotes), calls glob1() to do the real pattern matching, and finally
- * sorts the list (unless unsorted operation is requested). Returns 0
- * if things went well, nonzero if errors occurred. It is not an error
- * to find no matches.
- */
-static int
-glob0(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
-{
- const Char *qpatnext;
- int c, error, oldpathc;
- Char *bufnext, patbuf[MAXPATHLEN+1];
- size_t limit = 0;
-
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(pglob != NULL);
-
- if ((qpatnext = globtilde(pattern, patbuf, sizeof(patbuf),
- pglob)) == NULL)
- return GLOB_ABEND;
- oldpathc = pglob->gl_pathc;
- bufnext = patbuf;
-
- /* We don't need to check for buffer overflow any more. */
- while ((c = *qpatnext++) != EOS) {
- switch (c) {
- case LBRACKET:
- c = *qpatnext;
- if (c == NOT)
- ++qpatnext;
- if (*qpatnext == EOS ||
- g_strchr(qpatnext+1, RBRACKET) == NULL) {
- *bufnext++ = LBRACKET;
- if (c == NOT)
- --qpatnext;
- break;
- }
- *bufnext++ = M_SET;
- if (c == NOT)
- *bufnext++ = M_NOT;
- c = *qpatnext++;
- do {
- *bufnext++ = CHAR(c);
- if (*qpatnext == RANGE &&
- (c = qpatnext[1]) != RBRACKET) {
- *bufnext++ = M_RNG;
- *bufnext++ = CHAR(c);
- qpatnext += 2;
- }
- } while ((c = *qpatnext++) != RBRACKET);
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_END;
- break;
- case QUESTION:
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_ONE;
- break;
- case STAR:
- pglob->gl_flags |= GLOB_MAGCHAR;
- /* collapse adjacent stars to one,
- * to avoid exponential behavior
- */
- if (bufnext == patbuf || bufnext[-1] != M_ALL)
- *bufnext++ = M_ALL;
- break;
- default:
- *bufnext++ = CHAR(c);
- break;
- }
- }
- *bufnext = EOS;
-#ifdef DEBUG
- qprintf("glob0:", patbuf);
-#endif
-
- if ((error = glob1(patbuf, pglob, &limit)) != 0)
- return(error);
-
- if (pglob->gl_pathc == oldpathc) {
- /*
- * If there was no match we are going to append the pattern
- * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was
- * specified and the pattern did not contain any magic
- * characters GLOB_NOMAGIC is there just for compatibility
- * with csh.
- */
- if ((pglob->gl_flags & GLOB_NOCHECK) ||
- ((pglob->gl_flags & (GLOB_NOMAGIC|GLOB_MAGCHAR))
- == GLOB_NOMAGIC)) {
- return globextend(pattern, pglob, &limit);
- } else {
- return (GLOB_NOMATCH);
- }
- } else if (!(pglob->gl_flags & GLOB_NOSORT)) {
- qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
- (size_t)pglob->gl_pathc - oldpathc, sizeof(char *),
- compare);
- }
-
- return(0);
-}
-
-static int
-compare(p, q)
- const void *p, *q;
-{
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(q != NULL);
-
- return(strcoll(*(const char * const *)p, *(const char * const *)q));
-}
-
-static int
-glob1(pattern, pglob, limit)
- Char *pattern;
- glob_t *pglob;
- size_t *limit;
-{
- Char pathbuf[MAXPATHLEN+1];
-
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(pglob != NULL);
-
- /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
- if (*pattern == EOS)
- return(0);
- /*
- * we save one character so that we can use ptr >= limit,
- * in the general case when we are appending non nul chars only.
- */
- return(glob2(pathbuf, pathbuf, pathbuf + sizeof(pathbuf) - 1, pattern,
- pglob, limit));
-}
-
-/*
- * The functions glob2 and glob3 are mutually recursive; there is one level
- * of recursion for each segment in the pattern that contains one or more
- * meta characters.
- */
-static int
-glob2(pathbuf, pathend, pathlim, pattern, pglob, limit)
- Char *pathbuf, *pathend, *pathlim, *pattern;
- glob_t *pglob;
- size_t *limit;
-{
- struct STAT sb;
- Char *p, *q;
- int anymeta;
-
- _DIAGASSERT(pathbuf != NULL);
- _DIAGASSERT(pathend != NULL);
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(pglob != NULL);
-
- /*
- * Loop over pattern segments until end of pattern or until
- * segment with meta character found.
- */
- for (anymeta = 0;;) {
- if (*pattern == EOS) { /* End of pattern? */
- *pathend = EOS;
- if (g_lstat(pathbuf, &sb, pglob))
- return(0);
-
- if (((pglob->gl_flags & GLOB_MARK) &&
- pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) ||
- (S_ISLNK(sb.st_mode) &&
- (g_stat(pathbuf, &sb, pglob) == 0) &&
- S_ISDIR(sb.st_mode)))) {
- if (pathend >= pathlim)
- return (GLOB_ABORTED);
- *pathend++ = SEP;
- *pathend = EOS;
- }
- ++pglob->gl_matchc;
- return(globextend(pathbuf, pglob, limit));
- }
-
- /* Find end of next segment, copy tentatively to pathend. */
- q = pathend;
- p = pattern;
- while (*p != EOS && *p != SEP) {
- if (ismeta(*p))
- anymeta = 1;
- if (q >= pathlim)
- return GLOB_ABORTED;
- *q++ = *p++;
- }
-
- if (!anymeta) { /* No expansion, do next segment. */
- pathend = q;
- pattern = p;
- while (*pattern == SEP) {
- if (pathend >= pathlim)
- return GLOB_ABORTED;
- *pathend++ = *pattern++;
- }
- } else /* Need expansion, recurse. */
- return(glob3(pathbuf, pathend, pathlim, pattern, p,
- pglob, limit));
- }
- /* NOTREACHED */
-}
-
-static int
-glob3(pathbuf, pathend, pathlim, pattern, restpattern, pglob, limit)
- Char *pathbuf, *pathend, *pathlim, *pattern, *restpattern;
- glob_t *pglob;
- size_t *limit;
-{
- struct dirent *dp;
- DIR *dirp;
- int error;
- char buf[MAXPATHLEN];
-
- /*
- * The readdirfunc declaration can't be prototyped, because it is
- * assigned, below, to two functions which are prototyped in glob.h
- * and dirent.h as taking pointers to differently typed opaque
- * structures.
- */
- struct dirent *(*readdirfunc) __P((void *));
-
- _DIAGASSERT(pathbuf != NULL);
- _DIAGASSERT(pathend != NULL);
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(restpattern != NULL);
- _DIAGASSERT(pglob != NULL);
-
- *pathend = EOS;
- errno = 0;
-
- if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
- if (pglob->gl_errfunc) {
- if (g_Ctoc(pathbuf, buf, sizeof(buf)))
- return (GLOB_ABORTED);
- if (pglob->gl_errfunc(buf, errno) ||
- pglob->gl_flags & GLOB_ERR)
- return (GLOB_ABORTED);
- }
- /*
- * Posix/XOpen: glob should return when it encounters a
- * directory that it cannot open or read
- * XXX: Should we ignore ENOTDIR and ENOENT though?
- * I think that Posix had in mind EPERM...
- */
- if (pglob->gl_flags & GLOB_ERR)
- return (GLOB_ABORTED);
-
- return(0);
- }
-
- error = 0;
-
- /* Search directory for matching names. */
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- readdirfunc = pglob->gl_readdir;
- else
- readdirfunc = (struct dirent *(*)__P((void *))) readdir;
- while ((dp = (*readdirfunc)(dirp)) != NULL) {
- u_char *sc;
- Char *dc;
-
- /* Initial DOT must be matched literally. */
- if (dp->d_name[0] == DOT && *pattern != DOT)
- continue;
- /*
- * The resulting string contains EOS, so we can
- * use the pathlim character, if it is the nul
- */
- for (sc = (u_char *) dp->d_name, dc = pathend;
- dc <= pathlim && (*dc++ = *sc++) != EOS;)
- continue;
-
- /*
- * Have we filled the buffer without seeing EOS?
- */
- if (dc > pathlim && *pathlim != EOS) {
- /*
- * Abort when requested by caller, otherwise
- * reset pathend back to last SEP and continue
- * with next dir entry.
- */
- if (pglob->gl_flags & GLOB_ERR) {
- error = GLOB_ABORTED;
- break;
- }
- else {
- *pathend = EOS;
- continue;
- }
- }
-
- if (!match(pathend, pattern, restpattern)) {
- *pathend = EOS;
- continue;
- }
- error = glob2(pathbuf, --dc, pathlim, restpattern, pglob, limit);
- if (error)
- break;
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- (*pglob->gl_closedir)(dirp);
- else
- closedir(dirp);
-
- /*
- * Again Posix X/Open issue with regards to error handling.
- */
- if ((error || errno) && (pglob->gl_flags & GLOB_ERR))
- return (GLOB_ABORTED);
-
- return(error);
-}
-
-
-/*
- * Extend the gl_pathv member of a glob_t structure to accomodate a new item,
- * add the new item, and update gl_pathc.
- *
- * This assumes the BSD realloc, which only copies the block when its size
- * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic
- * behavior.
- *
- * Return 0 if new item added, error code if memory couldn't be allocated.
- *
- * Invariant of the glob_t structure:
- * Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and
- * gl_pathv points to (gl_offs + gl_pathc + 1) items.
- */
-static int
-globextend(path, pglob, limit)
- const Char *path;
- glob_t *pglob;
- size_t *limit;
-{
- char **pathv;
- int i;
- size_t newsize, len;
- char *copy;
- const Char *p;
-
- _DIAGASSERT(path != NULL);
- _DIAGASSERT(pglob != NULL);
-
- newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
- pathv = pglob->gl_pathv ? realloc(pglob->gl_pathv, newsize) :
- malloc(newsize);
- if (pathv == NULL)
- return(GLOB_NOSPACE);
-
- if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
- /* first time around -- clear initial gl_offs items */
- pathv += pglob->gl_offs;
- for (i = pglob->gl_offs; --i >= 0; )
- *--pathv = NULL;
- }
- pglob->gl_pathv = pathv;
-
- for (p = path; *p++;)
- continue;
- len = (size_t)(p - path);
- *limit += len;
- if ((copy = malloc(len)) != NULL) {
- if (g_Ctoc(path, copy, len)) {
- free(copy);
- return(GLOB_ABORTED);
- }
- pathv[pglob->gl_offs + pglob->gl_pathc++] = copy;
- }
- pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
-
- if ((pglob->gl_flags & GLOB_LIMIT) && (newsize + *limit) >= ARG_MAX) {
- errno = 0;
- return(GLOB_NOSPACE);
- }
-
- return(copy == NULL ? GLOB_NOSPACE : 0);
-}
-
-
-/*
- * pattern matching function for filenames. Each occurrence of the *
- * pattern causes a recursion level.
- */
-static int
-match(name, pat, patend)
- Char *name, *pat, *patend;
-{
- int ok, negate_range;
- Char c, k;
-
- _DIAGASSERT(name != NULL);
- _DIAGASSERT(pat != NULL);
- _DIAGASSERT(patend != NULL);
-
- while (pat < patend) {
- c = *pat++;
- switch (c & M_MASK) {
- case M_ALL:
- if (pat == patend)
- return(1);
- do
- if (match(name, pat, patend))
- return(1);
- while (*name++ != EOS);
- return(0);
- case M_ONE:
- if (*name++ == EOS)
- return(0);
- break;
- case M_SET:
- ok = 0;
- if ((k = *name++) == EOS)
- return(0);
- if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS)
- ++pat;
- while (((c = *pat++) & M_MASK) != M_END)
- if ((*pat & M_MASK) == M_RNG) {
- if (c <= k && k <= pat[1])
- ok = 1;
- pat += 2;
- } else if (c == k)
- ok = 1;
- if (ok == negate_range)
- return(0);
- break;
- default:
- if (*name++ != c)
- return(0);
- break;
- }
- }
- return(*name == EOS);
-}
-
-/* Free allocated data belonging to a glob_t structure. */
-void
-globfree(pglob)
- glob_t *pglob;
-{
- int i;
- char **pp;
-
- _DIAGASSERT(pglob != NULL);
-
- if (pglob->gl_pathv != NULL) {
- pp = pglob->gl_pathv + pglob->gl_offs;
- for (i = pglob->gl_pathc; i--; ++pp)
- if (*pp)
- free(*pp);
- free(pglob->gl_pathv);
- pglob->gl_pathv = NULL;
- pglob->gl_pathc = 0;
- }
-}
-
-static DIR *
-g_opendir(str, pglob)
- Char *str;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- _DIAGASSERT(str != NULL);
- _DIAGASSERT(pglob != NULL);
-
- if (!*str)
- (void)strlcpy(buf, ".", sizeof(buf));
- else {
- if (g_Ctoc(str, buf, sizeof(buf)))
- return NULL;
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_opendir)(buf));
-
- return(opendir(buf));
-}
-
-static int
-g_lstat(fn, sb, pglob)
- Char *fn;
- struct STAT *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- _DIAGASSERT(fn != NULL);
- _DIAGASSERT(sb != NULL);
- _DIAGASSERT(pglob != NULL);
-
- if (g_Ctoc(fn, buf, sizeof(buf)))
- return -1;
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_lstat)(buf, sb));
- return(lstat(buf, sb));
-}
-
-static int
-g_stat(fn, sb, pglob)
- Char *fn;
- struct STAT *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- _DIAGASSERT(fn != NULL);
- _DIAGASSERT(sb != NULL);
- _DIAGASSERT(pglob != NULL);
-
- if (g_Ctoc(fn, buf, sizeof(buf)))
- return -1;
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_stat)(buf, sb));
- return(stat(buf, sb));
-}
-
-static Char *
-g_strchr(str, ch)
- const Char *str;
- int ch;
-{
-
- _DIAGASSERT(str != NULL);
-
- do {
- if (*str == ch)
- /* LINTED this is libc's definition! */
- return (Char *)str;
- } while (*str++);
- return NULL;
-}
-
-static int
-g_Ctoc(str, buf, len)
- const Char *str;
- char *buf;
- size_t len;
-{
- char *dc;
-
- _DIAGASSERT(str != NULL);
- _DIAGASSERT(buf != NULL);
-
- if (len == 0)
- return 1;
-
- for (dc = buf; len && (*dc++ = *str++) != EOS; len--)
- continue;
-
- return len == 0;
-}
-
-#ifdef DEBUG
-static void
-qprintf(str, s)
- const char *str;
- Char *s;
-{
- Char *p;
-
- _DIAGASSERT(str != NULL);
- _DIAGASSERT(s != NULL);
-
- (void)printf("%s:\n", str);
- for (p = s; *p; p++)
- (void)printf("%c", CHAR(*p));
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", *p & M_PROTECT ? '"' : ' ');
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", ismeta(*p) ? '_' : ' ');
- (void)printf("\n");
-}
-#endif
diff --git a/pkgtools/libnbcompat/files/__unsetenv13.c b/pkgtools/libnbcompat/files/__unsetenv13.c
deleted file mode 100644
index 527d6a9464a..00000000000
--- a/pkgtools/libnbcompat/files/__unsetenv13.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/* $NetBSD: __unsetenv13.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "from: @(#)setenv.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: __unsetenv13.c,v 1.1 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-#if 0
-#include "local.h"
-#include "reentrant.h"
-#endif
-
-char *__findenv __P((const char *, int *));
-
-#if 0
-#ifdef __weak_alias
-#ifdef __LIBC12_SOURCE__
-__weak_alias(unsetenv,_unsetenv)
-#endif
-#endif
-#endif
-
-#if 0
-#ifdef _REENTRANT
-extern rwlock_t __environ_lock;
-#endif
-#endif
-
-#if 0
-#ifdef __LIBC12_SOURCE__
-__warn_references(unsetenv,
- "warning: reference to compatibility unsetenv();"
- " include <stdlib.h> for correct reference")
-#endif
-#endif
-
-extern char **environ;
-
-#ifndef rwlock_wrlock
-#define rwlock_wrlock(lock) ((void)0)
-#endif
-#ifndef rwlock_unlock
-#define rwlock_unlock(lock) ((void)0)
-#endif
-
-/*
- * unsetenv(name) --
- * Delete environmental variable "name".
- */
-#ifdef __LIBC12_SOURCE__
-void
-#else
-int
-#endif
-unsetenv(name)
- const char *name;
-{
- char **p;
- int offset;
-
- _DIAGASSERT(name != NULL);
-
-#ifndef __LIBC12_SOURCE__
- if (name == NULL || *name == '\0' || strchr(name, '=') != NULL) {
- errno = EINVAL;
- return (-1);
- }
-#endif
-
- rwlock_wrlock(&__environ_lock);
- while (__findenv(name, &offset)) /* if set multiple times */
- for (p = &environ[offset];; ++p)
- if (!(*p = *(p + 1)))
- break;
- rwlock_unlock(&__environ_lock);
-
-#ifndef __LIBC12_SOURCE__
- return (0);
-#endif
-}
diff --git a/pkgtools/libnbcompat/files/aclocal.m4 b/pkgtools/libnbcompat/files/aclocal.m4
deleted file mode 100644
index be248420f82..00000000000
--- a/pkgtools/libnbcompat/files/aclocal.m4
+++ /dev/null
@@ -1,143 +0,0 @@
-dnl $NetBSD: aclocal.m4,v 1.4 2006/03/01 16:47:54 joerg Exp $
-dnl
-
-dnl
-dnl AC_MSG_TRY_COMPILE
-dnl
-dnl Written by Luke Mewburn <lukem@netbsd.org>
-dnl
-dnl Usage:
-dnl AC_MSG_TRY_COMPILE(Message, CacheVar, Includes, Code,
-dnl ActionPass [,ActionFail] )
-dnl
-dnl effectively does:
-dnl AC_CACHE_CHECK(Message, CacheVar,
-dnl AC_TRY_COMPILE(Includes, Code, CacheVar = yes, CacheVar = no)
-dnl if CacheVar == yes
-dnl AC_MESSAGE_RESULT(yes)
-dnl ActionPass
-dnl else
-dnl AC_MESSAGE_RESULT(no)
-dnl ActionFail
-dnl )
-dnl
-AC_DEFUN(AC_MSG_TRY_COMPILE, [
- AC_CACHE_CHECK($1, $2, [
- AC_TRY_COMPILE([ $3 ], [ $4; ], [ $2=yes ], [ $2=no ])
- ])
- if test "x[$]$2" = "xyes"; then
- $5
- else
- $6
- :
- fi
-])
-
-dnl
-dnl AC_MSG_TRY_LINK
-dnl
-dnl Usage:
-dnl AC_MSG_TRY_LINK(Message, CacheVar, Includes, Code,
-dnl ActionPass [,ActionFail] )
-dnl
-dnl as AC_MSG_TRY_COMPILE, but uses AC_TRY_LINK instead of AC_TRY_COMPILE
-dnl
-AC_DEFUN(AC_MSG_TRY_LINK, [
- AC_CACHE_CHECK($1, $2, [
- AC_TRY_LINK([ $3 ], [ $4; ], [ $2=yes ], [ $2=no ])
- ])
- if test "x[$]$2" = "xyes"; then
- $5
- else
- $6
- :
- fi
-])
-
-
-dnl
-dnl AC_LIBRARY_NET: #Id: net.m4,v 1.5 1997/11/09 21:36:54 jhawk Exp #
-dnl
-dnl Written by John Hawkinson <jhawk@mit.edu>. This code is in the Public
-dnl Domain.
-dnl
-dnl This test is for network applications that need socket() and
-dnl gethostbyname() -ish functions. Under Solaris, those applications need to
-dnl link with "-lsocket -lnsl". Under IRIX, they should *not* link with
-dnl "-lsocket" because libsocket.a breaks a number of things (for instance:
-dnl gethostbyname() under IRIX 5.2, and snoop sockets under most versions of
-dnl IRIX).
-dnl
-dnl Unfortunately, many application developers are not aware of this, and
-dnl mistakenly write tests that cause -lsocket to be used under IRIX. It is
-dnl also easy to write tests that cause -lnsl to be used under operating
-dnl systems where neither are necessary (or useful), such as SunOS 4.1.4, which
-dnl uses -lnsl for TLI.
-dnl
-dnl This test exists so that every application developer does not test this in
-dnl a different, and subtly broken fashion.
-dnl
-dnl It has been argued that this test should be broken up into two separate
-dnl tests, one for the resolver libraries, and one for the libraries necessary
-dnl for using Sockets API. Unfortunately, the two are carefully intertwined and
-dnl allowing the autoconf user to use them independently potentially results in
-dnl unfortunate ordering dependencies -- as such, such component macros would
-dnl have to carefully use indirection and be aware if the other components were
-dnl executed. Since other autoconf macros do not go to this trouble, and almost
-dnl no applications use sockets without the resolver, this complexity has not
-dnl been implemented.
-dnl
-dnl The check for libresolv is in case you are attempting to link statically
-dnl and happen to have a libresolv.a lying around (and no libnsl.a).
-dnl
-AC_DEFUN(AC_LIBRARY_NET, [
- # Most operating systems have gethostbyname() in the default searched
- # libraries (i.e. libc):
- AC_CHECK_FUNC(gethostbyname, ,
- # Some OSes (eg. Solaris) place it in libnsl:
- AC_CHECK_LIB(nsl, gethostbyname, ,
- # Some strange OSes (SINIX) have it in libsocket:
- AC_CHECK_LIB(socket, gethostbyname, ,
- # Unfortunately libsocket sometimes depends on libnsl.
- # AC_CHECK_LIB's API is essentially broken so the following
- # ugliness is necessary:
- AC_CHECK_LIB(socket, gethostbyname,
- LIBS="-lsocket -lnsl $LIBS",
- AC_CHECK_LIB(resolv, gethostbyname),
- -lnsl)
- )
- )
- )
- AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, ,
- AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl)))
- ])
-
-
-dnl From heimdal sources
-dnl Id: c-attribute.m4,v 1.5 2004/08/26 12:35:41 joda Exp
-dnl
-
-dnl
-dnl Test for __attribute__
-dnl
-
-AC_DEFUN([AC_C___ATTRIBUTE__], [
-AC_MSG_CHECKING(for __attribute__)
-AC_CACHE_VAL(ac_cv___attribute__, [
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
- exit(1);
-}
-]])],
-[ac_cv___attribute__=yes],
-[ac_cv___attribute__=no])])
-if test "$ac_cv___attribute__" = "yes"; then
- AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
-fi
-AC_MSG_RESULT($ac_cv___attribute__)
-])
-
diff --git a/pkgtools/libnbcompat/files/bits.c b/pkgtools/libnbcompat/files/bits.c
deleted file mode 100644
index a0561e2c41f..00000000000
--- a/pkgtools/libnbcompat/files/bits.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/* $NetBSD: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the Institute nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include "nbcompat/config.h"
-#if 0
-__RCSID("$NetBSD: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $");
-#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#define BITSIZE(TYPE) \
-{ \
- int b = 0; TYPE x = 1, zero = 0; char *pre = "u"; \
- char tmp[128], tmp2[128]; \
- while(x){ x <<= 1; b++; if(x < zero) pre=""; } \
- if(b >= len){ \
- int tabs; \
- sprintf(tmp, "%sint%d_t" , pre, len); \
- sprintf(tmp2, "typedef %s %s;", #TYPE, tmp); \
- tabs = 5 - strlen(tmp2) / 8; \
- fprintf(f, "%s", tmp2); \
- while(tabs-- > 0) fprintf(f, "\t"); \
- fprintf(f, "/* %2d bits */\n", b); \
- return; \
- } \
-}
-
-/*
- * work around rpl_malloc from nbcompat_config.h, since we don't need the
- * replacement malloc() here
- */
-#if ! HAVE_MALLOC
-#undef malloc
-void *malloc();
-#endif
-
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
-static void
-try_signed(FILE *f, int len) __attribute__ ((unused));
-
-static void
-try_unsigned(FILE *f, int len) __attribute__ ((unused));
-
-static int
-print_bt(FILE *f, int flag) __attribute__ ((unused));
-
-static void
-try_signed(FILE *f, int len)
-{
- BITSIZE(signed char);
- BITSIZE(short);
- BITSIZE(int);
- BITSIZE(long);
-#if HAVE_LONG_LONG
- BITSIZE(long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-static void
-try_unsigned(FILE *f, int len)
-{
- BITSIZE(unsigned char);
- BITSIZE(unsigned short);
- BITSIZE(unsigned int);
- BITSIZE(unsigned long);
-#if HAVE_LONG_LONG
- BITSIZE(unsigned long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-int main(int argc, char **argv)
-{
- FILE *f;
- char *fn, *hb;
-
- if(argc < 2){
- fn = "bits.h";
- hb = "__BITS_H__";
- f = stdout;
- } else {
- char *p;
- fn = argv[1];
- hb = malloc(strlen(fn) + 5);
- sprintf(hb, "__%s__", fn);
- for(p = hb; *p; p++){
- if(!isalnum((unsigned char)*p))
- *p = '_';
- }
- f = fopen(argv[1], "w");
- }
- fprintf(f, "/* %s -- this file was generated by\n", fn);
- fprintf(f, " %*s %s */\n\n", (int)strlen(fn), "",
- "$Id: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $");
- fprintf(f, "#ifndef %s\n", hb);
- fprintf(f, "#define %s\n", hb);
- fprintf(f, "\n");
-#if HAVE_SYS_TYPES_H
- fprintf(f, "#include <sys/types.h>\n");
-#endif
-#if HAVE_INTTYPES_H
- fprintf(f, "#include <inttypes.h>\n");
-#endif
-#if HAVE_SYS_BITYPES_H
- fprintf(f, "#include <sys/bitypes.h>\n");
-#endif
-#if HAVE_BIND_BITYPES_H
- fprintf(f, "#include <bind/bitypes.h>\n");
-#endif
-#if HAVE_NETINET_IN6_MACHTYPES_H
- fprintf(f, "#include <netinet/in6_machtypes.h>\n");
-#endif
- fprintf(f, "\n");
-
-#ifndef HAVE_INT8_T
- try_signed (f, 8);
-#endif /* HAVE_INT8_T */
-#ifndef HAVE_INT16_T
- try_signed (f, 16);
-#endif /* HAVE_INT16_T */
-#ifndef HAVE_INT32_T
- try_signed (f, 32);
-#endif /* HAVE_INT32_T */
-#ifndef HAVE_INT64_T
- try_signed (f, 64);
-#endif /* HAVE_INT64_T */
-
-#ifndef HAVE_UINT8_T
- try_unsigned (f, 8);
-#endif /* HAVE_UINT8_T */
-#ifndef HAVE_UINT16_T
- try_unsigned (f, 16);
-#endif /* HAVE_UINT16_T */
-#ifndef HAVE_UINT32_T
- try_unsigned (f, 32);
-#endif /* HAVE_UINT32_T */
-#ifndef HAVE_UINT64_T
- try_unsigned (f, 64);
-#endif /* HAVE_UINT64_T */
-
-#define X(S) fprintf(f, "typedef uint" #S "_t u_int" #S "_t;\n")
-#ifndef HAVE_U_INT8_T
- X(8);
-#endif /* HAVE_U_INT8_T */
-#ifndef HAVE_U_INT16_T
- X(16);
-#endif /* HAVE_U_INT16_T */
-#ifndef HAVE_U_INT32_T
- X(32);
-#endif /* HAVE_U_INT32_T */
-#ifndef HAVE_U_INT64_T
- X(64);
-#endif /* HAVE_U_INT64_T */
-
- fprintf(f, "#endif /* %s */\n", hb);
- return 0;
-}
diff --git a/pkgtools/libnbcompat/files/config.guess b/pkgtools/libnbcompat/files/config.guess
deleted file mode 100755
index 0f0fe712ae6..00000000000
--- a/pkgtools/libnbcompat/files/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /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 Free Software Foundation,
-# Inc.
-
-timestamp='2007-03-06'
-
-# 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted 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.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-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
-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' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# 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" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { 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 __ELF__ >/dev/null
- 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 ;;
- 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:SunOS:5.*:*)
- echo i386-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:*:[45])
- 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 __LP64__ >/dev/null
- 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*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-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 ;;
- 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 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- 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 ;;
- 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:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- 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 ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-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 ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*)
- 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 i386.
- echo i386-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; } ;;
- 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.0*:*)
- 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 ;;
- 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
- 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 ;;
- 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 ;;
-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://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-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/pkgtools/libnbcompat/files/config.sub b/pkgtools/libnbcompat/files/config.sub
deleted file mode 100755
index 5defff65a6e..00000000000
--- a/pkgtools/libnbcompat/files/config.sub
+++ /dev/null
@@ -1,1622 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-01-18'
-
-# 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 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.
-
-# 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
-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-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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)
- os=
- basic_machine=$1
- ;;
- -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 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | 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 | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # 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-* | c54x-* | c55x-* | c6x-* \
- | 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-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | 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-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | 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-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # 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
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- 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
- ;;
- cr16c)
- basic_machine=cr16c-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
- ;;
- 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
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- 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
- ;;
- 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[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.
- -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* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -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* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -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*)
- # 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
- ;;
- -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
- ;;
- # 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
- ;;
- -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/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure
deleted file mode 100755
index d7fe8d38d4c..00000000000
--- a/pkgtools/libnbcompat/files/configure
+++ /dev/null
@@ -1,12080 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for libnbcompat 20040911.
-#
-# Report bugs to <grant@NetBSD.org>.
-#
-# Copyright (C) 2003 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 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='libnbcompat'
-PACKAGE_TARNAME='libnbcompat'
-PACKAGE_VERSION='20040911'
-PACKAGE_STRING='libnbcompat 20040911'
-PACKAGE_BUGREPORT='grant@NetBSD.org'
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#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"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CANONICAL_HOST INCLUDES SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB AWK AR AUTOCONF AUTOHEADER CPP EGREP LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# 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.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-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
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -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 | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$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 ;;
-
- -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 ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- 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 ;;
-
- -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=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 ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- 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'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-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
- 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
-
-
-# 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 its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- 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
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# 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 libnbcompat 20040911 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 \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-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]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --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]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_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]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of libnbcompat 20040911:";;
- esac
- cat <<\_ACEOF
-
-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>
- CPPFLAGS 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 <grant@NetBSD.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style 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
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-libnbcompat configure 20040911
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by libnbcompat $as_me 20040911, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-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`
-hostinfo = `(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=.
- echo "PATH: $as_dir"
-done
-
-} >&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_sep=
-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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$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
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >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
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- 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.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-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 `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-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
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`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.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-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_config_headers="$ac_config_headers nbcompat/config.h"
-
-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 $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-CANONICAL_HOST=$host
-
-
-
-# Checks for programs.
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-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
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- 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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; 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 | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$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
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 -std1 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 -std1. */
-int osf4_cc_array ['\x00' == 0 ? 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
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-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
-
-# 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.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- 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
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-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. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$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'
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$AWK" && break
-done
-
-# Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-
-
-
-
-echo "$as_me:$LINENO: checking for fparseln in -lutil" >&5
-echo $ECHO_N "checking for fparseln in -lutil... $ECHO_C" >&6
-if test "${ac_cv_lib_util_fparseln+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lutil $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char fparseln ();
-int
-main ()
-{
-fparseln ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_util_fparseln=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_util_fparseln=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_util_fparseln" >&5
-echo "${ECHO_T}$ac_cv_lib_util_fparseln" >&6
-if test $ac_cv_lib_util_fparseln = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUTIL 1
-_ACEOF
-
- LIBS="-lutil $LIBS"
-
-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
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
- echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-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
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.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))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
-if test "${ac_cv_header_time+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_time=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_time=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6
-if test $ac_cv_header_time = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
-
-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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-for ac_header in inttypes.h sys/types.h sys/bitypes.h bind/bitypes.h \
- netinet/in6_machtypes.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in alloca.h assert.h ctype.h dirent.h err.h errno.h fcntl.h \
- fnmatch.h fts.h grp.h libutil.h limits.h machine/endian.h ndir.h \
- paths.h pwd.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h \
- string.h sys/byteorder.h sys/cdefs.h sys/dir.h sys/endian.h \
- sys/file.h sys/mkdev.h sys/ndir.h sys/param.h sys/stat.h \
- sys/statfs.h sys/statvfs.h sys/time.h sys/ttycom.h sys/types.h \
- sys/uio.h sys/vfs.h termcap.h time.h tzfile.h unistd.h \
- util.h utime.h
-
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in sys/mount.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- $ac_includes_default
- #ifdef HAVE_SYS_PARAM_H
- #include <sys/param.h>
- #endif
-
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- :
-else
- :
-fi
-
-done
-
-
-
-for ac_header in glob.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_GLOB 1
-_ACEOF
-
-
-
-case $LIBOBJS in
- "glob.$ac_objext" | \
- *" glob.$ac_objext" | \
- "glob.$ac_objext "* | \
- *" glob.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS glob.$ac_objext" ;;
-esac
-
-
-
-for ac_header in sys/queue.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_QUEUE 1
-_ACEOF
-
-
-
-
-
-for ac_header in regex.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-echo "$as_me:$LINENO: checking for regexec" >&5
-echo $ECHO_N "checking for regexec... $ECHO_C" >&6
-if test "${ac_cv_func_regexec+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define regexec to an innocuous variant, in case <limits.h> declares regexec.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define regexec innocuous_regexec
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char regexec (); 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 regexec
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char regexec ();
-/* 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_regexec) || defined (__stub___regexec)
-choke me
-#else
-char (*f) () = regexec;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != regexec;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_regexec=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_regexec=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_regexec" >&5
-echo "${ECHO_T}$ac_cv_func_regexec" >&6
-if test $ac_cv_func_regexec = yes; then
- :
-else
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_REGEX 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "regcomp.$ac_objext" | \
- *" regcomp.$ac_objext" | \
- "regcomp.$ac_objext "* | \
- *" regcomp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS regcomp.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "regerror.$ac_objext" | \
- *" regerror.$ac_objext" | \
- "regerror.$ac_objext "* | \
- *" regerror.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS regerror.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "regexec.$ac_objext" | \
- *" regexec.$ac_objext" | \
- "regexec.$ac_objext "* | \
- *" regexec.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS regexec.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "regfree.$ac_objext" | \
- *" regfree.$ac_objext" | \
- "regfree.$ac_objext "* | \
- *" regfree.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS regfree.$ac_objext" ;;
-esac
-
-
-fi
-
-
-
-for ac_header in md5.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-
- echo "$as_me:$LINENO: checking for MD5Init in md5.h" >&5
-echo $ECHO_N "checking for MD5Init in md5.h... $ECHO_C" >&6
-if test "${pkg_cv_have_md5init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <sys/types.h>
- #include <md5.h>
-
-int
-main ()
-{
-
- MD5_CTX *f;
- MD5Init(f);
- ;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pkg_cv_have_md5init=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pkg_cv_have_md5init=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $pkg_cv_have_md5init" >&5
-echo "${ECHO_T}$pkg_cv_have_md5init" >&6
- if test "x$pkg_cv_have_md5init" = "xyes"; then
- :
- else
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_MD5INIT 1
-_ACEOF
-
-
-
-
- :
- fi
-
-
-fi
-
-done
-
-
-
-
-
-for ac_header in md5.h rmd160.h sha1.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-echo "$as_me:$LINENO: checking for MD5File" >&5
-echo $ECHO_N "checking for MD5File... $ECHO_C" >&6
-if test "${ac_cv_func_MD5File+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define MD5File to an innocuous variant, in case <limits.h> declares MD5File.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define MD5File innocuous_MD5File
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char MD5File (); 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 MD5File
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char MD5File ();
-/* 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_MD5File) || defined (__stub___MD5File)
-choke me
-#else
-char (*f) () = MD5File;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != MD5File;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_MD5File=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_MD5File=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_MD5File" >&5
-echo "${ECHO_T}$ac_cv_func_MD5File" >&6
-if test $ac_cv_func_MD5File = yes; then
- :
-else
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_MD5 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "md5c.$ac_objext" | \
- *" md5c.$ac_objext" | \
- "md5c.$ac_objext "* | \
- *" md5c.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS md5c.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "md5hl.$ac_objext" | \
- *" md5hl.$ac_objext" | \
- "md5hl.$ac_objext "* | \
- *" md5hl.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS md5hl.$ac_objext" ;;
-esac
-
-
-fi
-
-echo "$as_me:$LINENO: checking for RMD160File" >&5
-echo $ECHO_N "checking for RMD160File... $ECHO_C" >&6
-if test "${ac_cv_func_RMD160File+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define RMD160File to an innocuous variant, in case <limits.h> declares RMD160File.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define RMD160File innocuous_RMD160File
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char RMD160File (); 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 RMD160File
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char RMD160File ();
-/* 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_RMD160File) || defined (__stub___RMD160File)
-choke me
-#else
-char (*f) () = RMD160File;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != RMD160File;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_RMD160File=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_RMD160File=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_RMD160File" >&5
-echo "${ECHO_T}$ac_cv_func_RMD160File" >&6
-if test $ac_cv_func_RMD160File = yes; then
- :
-else
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_RMD160 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "rmd160.$ac_objext" | \
- *" rmd160.$ac_objext" | \
- "rmd160.$ac_objext "* | \
- *" rmd160.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS rmd160.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "rmd160hl.$ac_objext" | \
- *" rmd160hl.$ac_objext" | \
- "rmd160hl.$ac_objext "* | \
- *" rmd160hl.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS rmd160hl.$ac_objext" ;;
-esac
-
-
-fi
-
-echo "$as_me:$LINENO: checking for SHA1File" >&5
-echo $ECHO_N "checking for SHA1File... $ECHO_C" >&6
-if test "${ac_cv_func_SHA1File+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define SHA1File to an innocuous variant, in case <limits.h> declares SHA1File.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define SHA1File innocuous_SHA1File
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char SHA1File (); 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 SHA1File
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char SHA1File ();
-/* 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_SHA1File) || defined (__stub___SHA1File)
-choke me
-#else
-char (*f) () = SHA1File;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != SHA1File;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_SHA1File=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_SHA1File=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_SHA1File" >&5
-echo "${ECHO_T}$ac_cv_func_SHA1File" >&6
-if test $ac_cv_func_SHA1File = yes; then
- :
-else
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_SHA1 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "sha1.$ac_objext" | \
- *" sha1.$ac_objext" | \
- "sha1.$ac_objext "* | \
- *" sha1.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS sha1.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "sha1hl.$ac_objext" | \
- *" sha1hl.$ac_objext" | \
- "sha1hl.$ac_objext "* | \
- *" sha1hl.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS sha1hl.$ac_objext" ;;
-esac
-
-
-fi
-
-
-pkg_use_nbcompat_getopt_long=yes
-
-for ac_header in getopt.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-
- echo "$as_me:$LINENO: checking for struct option" >&5
-echo $ECHO_N "checking for struct option... $ECHO_C" >&6
-if test "${pkg_cv_have_struct_option+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <getopt.h>
-int
-main ()
-{
- struct option X; ;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pkg_cv_have_struct_option=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pkg_cv_have_struct_option=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $pkg_cv_have_struct_option" >&5
-echo "${ECHO_T}$pkg_cv_have_struct_option" >&6
- if test "x$pkg_cv_have_struct_option" = "xyes"; then
- pkg_use_nbcompat_getopt_long=no
- else
- pkg_use_nbcompat_getopt_long=yes
- :
- fi
-
-
-fi
-
-done
-
-
-if test $pkg_use_nbcompat_getopt_long = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_GETOPT_LONG 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "getopt_long.$ac_objext" | \
- *" getopt_long.$ac_objext" | \
- "getopt_long.$ac_objext "* | \
- *" getopt_long.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
-esac
-
-fi
-
-pkg_use_nbcompat_vis=yes
-
-for ac_header in vis.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-
- echo "$as_me:$LINENO: checking for VIS_WHITE in vis.h" >&5
-echo $ECHO_N "checking for VIS_WHITE in vis.h... $ECHO_C" >&6
-if test "${pkg_cv_have_vis_white+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <sys/types.h>
- #include <vis.h>
-
-int
-main ()
-{
- int X = VIS_WHITE; ;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pkg_cv_have_vis_white=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pkg_cv_have_vis_white=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $pkg_cv_have_vis_white" >&5
-echo "${ECHO_T}$pkg_cv_have_vis_white" >&6
- if test "x$pkg_cv_have_vis_white" = "xyes"; then
-
-
-
-
-
-
-
-for ac_func in strunvis strvis strsvis svis unvis vis
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
-
-
-
-for ac_func in strunvis strvis strsvis svis unvis vis
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- pkg_use_nbcompat_vis=no
-else
- pkg_use_nbcompat_vis=yes; break
-fi
-done
-
-
- else
-
- :
- fi
-
-
-fi
-
-done
-
-
-if test $pkg_use_nbcompat_vis = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_VIS 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "vis.$ac_objext" | \
- *" vis.$ac_objext" | \
- "vis.$ac_objext "* | \
- *" vis.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS vis.$ac_objext" ;;
-esac
-
- case $LIBOBJS in
- "unvis.$ac_objext" | \
- *" unvis.$ac_objext" | \
- "unvis.$ac_objext "* | \
- *" unvis.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS unvis.$ac_objext" ;;
-esac
-
-fi
-
-
-echo "$as_me:$LINENO: checking for __attribute__" >&5
-echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
-if test "${ac_cv___attribute__+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
- exit(1);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv___attribute__=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv___attribute__=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if test "$ac_cv___attribute__" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___ATTRIBUTE__ 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
-echo "${ECHO_T}$ac_cv___attribute__" >&6
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for long long" >&5
-echo $ECHO_N "checking for long long... $ECHO_C" >&6
-if test "${ac_cv_type_long_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((long long *) 0)
- return 0;
-if (sizeof (long long))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_long_long=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long_long=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
-echo "${ECHO_T}$ac_cv_type_long_long" >&6
-if test $ac_cv_type_long_long = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_LONG 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for long double" >&5
-echo $ECHO_N "checking for long double... $ECHO_C" >&6
-if test "${ac_cv_type_long_double+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((long double *) 0)
- return 0;
-if (sizeof (long double))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_long_double=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long_double=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
-echo "${ECHO_T}$ac_cv_type_long_double" >&6
-if test $ac_cv_type_long_double = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_DOUBLE 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int8_t" >&5
-echo $ECHO_N "checking for int8_t... $ECHO_C" >&6
-if test "${ac_cv_type_int8_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int8_t *) 0)
- return 0;
-if (sizeof (int8_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int8_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int8_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_int8_t" >&6
-if test $ac_cv_type_int8_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int16_t" >&5
-echo $ECHO_N "checking for int16_t... $ECHO_C" >&6
-if test "${ac_cv_type_int16_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int16_t *) 0)
- return 0;
-if (sizeof (int16_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int16_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int16_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_int16_t" >&6
-if test $ac_cv_type_int16_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT16_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int32_t" >&5
-echo $ECHO_N "checking for int32_t... $ECHO_C" >&6
-if test "${ac_cv_type_int32_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int32_t *) 0)
- return 0;
-if (sizeof (int32_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int32_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int32_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_int32_t" >&6
-if test $ac_cv_type_int32_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for int64_t" >&5
-echo $ECHO_N "checking for int64_t... $ECHO_C" >&6
-if test "${ac_cv_type_int64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((int64_t *) 0)
- return 0;
-if (sizeof (int64_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int64_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int64_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_int64_t" >&6
-if test $ac_cv_type_int64_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT64_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int8_t" >&5
-echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int8_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int8_t *) 0)
- return 0;
-if (sizeof (u_int8_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int8_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int8_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6
-if test $ac_cv_type_u_int8_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT8_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int16_t" >&5
-echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int16_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int16_t *) 0)
- return 0;
-if (sizeof (u_int16_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int16_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int16_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6
-if test $ac_cv_type_u_int16_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT16_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int32_t" >&5
-echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int32_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int32_t *) 0)
- return 0;
-if (sizeof (u_int32_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int32_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int32_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6
-if test $ac_cv_type_u_int32_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT32_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for u_int64_t" >&5
-echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6
-if test "${ac_cv_type_u_int64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((u_int64_t *) 0)
- return 0;
-if (sizeof (u_int64_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_u_int64_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_u_int64_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6
-if test $ac_cv_type_u_int64_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT64_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint8_t" >&5
-echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint8_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint8_t *) 0)
- return 0;
-if (sizeof (uint8_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint8_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint8_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint8_t" >&6
-if test $ac_cv_type_uint8_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint16_t" >&5
-echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint16_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint16_t *) 0)
- return 0;
-if (sizeof (uint16_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint16_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint16_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint16_t" >&6
-if test $ac_cv_type_uint16_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT16_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint32_t" >&5
-echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint32_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint32_t *) 0)
- return 0;
-if (sizeof (uint32_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint32_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint32_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint32_t" >&6
-if test $ac_cv_type_uint32_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT32_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for uint64_t" >&5
-echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
-if test "${ac_cv_type_uint64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-int
-main ()
-{
-if ((uint64_t *) 0)
- return 0;
-if (sizeof (uint64_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uint64_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uint64_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
-echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
-if test $ac_cv_type_uint64_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT64_T 1
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking for fsid_t" >&5
-echo $ECHO_N "checking for fsid_t... $ECHO_C" >&6
-if test "${ac_cv_type_fsid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#if HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-
-int
-main ()
-{
-if ((fsid_t *) 0)
- return 0;
-if (sizeof (fsid_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_fsid_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_fsid_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_fsid_t" >&5
-echo "${ECHO_T}$ac_cv_type_fsid_t" >&6
-if test $ac_cv_type_fsid_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FSID_T 1
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
-if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/param.h>
-
-int
-main ()
-{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- # It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_bigendian=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-int
-main ()
-{
- _ascii (); _ebcdic ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; 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
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=no
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_bigendian=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_off_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-
-echo "$as_me:$LINENO: checking size of off_t" >&5
-echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
-if test "${ac_cv_sizeof_off_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_off_t" = yes; then
- # The cast to unsigned long 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.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (off_t))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_off_t=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (off_t), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-long longval () { return (long) (sizeof (off_t)); }
-unsigned long ulongval () { return (long) (sizeof (off_t)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (off_t))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (off_t))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (off_t))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_off_t=`cat conftest.val`
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (off_t), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_off_t=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
-echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-_ACEOF
-
-
-
-# Checks for library functions.
-
-for ac_header in stdlib.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
-echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_malloc_0_nonnull=no
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if STDC_HEADERS || HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
-
-int
-main ()
-{
-exit (malloc (0) ? 0 : 1);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_malloc_0_nonnull=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
-echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
-if test $ac_cv_func_malloc_0_nonnull = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MALLOC 1
-_ACEOF
-
-else
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MALLOC 0
-_ACEOF
-
- case $LIBOBJS in
- "malloc.$ac_objext" | \
- *" malloc.$ac_objext" | \
- "malloc.$ac_objext "* | \
- *" malloc.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
-esac
-
-
-cat >>confdefs.h <<\_ACEOF
-#define malloc rpl_malloc
-_ACEOF
-
-fi
-
-
-
-echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
-echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_strerror_r+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef strerror_r
- char *p = (char *) strerror_r;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_strerror_r=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_strerror_r=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
-echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
-if test $ac_cv_have_decl_strerror_r = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R 0
-_ACEOF
-
-
-fi
-
-
-
-for ac_func in strerror_r
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
-echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
-if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_cv_func_strerror_r_char_p=no
- if test $ac_cv_have_decl_strerror_r = yes; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-
- char buf[100];
- char x = *strerror_r (0, buf, sizeof buf);
- char *p = strerror_r (0, buf, sizeof buf);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_strerror_r_char_p=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- else
- # strerror_r is not declared. Choose between
- # systems that have relatively inaccessible declarations for the
- # function. BeOS and DEC UNIX 4.0 fall in this category, but the
- # former has a strerror_r that returns char*, while the latter
- # has a strerror_r that returns `int'.
- # This test should segfault on the DEC system.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
- extern char *strerror_r ();
-int
-main ()
-{
-char buf[100];
- char x = *strerror_r (0, buf, sizeof buf);
- exit (!isalpha (x));
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_strerror_r_char_p=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
- fi
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
-echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
-if test $ac_cv_func_strerror_r_char_p = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STRERROR_R_CHAR_P 1
-_ACEOF
-
-fi
-
-
-for ac_func in vprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-echo "$as_me:$LINENO: checking for _doprnt" >&5
-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
-if test "${ac_cv_func__doprnt+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define _doprnt innocuous__doprnt
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt (); 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 _doprnt
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char _doprnt ();
-/* 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__doprnt) || defined (__stub____doprnt)
-choke me
-#else
-char (*f) () = _doprnt;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != _doprnt;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func__doprnt=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__doprnt=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-if test $ac_cv_func__doprnt = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DOPRNT 1
-_ACEOF
-
-fi
-
-fi
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in err fgetln fnmatch fparseln getenv isblank \
- lchflags lchmod lchown lutimes mkdtemp mkstemp setenv setgroupent \
- setpassent setprogname snprintf statvfs strdup strerror strlcat \
- strlcpy strmode strsep strtoll unsetenv usleep utimes warn
-
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
-
-
-
-
-for ac_func in getenv setenv unsetenv
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- :
-else
-
- case $LIBOBJS in
- "findenv.$ac_objext" | \
- *" findenv.$ac_objext" | \
- "findenv.$ac_objext "* | \
- *" findenv.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS findenv.$ac_objext" ;;
-esac
-
- break
-
-fi
-done
-
-
-
-
-for ac_func in mkdtemp mkstemp
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- :
-else
-
- case $LIBOBJS in
- "gettemp.$ac_objext" | \
- *" gettemp.$ac_objext" | \
- "gettemp.$ac_objext "* | \
- *" gettemp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS gettemp.$ac_objext" ;;
-esac
-
- break
-
-fi
-done
-
-
-
-
-
-
-
-for ac_func in bcopy bzero memset memcpy setlocale
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-for ac_func in getmode setmode
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-for ac_func in getmode setmode
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- :
-else
-
- case $LIBOBJS in
- "setmode.$ac_objext" | \
- *" setmode.$ac_objext" | \
- "setmode.$ac_objext "* | \
- *" setmode.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS setmode.$ac_objext" ;;
-esac
-
- break
-
-fi
-done
-
-
-
-
-
-
-
-
-for ac_func in gid_from_group group_from_gid pwcache_groupdb \
- pwcache_userdb uid_from_user user_from_uid \
-
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
-
-
-
-for ac_func in gid_from_group group_from_gid pwcache_groupdb \
- pwcache_userdb uid_from_user user_from_uid \
-
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- :
-else
-
- case $LIBOBJS in
- "pwcache.$ac_objext" | \
- *" pwcache.$ac_objext" | \
- "pwcache.$ac_objext "* | \
- *" pwcache.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS pwcache.$ac_objext" ;;
-esac
-
- break
-
-fi
-done
-
-
-echo "$as_me:$LINENO: checking for fts_open" >&5
-echo $ECHO_N "checking for fts_open... $ECHO_C" >&6
-if test "${ac_cv_func_fts_open+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define fts_open to an innocuous variant, in case <limits.h> declares fts_open.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define fts_open innocuous_fts_open
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char fts_open (); 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 fts_open
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char fts_open ();
-/* 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_fts_open) || defined (__stub___fts_open)
-choke me
-#else
-char (*f) () = fts_open;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != fts_open;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_fts_open=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_fts_open=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_fts_open" >&5
-echo "${ECHO_T}$ac_cv_func_fts_open" >&6
-if test $ac_cv_func_fts_open = yes; then
- :
-else
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_FTS 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "fts.$ac_objext" | \
- *" fts.$ac_objext" | \
- "fts.$ac_objext "* | \
- *" fts.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS fts.$ac_objext" ;;
-esac
-
-
-fi
-
-
-# Handle Darwin 7 having a poll() compatibility function. Be
-# conservative -- if we don't find one of <poll.h> or <sys/poll.h>, then
-# use our own poll() implementation.
-#
-pkg_cv_have_poll_h=no
-
-
-for ac_header in poll.h sys/poll.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_header in poll.h sys/poll.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- pkg_cv_have_poll_h=yes
-fi
-
-done
-
-
-pkg_use_nbcompat_poll=yes
-if test $pkg_cv_have_poll_h = yes; then
- pkg_use_nbcompat_poll=no
-fi
-
-if test $pkg_cv_have_poll_h = yes -o test $pkg_cv_have_sys_poll_h = yes; then
- echo "$as_me:$LINENO: checking for poll" >&5
-echo $ECHO_N "checking for poll... $ECHO_C" >&6
-if test "${ac_cv_func_poll+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define poll to an innocuous variant, in case <limits.h> declares poll.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define poll innocuous_poll
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char poll (); 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 poll
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char poll ();
-/* 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_poll) || defined (__stub___poll)
-choke me
-#else
-char (*f) () = poll;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != poll;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_poll=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_poll=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_poll" >&5
-echo "${ECHO_T}$ac_cv_func_poll" >&6
-if test $ac_cv_func_poll = yes; then
-
-
- echo "$as_me:$LINENO: checking if poll() is implemented natively" >&5
-echo $ECHO_N "checking if poll() is implemented natively... $ECHO_C" >&6
-if test "${pkg_cv_native_poll+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #if HAVE_POLL_H
- #include <poll.h>
- #endif
- #if HAVE_SYS_POLL_H
- #include <sys/poll.h>
- #endif
-
-int
-main ()
-{
- #ifdef _POLL_EMUL_H_
- #error "poll() is emulated"
- #endif
- ;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pkg_cv_native_poll=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pkg_cv_native_poll=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $pkg_cv_native_poll" >&5
-echo "${ECHO_T}$pkg_cv_native_poll" >&6
- if test "x$pkg_cv_native_poll" = "xyes"; then
- pkg_use_nbcompat_poll=no
- else
- pkg_use_nbcompat_poll=yes
- :
- fi
-
-
-fi
-
-fi
-
-if test $pkg_use_nbcompat_poll = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_POLL 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "poll.$ac_objext" | \
- *" poll.$ac_objext" | \
- "poll.$ac_objext "* | \
- *" poll.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS poll.$ac_objext" ;;
-esac
-
-fi
-
-
-
-
-
-for ac_func in getpassphrase getpgrp memmove select
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-echo "$as_me:$LINENO: checking for getpgrp" >&5
-echo $ECHO_N "checking for getpgrp... $ECHO_C" >&6
-if test "${ac_cv_func_getpgrp+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define getpgrp to an innocuous variant, in case <limits.h> declares getpgrp.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define getpgrp innocuous_getpgrp
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getpgrp (); 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 getpgrp
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getpgrp ();
-/* 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_getpgrp) || defined (__stub___getpgrp)
-choke me
-#else
-char (*f) () = getpgrp;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != getpgrp;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_getpgrp=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_getpgrp=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp" >&5
-echo "${ECHO_T}$ac_cv_func_getpgrp" >&6
-if test $ac_cv_func_getpgrp = yes; then
- echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
-echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
-if test "${ac_cv_func_getpgrp_void+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Use it with a single arg.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-getpgrp (0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_getpgrp_void=no
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_getpgrp_void=yes
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
-echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
-if test $ac_cv_func_getpgrp_void = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define GETPGRP_VOID 1
-_ACEOF
-
-fi
-
-fi
-
-
-echo "$as_me:$LINENO: checking for struct statfs.f_fsize" >&5
-echo $ECHO_N "checking for struct statfs.f_fsize... $ECHO_C" >&6
-if test "${ac_cv_member_struct_statfs_f_fsize+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <sys/statfs.h>
-
-int
-main ()
-{
-static struct statfs ac_aggr;
-if (ac_aggr.f_fsize)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_statfs_f_fsize=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <sys/statfs.h>
-
-int
-main ()
-{
-static struct statfs ac_aggr;
-if (sizeof ac_aggr.f_fsize)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_statfs_f_fsize=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_member_struct_statfs_f_fsize=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_statfs_f_fsize" >&5
-echo "${ECHO_T}$ac_cv_member_struct_statfs_f_fsize" >&6
-if test $ac_cv_member_struct_statfs_f_fsize = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STATFS_F_FSIZE 1
-_ACEOF
-
-:
-else
- :
-fi
-
-echo "$as_me:$LINENO: checking for struct statfs.f_iosize" >&5
-echo $ECHO_N "checking for struct statfs.f_iosize... $ECHO_C" >&6
-if test "${ac_cv_member_struct_statfs_f_iosize+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <sys/statfs.h>
-
-int
-main ()
-{
-static struct statfs ac_aggr;
-if (ac_aggr.f_iosize)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_statfs_f_iosize=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <sys/statfs.h>
-
-int
-main ()
-{
-static struct statfs ac_aggr;
-if (sizeof ac_aggr.f_iosize)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_statfs_f_iosize=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_member_struct_statfs_f_iosize=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_statfs_f_iosize" >&5
-echo "${ECHO_T}$ac_cv_member_struct_statfs_f_iosize" >&6
-if test $ac_cv_member_struct_statfs_f_iosize = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STATFS_F_IOSIZE 1
-_ACEOF
-
-:
-else
- :
-fi
-
-echo "$as_me:$LINENO: checking for struct dirent.d_namlen" >&5
-echo $ECHO_N "checking for struct dirent.d_namlen... $ECHO_C" >&6
-if test "${ac_cv_member_struct_dirent_d_namlen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <sys/types.h>
- #if HAVE_DIRENT_H
- # include <dirent.h>
- #else
- # define dirent direct
- # if HAVE_SYS_NDIR_H
- # include <sys/ndir.h>
- # endif
- # if HAVE_SYS_DIR_H
- # include <sys/dir.h>
- # endif
- # if HAVE_NDIR_H
- # include <ndir.h>
- # endif
- #endif
-
-int
-main ()
-{
-static struct dirent ac_aggr;
-if (ac_aggr.d_namlen)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_dirent_d_namlen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <sys/types.h>
- #if HAVE_DIRENT_H
- # include <dirent.h>
- #else
- # define dirent direct
- # if HAVE_SYS_NDIR_H
- # include <sys/ndir.h>
- # endif
- # if HAVE_SYS_DIR_H
- # include <sys/dir.h>
- # endif
- # if HAVE_NDIR_H
- # include <ndir.h>
- # endif
- #endif
-
-int
-main ()
-{
-static struct dirent ac_aggr;
-if (sizeof ac_aggr.d_namlen)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_dirent_d_namlen=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_member_struct_dirent_d_namlen=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_dirent_d_namlen" >&5
-echo "${ECHO_T}$ac_cv_member_struct_dirent_d_namlen" >&6
-if test $ac_cv_member_struct_dirent_d_namlen = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_DIRENT_D_NAMLEN 1
-_ACEOF
-
-:
-else
- :
-fi
-
-
-if test $ac_cv_type_long_long = yes; then
-
-
- echo "$as_me:$LINENO: checking *printf() support for %lld" >&5
-echo $ECHO_N "checking *printf() support for %lld... $ECHO_C" >&6
- can_printf_longlong=no
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <stdio.h>
- int main() {
- char buf[100];
- sprintf(buf, "%lld", 4294967300LL);
- return (strcmp(buf, "4294967300"));
- }
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- can_printf_longlong=yes
-
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $can_printf_longlong != yes; then
- echo "$as_me:$LINENO: checking *printf() support for %qd" >&5
-echo $ECHO_N "checking *printf() support for %qd... $ECHO_C" >&6
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <stdio.h>
- int main() {
- char buf[100];
- sprintf(buf, "%qd", 4294967300LL);
- return (strcmp(buf, "4294967300"));
- }
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- can_printf_longlong=yes
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_PRINTF_QD 1
-_ACEOF
-
-
-
-
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
- fi
-
- if test $can_printf_longlong = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WORKING_LONG_LONG 1
-_ACEOF
-
-
-
-
-for ac_func in strtoll
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
- fi
-
-fi
-
-echo "$as_me:$LINENO: checking whether optind is declared" >&5
-echo $ECHO_N "checking whether optind is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_optind+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-
-
-int
-main ()
-{
-#ifndef optind
- char *p = (char *) optind;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_optind=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_optind=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_optind" >&5
-echo "${ECHO_T}$ac_cv_have_decl_optind" >&6
-if test $ac_cv_have_decl_optind = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_OPTIND 1
-_ACEOF
-
-:
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_OPTIND 0
-_ACEOF
-
-:
-fi
-echo "$as_me:$LINENO: checking whether optreset is declared" >&5
-echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_optreset+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-
-
-int
-main ()
-{
-#ifndef optreset
- char *p = (char *) optreset;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_optreset=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_optreset=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
-echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6
-if test $ac_cv_have_decl_optreset = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_OPTRESET 1
-_ACEOF
-
-:
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_OPTRESET 0
-_ACEOF
-
-:
-fi
-
-
-
-
-
-
- ac_config_files="$ac_config_files 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, don't put newlines in cache variables' values.
-# 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.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *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 \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!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" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- 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}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $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}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by libnbcompat $as_me 20040911, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet 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
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-libnbcompat config.status 20040911
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-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=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- 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
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "nbcompat/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS nbcompat/config.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- 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
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@CANONICAL_HOST@,$CANONICAL_HOST,;t t
-s,@INCLUDES@,$INCLUDES,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@LN_S@,$LN_S,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@AWK@,$AWK,;t t
-s,@AR@,$AR,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # 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. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #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.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # 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. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# 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 || { (exit 1); exit 1; }
-fi
-
diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac
deleted file mode 100644
index 06a5b6e1f6f..00000000000
--- a/pkgtools/libnbcompat/files/configure.ac
+++ /dev/null
@@ -1,387 +0,0 @@
-dnl $NetBSD: configure.ac,v 1.52 2006/08/26 21:28:21 seb Exp $
-
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.52)
-AC_INIT([libnbcompat], [20040911], [grant@NetBSD.org])
-AC_CONFIG_HEADER(nbcompat/config.h)
-AC_ARG_PROGRAM
-
-AC_CANONICAL_HOST
-CANONICAL_HOST=$host
-AC_SUBST(CANONICAL_HOST)
-AC_SUBST(INCLUDES)
-
-# Checks for programs.
-AC_PROG_MAKE_SET
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_RANLIB
-AC_PROG_AWK
-AC_CHECK_PROG(AR, ar, ar)
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-AC_SUBST(AUTOCONF)
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-AC_SUBST(AUTOHEADER)
-
-dnl Checks for libraries
-AC_CHECK_LIB(util, fparseln)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_TIME
-
-dnl Used by bits.c to check for sizes of integer types
-AC_CHECK_HEADERS([inttypes.h sys/types.h sys/bitypes.h bind/bitypes.h \
- netinet/in6_machtypes.h])
-
-AC_CHECK_HEADERS([alloca.h assert.h ctype.h dirent.h err.h errno.h fcntl.h \
- fnmatch.h fts.h grp.h libutil.h limits.h machine/endian.h ndir.h \
- paths.h pwd.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h \
- string.h sys/byteorder.h sys/cdefs.h sys/dir.h sys/endian.h \
- sys/file.h sys/mkdev.h sys/ndir.h sys/param.h sys/stat.h \
- sys/statfs.h sys/statvfs.h sys/time.h sys/ttycom.h sys/types.h \
- sys/uio.h sys/vfs.h termcap.h time.h tzfile.h unistd.h \
- util.h utime.h
-])
-AC_CHECK_HEADERS([sys/mount.h], [:], [:], [
- AC_INCLUDES_DEFAULT
- #ifdef HAVE_SYS_PARAM_H
- #include <sys/param.h>
- #endif
-])
-
-dnl Always use our own glob().
-AC_CHECK_HEADERS([glob.h])
-AC_DEFINE(HAVE_NBCOMPAT_GLOB)
-AH_TEMPLATE([HAVE_NBCOMPAT_GLOB], [
- Define to 1 if the `glob' function is built into the library.
-])
-AC_LIBOBJ(glob)
-
-dnl Always use our own queue(3) implementation.
-AC_CHECK_HEADERS([sys/queue.h])
-AC_DEFINE(HAVE_NBCOMPAT_QUEUE)
-AH_TEMPLATE([HAVE_NBCOMPAT_QUEUE], [
- Define to 1 if the `queue' macros are supplied by the library.
-])
-
-AC_CHECK_HEADERS([regex.h])
-AC_CHECK_FUNC(regexec, [:], [
- AC_DEFINE(HAVE_NBCOMPAT_REGEX)
- AH_TEMPLATE([HAVE_NBCOMPAT_REGEX], [
- Define to 1 if the `regex' functions are built into the
- library.
- ])
- AC_LIBOBJ(regcomp)
- AC_LIBOBJ(regerror)
- AC_LIBOBJ(regexec)
- AC_LIBOBJ(regfree)
-])
-
-AC_CHECK_HEADERS([md5.h], [
- AC_MSG_TRY_COMPILE([for MD5Init in md5.h], pkg_cv_have_md5init, [
- #include <sys/types.h>
- #include <md5.h>
- ], [
- MD5_CTX *f;
- MD5Init(f);
- ], [:], [
- AC_DEFINE(HAVE_NBCOMPAT_MD5INIT)
- AH_TEMPLATE([HAVE_NBCOMPAT_MD5INIT], [
- Define to 1 if the `MD5Init' function is built into
- the library.
- ])
- ])
-])
-
-AC_CHECK_HEADERS([md5.h rmd160.h sha1.h])
-AC_CHECK_FUNC(MD5File, [:], [
- AC_DEFINE(HAVE_NBCOMPAT_MD5)
- AH_TEMPLATE([HAVE_NBCOMPAT_MD5], [
- Define to 1 if the `MD5*' functions are built into the
- library.
- ])
- AC_LIBOBJ(md5c)
- AC_LIBOBJ(md5hl)
-])
-AC_CHECK_FUNC(RMD160File, [:], [
- AC_DEFINE(HAVE_NBCOMPAT_RMD160)
- AH_TEMPLATE([HAVE_NBCOMPAT_RMD160], [
- Define to 1 if the `RMD160*' functions are built into the
- library.
- ])
- AC_LIBOBJ(rmd160)
- AC_LIBOBJ(rmd160hl)
-])
-AC_CHECK_FUNC(SHA1File, [:], [
- AC_DEFINE(HAVE_NBCOMPAT_SHA1)
- AH_TEMPLATE([HAVE_NBCOMPAT_SHA1], [
- Define to 1 if the `SHA1*' functions are built into the
- library.
- ])
- AC_LIBOBJ(sha1)
- AC_LIBOBJ(sha1hl)
-])
-
-pkg_use_nbcompat_getopt_long=yes
-AC_CHECK_HEADERS([getopt.h], [
- AC_MSG_TRY_COMPILE([for struct option], pkg_cv_have_struct_option,
- [ #include <getopt.h> ], [ struct option X; ],
- [pkg_use_nbcompat_getopt_long=no],
- [pkg_use_nbcompat_getopt_long=yes])
-])
-
-if test $pkg_use_nbcompat_getopt_long = yes; then
- AC_DEFINE(HAVE_NBCOMPAT_GETOPT_LONG)
- AH_TEMPLATE([HAVE_NBCOMPAT_GETOPT_LONG], [
- Define to 1 if the `getopt_long' function is
- built into the library.
- ])
- AC_LIBOBJ(getopt_long)
-fi
-
-dnl Check that this vis.h has *vis()-related functions because Solaris'
-dnl vis.h doesn't. Also, only consider the header found if it defines
-dnl all of the functions that we need.
-dnl
-pkg_use_nbcompat_vis=yes
-AC_CHECK_HEADERS([vis.h], [
- AC_MSG_TRY_COMPILE([for VIS_WHITE in vis.h], pkg_cv_have_vis_white, [
- #include <sys/types.h>
- #include <vis.h>
- ], [ int X = VIS_WHITE; ], [
- AC_CHECK_FUNCS([strunvis strvis strsvis svis unvis vis])
- AC_CHECK_FUNCS([strunvis strvis strsvis svis unvis vis],
- [pkg_use_nbcompat_vis=no],
- [pkg_use_nbcompat_vis=yes; break])
- ])
-])
-
-if test $pkg_use_nbcompat_vis = yes; then
- AC_DEFINE(HAVE_NBCOMPAT_VIS)
- AH_TEMPLATE([HAVE_NBCOMPAT_VIS], [
- Define to 1 if the `vis' function is built into the library.
- ])
- AC_LIBOBJ(vis)
- AC_LIBOBJ(unvis)
-fi
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C___ATTRIBUTE__
-AC_TYPE_SIZE_T
-AC_CHECK_TYPES([long long, long double, int8_t, int16_t, int32_t, int64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t, uint8_t, uint16_t, uint32_t, uint64_t],[],[],
-[#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif])
-AC_CHECK_TYPES([fsid_t],[],[],
-[#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#if HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif])
-AC_C_BIGENDIAN
-AC_CHECK_SIZEOF(off_t, 0)
-
-# Checks for library functions.
-AC_FUNC_MALLOC
-AC_FUNC_STRERROR_R
-AC_FUNC_VPRINTF
-
-AC_REPLACE_FUNCS([err fgetln fnmatch fparseln getenv isblank \
- lchflags lchmod lchown lutimes mkdtemp mkstemp setenv setgroupent \
- setpassent setprogname snprintf statvfs strdup strerror strlcat \
- strlcpy strmode strsep strtoll unsetenv usleep utimes warn
-])
-
-AC_CHECK_FUNCS([getenv setenv unsetenv], [:], [
- AC_LIBOBJ(findenv)
- break
-])
-
-AC_CHECK_FUNCS([mkdtemp mkstemp], [:], [
- AC_LIBOBJ(gettemp)
- break
-])
-
-AC_CHECK_FUNCS([bcopy bzero memset memcpy setlocale])
-AC_CHECK_FUNCS([getmode setmode])
-AC_CHECK_FUNCS([getmode setmode], [:], [
- AC_LIBOBJ(setmode)
- break
-])
-
-AC_CHECK_FUNCS([gid_from_group group_from_gid pwcache_groupdb \
- pwcache_userdb uid_from_user user_from_uid \
-])
-AC_CHECK_FUNCS([gid_from_group group_from_gid pwcache_groupdb \
- pwcache_userdb uid_from_user user_from_uid \
-], [:], [
- AC_LIBOBJ(pwcache)
- break
-])
-
-AC_CHECK_FUNC(fts_open, [:], [
- AC_DEFINE(HAVE_NBCOMPAT_FTS, 1)
- AH_TEMPLATE([HAVE_NBCOMPAT_FTS], [
- Define to 1 if the `fts_*' functions are built into the
- library.
- ])
- AC_LIBOBJ(fts)
-])
-
-# Handle Darwin 7 having a poll() compatibility function. Be
-# conservative -- if we don't find one of <poll.h> or <sys/poll.h>, then
-# use our own poll() implementation.
-#
-pkg_cv_have_poll_h=no
-AC_CHECK_HEADERS([poll.h sys/poll.h])
-AC_CHECK_HEADERS([poll.h sys/poll.h], [pkg_cv_have_poll_h=yes])
-
-pkg_use_nbcompat_poll=yes
-if test $pkg_cv_have_poll_h = yes; then
- pkg_use_nbcompat_poll=no
-fi
-
-if test $pkg_cv_have_poll_h = yes -o test $pkg_cv_have_sys_poll_h = yes; then
- AC_CHECK_FUNC(poll, [
- AC_MSG_TRY_COMPILE([if poll() is implemented natively],
- pkg_cv_native_poll,
- [ #if HAVE_POLL_H
- #include <poll.h>
- #endif
- #if HAVE_SYS_POLL_H
- #include <sys/poll.h>
- #endif
- ],
- [ #ifdef _POLL_EMUL_H_
- #error "poll() is emulated"
- #endif
- ],
- [pkg_use_nbcompat_poll=no],
- [pkg_use_nbcompat_poll=yes])
- ])
-fi
-
-if test $pkg_use_nbcompat_poll = yes; then
- AC_DEFINE(HAVE_NBCOMPAT_POLL, 1)
- AH_TEMPLATE([HAVE_NBCOMPAT_POLL], [
- Define to 1 if the `poll' function is built into the library.
- ])
- AC_LIBOBJ(poll)
-fi
-
-AC_CHECK_FUNCS([getpassphrase getpgrp memmove select])
-
-AC_CHECK_FUNC(getpgrp, [AC_FUNC_GETPGRP])
-
-AC_CHECK_MEMBERS([struct statfs.f_fsize], [:], [:],
- [ #include <sys/statfs.h> ])
-AC_CHECK_MEMBERS([struct statfs.f_iosize], [:], [:],
- [ #include <sys/statfs.h> ])
-AC_CHECK_MEMBERS([struct dirent.d_namlen], [:], [:],
- [ #include <sys/types.h>
- #if HAVE_DIRENT_H
- # include <dirent.h>
- #else
- # define dirent direct
- # if HAVE_SYS_NDIR_H
- # include <sys/ndir.h>
- # endif
- # if HAVE_SYS_DIR_H
- # include <sys/dir.h>
- # endif
- # if HAVE_NDIR_H
- # include <ndir.h>
- # endif
- #endif ])
-
-if test $ac_cv_type_long_long = yes; then
-
-dnl We assume that if sprintf() supports %lld or %qd,
-dnl then all of *printf() does. If not, disable long long
-dnl support because we don't know how to display it.
-
- AC_MSG_CHECKING(*printf() support for %lld)
- can_printf_longlong=no
- AC_TRY_RUN([
- #include <stdio.h>
- int main() {
- char buf[100];
- sprintf(buf, "%lld", 4294967300LL);
- return (strcmp(buf, "4294967300"));
- }
- ], [
- AC_MSG_RESULT(yes)
- can_printf_longlong=yes
- ], [
- AC_MSG_RESULT(no)
- ], [:])
-
- if test $can_printf_longlong != yes; then
- AC_MSG_CHECKING(*printf() support for %qd)
- AC_TRY_RUN([
- #include <stdio.h>
- int main() {
- char buf[100];
- sprintf(buf, "%qd", 4294967300LL);
- return (strcmp(buf, "4294967300"));
- }
- ], [
- AC_MSG_RESULT(yes)
- can_printf_longlong=yes
- AC_DEFINE(HAVE_PRINTF_QD, 1)
- AH_TEMPLATE([HAVE_PRINTF_QD], [
- Define to 1 if *printf() uses %qd to print
- `long long' (otherwise uses %lld).
- ])
- ], [
- AC_MSG_RESULT(no)
- ], [:])
- fi
-
- if test $can_printf_longlong = yes; then
- AC_DEFINE(HAVE_WORKING_LONG_LONG, 1)
- AH_TEMPLATE([HAVE_WORKING_LONG_LONG], [
- Define to 1 if `long long' is supported and
- sizeof(off_t) >= 8.
- ])
- AC_REPLACE_FUNCS(strtoll)
- fi
-
-fi
-
-AC_CHECK_DECLS([optind, optreset], [:], [:], [
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-])
-
-AH_BOTTOM([
-/* NBCOMPAT template section follows. */
-
-#ifndef HAVE___ATTRIBUTE__
-# define __attribute__(x)
-#endif
-])
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/pkgtools/libnbcompat/files/engine.c b/pkgtools/libnbcompat/files/engine.c
deleted file mode 100644
index 4c332203b8d..00000000000
--- a/pkgtools/libnbcompat/files/engine.c
+++ /dev/null
@@ -1,1188 +0,0 @@
-/* $NetBSD: engine.c,v 1.1 2004/08/16 17:24:56 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)engine.c 8.5 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)engine.c 8.5 (Berkeley) 3/20/94
- */
-
-/*
- * The matching engine and friends. This file is #included by regexec.c
- * after suitable #defines of a variety of macros used herein, so that
- * different state representations can be used without duplicating masses
- * of code.
- */
-
-#ifdef SNAMES
-#define matcher smatcher
-#define fast sfast
-#define slow sslow
-#define dissect sdissect
-#define backref sbackref
-#define step sstep
-#define print sprint
-#define at sat
-#define match smat
-#define nope snope
-#endif
-#ifdef LNAMES
-#define matcher lmatcher
-#define fast lfast
-#define slow lslow
-#define dissect ldissect
-#define backref lbackref
-#define step lstep
-#define print lprint
-#define at lat
-#define match lmat
-#define nope lnope
-#endif
-
-/* another structure passed up and down to avoid zillions of parameters */
-struct match {
- struct re_guts *g;
- int eflags;
- regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
- char *offp; /* offsets work from here */
- char *beginp; /* start of string -- virtual NUL precedes */
- char *endp; /* end of string -- virtual NUL here */
- char *coldp; /* can be no match starting before here */
- char **lastpos; /* [nplus+1] */
- STATEVARS;
- states st; /* current states */
- states fresh; /* states for a fresh start */
- states tmp; /* temporary */
- states empty; /* empty set of states */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === engine.c === */
-static int matcher __P((struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags));
-static char *dissect __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
-static char *backref __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev));
-static char *fast __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
-static char *slow __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
-static states step __P((struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft));
-#define BOL (OUT+1)
-#define EOL (BOL+1)
-#define BOLEOL (BOL+2)
-#define NOTHING (BOL+3)
-#define BOW (BOL+4)
-#define EOW (BOL+5)
-#define CODEMAX (BOL+5) /* highest code used */
-#define NONCHAR(c) ((c) > CHAR_MAX)
-#define NNONCHAR (CODEMAX-CHAR_MAX)
-#ifdef REDEBUG
-static void print __P((struct match *m, char *caption, states st, int ch, FILE *d));
-#endif
-#ifdef REDEBUG
-static void at __P((struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst));
-#endif
-#ifdef REDEBUG
-static char *pchar __P((int ch));
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-#ifdef REDEBUG
-#define SP(t, s, c) print(m, t, s, c, stdout)
-#define AT(t, p1, p2, s1, s2) at(m, t, p1, p2, s1, s2)
-#define NOTE(str) { if (m->eflags&REG_TRACE) printf("=%s\n", (str)); }
-static int nope = 0;
-#else
-#define SP(t, s, c) /* nothing */
-#define AT(t, p1, p2, s1, s2) /* nothing */
-#define NOTE(s) /* nothing */
-#endif
-
-/*
- - matcher - the actual matching engine
- == static int matcher(struct re_guts *g, char *string, \
- == size_t nmatch, regmatch_t pmatch[], int eflags);
- */
-static int /* 0 success, REG_NOMATCH failure */
-matcher(g, string, nmatch, pmatch, eflags)
-struct re_guts *g;
-char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- char *endp;
- int i;
- struct match mv;
- struct match *m = &mv;
- char *dp;
- const sopno gf = g->firststate+1; /* +1 for OEND */
- const sopno gl = g->laststate;
- char *start;
- char *stop;
- int error = 0;
-
- _DIAGASSERT(g != NULL);
- _DIAGASSERT(string != NULL);
- /* pmatch checked below */
-
- /* simplify the situation where possible */
- if (g->cflags&REG_NOSUB)
- nmatch = 0;
- if (eflags&REG_STARTEND) {
- _DIAGASSERT(pmatch != NULL);
- start = string + (size_t)pmatch[0].rm_so;
- stop = string + (size_t)pmatch[0].rm_eo;
- } else {
- start = string;
- stop = start + strlen(start);
- }
- if (stop < start)
- return(REG_INVARG);
-
- /* prescreening; this does wonders for this rather slow code */
- if (g->must != NULL) {
- for (dp = start; dp < stop; dp++)
- if (*dp == g->must[0] && stop - dp >= g->mlen &&
- memcmp(dp, g->must, (size_t)g->mlen) == 0)
- break;
- if (dp == stop) /* we didn't find g->must */
- return(REG_NOMATCH);
- }
-
- /* match struct setup */
- m->g = g;
- m->eflags = eflags;
- m->pmatch = NULL;
- m->lastpos = NULL;
- m->offp = string;
- m->beginp = start;
- m->endp = stop;
- STATESETUP(m, 4);
- SETUP(m->st);
- SETUP(m->fresh);
- SETUP(m->tmp);
- SETUP(m->empty);
- CLEAR(m->empty);
-
- /* this loop does only one repetition except for backrefs */
- for (;;) {
- endp = fast(m, start, stop, gf, gl);
- if (endp == NULL) { /* a miss */
- error = REG_NOMATCH;
- goto done;
- }
- if (nmatch == 0 && !g->backrefs)
- break; /* no further info needed */
-
- /* where? */
- assert(m->coldp != NULL);
- for (;;) {
- NOTE("finding start");
- endp = slow(m, m->coldp, stop, gf, gl);
- if (endp != NULL)
- break;
- assert(m->coldp < m->endp);
- m->coldp++;
- }
- if (nmatch == 1 && !g->backrefs)
- break; /* no further info needed */
-
- /* oh my, he wants the subexpressions... */
- if (m->pmatch == NULL)
- m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) *
- sizeof(regmatch_t));
- if (m->pmatch == NULL) {
- error = REG_ESPACE;
- goto done;
- }
- for (i = 1; i <= m->g->nsub; i++)
- m->pmatch[i].rm_so = m->pmatch[i].rm_eo = (regoff_t)-1;
- if (!g->backrefs && !(m->eflags&REG_BACKR)) {
- NOTE("dissecting");
- dp = dissect(m, m->coldp, endp, gf, gl);
- } else {
- if (g->nplus > 0 && m->lastpos == NULL)
- m->lastpos = (char **)malloc((g->nplus+1) *
- sizeof(char *));
- if (g->nplus > 0 && m->lastpos == NULL) {
- error = REG_ESPACE;
- goto done;
- }
- NOTE("backref dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- if (dp != NULL)
- break;
-
- /* uh-oh... we couldn't find a subexpression-level match */
- assert(g->backrefs); /* must be back references doing it */
- assert(g->nplus == 0 || m->lastpos != NULL);
- for (;;) {
- if (dp != NULL || endp <= m->coldp)
- break; /* defeat */
- NOTE("backoff");
- endp = slow(m, m->coldp, endp-1, gf, gl);
- if (endp == NULL)
- break; /* defeat */
- /* try it on a shorter possibility */
-#ifndef NDEBUG
- for (i = 1; i <= m->g->nsub; i++) {
- assert(m->pmatch[i].rm_so == (regoff_t)-1);
- assert(m->pmatch[i].rm_eo == (regoff_t)-1);
- }
-#endif
- NOTE("backoff dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- assert(dp == NULL || dp == endp);
- if (dp != NULL) /* found a shorter one */
- break;
-
- /* despite initial appearances, there is no match here */
- NOTE("false alarm");
- start = m->coldp + 1; /* recycle starting later */
- assert(start <= stop);
- }
-
- /* fill in the details if requested */
- if (nmatch > 0) {
- _DIAGASSERT(pmatch != NULL);
- pmatch[0].rm_so = m->coldp - m->offp;
- pmatch[0].rm_eo = endp - m->offp;
- }
- if (nmatch > 1) {
- assert(m->pmatch != NULL);
- for (i = 1; i < nmatch; i++)
- if (i <= m->g->nsub)
- pmatch[i] = m->pmatch[i];
- else {
- pmatch[i].rm_so = (regoff_t)-1;
- pmatch[i].rm_eo = (regoff_t)-1;
- }
- }
-
-done:
- if (m->pmatch != NULL) {
- free(m->pmatch);
- m->pmatch = NULL;
- }
- if (m->lastpos != NULL) {
- free(m->lastpos);
- m->lastpos = NULL;
- }
- STATETEARDOWN(m);
- return error;
-}
-
-/*
- - dissect - figure out what matched what, no back references
- == static char *dissect(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* == stop (success) always */
-dissect(m, start, stop, startst, stopst)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- int i;
- sopno ss; /* start sop of current subRE */
- sopno es; /* end sop of current subRE */
- char *sp; /* start of string matched by it */
- char *stp; /* string matched by it cannot pass here */
- char *rest; /* start of rest of string */
- char *tail; /* string unmatched by rest of RE */
- sopno ssub; /* start sop of subsubRE */
- sopno esub; /* end sop of subsubRE */
- char *ssp; /* start of string matched by subsubRE */
- char *sep; /* end of string matched by subsubRE */
- char *oldssp; /* previous ssp */
-#ifndef NDEBUG
- char *dp;
-#endif
-
- _DIAGASSERT(m != NULL);
- _DIAGASSERT(start != NULL);
- _DIAGASSERT(stop != NULL);
-
- AT("diss", start, stop, startst, stopst);
- sp = start;
- for (ss = startst; ss < stopst; ss = es) {
- /* identify end of subRE */
- es = ss;
- switch (OP(m->g->strip[es])) {
- case OPLUS_:
- case OQUEST_:
- es += OPND(m->g->strip[es]);
- break;
- case OCH_:
- while (OP(m->g->strip[es]) != O_CH)
- es += OPND(m->g->strip[es]);
- break;
- }
- es++;
-
- /* figure out what it matched */
- switch (OP(m->g->strip[ss])) {
- case OEND:
- assert(nope);
- break;
- case OCHAR:
- sp++;
- break;
- case OBOL:
- case OEOL:
- case OBOW:
- case OEOW:
- break;
- case OANY:
- case OANYOF:
- sp++;
- break;
- case OBACK_:
- case O_BACK:
- assert(nope);
- break;
- /* cases where length of match is hard to find */
- case OQUEST_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- /* did innards match? */
- if (slow(m, sp, rest, ssub, esub) != NULL) {
-#ifdef NDEBUG
- (void)
-#else
- dp =
-#endif
- dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- } else /* no */
- assert(sp == rest);
- sp = rest;
- break;
- case OPLUS_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- ssp = sp;
- oldssp = ssp;
- for (;;) { /* find last match of innards */
- sep = slow(m, ssp, rest, ssub, esub);
- if (sep == NULL || sep == ssp)
- break; /* failed or matched null */
- oldssp = ssp; /* on to next try */
- ssp = sep;
- }
- if (sep == NULL) {
- /* last successful match */
- sep = ssp;
- ssp = oldssp;
- }
- assert(sep == rest); /* must exhaust substring */
- assert(slow(m, ssp, sep, ssub, esub) == rest);
-#ifdef NDEBUG
- (void)
-#else
- dp =
-#endif
- dissect(m, ssp, sep, ssub, esub);
- assert(dp == sep);
- sp = rest;
- break;
- case OCH_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = ss + OPND(m->g->strip[ss]) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- if (slow(m, sp, rest, ssub, esub) == rest)
- break; /* it matched all of it */
- /* that one missed, try next one */
- assert(OP(m->g->strip[esub]) == OOR1);
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
-#ifdef NDEBUG
- (void)
-#else
- dp =
-#endif
- dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- sp = rest;
- break;
- case O_PLUS:
- case O_QUEST:
- case OOR1:
- case OOR2:
- case O_CH:
- assert(nope);
- break;
- case OLPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_so = sp - m->offp;
- break;
- case ORPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_eo = sp - m->offp;
- break;
- default: /* uh oh */
- assert(nope);
- break;
- }
- }
-
- assert(sp == stop);
- return(sp);
-}
-
-/*
- - backref - figure out what matched what, figuring in back references
- == static char *backref(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst, sopno lev);
- */
-static char * /* == stop (success) or NULL (failure) */
-backref(m, start, stop, startst, stopst, lev)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-sopno lev; /* PLUS nesting level */
-{
- int i;
- sopno ss; /* start sop of current subRE */
- char *sp; /* start of string matched by it */
- sopno ssub; /* start sop of subsubRE */
- sopno esub; /* end sop of subsubRE */
- char *ssp; /* start of string matched by subsubRE */
- char *dp;
- size_t len;
- int hard;
- sop s;
- regoff_t offsave;
- cset *cs;
-
- _DIAGASSERT(m != NULL);
- _DIAGASSERT(start != NULL);
- _DIAGASSERT(stop != NULL);
-
- AT("back", start, stop, startst, stopst);
- sp = start;
-
- /* get as far as we can with easy stuff */
- hard = 0;
- for (ss = startst; !hard && ss < stopst; ss++)
- switch (OP(s = m->g->strip[ss])) {
- case OCHAR:
- if (sp == stop || *sp++ != (char)OPND(s))
- return(NULL);
- break;
- case OANY:
- if (sp == stop)
- return(NULL);
- sp++;
- break;
- case OANYOF:
- cs = &m->g->sets[OPND(s)];
- if (sp == stop || !CHIN(cs, *sp++))
- return(NULL);
- break;
- case OBOL:
- if ( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOL:
- if ( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OBOW:
- if (( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp > m->beginp &&
- !ISWORD(*(sp-1))) ) &&
- (sp < m->endp && ISWORD(*sp)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOW:
- if (( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp < m->endp && !ISWORD(*sp)) ) &&
- (sp > m->beginp && ISWORD(*(sp-1))) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case O_QUEST:
- break;
- case OOR1: /* matches null but needs to skip */
- ss++;
- s = m->g->strip[ss];
- do {
- assert(OP(s) == OOR2);
- ss += OPND(s);
- } while (OP(s = m->g->strip[ss]) != O_CH);
- /* note that the ss++ gets us past the O_CH */
- break;
- default: /* have to make a choice */
- hard = 1;
- break;
- }
- if (!hard) { /* that was it! */
- if (sp != stop)
- return(NULL);
- return(sp);
- }
- ss--; /* adjust for the for's final increment */
-
- /* the hard stuff */
- AT("hard", sp, stop, ss, stopst);
- s = m->g->strip[ss];
- switch (OP(s)) {
- case OBACK_: /* the vilest depths */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- if (m->pmatch[i].rm_eo == (regoff_t)-1)
- return(NULL);
- assert(m->pmatch[i].rm_so != (regoff_t)-1);
- len = (size_t)(m->pmatch[i].rm_eo - m->pmatch[i].rm_so);
- if (len == 0)
- return(NULL);
- assert(stop - m->beginp >= len);
- if (sp > stop - len)
- return(NULL); /* not enough left to match */
- ssp = m->offp + (size_t)m->pmatch[i].rm_so;
- if (memcmp(sp, ssp, len) != 0)
- return(NULL);
- while (m->g->strip[ss] != SOP(O_BACK, i))
- ss++;
- return(backref(m, sp+len, stop, ss+1, stopst, lev));
-
- case OQUEST_: /* to null or not */
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp); /* not */
- return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev));
-
- case OPLUS_:
- assert(m->lastpos != NULL);
- assert(lev+1 <= m->g->nplus);
- m->lastpos[lev+1] = sp;
- return(backref(m, sp, stop, ss+1, stopst, lev+1));
-
- case O_PLUS:
- if (sp == m->lastpos[lev]) /* last pass matched null */
- return(backref(m, sp, stop, ss+1, stopst, lev-1));
- /* try another pass */
- m->lastpos[lev] = sp;
- dp = backref(m, sp, stop, ss-OPND(s)+1, stopst, lev);
- if (dp == NULL)
- dp = backref(m, sp, stop, ss+1, stopst, lev-1);
- return(dp);
-
- case OCH_: /* find the right one, if any */
- ssub = ss + 1;
- esub = ss + OPND(s) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- dp = backref(m, sp, stop, ssub, esub, lev);
- if (dp != NULL)
- return(dp);
- /* that one missed, try next one */
- if (OP(m->g->strip[esub]) == O_CH)
- return(NULL); /* there is none */
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
-
- case OLPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_so;
- m->pmatch[i].rm_so = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_so = offsave;
- return(NULL);
-
- case ORPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_eo;
- m->pmatch[i].rm_eo = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_eo = offsave;
- return(NULL);
-
- default: /* uh oh */
- assert(nope);
- break;
- }
-
- /* "can't happen" */
- assert(nope);
- /* NOTREACHED */
- return NULL;
-}
-
-/*
- - fast - step through the string at top speed
- == static char *fast(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where tentative match ended, or NULL */
-fast(m, start, stop, startst, stopst)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- states st = m->st;
- states fresh = m->fresh;
- states tmp = m->tmp;
- char *p = start;
- int c = (start == m->beginp) ? OUT : *(start-1);
- int lastc; /* previous c */
- int flagch;
- int i;
- char *coldp; /* last p after which no match was underway */
-
- _DIAGASSERT(m != NULL);
- _DIAGASSERT(start != NULL);
- _DIAGASSERT(stop != NULL);
-
- CLEAR(st);
- SET1(st, startst);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- ASSIGN(fresh, st);
- SP("start", st, *p);
- coldp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
- if (EQ(st, fresh))
- coldp = p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, fresh);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("aft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- assert(coldp != NULL);
- m->coldp = coldp;
- if (ISSET(st, stopst))
- return(p+1);
- else
- return(NULL);
-}
-
-/*
- - slow - step through the string more deliberately
- == static char *slow(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where it ended */
-slow(m, start, stop, startst, stopst)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- states st = m->st;
- states empty = m->empty;
- states tmp = m->tmp;
- char *p = start;
- int c = (start == m->beginp) ? OUT : *(start-1);
- int lastc; /* previous c */
- int flagch;
- int i;
- char *matchp; /* last p at which a match ended */
-
- _DIAGASSERT(m != NULL);
- _DIAGASSERT(start != NULL);
- _DIAGASSERT(stop != NULL);
-
- AT("slow", start, stop, startst, stopst);
- CLEAR(st);
- SET1(st, startst);
- SP("sstart", st, *p);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- matchp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst))
- matchp = p;
- if (EQ(st, empty) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, empty);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("saft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- return(matchp);
-}
-
-
-/*
- - step - map set of states reachable before char to set reachable after
- == static states step(struct re_guts *g, sopno start, sopno stop, \
- == states bef, int ch, states aft);
- == #define BOL (OUT+1)
- == #define EOL (BOL+1)
- == #define BOLEOL (BOL+2)
- == #define NOTHING (BOL+3)
- == #define BOW (BOL+4)
- == #define EOW (BOL+5)
- == #define CODEMAX (BOL+5) // highest code used
- == #define NONCHAR(c) ((c) > CHAR_MAX)
- == #define NNONCHAR (CODEMAX-CHAR_MAX)
- */
-static states
-step(g, start, stop, bef, ch, aft)
-struct re_guts *g;
-sopno start; /* start state within strip */
-sopno stop; /* state after stop state within strip */
-states bef; /* states reachable before */
-int ch; /* character or NONCHAR code */
-states aft; /* states already known reachable after */
-{
- cset *cs;
- sop s;
- sopno pc;
- onestate here; /* note, macros know this name */
- sopno look;
- int i;
-
- _DIAGASSERT(g != NULL);
-
- for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) {
- s = g->strip[pc];
- switch (OP(s)) {
- case OEND:
- assert(pc == stop-1);
- break;
- case OCHAR:
- /* only characters can match */
- assert(!NONCHAR(ch) || ch != (char)OPND(s));
- if (ch == (char)OPND(s))
- FWD(aft, bef, 1);
- break;
- case OBOL:
- if (ch == BOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OEOL:
- if (ch == EOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OBOW:
- if (ch == BOW)
- FWD(aft, bef, 1);
- break;
- case OEOW:
- if (ch == EOW)
- FWD(aft, bef, 1);
- break;
- case OANY:
- if (!NONCHAR(ch))
- FWD(aft, bef, 1);
- break;
- case OANYOF:
- cs = &g->sets[OPND(s)];
- if (!NONCHAR(ch) && CHIN(cs, ch))
- FWD(aft, bef, 1);
- break;
- case OBACK_: /* ignored here */
- case O_BACK:
- FWD(aft, aft, 1);
- break;
- case OPLUS_: /* forward, this is just an empty */
- FWD(aft, aft, 1);
- break;
- case O_PLUS: /* both forward and back */
- FWD(aft, aft, 1);
- i = ISSETBACK(aft, OPND(s));
- BACK(aft, aft, OPND(s));
- if (!i && ISSETBACK(aft, OPND(s))) {
- /* oho, must reconsider loop body */
- pc -= OPND(s) + 1;
- INIT(here, pc);
- }
- break;
- case OQUEST_: /* two branches, both forward */
- FWD(aft, aft, 1);
- FWD(aft, aft, OPND(s));
- break;
- case O_QUEST: /* just an empty */
- FWD(aft, aft, 1);
- break;
- case OLPAREN: /* not significant here */
- case ORPAREN:
- FWD(aft, aft, 1);
- break;
- case OCH_: /* mark the first two branches */
- FWD(aft, aft, 1);
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- break;
- case OOR1: /* done a branch, find the O_CH */
- if (ISSTATEIN(aft, here)) {
- for (look = 1;
- OP(s = g->strip[pc+look]) != O_CH;
- look += OPND(s))
- assert(OP(s) == OOR2);
- FWD(aft, aft, look);
- }
- break;
- case OOR2: /* propagate OCH_'s marking */
- FWD(aft, aft, 1);
- if (OP(g->strip[pc+OPND(s)]) != O_CH) {
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- }
- break;
- case O_CH: /* just empty */
- FWD(aft, aft, 1);
- break;
- default: /* ooooops... */
- assert(nope);
- break;
- }
- }
-
- return(aft);
-}
-
-#ifdef REDEBUG
-/*
- - print - print a set of states
- == #ifdef REDEBUG
- == static void print(struct match *m, char *caption, states st, \
- == int ch, FILE *d);
- == #endif
- */
-static void
-print(m, caption, st, ch, d)
-struct match *m;
-char *caption;
-states st;
-int ch;
-FILE *d;
-{
- struct re_guts *g = m->g;
- int i;
- int first = 1;
-
- _DIAGASSERT(m != NULL);
- _DIAGASSERT(caption != NULL);
-
- if (!(m->eflags&REG_TRACE))
- return;
-
- _DIAGASSERT(d != NULL);
-
- fprintf(d, "%s", caption);
- if (ch != '\0')
- fprintf(d, " %s", pchar(ch));
- for (i = 0; i < g->nstates; i++)
- if (ISSET(st, i)) {
- fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
- first = 0;
- }
- fprintf(d, "\n");
-}
-
-/*
- - at - print current situation
- == #ifdef REDEBUG
- == static void at(struct match *m, char *title, char *start, char *stop, \
- == sopno startst, sopno stopst);
- == #endif
- */
-static void
-at(m, title, start, stop, startst, stopst)
-struct match *m;
-char *title;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
-
- _DIAGASSERT(m != NULL);
- _DIAGASSERT(title != NULL);
- _DIAGASSERT(start != NULL);
- _DIAGASSERT(stop != NULL);
-
- if (!(m->eflags&REG_TRACE))
- return;
-
- printf("%s %s-", title, pchar(*start));
- printf("%s ", pchar(*stop));
- printf("%ld-%ld\n", (long)startst, (long)stopst);
-}
-
-#ifndef PCHARDONE
-#define PCHARDONE /* never again */
-/*
- - pchar - make a character printable
- == #ifdef REDEBUG
- == static char *pchar(int ch);
- == #endif
- *
- * Is this identical to regchar() over in debug.c? Well, yes. But a
- * duplicate here avoids having a debugging-capable regexec.o tied to
- * a matching debug.o, and this is convenient. It all disappears in
- * the non-debug compilation anyway, so it doesn't matter much.
- */
-static char * /* -> representation */
-pchar(ch)
-int ch;
-{
- static char pbuf[10];
-
- if (isprint(ch) || ch == ' ')
- (void)snprintf(pbuf, sizeof pbuf, "%c", ch);
- else
- (void)snprintf(pbuf, sizeof pbuf, "\\%o", ch);
- return(pbuf);
-}
-#endif
-#endif
-
-#undef matcher
-#undef fast
-#undef slow
-#undef dissect
-#undef backref
-#undef step
-#undef print
-#undef at
-#undef match
-#undef nope
diff --git a/pkgtools/libnbcompat/files/err.c b/pkgtools/libnbcompat/files/err.c
deleted file mode 100644
index 54938914260..00000000000
--- a/pkgtools/libnbcompat/files/err.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* $NetBSD: err.c,v 1.4 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright 1997-2000 Luke Mewburn <lukem@netbsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: err.c,v 1.4 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#ifndef __NO_NAMESPACE_H /* XXX */
-#if 0
-#include "namespace.h"
-#endif
-#endif
-#include <nbcompat/err.h>
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(err, _err)
-#endif
-#endif
-
-void
-err(int eval, const char *fmt, ...)
-{
- va_list ap;
- int sverrno;
-
- sverrno = errno;
- (void)fprintf(stderr, "%s: ", getprogname());
- va_start(ap, fmt);
- if (fmt != NULL) {
- (void)vfprintf(stderr, fmt, ap);
- (void)fprintf(stderr, ": ");
- }
- va_end(ap);
- (void)fprintf(stderr, "%s\n", strerror(sverrno));
- exit(eval);
-}
-
-void
-errx(int eval, const char *fmt, ...)
-{
- va_list ap;
-
- (void)fprintf(stderr, "%s: ", getprogname());
- va_start(ap, fmt);
- if (fmt != NULL)
- (void)vfprintf(stderr, fmt, ap);
- va_end(ap);
- (void)fprintf(stderr, "\n");
- exit(eval);
-}
-
-void
-verr(eval, fmt, ap)
- int eval;
- const char *fmt;
- va_list ap;
-{
- int sverrno;
-
- sverrno = errno;
- (void)fprintf(stderr, "%s: ", getprogname());
- if (fmt != NULL) {
- (void)vfprintf(stderr, fmt, ap);
- (void)fprintf(stderr, ": ");
- }
- (void)fprintf(stderr, "%s\n", strerror(sverrno));
- exit(eval);
-}
-
-void
-verrx(eval, fmt, ap)
- int eval;
- const char *fmt;
- va_list ap;
-{
- (void)fprintf(stderr, "%s: ", getprogname());
- if (fmt != NULL)
- (void)vfprintf(stderr, fmt, ap);
- (void)fprintf(stderr, "\n");
- exit(eval);
-}
diff --git a/pkgtools/libnbcompat/files/fgetln.c b/pkgtools/libnbcompat/files/fgetln.c
deleted file mode 100644
index d5a465f1208..00000000000
--- a/pkgtools/libnbcompat/files/fgetln.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* $NetBSD: fgetln.c,v 1.3 2004/09/11 19:01:40 jlam Exp $ */
-
-/*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Christos Zoulas.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-
-char *
-fgetln(fp, len)
- FILE *fp;
- size_t *len;
-{
- static char *buf = NULL;
- static size_t bufsiz = 0;
- char *ptr;
-
- if (buf == NULL) {
- bufsiz = BUFSIZ;
- if ((buf = malloc(bufsiz)) == NULL)
- return NULL;
- }
-
- if (fgets(buf, bufsiz, fp) == NULL)
- return NULL;
- *len = 0;
-
- while ((ptr = strchr(&buf[*len], '\n')) == NULL) {
- size_t nbufsiz = bufsiz + BUFSIZ;
- char *nbuf = realloc(buf, nbufsiz);
-
- if (nbuf == NULL) {
- int oerrno = errno;
- free(buf);
- errno = oerrno;
- buf = NULL;
- return NULL;
- } else
- buf = nbuf;
-
- /*
- * We need to overwrite the '\0' written by the last call
- * to fgets().
- */
- *len = bufsiz - 1;
- if (fgets(&buf[bufsiz - 1], BUFSIZ + 1, fp) == NULL)
- return buf;
-
- bufsiz = nbufsiz;
- }
-
- *len = (ptr - buf) + 1;
- return buf;
-}
diff --git a/pkgtools/libnbcompat/files/findenv.c b/pkgtools/libnbcompat/files/findenv.c
deleted file mode 100644
index 8c17a2ecc82..00000000000
--- a/pkgtools/libnbcompat/files/findenv.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* $NetBSD: findenv.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)getenv.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: findenv.c,v 1.1 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-#if 0
-#include "local.h"
-#include "reentrant.h"
-#endif
-
-#if 0
-#ifdef _REENTRANT
-rwlock_t __environ_lock = RWLOCK_INITIALIZER;
-#endif
-#endif
-extern char **environ;
-
-/*
- * __findenv --
- * Returns pointer to value associated with name, if any, else NULL.
- * Sets offset to be the offset of the name/value combination in the
- * environmental array, for use by setenv(3) and unsetenv(3).
- * Explicitly removes '=' in argument name.
- *
- * This routine *should* be a static; don't use it.
- */
-char *
-__findenv(name, offset)
- const char *name;
- int *offset;
-{
- size_t len;
- const char *np;
- char **p, *c;
-
- if (name == NULL || environ == NULL)
- return (NULL);
- for (np = name; *np && *np != '='; ++np)
- continue;
- len = np - name;
- for (p = environ; (c = *p) != NULL; ++p)
- if (strncmp(c, name, len) == 0 && c[len] == '=') {
- *offset = p - environ;
- return (c + len + 1);
- }
- return (NULL);
-}
diff --git a/pkgtools/libnbcompat/files/fnmatch.c b/pkgtools/libnbcompat/files/fnmatch.c
deleted file mode 100644
index 3a897213b8a..00000000000
--- a/pkgtools/libnbcompat/files/fnmatch.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/* $NetBSD: fnmatch.c,v 1.3 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
-#else
-__RCSID("$NetBSD: fnmatch.c,v 1.3 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
- * Compares a filename or pathname to a pattern.
- */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#include <nbcompat/fnmatch.h>
-#include <nbcompat/string.h>
-
-#define EOS '\0'
-
-static const char *rangematch(const char *, int, int);
-
-static int
-foldcase(int ch, int flags)
-{
-
- if ((flags & FNM_CASEFOLD) != 0 && isupper(ch))
- return (tolower(ch));
- return (ch);
-}
-
-#define FOLDCASE(ch, flags) foldcase((unsigned char)(ch), (flags))
-
-int
-fnmatch(pattern, string, flags)
- const char *pattern, *string;
- int flags;
-{
- const char *stringstart;
- char c, test;
-
- _DIAGASSERT(pattern != NULL);
- _DIAGASSERT(string != NULL);
-
- for (stringstart = string;;)
- switch (c = FOLDCASE(*pattern++, flags)) {
- case EOS:
- if ((flags & FNM_LEADING_DIR) && *string == '/')
- return (0);
- return (*string == EOS ? 0 : FNM_NOMATCH);
- case '?':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
- ++string;
- break;
- case '*':
- c = FOLDCASE(*pattern, flags);
- /* Collapse multiple stars. */
- while (c == '*')
- c = FOLDCASE(*++pattern, flags);
-
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
-
- /* Optimize for pattern with * at end or before /. */
- if (c == EOS) {
- if (flags & FNM_PATHNAME)
- return ((flags & FNM_LEADING_DIR) ||
- strchr(string, '/') == NULL ?
- 0 : FNM_NOMATCH);
- else
- return (0);
- } else if (c == '/' && flags & FNM_PATHNAME) {
- if ((string = strchr(string, '/')) == NULL)
- return (FNM_NOMATCH);
- break;
- }
-
- /* General case, use recursion. */
- while ((test = FOLDCASE(*string, flags)) != EOS) {
- if (!fnmatch(pattern, string,
- flags & ~FNM_PERIOD))
- return (0);
- if (test == '/' && flags & FNM_PATHNAME)
- break;
- ++string;
- }
- return (FNM_NOMATCH);
- case '[':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && flags & FNM_PATHNAME)
- return (FNM_NOMATCH);
- if ((pattern =
- rangematch(pattern, FOLDCASE(*string, flags),
- flags)) == NULL)
- return (FNM_NOMATCH);
- ++string;
- break;
- case '\\':
- if (!(flags & FNM_NOESCAPE)) {
- if ((c = FOLDCASE(*pattern++, flags)) == EOS) {
- c = '\\';
- --pattern;
- }
- }
- /* FALLTHROUGH */
- default:
- if (c != FOLDCASE(*string++, flags))
- return (FNM_NOMATCH);
- break;
- }
- /* NOTREACHED */
-}
-
-static const char *
-rangematch(pattern, test, flags)
- const char *pattern;
- int test, flags;
-{
- int negate, ok;
- char c, c2;
-
- _DIAGASSERT(pattern != NULL);
-
- /*
- * A bracket expression starting with an unquoted circumflex
- * character produces unspecified results (IEEE 1003.2-1992,
- * 3.13.2). This implementation treats it like '!', for
- * consistency with the regular expression syntax.
- * J.T. Conklin (conklin@ngai.kaleida.com)
- */
- if ((negate = (*pattern == '!' || *pattern == '^')) != 0)
- ++pattern;
-
- for (ok = 0; (c = FOLDCASE(*pattern++, flags)) != ']';) {
- if (c == '\\' && !(flags & FNM_NOESCAPE))
- c = FOLDCASE(*pattern++, flags);
- if (c == EOS)
- return (NULL);
- if (*pattern == '-'
- && (c2 = FOLDCASE(*(pattern+1), flags)) != EOS &&
- c2 != ']') {
- pattern += 2;
- if (c2 == '\\' && !(flags & FNM_NOESCAPE))
- c2 = FOLDCASE(*pattern++, flags);
- if (c2 == EOS)
- return (NULL);
- if (c <= test && test <= c2)
- ok = 1;
- } else if (c == test)
- ok = 1;
- }
- return (ok == negate ? NULL : pattern);
-}
diff --git a/pkgtools/libnbcompat/files/fparseln.c b/pkgtools/libnbcompat/files/fparseln.c
deleted file mode 100644
index 95a37811312..00000000000
--- a/pkgtools/libnbcompat/files/fparseln.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/* $NetBSD: fparseln.c,v 1.3 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1997 Christos Zoulas. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christos Zoulas.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fparseln.c,v 1.3 2004/08/23 03:32:12 jlam Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdio.h>
-#include <nbcompat/string.h>
-#include <nbcompat/stdlib.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(fparseln,_fparseln)
-#endif
-#endif
-
-#if ! HAVE_FPARSELN
-
-#if 0
-#ifndef HAVE_NBTOOL_CONFIG_H
-#include "reentrant.h"
-#include "local.h"
-#else
-#define FLOCKFILE(fp)
-#define FUNLOCKFILE(fp)
-#endif
-#endif
-
-#if 0
-#if defined(_REENTRANT) && !HAVE_NBTOOL_CONFIG_H
-#define __fgetln(f, l) __fgetstr(f, l, '\n')
-#else
-#define __fgetln(f, l) fgetln(f, l)
-#endif
-#endif
-
-static int isescaped(const char *, const char *, int);
-
-/* isescaped():
- * Return true if the character in *p that belongs to a string
- * that starts in *sp, is escaped by the escape character esc.
- */
-static int
-isescaped(const char *sp, const char *p, int esc)
-{
- const char *cp;
- size_t ne;
-
- /* No escape character */
- if (esc == '\0')
- return 1;
-
- /* Count the number of escape characters that precede ours */
- for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++)
- continue;
-
- /* Return true if odd number of escape characters */
- return (ne & 1) != 0;
-}
-
-
-/* fparseln():
- * Read a line from a file parsing continuations ending in \
- * and eliminating trailing newlines, or comments starting with
- * the comment char.
- */
-char *
-fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags)
-{
- static const char dstr[3] = { '\\', '\\', '#' };
-
- size_t s, len;
- char *buf;
- char *ptr, *cp;
- int cnt;
- char esc, con, nl, com;
-
- len = 0;
- buf = NULL;
- cnt = 1;
-
- if (str == NULL)
- str = dstr;
-
- esc = str[0];
- con = str[1];
- com = str[2];
- /*
- * XXX: it would be cool to be able to specify the newline character,
- * but unfortunately, fgetln does not let us
- */
- nl = '\n';
-
- while (cnt) {
- cnt = 0;
-
- if (lineno)
- (*lineno)++;
-
- if ((ptr = fgetln(fp, &s)) == NULL)
- break;
-
- if (s && com) { /* Check and eliminate comments */
- for (cp = ptr; cp < ptr + s; cp++)
- if (*cp == com && !isescaped(ptr, cp, esc)) {
- s = cp - ptr;
- cnt = s == 0 && buf == NULL;
- break;
- }
- }
-
- if (s && nl) { /* Check and eliminate newlines */
- cp = &ptr[s - 1];
-
- if (*cp == nl)
- s--; /* forget newline */
- }
-
- if (s && con) { /* Check and eliminate continuations */
- cp = &ptr[s - 1];
-
- if (*cp == con && !isescaped(ptr, cp, esc)) {
- s--; /* forget escape */
- cnt = 1;
- }
- }
-
- if (s == 0 && buf != NULL)
- continue;
-
- if ((cp = realloc(buf, len + s + 1)) == NULL) {
- free(buf);
- return NULL;
- }
- buf = cp;
-
- (void) memcpy(buf + len, ptr, s);
- len += s;
- buf[len] = '\0';
- }
-
- if ((flags & FPARSELN_UNESCALL) != 0 && esc && buf != NULL &&
- strchr(buf, esc) != NULL) {
- ptr = cp = buf;
- while (cp[0] != '\0') {
- int skipesc;
-
- while (cp[0] != '\0' && cp[0] != esc)
- *ptr++ = *cp++;
- if (cp[0] == '\0' || cp[1] == '\0')
- break;
-
- skipesc = 0;
- if (cp[1] == com)
- skipesc += (flags & FPARSELN_UNESCCOMM);
- if (cp[1] == con)
- skipesc += (flags & FPARSELN_UNESCCONT);
- if (cp[1] == esc)
- skipesc += (flags & FPARSELN_UNESCESC);
- if (cp[1] != com && cp[1] != con && cp[1] != esc)
- skipesc = (flags & FPARSELN_UNESCREST);
-
- if (skipesc)
- cp++;
- else
- *ptr++ = *cp++;
- *ptr++ = *cp++;
- }
- *ptr = '\0';
- len = strlen(buf);
- }
-
- if (size)
- *size = len;
- return buf;
-}
-
-#ifdef TEST
-
-int main(int, char *[]);
-
-int
-main(int argc, char *argv[])
-{
- char *ptr;
- size_t size, line;
-
- line = 0;
- while ((ptr = fparseln(stdin, &size, &line, NULL,
- FPARSELN_UNESCALL)) != NULL)
- printf("line %d (%d) |%s|\n", line, size, ptr);
- return 0;
-}
-
-/*
-
-# This is a test
-line 1
-line 2 \
-line 3 # Comment
-line 4 \# Not comment \\\\
-
-# And a comment \
-line 5 \\\
-line 6
-
-*/
-
-#endif /* TEST */
-#endif /* ! HAVE_FPARSELN */
diff --git a/pkgtools/libnbcompat/files/fts.c b/pkgtools/libnbcompat/files/fts.c
deleted file mode 100644
index 29fd40f4006..00000000000
--- a/pkgtools/libnbcompat/files/fts.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $NetBSD: fts.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Written by Jason R. Thorpe <thorpej@NetBSD.org>, October 21, 1997.
- * Public domain.
- */
-
-#if 0
-#define __LIBC12_SOURCE__
-#endif
-
-#include "__fts13.c"
diff --git a/pkgtools/libnbcompat/files/getenv.c b/pkgtools/libnbcompat/files/getenv.c
deleted file mode 100644
index 6ee384eaa1d..00000000000
--- a/pkgtools/libnbcompat/files/getenv.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* $NetBSD: getenv.c,v 1.4 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)getenv.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: getenv.c,v 1.4 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-#if 0
-#include "local.h"
-#include "reentrant.h"
-#endif
-
-char *__findenv __P((const char *, int *));
-
-#if 0
-#ifdef _REENTRANT
-rwlock_t __environ_lock = RWLOCK_INITIALIZER;
-#endif
-#endif
-extern char **environ;
-
-#ifndef rwlock_rdlock
-#define rwlock_rdlock(lock) ((void)0)
-#endif
-#ifndef rwlock_unlock
-#define rwlock_unlock(lock) ((void)0)
-#endif
-
-/*
- * getenv --
- * Returns ptr to value associated with name, if any, else NULL.
- */
-char *
-getenv(name)
- const char *name;
-{
- int offset;
- char *result;
-
- _DIAGASSERT(name != NULL);
-
- rwlock_rdlock(&__environ_lock);
- result = __findenv(name, &offset);
- rwlock_unlock(&__environ_lock);
- return (result);
-}
-
-/*
- * __findenv --
- * Returns pointer to value associated with name, if any, else NULL.
- * Sets offset to be the offset of the name/value combination in the
- * environmental array, for use by setenv(3) and unsetenv(3).
- * Explicitly removes '=' in argument name.
- *
- * This routine *should* be a static; don't use it.
- */
-char *
-__findenv(name, offset)
- const char *name;
- int *offset;
-{
- size_t len;
- const char *np;
- char **p, *c;
-
- if (name == NULL || environ == NULL)
- return (NULL);
- for (np = name; *np && *np != '='; ++np)
- continue;
- len = np - name;
- for (p = environ; (c = *p) != NULL; ++p)
- if (strncmp(c, name, len) == 0 && c[len] == '=') {
- *offset = p - environ;
- return (c + len + 1);
- }
- return (NULL);
-}
diff --git a/pkgtools/libnbcompat/files/getopt_long.c b/pkgtools/libnbcompat/files/getopt_long.c
deleted file mode 100644
index 9e7ce1d45ee..00000000000
--- a/pkgtools/libnbcompat/files/getopt_long.c
+++ /dev/null
@@ -1,505 +0,0 @@
-/* $NetBSD: getopt_long.c,v 1.8 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getopt_long.c,v 1.8 2004/08/23 03:32:12 jlam Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#include <nbcompat/err.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "compat_getopt.h"
-#else
-#include <nbcompat/getopt.h>
-#endif
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-
-#if (HAVE_NBTOOL_CONFIG_H && !HAVE_GETOPT_LONG && !HAVE_DECL_OPTIND) || 1
-#define REPLACE_GETOPT
-#endif
-
-#ifdef REPLACE_GETOPT
-#if 0
-#ifdef __weak_alias
-__weak_alias(getopt,_getopt)
-#endif
-#endif
-int opterr = 1; /* if error message should be printed */
-int optind = 1; /* index into parent argv vector */
-int optopt = '?'; /* character checked for validity */
-int optreset; /* reset getopt */
-char *optarg; /* argument associated with option */
-#elif HAVE_NBTOOL_CONFIG_H && !HAVE_DECL_OPTRESET
-static int optreset;
-#endif
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(getopt_long,_getopt_long)
-#endif
-#endif
-
-#if !HAVE_GETOPT_LONG
-#define IGNORE_FIRST (*options == '-' || *options == '+')
-#define PRINT_ERROR ((opterr) && ((*options != ':') \
- || (IGNORE_FIRST && options[1] != ':')))
-#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
-#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
-/* XXX: GNU ignores PC if *options == '-' */
-#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-')
-
-/* return values */
-#define BADCH (int)'?'
-#define BADARG ((IGNORE_FIRST && options[1] == ':') \
- || (*options == ':') ? (int)':' : (int)'?')
-#define INORDER (int)1
-
-#define EMSG ""
-
-static int getopt_internal __P((int, char * const *, const char *));
-static int gcd __P((int, int));
-static void permute_args __P((int, int, int, char * const *));
-
-static char *place = EMSG; /* option letter processing */
-
-/* XXX: set optreset to 1 rather than these two */
-static int nonopt_start = -1; /* first non option argument (for permute) */
-static int nonopt_end = -1; /* first option after non options (for permute) */
-
-/* Error messages */
-static const char recargchar[] = "option requires an argument -- %c";
-static const char recargstring[] = "option requires an argument -- %s";
-static const char ambig[] = "ambiguous option -- %.*s";
-static const char noarg[] = "option doesn't take an argument -- %.*s";
-static const char illoptchar[] = "unknown option -- %c";
-static const char illoptstring[] = "unknown option -- %s";
-
-
-/*
- * Compute the greatest common divisor of a and b.
- */
-static int
-gcd(a, b)
- int a;
- int b;
-{
- int c;
-
- c = a % b;
- while (c != 0) {
- a = b;
- b = c;
- c = a % b;
- }
-
- return b;
-}
-
-/*
- * Exchange the block from nonopt_start to nonopt_end with the block
- * from nonopt_end to opt_end (keeping the same order of arguments
- * in each block).
- */
-static void
-permute_args(panonopt_start, panonopt_end, opt_end, nargv)
- int panonopt_start;
- int panonopt_end;
- int opt_end;
- char * const *nargv;
-{
- int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
- char *swap;
-
- _DIAGASSERT(nargv != NULL);
-
- /*
- * compute lengths of blocks and number and size of cycles
- */
- nnonopts = panonopt_end - panonopt_start;
- nopts = opt_end - panonopt_end;
- ncycle = gcd(nnonopts, nopts);
- cyclelen = (opt_end - panonopt_start) / ncycle;
-
- for (i = 0; i < ncycle; i++) {
- cstart = panonopt_end+i;
- pos = cstart;
- for (j = 0; j < cyclelen; j++) {
- if (pos >= panonopt_end)
- pos -= nnonopts;
- else
- pos += nopts;
- swap = nargv[pos];
- /* LINTED const cast */
- ((char **) nargv)[pos] = nargv[cstart];
- /* LINTED const cast */
- ((char **)nargv)[cstart] = swap;
- }
- }
-}
-
-/*
- * getopt_internal --
- * Parse argc/argv argument vector. Called by user level routines.
- * Returns -2 if -- is found (can be long option or end of options marker).
- */
-static int
-getopt_internal(nargc, nargv, options)
- int nargc;
- char * const *nargv;
- const char *options;
-{
- char *oli; /* option letter list index */
- int optchar;
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(options != NULL);
-
- optarg = NULL;
-
- /*
- * XXX Some programs (like rsyncd) expect to be able to
- * XXX re-initialize optind to 0 and have getopt_long(3)
- * XXX properly function again. Work around this braindamage.
- */
- if (optind == 0)
- optind = 1;
-
- if (optreset)
- nonopt_start = nonopt_end = -1;
-start:
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc) { /* end of argument vector */
- place = EMSG;
- if (nonopt_end != -1) {
- /* do permutation, if we have to */
- permute_args(nonopt_start, nonopt_end,
- optind, nargv);
- optind -= nonopt_end - nonopt_start;
- }
- else if (nonopt_start != -1) {
- /*
- * If we skipped non-options, set optind
- * to the first of them.
- */
- optind = nonopt_start;
- }
- nonopt_start = nonopt_end = -1;
- return -1;
- }
- if ((*(place = nargv[optind]) != '-')
- || (place[1] == '\0')) { /* found non-option */
- place = EMSG;
- if (IN_ORDER) {
- /*
- * GNU extension:
- * return non-option as argument to option 1
- */
- optarg = nargv[optind++];
- return INORDER;
- }
- if (!PERMUTE) {
- /*
- * if no permutation wanted, stop parsing
- * at first non-option
- */
- return -1;
- }
- /* do permutation */
- if (nonopt_start == -1)
- nonopt_start = optind;
- else if (nonopt_end != -1) {
- permute_args(nonopt_start, nonopt_end,
- optind, nargv);
- nonopt_start = optind -
- (nonopt_end - nonopt_start);
- nonopt_end = -1;
- }
- optind++;
- /* process next argument */
- goto start;
- }
- if (nonopt_start != -1 && nonopt_end == -1)
- nonopt_end = optind;
- if (place[1] && *++place == '-') { /* found "--" */
- place++;
- return -2;
- }
- }
- if ((optchar = (int)*place++) == (int)':' ||
- (oli = strchr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) {
- /* option letter unknown or ':' */
- if (!*place)
- ++optind;
- if (PRINT_ERROR)
- warnx(illoptchar, optchar);
- optopt = optchar;
- return BADCH;
- }
- if (optchar == 'W' && oli[1] == ';') { /* -W long-option */
- /* XXX: what if no long options provided (called by getopt)? */
- if (*place)
- return -2;
-
- if (++optind >= nargc) { /* no arg */
- place = EMSG;
- if (PRINT_ERROR)
- warnx(recargchar, optchar);
- optopt = optchar;
- return BADARG;
- } else /* white space */
- place = nargv[optind];
- /*
- * Handle -W arg the same as --arg (which causes getopt to
- * stop parsing).
- */
- return -2;
- }
- if (*++oli != ':') { /* doesn't take argument */
- if (!*place)
- ++optind;
- } else { /* takes (optional) argument */
- optarg = NULL;
- if (*place) /* no white space */
- optarg = place;
- /* XXX: disable test for :: if PC? (GNU doesn't) */
- else if (oli[1] != ':') { /* arg not optional */
- if (++optind >= nargc) { /* no arg */
- place = EMSG;
- if (PRINT_ERROR)
- warnx(recargchar, optchar);
- optopt = optchar;
- return BADARG;
- } else
- optarg = nargv[optind];
- }
- place = EMSG;
- ++optind;
- }
- /* dump back option letter */
- return optchar;
-}
-
-#ifdef REPLACE_GETOPT
-/*
- * getopt --
- * Parse argc/argv argument vector.
- *
- * [eventually this will replace the real getopt]
- */
-int
-getopt(nargc, nargv, options)
- int nargc;
- char * const *nargv;
- const char *options;
-{
- int retval;
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(options != NULL);
-
- if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
- ++optind;
- /*
- * We found an option (--), so if we skipped non-options,
- * we have to permute.
- */
- if (nonopt_end != -1) {
- permute_args(nonopt_start, nonopt_end, optind,
- nargv);
- optind -= nonopt_end - nonopt_start;
- }
- nonopt_start = nonopt_end = -1;
- retval = -1;
- }
- return retval;
-}
-#endif
-
-/*
- * getopt_long --
- * Parse argc/argv argument vector.
- */
-int
-getopt_long(nargc, nargv, options, long_options, idx)
- int nargc;
- char * const *nargv;
- const char *options;
- const struct option *long_options;
- int *idx;
-{
- int retval;
-
- _DIAGASSERT(nargv != NULL);
- _DIAGASSERT(options != NULL);
- _DIAGASSERT(long_options != NULL);
- /* idx may be NULL */
-
- if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
- char *current_argv, *has_equal;
- size_t current_argv_len;
- int i, match;
-
- current_argv = place;
- match = -1;
-
- optind++;
- place = EMSG;
-
- if (*current_argv == '\0') { /* found "--" */
- /*
- * We found an option (--), so if we skipped
- * non-options, we have to permute.
- */
- if (nonopt_end != -1) {
- permute_args(nonopt_start, nonopt_end,
- optind, nargv);
- optind -= nonopt_end - nonopt_start;
- }
- nonopt_start = nonopt_end = -1;
- return -1;
- }
- if ((has_equal = strchr(current_argv, '=')) != NULL) {
- /* argument found (--option=arg) */
- current_argv_len = has_equal - current_argv;
- has_equal++;
- } else
- current_argv_len = strlen(current_argv);
-
- for (i = 0; long_options[i].name; i++) {
- /* find matching long option */
- if (strncmp(current_argv, long_options[i].name,
- current_argv_len))
- continue;
-
- if (strlen(long_options[i].name) ==
- (unsigned)current_argv_len) {
- /* exact match */
- match = i;
- break;
- }
- if (match == -1) /* partial match */
- match = i;
- else {
- /* ambiguous abbreviation */
- if (PRINT_ERROR)
- warnx(ambig, (int)current_argv_len,
- current_argv);
- optopt = 0;
- return BADCH;
- }
- }
- if (match != -1) { /* option found */
- if (long_options[match].has_arg == no_argument
- && has_equal) {
- if (PRINT_ERROR)
- warnx(noarg, (int)current_argv_len,
- current_argv);
- /*
- * XXX: GNU sets optopt to val regardless of
- * flag
- */
- if (long_options[match].flag == NULL)
- optopt = long_options[match].val;
- else
- optopt = 0;
- return BADARG;
- }
- if (long_options[match].has_arg == required_argument ||
- long_options[match].has_arg == optional_argument) {
- if (has_equal)
- optarg = has_equal;
- else if (long_options[match].has_arg ==
- required_argument) {
- /*
- * optional argument doesn't use
- * next nargv
- */
- optarg = nargv[optind++];
- }
- }
- if ((long_options[match].has_arg == required_argument)
- && (optarg == NULL)) {
- /*
- * Missing argument; leading ':'
- * indicates no error should be generated
- */
- if (PRINT_ERROR)
- warnx(recargstring, current_argv);
- /*
- * XXX: GNU sets optopt to val regardless
- * of flag
- */
- if (long_options[match].flag == NULL)
- optopt = long_options[match].val;
- else
- optopt = 0;
- --optind;
- return BADARG;
- }
- } else { /* unknown option */
- if (PRINT_ERROR)
- warnx(illoptstring, current_argv);
- optopt = 0;
- return BADCH;
- }
- if (long_options[match].flag) {
- *long_options[match].flag = long_options[match].val;
- retval = 0;
- } else
- retval = long_options[match].val;
- if (idx)
- *idx = match;
- }
- return retval;
-}
-#endif /* !GETOPT_LONG */
diff --git a/pkgtools/libnbcompat/files/gettemp.c b/pkgtools/libnbcompat/files/gettemp.c
deleted file mode 100644
index 2500a7114a0..00000000000
--- a/pkgtools/libnbcompat/files/gettemp.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/* $NetBSD: gettemp.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#if !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP || !HAVE_MKDTEMP
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: gettemp.c,v 1.1 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include <nbcompat/types.h>
-#include <nbcompat/stat.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/unistd.h>
-
-#if HAVE_NBTOOL_CONFIG_H
-#define GETTEMP gettemp
-#else
-#if 0
-#include "reentrant.h"
-#include "local.h"
-#define GETTEMP __gettemp
-#else
-#define GETTEMP gettemp
-#endif
-#endif
-
-
-int
-GETTEMP(path, doopen, domkdir)
- char *path;
- int *doopen;
- int domkdir;
-{
- char *start, *trv;
- struct stat sbuf;
- u_int pid;
-
- /* To guarantee multiple calls generate unique names even if
- the file is not created. 676 different possibilities with 7
- or more X's, 26 with 6 or less. */
- static char xtra[2] = "aa";
- int xcnt = 0;
-
- _DIAGASSERT(path != NULL);
- /* doopen may be NULL */
-
- pid = getpid();
-
- /* Move to end of path and count trailing X's. */
- for (trv = path; *trv; ++trv)
- if (*trv == 'X')
- xcnt++;
- else
- xcnt = 0;
-
- /* Use at least one from xtra. Use 2 if more than 6 X's. */
- if (*(trv - 1) == 'X')
- *--trv = xtra[0];
- if (xcnt > 6 && *(trv - 1) == 'X')
- *--trv = xtra[1];
-
- /* Set remaining X's to pid digits with 0's to the left. */
- while (*--trv == 'X') {
- *trv = (pid % 10) + '0';
- pid /= 10;
- }
-
- /* update xtra for next call. */
- if (xtra[0] != 'z')
- xtra[0]++;
- else {
- xtra[0] = 'a';
- if (xtra[1] != 'z')
- xtra[1]++;
- else
- xtra[1] = 'a';
- }
-
- /*
- * check the target directory; if you have six X's and it
- * doesn't exist this runs for a *very* long time.
- */
- for (start = trv + 1;; --trv) {
- if (trv <= path)
- break;
- if (*trv == '/') {
- *trv = '\0';
- if (stat(path, &sbuf))
- return (0);
- if (!S_ISDIR(sbuf.st_mode)) {
- errno = ENOTDIR;
- return (0);
- }
- *trv = '/';
- break;
- }
- }
-
- for (;;) {
- if (doopen) {
- if ((*doopen =
- open(path, O_CREAT | O_EXCL | O_RDWR, 0600)) >= 0)
- return (1);
- if (errno != EEXIST)
- return (0);
- } else if (domkdir) {
- if (mkdir(path, 0700) >= 0)
- return (1);
- if (errno != EEXIST)
- return (0);
- } else if (lstat(path, &sbuf))
- return (errno == ENOENT ? 1 : 0);
-
- /* tricky little algorithm for backward compatibility */
- for (trv = start;;) {
- if (!*trv)
- return (0);
- if (*trv == 'z')
- *trv++ = 'a';
- else {
- if (isdigit((unsigned char)*trv))
- *trv = 'a';
- else
- ++*trv;
- break;
- }
- }
- }
- /*NOTREACHED*/
-}
-
-#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP || !HAVE_MKDTEMP */
diff --git a/pkgtools/libnbcompat/files/glob.c b/pkgtools/libnbcompat/files/glob.c
deleted file mode 100644
index bfb1cb658a7..00000000000
--- a/pkgtools/libnbcompat/files/glob.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $NetBSD: glob.c,v 1.4 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Written by Jason R. Thorpe <thorpej@NetBSD.org>, October 21, 1997.
- * Public domain.
- */
-
-#if 0
-#define __LIBC12_SOURCE__
-#endif
-
-#include "__glob13.c"
diff --git a/pkgtools/libnbcompat/files/install-sh b/pkgtools/libnbcompat/files/install-sh
deleted file mode 100755
index e9de23842dc..00000000000
--- a/pkgtools/libnbcompat/files/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# 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. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# 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 $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/pkgtools/libnbcompat/files/isblank.c b/pkgtools/libnbcompat/files/isblank.c
deleted file mode 100644
index 0d182359912..00000000000
--- a/pkgtools/libnbcompat/files/isblank.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: isblank.c,v 1.5 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)isctype.c 5.2 (Berkeley) 6/1/90";
-#else
-__RCSID("$NetBSD: isblank.c,v 1.5 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#define _ANSI_LIBRARY
-#endif
-#include <nbcompat/ctype.h>
-
-int
-isblank(c)
- int c;
-{
- return(c == ' ' || c == '\t');
-}
diff --git a/pkgtools/libnbcompat/files/lchflags.c b/pkgtools/libnbcompat/files/lchflags.c
deleted file mode 100644
index 70f44003848..00000000000
--- a/pkgtools/libnbcompat/files/lchflags.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: lchflags.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Emulate lchflags(2), checking path with lstat(2) first to ensure that
- * it's not a symlink, and then call chflags(2) */
-
-#include <nbcompat.h>
-#include <nbcompat/stat.h>
-#include <nbcompat/unistd.h>
-
-int
-lchflags(const char *path, u_long flags)
-{
- struct stat psb;
-
- if (lstat(path, &psb) == -1)
- return -1;
- if (S_ISLNK(psb.st_mode)) {
- return 0;
- }
- return (chflags(path, flags));
-}
diff --git a/pkgtools/libnbcompat/files/lchmod.c b/pkgtools/libnbcompat/files/lchmod.c
deleted file mode 100644
index 697de1ed855..00000000000
--- a/pkgtools/libnbcompat/files/lchmod.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: lchmod.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Emulate lchmod(2), checking path with lstat(2) first to ensure that
- * it's not a symlink, and then call chmod(2) */
-
-#include <nbcompat.h>
-#include <nbcompat/stat.h>
-#include <nbcompat/unistd.h>
-
-int
-lchmod(const char *path, mode_t mode)
-{
- struct stat psb;
-
- if (lstat(path, &psb) == -1)
- return -1;
- if (S_ISLNK(psb.st_mode)) {
- return 0;
- }
- return (chmod(path, mode));
-}
diff --git a/pkgtools/libnbcompat/files/lchown.c b/pkgtools/libnbcompat/files/lchown.c
deleted file mode 100644
index 09fcbbde5f1..00000000000
--- a/pkgtools/libnbcompat/files/lchown.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: lchown.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Emulate lchown(2), checking path with lstat(2) first to ensure that
- * it's not a symlink, and then call chown(2) */
-
-#include <nbcompat.h>
-#include <nbcompat/stat.h>
-#include <nbcompat/unistd.h>
-
-int
-lchown(const char *path, uid_t owner, gid_t group)
-{
- struct stat psb;
-
- if (lstat(path, &psb) == -1)
- return -1;
- if (S_ISLNK(psb.st_mode)) {
- return 0;
- }
- return (chown(path, owner, group));
-}
diff --git a/pkgtools/libnbcompat/files/lutimes.c b/pkgtools/libnbcompat/files/lutimes.c
deleted file mode 100644
index e1ff535826f..00000000000
--- a/pkgtools/libnbcompat/files/lutimes.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: lutimes.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Grant Beattie.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Emulate lutimes(2), checking path with lstat(2) first to ensure that
- * it's not a symlink, and then call chmod(2) */
-
-#include <nbcompat.h>
-#include <nbcompat/stat.h>
-#include <nbcompat/unistd.h>
-
-int
-lutimes(const char *path, const struct timeval *times)
-{
- struct stat psb;
-
- if (lstat(path, &psb) == -1)
- return -1;
- if (S_ISLNK(psb.st_mode)) {
- return 0;
- }
- return (utimes(path, times));
-}
diff --git a/pkgtools/libnbcompat/files/malloc.c b/pkgtools/libnbcompat/files/malloc.c
deleted file mode 100644
index db858578000..00000000000
--- a/pkgtools/libnbcompat/files/malloc.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* $NetBSD: malloc.c,v 1.1.1.1 2003/03/31 05:02:54 grant Exp $ */
-
-#if ! HAVE_MALLOC
-#undef malloc
-
-#include <sys/types.h>
-
-void *malloc();
-
-void *rpl_malloc (size_t n)
-{
- if (n == 0) n = 1;
- return malloc(n);
-}
-#endif
diff --git a/pkgtools/libnbcompat/files/md5c.c b/pkgtools/libnbcompat/files/md5c.c
deleted file mode 100644
index b3b1ee93441..00000000000
--- a/pkgtools/libnbcompat/files/md5c.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/* $NetBSD: md5c.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * This file is derived from the RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm and has been modified by Jason R. Thorpe <thorpej@NetBSD.org>
- * for portability and formatting.
- */
-
-/*
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
- *
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
- *
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD5 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- */
-
-#if defined(_KERNEL) || defined(_STANDALONE)
-#include <lib/libkern/libkern.h>
-#include <sys/param.h>
-#include <sys/md5.h>
-#define _DIAGASSERT(x) (void)0
-#else
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat.h>
-#include <nbcompat/types.h>
-#include <nbcompat/assert.h>
-#include <nbcompat/string.h>
-#include <nbcompat/md5.h>
-#endif /* _KERNEL || _STANDALONE */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#if !HAVE_MD5_H
-
-#if defined(HAVE_MEMSET)
-#define ZEROIZE(d, l) memset((d), 0, (l))
-#else
-# if defined(HAVE_BZERO)
-#define ZEROIZE(d, l) bzero((d), (l))
-# else
-#error You need either memset or bzero
-# endif
-#endif
-
-typedef unsigned char *POINTER;
-typedef u_int16_t UINT2;
-typedef u_int32_t UINT4;
-
-/*
- * Constants for MD5Transform routine.
- */
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-#if 0
-#if !defined(_KERNEL) && !defined(_STANDALONE) && defined(__weak_alias)
-__weak_alias(MD5Init,_MD5Init)
-__weak_alias(MD5Update,_MD5Update)
-__weak_alias(MD5Final,_MD5Final)
-#endif
-#endif
-
-static void MD5Transform __P((UINT4 [4], const unsigned char [64]));
-
-static void Encode __P((unsigned char *, UINT4 *, unsigned int));
-static void Decode __P((UINT4 *, const unsigned char *, unsigned int));
-
-/*
- * Encodes input (UINT4) into output (unsigned char). Assumes len is
- * a multiple of 4.
- */
-static void
-Encode (output, input, len)
- unsigned char *output;
- UINT4 *input;
- unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
-
-/*
- * Decodes input (unsigned char) into output (UINT4). Assumes len is
- * a multiple of 4.
- */
-static void
-Decode (output, input, len)
- UINT4 *output;
- const unsigned char *input;
- unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
-}
-
-static const unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/*
- * F, G, H and I are basic MD5 functions.
- */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
-
-/*
- * ROTATE_LEFT rotates x left n bits.
- */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/*
- * FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
- * Rotation is separate from addition to prevent recomputation.
- */
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-}
-
-/*
- * MD5 initialization. Begins an MD5 operation, writing a new context.
- */
-void
-MD5Init(context)
- MD5_CTX *context; /* context */
-{
-
- _DIAGASSERT(context != 0);
-
- context->count[0] = context->count[1] = 0;
-
- /* Load magic initialization constants. */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
-}
-
-/*
- * MD5 block update operation. Continues an MD5 message-digest
- * operation, processing another message block, and updating the
- * context.
- */
-void
-MD5Update(context, input, inputLen)
- MD5_CTX *context; /* context */
- const unsigned char *input; /* input block */
- unsigned int inputLen; /* length of input block */
-{
- unsigned int i, idx, partLen;
-
- _DIAGASSERT(context != 0);
- _DIAGASSERT(input != 0);
-
- /* Compute number of bytes mod 64 */
- idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
-
- /* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
-
- partLen = 64 - idx;
-
- /* Transform as many times as possible. */
- if (inputLen >= partLen) {
- /* LINTED const castaway ok */
- memcpy((POINTER)&context->buffer[idx],
- (POINTER)input, partLen);
- MD5Transform(context->state, context->buffer);
-
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD5Transform(context->state, &input[i]);
-
- idx = 0;
- } else
- i = 0;
-
- /* Buffer remaining input */
- /* LINTED const castaway ok */
- memcpy((POINTER)&context->buffer[idx], (POINTER)&input[i],
- inputLen - i);
-}
-
-/*
- * MD5 finalization. Ends an MD5 message-digest operation, writing the
- * message digest and zeroing the context.
- */
-void
-MD5Final(digest, context)
- unsigned char digest[16]; /* message digest */
- MD5_CTX *context; /* context */
-{
- unsigned char bits[8];
- unsigned int idx, padLen;
-
- _DIAGASSERT(digest != 0);
- _DIAGASSERT(context != 0);
-
- /* Save number of bits */
- Encode(bits, context->count, 8);
-
- /* Pad out to 56 mod 64. */
- idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (idx < 56) ? (56 - idx) : (120 - idx);
- MD5Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- MD5Update(context, bits, 8);
-
- /* Store state in digest */
- Encode(digest, context->state, 16);
-
- /* Zeroize sensitive information. */
- ZEROIZE((POINTER)(void *)context, sizeof(*context));
-}
-
-/*
- * MD5 basic transformation. Transforms state based on block.
- */
-static void
-MD5Transform(state, block)
- UINT4 state[4];
- const unsigned char block[64];
-{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode(x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
- II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information. */
- ZEROIZE((POINTER)(void *)x, sizeof (x));
-}
-
-#endif /* HAVE_MD5_H */
diff --git a/pkgtools/libnbcompat/files/md5hl.c b/pkgtools/libnbcompat/files/md5hl.c
deleted file mode 100644
index 64d80fbdf68..00000000000
--- a/pkgtools/libnbcompat/files/md5hl.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* $NetBSD: md5hl.c,v 1.7 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Written by Jason R. Thorpe <thorpej@NetBSD.org>, April 29, 1997.
- * Public domain.
- */
-
-#define MDALGORITHM MD5
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat.h>
-#include <nbcompat/md5.h>
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#if !HAVE_MD5_H
-#include "mdXhl.c"
-#endif
diff --git a/pkgtools/libnbcompat/files/mdXhl.c b/pkgtools/libnbcompat/files/mdXhl.c
deleted file mode 100644
index 2fece0841e6..00000000000
--- a/pkgtools/libnbcompat/files/mdXhl.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* $NetBSD: mdXhl.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * from FreeBSD Id: mdXhl.c,v 1.8 1996/10/25 06:48:12 bde Exp
- */
-
-/*
- * Modifed April 29, 1997 by Jason R. Thorpe <thorpej@NetBSD.org>
- */
-
-#include <nbcompat.h>
-#include <nbcompat/types.h>
-
-#include <nbcompat/assert.h>
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/unistd.h>
-
-#define CONCAT(x,y) __CONCAT(x,y)
-#define MDNAME(x) CONCAT(MDALGORITHM,x)
-
-char *
-MDNAME(End)(ctx, buf)
- MDNAME(_CTX) *ctx;
- char *buf;
-{
- int i;
- unsigned char digest[16];
- static const char hex[]="0123456789abcdef";
-
- _DIAGASSERT(ctx != 0);
-
- if (buf == NULL)
- buf = malloc(33);
- if (buf == NULL)
- return (NULL);
-
- MDNAME(Final)(digest, ctx);
-
- for (i = 0; i < 16; i++) {
- buf[i+i] = hex[(u_int32_t)digest[i] >> 4];
- buf[i+i+1] = hex[digest[i] & 0x0f];
- }
-
- buf[i+i] = '\0';
- return (buf);
-}
-
-char *
-MDNAME(File)(filename, buf)
- const char *filename;
- char *buf;
-{
- unsigned char buffer[BUFSIZ];
- MDNAME(_CTX) ctx;
- int f, i, j;
-
- _DIAGASSERT(filename != 0);
- /* buf may be NULL */
-
- MDNAME(Init)(&ctx);
- f = open(filename, O_RDONLY, 0666);
- if (f < 0)
- return NULL;
-
- while ((i = read(f, buffer, sizeof(buffer))) > 0)
- MDNAME(Update)(&ctx, buffer, (unsigned int)i);
-
- j = errno;
- close(f);
- errno = j;
-
- if (i < 0)
- return NULL;
-
- return (MDNAME(End)(&ctx, buf));
-}
-
-char *
-MDNAME(Data)(data, len, buf)
- const unsigned char *data;
- unsigned int len;
- char *buf;
-{
- MDNAME(_CTX) ctx;
-
- _DIAGASSERT(data != 0);
-
- MDNAME(Init)(&ctx);
- MDNAME(Update)(&ctx, data, len);
- return (MDNAME(End)(&ctx, buf));
-}
diff --git a/pkgtools/libnbcompat/files/mkdtemp.c b/pkgtools/libnbcompat/files/mkdtemp.c
deleted file mode 100644
index 3d9a7a2fd02..00000000000
--- a/pkgtools/libnbcompat/files/mkdtemp.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $NetBSD: mkdtemp.c,v 1.3 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#if !HAVE_NBTOOL_CONFIG_H || !HAVE_MKDTEMP
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: mkdtemp.c,v 1.3 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if HAVE_NBTOOL_CONFIG_H
-#define GETTEMP gettemp
-#else
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/unistd.h>
-#if 0
-#include "reentrant.h"
-#include "local.h"
-#define GETTEMP __gettemp
-#else
-#define GETTEMP gettemp
-extern int gettemp __P((char *, int *, int));
-#endif
-#endif
-
-char *
-mkdtemp(path)
- char *path;
-{
- _DIAGASSERT(path != NULL);
-
- return (GETTEMP(path, (int *)NULL, 1) ? path : (char *)NULL);
-}
-
-#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKDTEMP */
diff --git a/pkgtools/libnbcompat/files/mkstemp.c b/pkgtools/libnbcompat/files/mkstemp.c
deleted file mode 100644
index c558d6e8d13..00000000000
--- a/pkgtools/libnbcompat/files/mkstemp.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $NetBSD: mkstemp.c,v 1.4 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#if !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: mkstemp.c,v 1.4 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if HAVE_NBTOOL_CONFIG_H
-#define GETTEMP gettemp
-#else
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/unistd.h>
-#if 0
-#include "reentrant.h"
-#include "local.h"
-#define GETTEMP __gettemp
-#else
-#define GETTEMP gettemp
-extern int gettemp __P((char *, int *, int));
-#endif
-#endif
-
-int
-mkstemp(path)
- char *path;
-{
- int fd;
-
- _DIAGASSERT(path != NULL);
-
- return (GETTEMP(path, &fd, 0) ? fd : -1);
-}
-
-#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP */
diff --git a/pkgtools/libnbcompat/files/nbcompat.awk b/pkgtools/libnbcompat/files/nbcompat.awk
deleted file mode 100644
index c1946624a60..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat.awk
+++ /dev/null
@@ -1,24 +0,0 @@
-BEGIN { process = 1 }
-
-/NBCOMPAT template section follows\./ { process = 0 }
-
-/^\#[ ]*define[ ]+PACKAGE_.*/ {
- if (process == 1) {
- print "/* " $0 " */";
- next;
- }
-}
-
-/^\#[ ]*define[ ]+/ {
- if (process == 1) {
- guard = $0;
- sub("^#[ ]*define[ ]+", "", guard);
- sub("[ ]+.*", "", guard);
- print "#ifndef " guard;
- print $0;
- print "#endif";
- next;
- }
-}
-
-{ print }
diff --git a/pkgtools/libnbcompat/files/nbcompat.h b/pkgtools/libnbcompat/files/nbcompat.h
deleted file mode 100644
index 903c3cf972f..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* $NetBSD: nbcompat.h,v 1.38 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2003 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat/nbconfig.h>
-#include <nbcompat/nbtypes.h>
-
-#include <nbcompat/cdefs.h>
-#include <nbcompat/limits.h>
-#include <nbcompat/endian.h>
-#include <nbcompat/types.h>
-#include <nbcompat/param.h>
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-
-#if HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#include <nbcompat/dirent.h>
-#include <nbcompat/err.h>
-#include <nbcompat/fnmatch.h>
-#include <nbcompat/grp.h>
-#include <nbcompat/paths.h>
-#include <nbcompat/pwd.h>
-#include <nbcompat/queue.h>
-#include <nbcompat/stat.h>
-#include <nbcompat/statvfs.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/string.h>
-#include <nbcompat/termcap.h>
-#include <nbcompat/time.h>
-#include <nbcompat/tzfile.h>
-#include <nbcompat/unistd.h>
-#include <nbcompat/util.h>
-
-#if HAVE_NBCOMPAT_POLL
-# if HAVE_POLL_H
-# undef HAVE_POLL_H
-# endif
-# if HAVE_SYS_POLL_H
-# undef HAVE_SYS_POLL_H
-# endif
-# include <nbcompat/poll.h>
-#endif
-
-#if HAVE_NBCOMPAT_FTS
-# if HAVE_FTS_H
-# undef HAVE_FTS_H
-# endif
-# include <nbcompat/fts.h>
-#endif
-
-#if HAVE_NBCOMPAT_GLOB
-# if HAVE_GLOB_H
-# undef HAVE_GLOB_H
-# endif
-# include <nbcompat/glob.h>
-#endif
-
-#if HAVE_NBCOMPAT_REGEX
-# if HAVE_REGEX_H
-# undef HAVE_REGEX_H
-# endif
-# include <nbcompat/regex.h>
-#endif
-
-#if HAVE_NBCOMPAT_MD5INIT
-# if HAVE_MD5_H
-# undef HAVE_MD5_H
-# endif
-#endif
-
-#if HAVE_NBCOMPAT_MD5
-# if HAVE_MD5_H
-# undef HAVE_MD5_H
-# endif
-# include <nbcompat/md5.h>
-#endif
-
-#if HAVE_NBCOMPAT_RMD160
-# if HAVE_RMD160_H
-# undef HAVE_RMD160_H
-# endif
-# include <nbcompat/rmd160.h>
-#endif
-
-#if HAVE_NBCOMPAT_SHA1
-# if HAVE_SHA1_H
-# undef HAVE_SHA1_H
-# endif
-# include <nbcompat/sha1.h>
-#endif
-
-#if HAVE_NBCOMPAT_VIS
-# if HAVE_VIS_H
-# undef HAVE_VIS_H
-# endif
-# include <nbcompat/vis.h>
-#endif
-
-#if HAVE_NBCOMPAT_GETOPT_LONG
-# if HAVE_GETOPT_H
-# undef HAVE_GETOPT_H
-# endif
-# include <nbcompat/getopt.h>
-#endif
diff --git a/pkgtools/libnbcompat/files/nbcompat/assert.h b/pkgtools/libnbcompat/files/nbcompat/assert.h
deleted file mode 100644
index 736e0563982..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/assert.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $NetBSD: assert.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_ASSERT_H_
-#define _NBCOMPAT_ASSERT_H_
-
-#if HAVE_ASSERT_H
-# include <assert.h>
-#endif
-
-/*
- * Declare macros and functions that may be missing in <assert.h>.
- */
-
-#ifndef _DIAGASSERT
-#define _DIAGASSERT(cond) assert(cond)
-#endif
-
-#endif /* !_NBCOMPAT_ASSERT_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/cdefs.h b/pkgtools/libnbcompat/files/nbcompat/cdefs.h
deleted file mode 100644
index e40ee70c1f3..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/cdefs.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* $NetBSD: cdefs.h,v 1.2 2004/09/11 19:01:40 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_SYS_CDEFS_H_
-#define _NBCOMPAT_SYS_CDEFS_H_
-
-#if HAVE_SYS_CDEFS_H
-# include <sys/cdefs.h>
-#endif
-
-/*
- * Declare macros and functions that may be missing in <sys/cdefs.h>.
- */
-
-#ifndef __IDSTRING
-# define __IDSTRING(name,string) \
- static const char name[] __attribute__((__unused__)) = string
-#endif
-
-#ifndef __COPYRIGHT
-# define __COPYRIGHT(_s) __IDSTRING(copyright,_s)
-#endif
-
-#ifndef __RCSID
-# define __RCSID(_s) __IDSTRING(rcsid,_s)
-#endif
-
-#ifndef __P
-# if defined(__STDC__) || defined(__cplusplus)
-# define __P(protos) protos /* full-blown ANSI C */
-# else
-# define __P(protos) () /* traditional C preprocessor */
-# endif
-#endif
-
-#ifndef __CONCAT
-# if defined(__STDC__) || defined(__cplusplus)
-# define __CONCAT(x,y) x ## y
-# else
-# define __CONCAT(x,y) x/**/y
-# endif
-#endif
-
-#ifndef __BEGIN_DECLS
-# if defined(__cplusplus)
-# define __BEGIN_DECLS extern "C" {
-# else
-# define __BEGIN_DECLS
-# endif
-#endif
-
-#ifndef __END_DECLS
-# if defined(__cplusplus)
-# define __END_DECLS };
-# else
-# define __END_DECLS
-# endif
-#endif
-
-#ifndef __restrict
-/*
- * C99 defines the restrict type qualifier keyword, which was made available
- * in GCC 2.92.
- */
-# if __STDC_VERSION__ >= 199901L
-# define __restrict restrict
-# else
-# define __restrict /* delete __restrict when not supported */
-# endif
-#endif
-
-#endif /* !_NBCOMPAT_SYS_CDEFS_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/config.h.in b/pkgtools/libnbcompat/files/nbcompat/config.h.in
deleted file mode 100644
index fd3feba5fe7..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/config.h.in
+++ /dev/null
@@ -1,516 +0,0 @@
-/* nbcompat/config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if the `getpgrp' function requires zero arguments. */
-#undef GETPGRP_VOID
-
-/* Define to 1 if you have the <alloca.h> header file. */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY
-
-/* Define to 1 if you have the <bind/bitypes.h> header file. */
-#undef HAVE_BIND_BITYPES_H
-
-/* Define to 1 if you have the `bzero' function. */
-#undef HAVE_BZERO
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
-
-/* Define to 1 if you have the declaration of `optind', and to 0 if you don't.
- */
-#undef HAVE_DECL_OPTIND
-
-/* Define to 1 if you have the declaration of `optreset', and to 0 if you
- don't. */
-#undef HAVE_DECL_OPTRESET
-
-/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
- don't. */
-#undef HAVE_DECL_STRERROR_R
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Define to 1 if you have the `err' function. */
-#undef HAVE_ERR
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `fgetln' function. */
-#undef HAVE_FGETLN
-
-/* Define to 1 if you have the `fnmatch' function. */
-#undef HAVE_FNMATCH
-
-/* Define to 1 if you have the <fnmatch.h> header file. */
-#undef HAVE_FNMATCH_H
-
-/* Define to 1 if you have the `fparseln' function. */
-#undef HAVE_FPARSELN
-
-/* Define to 1 if the system has the type `fsid_t'. */
-#undef HAVE_FSID_T
-
-/* Define to 1 if you have the <fts.h> header file. */
-#undef HAVE_FTS_H
-
-/* Define to 1 if you have the `getenv' function. */
-#undef HAVE_GETENV
-
-/* Define to 1 if you have the `getmode' function. */
-#undef HAVE_GETMODE
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
-
-/* Define to 1 if you have the `getpassphrase' function. */
-#undef HAVE_GETPASSPHRASE
-
-/* Define to 1 if you have the `getpgrp' function. */
-#undef HAVE_GETPGRP
-
-/* Define to 1 if you have the `gid_from_group' function. */
-#undef HAVE_GID_FROM_GROUP
-
-/* Define to 1 if you have the <glob.h> header file. */
-#undef HAVE_GLOB_H
-
-/* Define to 1 if you have the `group_from_gid' function. */
-#undef HAVE_GROUP_FROM_GID
-
-/* Define to 1 if you have the <grp.h> header file. */
-#undef HAVE_GRP_H
-
-/* Define to 1 if the system has the type `int16_t'. */
-#undef HAVE_INT16_T
-
-/* Define to 1 if the system has the type `int32_t'. */
-#undef HAVE_INT32_T
-
-/* Define to 1 if the system has the type `int64_t'. */
-#undef HAVE_INT64_T
-
-/* Define to 1 if the system has the type `int8_t'. */
-#undef HAVE_INT8_T
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `isblank' function. */
-#undef HAVE_ISBLANK
-
-/* Define to 1 if you have the `lchflags' function. */
-#undef HAVE_LCHFLAGS
-
-/* Define to 1 if you have the `lchmod' function. */
-#undef HAVE_LCHMOD
-
-/* Define to 1 if you have the `lchown' function. */
-#undef HAVE_LCHOWN
-
-/* Define to 1 if you have the `util' library (-lutil). */
-#undef HAVE_LIBUTIL
-
-/* Define to 1 if you have the <libutil.h> header file. */
-#undef HAVE_LIBUTIL_H
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if the system has the type `long double'. */
-#undef HAVE_LONG_DOUBLE
-
-/* Define to 1 if the system has the type `long long'. */
-#undef HAVE_LONG_LONG
-
-/* Define to 1 if you have the `lutimes' function. */
-#undef HAVE_LUTIMES
-
-/* Define to 1 if you have the <machine/endian.h> header file. */
-#undef HAVE_MACHINE_ENDIAN_H
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the <md5.h> header file. */
-#undef HAVE_MD5_H
-
-/* 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 `mkdtemp' function. */
-#undef HAVE_MKDTEMP
-
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
-/* Define to 1 if the `fts_*' functions are built into the library. */
-#undef HAVE_NBCOMPAT_FTS
-
-/* Define to 1 if the `getopt_long' function is built into the library. */
-#undef HAVE_NBCOMPAT_GETOPT_LONG
-
-/* Define to 1 if the `glob' function is built into the library. */
-#undef HAVE_NBCOMPAT_GLOB
-
-/* Define to 1 if the `MD5*' functions are built into the library. */
-#undef HAVE_NBCOMPAT_MD5
-
-/* Define to 1 if the `MD5Init' function is built into the library. */
-#undef HAVE_NBCOMPAT_MD5INIT
-
-/* Define to 1 if the `poll' function is built into the library. */
-#undef HAVE_NBCOMPAT_POLL
-
-/* Define to 1 if the `queue' macros are supplied by the library. */
-#undef HAVE_NBCOMPAT_QUEUE
-
-/* Define to 1 if the `regex' functions are built into the library. */
-#undef HAVE_NBCOMPAT_REGEX
-
-/* Define to 1 if the `RMD160*' functions are built into the library. */
-#undef HAVE_NBCOMPAT_RMD160
-
-/* Define to 1 if the `SHA1*' functions are built into the library. */
-#undef HAVE_NBCOMPAT_SHA1
-
-/* Define to 1 if the `vis' function is built into the library. */
-#undef HAVE_NBCOMPAT_VIS
-
-/* Define to 1 if you have the <ndir.h> header file. */
-#undef HAVE_NDIR_H
-
-/* Define to 1 if you have the <netinet/in6_machtypes.h> header file. */
-#undef HAVE_NETINET_IN6_MACHTYPES_H
-
-/* Define to 1 if you have the <paths.h> header file. */
-#undef HAVE_PATHS_H
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
-/* Define to 1 if *printf() uses %qd to print `long long' (otherwise uses
- %lld). */
-#undef HAVE_PRINTF_QD
-
-/* Define to 1 if you have the `pwcache_groupdb' function. */
-#undef HAVE_PWCACHE_GROUPDB
-
-/* Define to 1 if you have the `pwcache_userdb' function. */
-#undef HAVE_PWCACHE_USERDB
-
-/* Define to 1 if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define to 1 if you have the <regex.h> header file. */
-#undef HAVE_REGEX_H
-
-/* Define to 1 if you have the <rmd160.h> header file. */
-#undef HAVE_RMD160_H
-
-/* Define to 1 if you have the `select' function. */
-#undef HAVE_SELECT
-
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
-
-/* Define to 1 if you have the `setgroupent' function. */
-#undef HAVE_SETGROUPENT
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Define to 1 if you have the `setmode' function. */
-#undef HAVE_SETMODE
-
-/* Define to 1 if you have the `setpassent' function. */
-#undef HAVE_SETPASSENT
-
-/* Define to 1 if you have the `setprogname' function. */
-#undef HAVE_SETPROGNAME
-
-/* Define to 1 if you have the <sha1.h> header file. */
-#undef HAVE_SHA1_H
-
-/* 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 `statvfs' function. */
-#undef HAVE_STATVFS
-
-/* 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 `strdup' function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the `strerror_r' function. */
-#undef HAVE_STRERROR_R
-
-/* 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 `strlcat' function. */
-#undef HAVE_STRLCAT
-
-/* Define to 1 if you have the `strlcpy' function. */
-#undef HAVE_STRLCPY
-
-/* Define to 1 if you have the `strmode' function. */
-#undef HAVE_STRMODE
-
-/* Define to 1 if you have the `strsep' function. */
-#undef HAVE_STRSEP
-
-/* Define to 1 if you have the `strsvis' function. */
-#undef HAVE_STRSVIS
-
-/* Define to 1 if you have the `strtoll' function. */
-#undef HAVE_STRTOLL
-
-/* Define to 1 if `d_namlen' is member of `struct dirent'. */
-#undef HAVE_STRUCT_DIRENT_D_NAMLEN
-
-/* Define to 1 if `f_fsize' is member of `struct statfs'. */
-#undef HAVE_STRUCT_STATFS_F_FSIZE
-
-/* Define to 1 if `f_iosize' is member of `struct statfs'. */
-#undef HAVE_STRUCT_STATFS_F_IOSIZE
-
-/* Define to 1 if you have the `strunvis' function. */
-#undef HAVE_STRUNVIS
-
-/* Define to 1 if you have the `strvis' function. */
-#undef HAVE_STRVIS
-
-/* Define to 1 if you have the `svis' function. */
-#undef HAVE_SVIS
-
-/* Define to 1 if you have the <sys/bitypes.h> header file. */
-#undef HAVE_SYS_BITYPES_H
-
-/* Define to 1 if you have the <sys/byteorder.h> header file. */
-#undef HAVE_SYS_BYTEORDER_H
-
-/* Define to 1 if you have the <sys/cdefs.h> header file. */
-#undef HAVE_SYS_CDEFS_H
-
-/* Define to 1 if you have the <sys/dir.h> header file. */
-#undef HAVE_SYS_DIR_H
-
-/* Define to 1 if you have the <sys/endian.h> header file. */
-#undef HAVE_SYS_ENDIAN_H
-
-/* Define to 1 if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
-/* Define to 1 if you have the <sys/mkdev.h> header file. */
-#undef HAVE_SYS_MKDEV_H
-
-/* Define to 1 if you have the <sys/mount.h> header file. */
-#undef HAVE_SYS_MOUNT_H
-
-/* Define to 1 if you have the <sys/ndir.h> header file. */
-#undef HAVE_SYS_NDIR_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/poll.h> header file. */
-#undef HAVE_SYS_POLL_H
-
-/* Define to 1 if you have the <sys/queue.h> header file. */
-#undef HAVE_SYS_QUEUE_H
-
-/* Define to 1 if you have the <sys/statfs.h> header file. */
-#undef HAVE_SYS_STATFS_H
-
-/* Define to 1 if you have the <sys/statvfs.h> header file. */
-#undef HAVE_SYS_STATVFS_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/ttycom.h> header file. */
-#undef HAVE_SYS_TTYCOM_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/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if you have the <sys/vfs.h> header file. */
-#undef HAVE_SYS_VFS_H
-
-/* Define to 1 if you have the <termcap.h> header file. */
-#undef HAVE_TERMCAP_H
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <tzfile.h> header file. */
-#undef HAVE_TZFILE_H
-
-/* Define to 1 if you have the `uid_from_user' function. */
-#undef HAVE_UID_FROM_USER
-
-/* Define to 1 if the system has the type `uint16_t'. */
-#undef HAVE_UINT16_T
-
-/* Define to 1 if the system has the type `uint32_t'. */
-#undef HAVE_UINT32_T
-
-/* Define to 1 if the system has the type `uint64_t'. */
-#undef HAVE_UINT64_T
-
-/* Define to 1 if the system has the type `uint8_t'. */
-#undef HAVE_UINT8_T
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `unsetenv' function. */
-#undef HAVE_UNSETENV
-
-/* Define to 1 if you have the `unvis' function. */
-#undef HAVE_UNVIS
-
-/* Define to 1 if you have the `user_from_uid' function. */
-#undef HAVE_USER_FROM_UID
-
-/* Define to 1 if you have the `usleep' function. */
-#undef HAVE_USLEEP
-
-/* Define to 1 if you have the <util.h> header file. */
-#undef HAVE_UTIL_H
-
-/* Define to 1 if you have the `utimes' function. */
-#undef HAVE_UTIMES
-
-/* Define to 1 if you have the <utime.h> header file. */
-#undef HAVE_UTIME_H
-
-/* Define to 1 if the system has the type `u_int16_t'. */
-#undef HAVE_U_INT16_T
-
-/* Define to 1 if the system has the type `u_int32_t'. */
-#undef HAVE_U_INT32_T
-
-/* Define to 1 if the system has the type `u_int64_t'. */
-#undef HAVE_U_INT64_T
-
-/* Define to 1 if the system has the type `u_int8_t'. */
-#undef HAVE_U_INT8_T
-
-/* Define to 1 if you have the `vis' function. */
-#undef HAVE_VIS
-
-/* Define to 1 if you have the <vis.h> header file. */
-#undef HAVE_VIS_H
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Define to 1 if you have the `warn' function. */
-#undef HAVE_WARN
-
-/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8. */
-#undef HAVE_WORKING_LONG_LONG
-
-/* define if your compiler has __attribute__ */
-#undef HAVE___ATTRIBUTE__
-
-/* 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 version of this package. */
-#undef PACKAGE_VERSION
-
-/* The size of a `off_t', as computed by sizeof. */
-#undef SIZEOF_OFF_T
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if strerror_r returns char *. */
-#undef STRERROR_R_CHAR_P
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-
-/* NBCOMPAT template section follows. */
-
-#ifndef HAVE___ATTRIBUTE__
-# define __attribute__(x)
-#endif
-
diff --git a/pkgtools/libnbcompat/files/nbcompat/ctype.h b/pkgtools/libnbcompat/files/nbcompat/ctype.h
deleted file mode 100644
index a90bbdc36a4..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/ctype.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $NetBSD: ctype.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_CTYPE_H_
-#define _NBCOMPAT_CTYPE_H_
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-/*
- * Declare macros and functions that may be missing in <ctype.h>.
- */
-
-#if !HAVE_ISBLANK
-int isblank(int);
-#endif
-
-#endif /* !_NBCOMPAT_CTYPE_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/dirent.h b/pkgtools/libnbcompat/files/nbcompat/dirent.h
deleted file mode 100644
index b23adfc60ec..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/dirent.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* $NetBSD: dirent.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_DIRENT_H_
-#define _NBCOMPAT_DIRENT_H_
-
-#if HAVE_DIRENT_H
-# include <dirent.h>
-#else
-# define dirent direct
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
-
-/*
- * Declare functions and macros that may be missing in <dirent.h>.
- */
-
-#ifndef dirfd
-#define dirfd(dirp) ((dirp)->dd_fd)
-#endif
-
-#endif /* !_NBCOMPAT_DIRENT_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/endian.h b/pkgtools/libnbcompat/files/nbcompat/endian.h
deleted file mode 100644
index 2a6a475552d..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/endian.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $NetBSD: endian.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_ENDIAN_H_
-#define _NBCOMPAT_ENDIAN_H_
-
-#if HAVE_SYS_ENDIAN_H
-# include <sys/endian.h>
-#endif
-
-#if HAVE_MACHINE_ENDIAN_H
-# include <machine/endian.h>
-#endif
-
-#if HAVE_SYS_BYTEORDER_H
-# include <sys/byteorder.h>
-#endif
-
-/*
- * Declare macros that may be missing in <sys/endian.h>, <machine/endian.h>,
- * and <sys/byteorder.h>
- */
-
-#ifndef LITTLE_ENDIAN
-# define LITTLE_ENDIAN 1234
-#endif
-
-#ifndef BIG_ENDIAN
-# define BIG_ENDIAN 4321
-#endif
-
-#ifndef BYTE_ORDER
-# if defined(_BIG_ENDIAN)
-# define BYTE_ORDER BIG_ENDIAN
-# elif defined(_LITTE_ENDIAN)
-# define BYTE_ORDER LITTLE_ENDIAN
-# elif defined(WORDS_BIGENDIAN)
-# define BYTE_ORDER BIG_ENDIAN
-# else
-# define BYTE_ORDER LITTLE_ENDIAN
-# endif
-#endif
-
-#endif /* !_NBCOMPAT_ENDIAN_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/err.h b/pkgtools/libnbcompat/files/nbcompat/err.h
deleted file mode 100644
index eb7f0a06bf0..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/err.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $NetBSD: err.h,v 1.4 2004/08/23 03:32:13 jlam Exp $ */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fts.h 8.3 (Berkeley) 8/14/94
- */
-
-#ifndef _NBCOMPAT_ERR_H_
-#define _NBCOMPAT_ERR_H_
-
-#if HAVE_ERR_H
-# include <err.h>
-#endif
-
-#if !HAVE_ERR
-void err __P((int, const char *, ...));
-void errx __P((int, const char *, ...));
-void verr __P((int, const char *, va_list));
-void verrx __P((int, const char *, va_list));
-#endif
-
-#if !HAVE_WARN
-void warn __P((const char *, ...));
-void warnx __P((const char *, ...));
-void vwarn __P((const char *, va_list));
-void vwarnx __P((const char *, va_list));
-#endif
-
-#endif /* !_NBCOMPAT_ERR_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/fnmatch.h b/pkgtools/libnbcompat/files/nbcompat/fnmatch.h
deleted file mode 100644
index 9a709925f5c..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/fnmatch.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $NetBSD: fnmatch.h,v 1.2 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _NBCOMPAT_FNMATCH_H_
-#define _NBCOMPAT_FNMATCH_H_
-
-#if HAVE_FNMATCH_H
-# include <fnmatch.h>
-#endif
-
-#if !HAVE_FNMATCH
-#define FNM_NOMATCH 1 /* Match failed. */
-#define FNM_NOSYS 2 /* Function not implemented. */
-
-#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
-#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
-#define FNM_PERIOD 0x04 /* Period must be matched by period. */
-#define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */
-#define FNM_LEADING_DIR 0x10 /* Ignore /<tail> after Imatch. */
-
-int fnmatch(const char *, const char *, int);
-#endif
-
-#endif /* !_NBCOMPAT_FNMATCH_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/fts.h b/pkgtools/libnbcompat/files/nbcompat/fts.h
deleted file mode 100644
index 7f0ba15e6dd..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/fts.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* $NetBSD: fts.h,v 1.4 2004/08/16 17:24:57 jlam Exp $ */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fts.h 8.3 (Berkeley) 8/14/94
- */
-
-#ifndef _NBCOMPAT_FTS_H_
-#define _NBCOMPAT_FTS_H_
-
-typedef struct {
- struct _ftsent *fts_cur; /* current node */
- struct _ftsent *fts_child; /* linked list of children */
- struct _ftsent **fts_array; /* sort array */
- dev_t fts_dev; /* starting device # */
- char *fts_path; /* path for this descent */
- int fts_rfd; /* fd for root */
- u_int fts_pathlen; /* sizeof(path) */
- u_int fts_nitems; /* elements in the sort array */
- int (*fts_compar) /* compare function */
- (const struct _ftsent **, const struct _ftsent **);
-
-#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */
-#define FTS_LOGICAL 0x002 /* logical walk */
-#define FTS_NOCHDIR 0x004 /* don't change directories */
-#define FTS_NOSTAT 0x008 /* don't get stat info */
-#define FTS_PHYSICAL 0x010 /* physical walk */
-#define FTS_SEEDOT 0x020 /* return dot and dot-dot */
-#define FTS_XDEV 0x040 /* don't cross devices */
-#define FTS_WHITEOUT 0x080 /* return whiteout information */
-#define FTS_OPTIONMASK 0x0ff /* valid user option mask */
-
-#define FTS_NAMEONLY 0x100 /* (private) child names only */
-#define FTS_STOP 0x200 /* (private) unrecoverable error */
- int fts_options; /* fts_open options, global flags */
-} FTS;
-
-typedef struct _ftsent {
- struct _ftsent *fts_cycle; /* cycle node */
- struct _ftsent *fts_parent; /* parent directory */
- struct _ftsent *fts_link; /* next file in directory */
- long fts_number; /* local numeric value */
- void *fts_pointer; /* local address value */
- char *fts_accpath; /* access path */
- char *fts_path; /* root path */
- int fts_errno; /* errno for this node */
- int fts_symfd; /* fd for symlink */
- u_short fts_pathlen; /* strlen(fts_path) */
- u_short fts_namelen; /* strlen(fts_name) */
-
- ino_t fts_ino; /* inode */
- dev_t fts_dev; /* device */
-#ifdef __LIBC12_SOURCE__
- u_int16_t fts_nlink; /* link count */
-#else
- nlink_t fts_nlink; /* link count */
-#endif
-
-#define FTS_ROOTPARENTLEVEL -1
-#define FTS_ROOTLEVEL 0
- short fts_level; /* depth (-1 to N) */
-
-#define FTS_D 1 /* preorder directory */
-#define FTS_DC 2 /* directory that causes cycles */
-#define FTS_DEFAULT 3 /* none of the above */
-#define FTS_DNR 4 /* unreadable directory */
-#define FTS_DOT 5 /* dot or dot-dot */
-#define FTS_DP 6 /* postorder directory */
-#define FTS_ERR 7 /* error; errno is set */
-#define FTS_F 8 /* regular file */
-#define FTS_INIT 9 /* initialized only */
-#define FTS_NS 10 /* stat(2) failed */
-#define FTS_NSOK 11 /* no stat(2) requested */
-#define FTS_SL 12 /* symbolic link */
-#define FTS_SLNONE 13 /* symbolic link without target */
-#define FTS_W 14 /* whiteout object */
- u_short fts_info; /* user flags for FTSENT structure */
-
-#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
-#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
-#define FTS_ISW 0x04 /* this is a whiteout object */
- u_short fts_flags; /* private flags for FTSENT structure */
-
-#define FTS_AGAIN 1 /* read node again */
-#define FTS_FOLLOW 2 /* follow symbolic link */
-#define FTS_NOINSTR 3 /* no instructions */
-#define FTS_SKIP 4 /* discard node */
- u_short fts_instr; /* fts_set() instructions */
-
- struct stat *fts_statp; /* stat(2) information */
- char fts_name[1]; /* file name */
-} FTSENT;
-
-FTSENT *fts_children (FTS *, int);
-int fts_close (FTS *);
-FTS *fts_open (char * const *, int,
- int (*)(const FTSENT **, const FTSENT **));
-FTSENT *fts_read (FTS *);
-int fts_set (FTS *, FTSENT *, int);
-
-#endif /* !_NBCOMPAT_FTS_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/getopt.h b/pkgtools/libnbcompat/files/nbcompat/getopt.h
deleted file mode 100644
index 8af7a9c3896..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/getopt.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* $NetBSD: getopt.h,v 1.4 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_GETOPT_H_
-#define _NBCOMPAT_GETOPT_H_
-
-#include <nbcompat/cdefs.h>
-#include <nbcompat/unistd.h>
-
-/*
- * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
- */
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-struct option {
- /* name of long option */
- const char *name;
- /*
- * one of no_argument, required_argument, and optional_argument:
- * whether option takes an argument
- */
- int has_arg;
- /* if not NULL, set *flag to val when option found */
- int *flag;
- /* if flag not NULL, value to set *flag to; else return value */
- int val;
-};
-
-__BEGIN_DECLS
-int getopt_long (int, char * const *, const char *,
- const struct option *, int *);
-__END_DECLS
-
-#endif /* !_NBCOMPAT_GETOPT_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/glob.h b/pkgtools/libnbcompat/files/nbcompat/glob.h
deleted file mode 100644
index c5f1a96cc83..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/glob.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* $Id: glob.h,v 1.3 2004/08/16 17:24:57 jlam Exp $ */
-/* from NetBSD: glob.h,v 1.13 2001/03/16 21:02:42 christos Exp */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)glob.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _NBCOMPAT_GLOB_H_
-#define _NBCOMPAT_GLOB_H_
-
-typedef struct {
- int gl_pathc; /* Count of total paths so far. */
- int gl_matchc; /* Count of paths matching pattern. */
- int gl_offs; /* Reserved at beginning of gl_pathv. */
- int gl_flags; /* Copy of flags parameter to glob. */
- char **gl_pathv; /* List of paths matching pattern. */
- /* Copy of errfunc parameter to glob. */
- int (*gl_errfunc)(const char *, int);
-
- /*
- * Alternate filesystem access methods for glob; replacement
- * versions of closedir(3), readdir(3), opendir(3), stat(2)
- * and lstat(2).
- */
- void (*gl_closedir)(void *);
- struct dirent *(*gl_readdir)(void *);
- void *(*gl_opendir)(const char *);
- int (*gl_lstat)(const char *, struct stat *);
- int (*gl_stat)(const char *, struct stat *);
-} glob_t;
-
-#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
-#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
-#define GLOB_ERR 0x0004 /* Return on error. */
-#define GLOB_MARK 0x0008 /* Append / to matching directories. */
-#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
-#define GLOB_NOSORT 0x0020 /* Don't sort. */
-#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */
-
-#define GLOB_NOSPACE (-1) /* Malloc call failed. */
-#define GLOB_ABORTED (-2) /* Unignored error. */
-#define GLOB_NOMATCH (-3) /* No match, and GLOB_NOCHECK was not set. */
-#define GLOB_NOSYS (-4) /* Implementation does not support function. */
-
-#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
-#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
-#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
-#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
-#define GLOB_LIMIT 0x0400 /* Limit memory used by matches to ARG_MAX */
-#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
-#define GLOB_QUOTE 0 /* source compatibility */
-
-#define GLOB_ABEND GLOB_ABORTED /* source compatibility */
-
-int glob(const char *, int, int (*)(const char *, int), glob_t *);
-void globfree(glob_t *);
-
-#endif /* !_NBCOMPAT_GLOB_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/grp.h b/pkgtools/libnbcompat/files/nbcompat/grp.h
deleted file mode 100644
index d61be39d7c1..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/grp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $NetBSD: grp.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_GRP_H_
-#define _NBCOMPAT_GRP_H_
-
-#if HAVE_GRP_H
-# include <grp.h>
-#endif
-
-/*
- * Declare functions that may be missing in <grp.h>.
- */
-
-#if !HAVE_SETGROUPENT
-int setgroupent(int);
-#endif
-
-#if !HAVE_GROUP_FROM_GID
-const char *group_from_gid(gid_t, int);
-#endif
-
-#if !HAVE_GID_FROM_GROUP
-int gid_from_group(const char *, gid_t *);
-#endif
-
-#endif /* !_NBCOMPAT_GRP_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/limits.h b/pkgtools/libnbcompat/files/nbcompat/limits.h
deleted file mode 100644
index 1f060ad90bf..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/limits.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* $NetBSD: limits.h,v 1.2 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_LIMITS_H_
-#define _NBCOMPAT_LIMITS_H_
-
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <limits.h>.
- */
-
-#ifndef UINT_MAX
-# define UINT_MAX 4294967295U
-#endif
-
-#if !defined(LLONG_MAX)
-# if defined(LONG_LONG_MAX)
-# define LLONG_MAX LONG_LONG_MAX
-# else
-# define LLONG_MAX (0x7fffffffffffffffLL)
-# endif
-#endif
-#if !defined(LLONG_MIN)
-# if defined(LONG_LONG_MIN)
-# define LLONG_MIN LONG_LONG_MIN
-# else
-# define LLONG_MIN (-0x7fffffffffffffffLL-1)
-# endif
-#endif
-#if !defined(ULLONG_MAX)
-# define ULLONG_MAX (0xffffffffffffffffULL) /* max unsigned long long */
-#endif
-
-#ifndef GID_MAX
-# define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */
-#endif
-
-#ifndef UID_MAX
-# define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */
-#endif
-
-#endif /* !_NBCOMPAT_LIMITS_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/md5.h b/pkgtools/libnbcompat/files/nbcompat/md5.h
deleted file mode 100644
index b2592b7e91f..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/md5.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $NetBSD: md5.h,v 1.2 2004/08/16 17:24:57 jlam Exp $ */
-
-/*
- * This file is derived from the RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm and has been modified by Jason R. Thorpe <thorpej@NetBSD.ORG>
- * for portability and formatting.
- */
-
-/*
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
- *
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
- *
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD5 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- */
-
-#ifndef _NBCOMPAT_SYS_MD5_H_
-#define _NBCOMPAT_SYS_MD5_H_
-
-/* MD5 context. */
-typedef struct MD5Context {
- u_int32_t state[4]; /* state (ABCD) */
- u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
-} MD5_CTX;
-
-__BEGIN_DECLS
-void MD5Init __P((MD5_CTX *));
-void MD5Update __P((MD5_CTX *, const unsigned char *, unsigned int));
-void MD5Final __P((unsigned char[16], MD5_CTX *));
-#ifndef _KERNEL
-char *MD5End __P((MD5_CTX *, char *));
-char *MD5File __P((const char *, char *));
-char *MD5Data __P((const unsigned char *, unsigned int, char *));
-#endif /* _KERNEL */
-__END_DECLS
-
-#endif /* !_NBCOMPAT_SYS_MD5_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/param.h b/pkgtools/libnbcompat/files/nbcompat/param.h
deleted file mode 100644
index e46c221645b..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/param.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: param.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_SYS_PARAM_H_
-#define _NBCOMPAT_SYS_PARAM_H_
-
-#if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-/*
- * Declare macros and functions that may be missing in <sys/param.h>.
- */
-
-#if !defined(MIN)
-# define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#if !defined(MAX)
-# define MAX(a, b) ((a) < (b) ? (b) : (a))
-#endif
-
-#endif /* !_NBCOMPAT_SYS_PARAM_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/paths.h b/pkgtools/libnbcompat/files/nbcompat/paths.h
deleted file mode 100644
index dbadb84f1a8..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/paths.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* $NetBSD: paths.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_PATHS_H_
-#define _NBCOMPAT_PATHS_H_
-
-#if HAVE_PATHS_H
-# include <paths.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <paths.h>.
- */
-
-#ifndef _PATH_BSHELL
-#define _PATH_BSHELL "/bin/sh"
-#endif
-#ifndef _PATH_TMP
-#define _PATH_TMP "/tmp/"
-#endif
-
-#ifndef _PATH_DEFTAPE
-# ifdef DEFTAPE
-# define _PATH_DEFTAPE DEFTAPE
-# else
-# define _PATH_DEFTAPE "/dev/tape"
-# endif /* DEFTAPE */
-#endif /* _PATH_DEFTAPE */
-
-#endif /* !_NBCOMPAT_PATHS_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/poll.h b/pkgtools/libnbcompat/files/nbcompat/poll.h
deleted file mode 100644
index 042b9c8b43b..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/poll.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $NetBSD: poll.h,v 1.2 2004/08/16 17:24:57 jlam Exp $ */
-
-/*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Charles M. Hannum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_POLL_H_
-#define _NBCOMPAT_POLL_H_
-
-typedef unsigned int nfds_t;
-
-struct pollfd {
- int fd; /* file descriptor */
- short events; /* events to look for */
- short revents; /* events returned */
-};
-
-/*
- * Testable events (may be specified in events field).
- */
-#define POLLIN 0x0001
-#define POLLPRI 0x0002
-#define POLLOUT 0x0004
-#define POLLRDNORM 0x0040
-#define POLLWRNORM POLLOUT
-#define POLLRDBAND 0x0080
-#define POLLWRBAND 0x0100
-
-/*
- * Non-testable events (may not be specified in events field).
- */
-#define POLLERR 0x0008
-#define POLLHUP 0x0010
-#define POLLNVAL 0x0020
-
-__BEGIN_DECLS
-int poll (struct pollfd *, nfds_t, int);
-__END_DECLS
-
-#endif /* !_NBCOMPAT_POLL_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/pwd.h b/pkgtools/libnbcompat/files/nbcompat/pwd.h
deleted file mode 100644
index 4098a1463c3..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/pwd.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $NetBSD: pwd.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_PWD_H_
-#define _NBCOMPAT_PWD_H_
-
-#if HAVE_PWD_H
-# include <pwd.h>
-#endif
-
-/*
- * Declare functions that may be missing in <pwd.h>.
- */
-
-#if !HAVE_SETPASSENT
-int setpassent(int);
-#endif
-
-#if !HAVE_USER_FROM_UID
-const char *user_from_uid(uid_t, int);
-#endif
-
-#if !HAVE_UID_FROM_USER
-int uid_from_user(const char *, uid_t *);
-#endif
-
-#endif /* !_NBCOMPAT_PWD_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/queue.h b/pkgtools/libnbcompat/files/nbcompat/queue.h
deleted file mode 100644
index fbf9411bf4b..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/queue.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* $NetBSD: queue.h,v 1.2 2004/08/10 18:47:55 jlam Exp $ */
-
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)queue.h 8.5 (Berkeley) 8/20/94
- */
-
-#ifndef _NBCOMPAT_QUEUE_H
-#define _NBCOMPAT_QUEUE_H
-
-#if HAVE_SYS_QUEUE_H
-# include <sys/queue.h>
-#endif
-
-/*
- * Provide any macros missing from <sys/queue.h>.
- */
-
-#ifndef LIST_HEAD
-#define LIST_HEAD(name, type) \
-struct name { \
- struct type *lh_first; /* first element */ \
-}
-#endif
-
-#ifndef LIST_HEAD_INITIALIZER
-#define LIST_HEAD_INITIALIZER(head) \
- { NULL }
-#endif
-
-#ifndef LIST_ENTRY
-#define LIST_ENTRY(type) \
-struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
-}
-#endif
-
-#ifndef LIST_INSERT_HEAD
-#define LIST_INSERT_HEAD(head, elm, field) do { \
- if (((elm)->field.le_next = (head)->lh_first) != NULL) \
- (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
- (head)->lh_first = (elm); \
- (elm)->field.le_prev = &(head)->lh_first; \
-} while (/*CONSTCOND*/0)
-#endif
-
-#ifndef LIST_INIT
-#define LIST_INIT(head) do { \
- (head)->lh_first = NULL; \
-} while (/*CONSTCOND*/0)
-#endif
-
-#ifndef LIST_EMPTY
-#define LIST_EMPTY(head) ((head)->lh_first == NULL)
-#endif
-#ifndef LIST_FIRST
-#define LIST_FIRST(head) ((head)->lh_first)
-#endif
-#ifndef LIST_NEXT
-#define LIST_NEXT(elm, field) ((elm)->field.le_next)
-#endif
-
-#ifndef TAILQ_HEAD
-#define TAILQ_HEAD(name, type) \
-struct name { \
- struct type *tqh_first; /* first element */ \
- struct type **tqh_last; /* addr of last next element */ \
-}
-#endif
-
-#ifndef TAILQ_HEAD_INITIALIZER
-#define TAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).tqh_first }
-#endif
-
-#ifndef TAILQ_ENTRY
-#define TAILQ_ENTRY(type) \
-struct { \
- struct type *tqe_next; /* next element */ \
- struct type **tqe_prev; /* address of previous next element */ \
-}
-#endif
-
-#ifndef TAILQ_INIT
-#define TAILQ_INIT(head) do { \
- (head)->tqh_first = NULL; \
- (head)->tqh_last = &(head)->tqh_first; \
-} while (/*CONSTCOND*/0)
-#endif
-
-#ifndef TAILQ_INSERT_HEAD
-#define TAILQ_INSERT_HEAD(head, elm, field) do { \
- if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
- (head)->tqh_first->field.tqe_prev = \
- &(elm)->field.tqe_next; \
- else \
- (head)->tqh_last = &(elm)->field.tqe_next; \
- (head)->tqh_first = (elm); \
- (elm)->field.tqe_prev = &(head)->tqh_first; \
-} while (/*CONSTCOND*/0)
-#endif
-
-#ifndef TAILQ_INSERT_TAIL
-#define TAILQ_INSERT_TAIL(head, elm, field) do { \
- (elm)->field.tqe_next = NULL; \
- (elm)->field.tqe_prev = (head)->tqh_last; \
- *(head)->tqh_last = (elm); \
- (head)->tqh_last = &(elm)->field.tqe_next; \
-} while (/*CONSTCOND*/0)
-#endif
-
-#ifndef TAILQ_REMOVE
-#define TAILQ_REMOVE(head, elm, field) do { \
- if (((elm)->field.tqe_next) != NULL) \
- (elm)->field.tqe_next->field.tqe_prev = \
- (elm)->field.tqe_prev; \
- else \
- (head)->tqh_last = (elm)->field.tqe_prev; \
- *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
-} while (/*CONSTCOND*/0)
-#endif
-
-#ifndef TAILQ_HEAD_INITIALIZER
-#define TAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).tqh_first }
-#endif
-#ifndef TAILQ_EMPTY
-#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
-#endif
-#ifndef TAILQ_FIRST
-#define TAILQ_FIRST(head) ((head)->tqh_first)
-#endif
-#ifndef TAILQ_NEXT
-#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-#endif
-#ifndef TAILQ_FOREACH
-#define TAILQ_FOREACH(var, head, field) \
- for ((var) = ((head)->tqh_first); \
- (var); \
- (var) = ((var)->field.tqe_next))
-#endif
-
-#endif /* !_NBCOMPAT_QUEUE_H */
diff --git a/pkgtools/libnbcompat/files/nbcompat/regex.h b/pkgtools/libnbcompat/files/nbcompat/regex.h
deleted file mode 100644
index ed63c0e327e..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/regex.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* $NetBSD: regex.h,v 1.2 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer of the University of Toronto.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex.h 8.2 (Berkeley) 1/3/94
- */
-
-/*-
- * Copyright (c) 1992 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer of the University of Toronto.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex.h 8.2 (Berkeley) 1/3/94
- */
-
-#ifndef _NBCOMPAT_REGEX_H_
-#define _NBCOMPAT_REGEX_H_
-
-#include <nbcompat/cdefs.h>
-#include <nbcompat/types.h>
-
-/* types */
-#if 1 /* __LIBC12_SOURCE__ - should go away */
-typedef off_t regoff_t;
-#else
-typedef size_t regoff_t;
-#endif
-
-typedef struct {
- int re_magic;
- size_t re_nsub; /* number of parenthesized subexpressions */
- const char *re_endp; /* end pointer for REG_PEND */
- struct re_guts *re_g; /* none of your business :-) */
-} regex_t;
-
-typedef struct {
- regoff_t rm_so; /* start of match */
- regoff_t rm_eo; /* end of match */
-} regmatch_t;
-
-/* regcomp() flags */
-#define REG_BASIC 0000
-#define REG_EXTENDED 0001
-#define REG_ICASE 0002
-#define REG_NOSUB 0004
-#define REG_NEWLINE 0010
-#define REG_NOSPEC 0020
-#define REG_PEND 0040
-#define REG_DUMP 0200
-
-/* regerror() flags */
-#define REG_NOMATCH 1
-#define REG_BADPAT 2
-#define REG_ECOLLATE 3
-#define REG_ECTYPE 4
-#define REG_EESCAPE 5
-#define REG_ESUBREG 6
-#define REG_EBRACK 7
-#define REG_EPAREN 8
-#define REG_EBRACE 9
-#define REG_BADBR 10
-#define REG_ERANGE 11
-#define REG_ESPACE 12
-#define REG_BADRPT 13
-#define REG_EMPTY 14
-#define REG_ASSERT 15
-#define REG_INVARG 16
-#define REG_ENOSYS 17
-#define REG_ATOI 255 /* convert name to number (!) */
-#define REG_ITOA 0400 /* convert number to name (!) */
-
-/* regexec() flags */
-#define REG_NOTBOL 00001
-#define REG_NOTEOL 00002
-#define REG_STARTEND 00004
-#define REG_TRACE 00400 /* tracing of execution */
-#define REG_LARGE 01000 /* force large representation */
-#define REG_BACKR 02000 /* force use of backref code */
-
-__BEGIN_DECLS
-int regcomp __P((regex_t * __restrict, const char * __restrict, int));
-size_t regerror __P((int, const regex_t * __restrict, char * __restrict,
- size_t));
-int regexec __P((const regex_t * __restrict,
- const char * __restrict, size_t, regmatch_t [], int));
-void regfree __P((regex_t *));
-__END_DECLS
-
-#endif /* !_NBCOMPAT_REGEX_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/rmd160.h b/pkgtools/libnbcompat/files/nbcompat/rmd160.h
deleted file mode 100644
index f2e1ecc8571..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/rmd160.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $NetBSD: rmd160.h,v 1.2 2004/08/16 17:24:57 jlam Exp $ */
-
-/********************************************************************\
- *
- * FILE: rmd160.h
- *
- * CONTENTS: Header file for a sample C-implementation of the
- * RIPEMD-160 hash-function.
- * TARGET: any computer with an ANSI C compiler
- *
- * AUTHOR: Antoon Bosselaers, ESAT-COSIC
- * DATE: 1 March 1996
- * VERSION: 1.0
- *
- * Copyright (c) Katholieke Universiteit Leuven
- * 1996, All Rights Reserved
- *
-\********************************************************************/
-
-/*
- * from OpenBSD: rmd160.h,v 1.4 1999/08/16 09:59:04 millert Exp
- */
-
-#ifndef _NBCOMPAT_RMD160_H_
-#define _NBCOMPAT_RMD160_H_
-
-typedef struct {
- u_int32_t state[5]; /* state (ABCDE) */
- u_int32_t length[2]; /* number of bits */
- u_char bbuffer[64]; /* overflow buffer */
- u_int32_t buflen; /* number of chars in bbuffer */
-} RMD160_CTX;
-
-__BEGIN_DECLS
-void RMD160Init(RMD160_CTX *);
-void RMD160Transform(u_int32_t[5], const u_int32_t[16]);
-void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
-void RMD160Final(u_char[20], RMD160_CTX *);
-#ifndef _KERNEL
-char *RMD160End(RMD160_CTX *, char *);
-char *RMD160File(char *, char *);
-char *RMD160Data(const u_char *, size_t, char *);
-#endif /* _KERNEL */
-__END_DECLS
-
-#endif /* !_NBCOMPAT_RMD160_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/sha1.h b/pkgtools/libnbcompat/files/nbcompat/sha1.h
deleted file mode 100644
index 7c0fe101548..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/sha1.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $NetBSD: sha1.h,v 1.2 2004/08/16 17:24:57 jlam Exp $ */
-
-/*
- * SHA-1 in C
- * By Steve Reid <steve@edmweb.com>
- * 100% Public Domain
- */
-
-#ifndef _NBCOMPAT_SYS_SHA1_H_
-#define _NBCOMPAT_SYS_SHA1_H_
-
-typedef struct {
- u_int32_t state[5];
- u_int32_t count[2];
- u_char buffer[64];
-} SHA1_CTX;
-
-void SHA1Transform __P((u_int32_t state[5], const u_char buffer[64]));
-void SHA1Init __P((SHA1_CTX *context));
-void SHA1Update __P((SHA1_CTX *context, const u_char *data, u_int len));
-void SHA1Final __P((u_char digest[20], SHA1_CTX *context));
-#ifndef _KERNEL
-char *SHA1End __P((SHA1_CTX *, char *));
-char *SHA1File __P((char *, char *));
-char *SHA1Data __P((const u_char *, size_t, char *));
-#endif /* _KERNEL */
-
-#endif /* _NBCOMPAT_SYS_SHA1_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/stat.h b/pkgtools/libnbcompat/files/nbcompat/stat.h
deleted file mode 100644
index 20c2999369a..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/stat.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* $NetBSD: stat.h,v 1.2 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_STAT_H_
-#define _NBCOMPAT_STAT_H_
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <sys/stat.h>.
- */
-
-#if !HAVE_LCHMOD
-int lchmod(const char *, mode_t);
-#endif
-
-#if !defined(S_ISLNK)
-# define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
-#endif
-
-#if !defined(S_ISTXT)
-# define S_ISTXT S_ISVTX
-#endif
-
-#if !defined(ALLPERMS)
-# define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
-#endif
-
-#if !defined(DEFFILEMODE)
-# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
-#endif
-
-#endif /* !_NBCOMPAT_STAT_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/statvfs.h b/pkgtools/libnbcompat/files/nbcompat/statvfs.h
deleted file mode 100644
index 6561b06a9f0..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/statvfs.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* $NetBSD: statvfs.h,v 1.3 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Christos Zoulas.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_STATVFS_H_
-#define _NBCOMPAT_STATVFS_H_
-
-#if HAVE_SYS_STATVFS_H
-# include <sys/statvfs.h>
-#endif
-
-#if !HAVE_STATVFS
-
-#include <nbcompat/types.h>
-#include <nbcompat/param.h>
-
-#if HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-
-#if HAVE_SYS_STATFS_H
-#include <sys/statfs.h>
-#endif
-
-#if HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
-#define VFS_NAMELEN 32
-#define VFS_MNAMELEN 1024
-
-typedef uint64_t fsblkcnt_t; /* fs block count (statvfs) */
-typedef uint64_t fsfilcnt_t; /* fs file count */
-
-#if !HAVE_FSID_T
-typedef struct { int32_t val[2]; } fsid_t;
-#endif
-
-struct statvfs {
- unsigned long f_flag; /* copy of mount exported flags */
- unsigned long f_bsize; /* system block size */
- unsigned long f_frsize; /* system fragment size */
- unsigned long f_iosize; /* optimal file system block size */
-
- fsblkcnt_t f_blocks; /* number of blocks in file system */
- fsblkcnt_t f_bfree; /* free blocks avail in file system */
- fsblkcnt_t f_bavail; /* free blocks avail to non-root */
- fsblkcnt_t f_bresvd; /* blocks reserved for root */
-
- fsfilcnt_t f_files; /* total file nodes in file system */
- fsfilcnt_t f_ffree; /* free file nodes in file system */
- fsfilcnt_t f_favail; /* free file nodes avail to non-root */
- fsfilcnt_t f_fresvd; /* file nodes reserved for root */
-
- uint64_t f_syncreads; /* count of sync reads since mount */
- uint64_t f_syncwrites; /* count of sync writes since mount */
-
- uint64_t f_asyncreads; /* count of async reads since mount */
- uint64_t f_asyncwrites; /* count of async writes since mount */
-
- fsid_t f_fsidx; /* NetBSD compatible fsid */
- unsigned long f_fsid; /* Posix compatible fsid */
- unsigned long f_namemax; /* maximum filename length */
- uint32_t f_owner; /* user that mounted the file system */
-
- uint32_t f_spare[4]; /* spare space */
-
- char f_fstypename[VFS_NAMELEN]; /* fs type name */
- char f_mntonname[VFS_MNAMELEN]; /* directory on which mounted */
- char f_mntfromname[VFS_MNAMELEN]; /* mounted file system */
-};
-
-#ifndef MNT_RDONLY
-#define MNT_RDONLY 0x00000001 /* read only filesystem */
-#endif
-#ifndef ST_RDONLY
-#define ST_RDONLY MNT_RDONLY
-#endif
-
-#ifndef MNT_NOSUID
-#define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */
-#endif
-#ifndef ST_NOSUID
-#define ST_NOSUID MNT_NOSUID
-#endif
-
-int statvfs(const char *path, struct statvfs *vfs);
-int fstatvfs(int fd, struct statvfs *vfs);
-
-#endif /* !HAVE_STATVFS */
-
-#endif /* !_NBCOMPAT_STATVFS_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/stdio.h b/pkgtools/libnbcompat/files/nbcompat/stdio.h
deleted file mode 100644
index 60d3c0bf7a2..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/stdio.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* $NetBSD: stdio.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_STDIO_H_
-#define _NBCOMPAT_STDIO_H_
-
-#if HAVE_STDIO_H
-# include <stdio.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <stdio.h>.
- */
-
-#if !HAVE_FCLOSE_D
-int fclose(FILE *);
-#endif
-
-#if !HAVE_PCLOSE_D
-int pclose(FILE *);
-#endif
-
-#if !HAVE_FGETLN
-char *fgetln(FILE *, size_t *);
-#endif
-
-#if !HAVE_SNPRINTF
-int snprintf(char *, size_t, const char *, ...);
-#endif
-
-#endif /* !_NBCOMPAT_STDIO_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/stdlib.h b/pkgtools/libnbcompat/files/nbcompat/stdlib.h
deleted file mode 100644
index 52da70c2a3e..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/stdlib.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* $NetBSD: stdlib.h,v 1.2 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_STDLIB_H_
-#define _NBCOMPAT_STDLIB_H_
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <stdlib.h> and
- * <alloca.h>.
- */
-
-#if !HAVE_MKSTEMP
-int mkstemp(char *);
-#endif
-
-#if !HAVE_MKDTEMP
-char *mkdtemp(char *);
-#endif
-
-#if !HAVE_SETPROGNAME
-const char *getprogname(void);
-void setprogname(const char *);
-#endif
-
-#if HAVE_WORKING_LONG_LONG
-# if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG)
-long long strtoll(const char *, char **, int);
-# endif
-#else
-# define NO_LONG_LONG 1
-#endif /* ! HAVE_WORKING_LONG_LONG */
-
-#endif /* !_NBCOMPAT_STDLIB_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/string.h b/pkgtools/libnbcompat/files/nbcompat/string.h
deleted file mode 100644
index 09741c9aba4..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/string.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* $NetBSD: string.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_STRING_H_
-#define _NBCOMPAT_STRING_H_
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <string.h>.
- */
-
-#if !HAVE_MEMMOVE
-# define memmove(a,b,c) bcopy((b),(a),(c))
-#endif
-
-#if !HAVE_STRDUP
-char *strdup(const char *);
-#endif
-
-#if !HAVE_STRERROR
-char *strerror(int);
-#endif
-
-#if !HAVE_STRLCAT
-size_t strlcat(char *, const char *, size_t);
-#endif
-
-#if !HAVE_STRLCPY
-size_t strlcpy(char *, const char *, size_t);
-#endif
-
-#if !HAVE_STRSEP
-char *strsep(char **stringp, const char *delim);
-#endif
-
-#endif /* !_NBCOMPAT_STRING_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/termcap.h b/pkgtools/libnbcompat/files/nbcompat/termcap.h
deleted file mode 100644
index 11bf60bc853..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/termcap.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $NetBSD: termcap.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_TERMCAP_H_
-#define _NBCOMPAT_TERMCAP_H_
-
-#if HAVE_TERMCAP_H
-# include <termcap.h>
-#endif
-
-/*
- * Declare macros and functions that may be missing in <termcap.h>.
- */
-
-#if !HAVE_TERMCAP_H
-int tgetent __P((char *, const char *));
-char *tgetstr __P((const char *, char **));
-int tgetflag __P((const char *));
-int tgetnum __P((const char *));
-char *tgoto __P((const char *, int, int));
-void tputs __P((const char *, int, int (*)(int)));
-#endif
-
-#endif /* !_NBCOMPAT_TERMCAP_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/time.h b/pkgtools/libnbcompat/files/nbcompat/time.h
deleted file mode 100644
index ffd7e8d65af..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/time.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* $NetBSD: time.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_TIME_H_
-#define _NBCOMPAT_TIME_H_
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-/*
- * Declare functions and macros that may be missing in <time.h> or
- * <sys/time.h>.
- */
-
-#if !defined(timersub)
-# define timersub(tvp, uvp, vvp) \
- do { \
- (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
- (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
- if ((vvp)->tv_usec < 0) { \
- (vvp)->tv_sec--; \
- (vvp)->tv_usec += 1000000; \
- } \
- } while (0)
-#endif
-
-#if !HAVE_UTIMES
-int utimes(const char *, const struct timeval *);
-#endif
-
-#endif /* !_NBCOMPAT_TIME_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/types.h b/pkgtools/libnbcompat/files/nbcompat/types.h
deleted file mode 100644
index 6121bab11ca..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/types.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $NetBSD: types.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_SYS_TYPES_H_
-#define _NBCOMPAT_SYS_TYPES_H_
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-/*
- * Declare macros and functions that may be missing in <sys/types.h>.
- */
-
-#if !defined(makedev)
-# if HAVE_SYS_MKDEV_H
-# include <sys/mkdev.h>
-# if defined(mkdev)
-# define makedev mkdev
-# endif
-# endif
-#endif
-
-#endif /* !_NBCOMPAT_SYS_TYPES_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/tzfile.h b/pkgtools/libnbcompat/files/nbcompat/tzfile.h
deleted file mode 100644
index 324e4786369..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/tzfile.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* $NetBSD: tzfile.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_TZFILE_H_
-#define _NBCOMPAT_TZFILE_H_
-
-#if HAVE_TZFILE_H
-# include <tzfile.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <tzfile.h>.
- */
-
-#ifndef DAYSPERNYEAR
-# define DAYSPERNYEAR 365
-#endif
-
-#ifndef EPOCH_YEAR
-# define EPOCH_YEAR 1970
-#endif
-
-#ifndef HOURSPERDAY
-# define HOURSPERDAY 24
-#endif
-
-#ifndef MINSPERHOUR
-# define MINSPERHOUR 60
-#endif
-
-#ifndef SECSPERHOUR
-# define SECSPERHOUR 3600
-#endif
-
-#ifndef SECSPERMIN
-# define SECSPERMIN 60
-#endif
-
-#ifndef SECSPERDAY
-# define SECSPERDAY 86400
-#endif
-
-#ifndef TM_YEAR_BASE
-# define TM_YEAR_BASE 1900
-#endif
-
-#endif /* !_NBCOMPAT_TZFILE_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/unistd.h b/pkgtools/libnbcompat/files/nbcompat/unistd.h
deleted file mode 100644
index 653722c75af..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/unistd.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* $NetBSD: unistd.h,v 1.2 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_UNISTD_H_
-#define _NBCOMPAT_UNISTD_H_
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <unistd.h>.
- */
-
-#if !HAVE_OPTARG_D
-extern char *optarg;
-#endif
-
-#if !HAVE_OPTIND_D
-extern int optind;
-#endif
-
-#if !HAVE_GETPASS_D
-char *getpass(const char *);
-#endif
-
-/*
- * If getpassphrase() exists, then use it in place of getpass().
- */
-#if HAVE_GETPASSPHRASE
-# ifndef getpass
-# define getpass getpassphrase
-# endif
-#endif
-
-#if !HAVE_LCHOWN
-int lchown(const char *, uid_t, gid_t);
-#endif
-
-#if !HAVE_GETMODE
-mode_t getmode(const void *, mode_t);
-#endif
-
-#if !HAVE_SETMODE
-void *setmode(const char *);
-#endif
-
-#if !HAVE_STRMODE
-void strmode(mode_t, char *);
-#endif
-
-#endif /* !_NBCOMPAT_UNISTD_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/util.h b/pkgtools/libnbcompat/files/nbcompat/util.h
deleted file mode 100644
index 88346be6214..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/util.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* $NetBSD: util.h,v 1.1 2004/08/10 18:47:55 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NBCOMPAT_UTIL_H_
-#define _NBCOMPAT_UTIL_H_
-
-#if HAVE_UTIL_H
-# include <util.h>
-#endif
-#if HAVE_LIBUTIL_H
-# include <libutil.h>
-#endif
-
-/*
- * Declare functions and macros that may be missing in <util.h> or
- * <libutil.h>.
- */
-
-#if !HAVE_FPARSELN
-#define FPARSELN_UNESCESC 0x01
-#define FPARSELN_UNESCCONT 0x02
-#define FPARSELN_UNESCCOMM 0x04
-#define FPARSELN_UNESCREST 0x08
-#define FPARSELN_UNESCALL 0x0f
-
-char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
-#endif
-
-#endif /* !_NBCOMPAT_UTIL_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/vis.h b/pkgtools/libnbcompat/files/nbcompat/vis.h
deleted file mode 100644
index 2361de40098..00000000000
--- a/pkgtools/libnbcompat/files/nbcompat/vis.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $NetBSD: vis.h,v 1.3 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)vis.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _NBCOMPAT_VIS_H_
-#define _NBCOMPAT_VIS_H_
-
-#include <nbcompat/types.h>
-
-/*
- * to select alternate encoding format
- */
-#define VIS_OCTAL 0x01 /* use octal \ddd format */
-#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropiate */
-
-/*
- * to alter set of characters encoded (default is to encode all
- * non-graphic except space, tab, and newline).
- */
-#define VIS_SP 0x04 /* also encode space */
-#define VIS_TAB 0x08 /* also encode tab */
-#define VIS_NL 0x10 /* also encode newline */
-#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL)
-#define VIS_SAFE 0x20 /* only encode "unsafe" characters */
-
-/*
- * other
- */
-#define VIS_NOSLASH 0x40 /* inhibit printing '\' */
-#define VIS_HTTPSTYLE 0x80 /* http-style escape % HEX HEX */
-
-/*
- * unvis return codes
- */
-#define UNVIS_VALID 1 /* character valid */
-#define UNVIS_VALIDPUSH 2 /* character valid, push back passed char */
-#define UNVIS_NOCHAR 3 /* valid sequence, no character produced */
-#define UNVIS_SYNBAD -1 /* unrecognized escape sequence */
-#define UNVIS_ERROR -2 /* decoder in unknown state (unrecoverable) */
-
-/*
- * unvis flags
- */
-#define UNVIS_END 1 /* no more characters */
-
-#include <nbcompat/cdefs.h>
-
-__BEGIN_DECLS
-char *vis (char *, int, int, int);
-char *svis (char *, int, int, int, const char *);
-int strvis (char *, const char *, int);
-int strsvis (char *, const char *, int, const char *);
-int strvisx (char *, const char *, size_t, int);
-int strsvisx (char *, const char *, size_t, int, const char *);
-int strunvis (char *, const char *);
-int strunvisx (char *, const char *, int);
-#if defined(__LIBC12_SOURCE__) || !defined(__NetBSD__)
-int unvis (char *, int, int *, int);
-int __unvis13 (char *, int, int *, int);
-#else
-int unvis (char *, int, int *, int) __RENAME(__unvis13);
-#endif
-__END_DECLS
-
-#endif /* !_NBCOMPAT_VIS_H_ */
diff --git a/pkgtools/libnbcompat/files/poll.c b/pkgtools/libnbcompat/files/poll.c
deleted file mode 100644
index ae43a04c8f1..00000000000
--- a/pkgtools/libnbcompat/files/poll.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* $NetBSD: poll.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2003 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Charles Blundell.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/types.h>
-#include <nbcompat/time.h>
-#include <nbcompat/unistd.h>
-#include <nbcompat/poll.h>
-
-int
-poll(struct pollfd *p, nfds_t nfds, int timout)
-{
- fd_set read, write, except;
- struct timeval tv;
- nfds_t i;
- int highfd, rval;
-
- /*
- * select cannot tell us much wrt POLL*BAND, POLLPRI, POLLHUP or
- * POLLNVAL.
- */
- FD_ZERO(&read);
- FD_ZERO(&write);
- FD_ZERO(&except);
-
- highfd = -1;
- for (i = 0; i < nfds; i++) {
- if (p[i].fd < 0)
- continue;
- if (p[i].fd >= FD_SETSIZE) {
- errno = EINVAL;
- return -1;
- }
- if (p[i].fd > highfd)
- highfd = p[i].fd;
-
- if (p[i].events & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI))
- FD_SET(p[i].fd, &read);
- if (p[i].events & (POLLOUT|POLLWRNORM|POLLWRBAND))
- FD_SET(p[i].fd, &write);
- FD_SET(p[i].fd, &except);
- }
-
- tv.tv_sec = timout / 1000;
- tv.tv_usec = (timout % 1000) * 1000;
-
- rval = select(highfd + 1, &read, &write, &except,
- timout == -1 ? NULL : &tv);
- if (rval <= 0)
- return rval;
-
- rval = 0;
- for (i = 0; i < nfds; i++) {
- p[i].revents = 0;
- if (FD_ISSET(p[i].fd, &read))
- p[i].revents |= POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI;
- if (FD_ISSET(p[i].fd, &write))
- p[i].revents |= POLLOUT|POLLWRNORM|POLLWRBAND;
- if (FD_ISSET(p[i].fd, &except))
- p[i].revents |= POLLERR;
- /* XXX: POLLHUP/POLLNVAL? */
- if (p[i].revents != 0)
- rval++;
- }
- return rval;
-}
diff --git a/pkgtools/libnbcompat/files/private/cclass.h b/pkgtools/libnbcompat/files/private/cclass.h
deleted file mode 100644
index 7742a355f0d..00000000000
--- a/pkgtools/libnbcompat/files/private/cclass.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* $NetBSD: cclass.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cclass.h 8.3 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cclass.h 8.3 (Berkeley) 3/20/94
- */
-
-/* character-class table */
-static const struct cclass {
- const char *name;
- const char *chars;
- const char *multis;
-} cclasses[] = {
- { "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789", "" },
- { "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
- "" },
- { "blank", " \t", "" },
- { "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
-\25\26\27\30\31\32\33\34\35\36\37\177", "" },
- { "digit", "0123456789", "" },
- { "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- "" },
- { "lower", "abcdefghijklmnopqrstuvwxyz",
- "" },
- { "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
- "" },
- { "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- "" },
- { "space", "\t\n\v\f\r ", "" },
- { "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
- "" },
- { "xdigit", "0123456789ABCDEFabcdef",
- "" },
- { NULL, 0, "" }
-};
diff --git a/pkgtools/libnbcompat/files/private/cname.h b/pkgtools/libnbcompat/files/private/cname.h
deleted file mode 100644
index b16be8d303d..00000000000
--- a/pkgtools/libnbcompat/files/private/cname.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* $NetBSD: cname.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cname.h 8.3 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cname.h 8.3 (Berkeley) 3/20/94
- */
-
-/* character-name table */
-static const struct cname {
- const char *name;
- char code;
-} cnames[] = {
- { "NUL", '\0' },
- { "SOH", '\001' },
- { "STX", '\002' },
- { "ETX", '\003' },
- { "EOT", '\004' },
- { "ENQ", '\005' },
- { "ACK", '\006' },
- { "BEL", '\007' },
- { "alert", '\007' },
- { "BS", '\010' },
- { "backspace", '\b' },
- { "HT", '\011' },
- { "tab", '\t' },
- { "LF", '\012' },
- { "newline", '\n' },
- { "VT", '\013' },
- { "vertical-tab", '\v' },
- { "FF", '\014' },
- { "form-feed", '\f' },
- { "CR", '\015' },
- { "carriage-return", '\r' },
- { "SO", '\016' },
- { "SI", '\017' },
- { "DLE", '\020' },
- { "DC1", '\021' },
- { "DC2", '\022' },
- { "DC3", '\023' },
- { "DC4", '\024' },
- { "NAK", '\025' },
- { "SYN", '\026' },
- { "ETB", '\027' },
- { "CAN", '\030' },
- { "EM", '\031' },
- { "SUB", '\032' },
- { "ESC", '\033' },
- { "IS4", '\034' },
- { "FS", '\034' },
- { "IS3", '\035' },
- { "GS", '\035' },
- { "IS2", '\036' },
- { "RS", '\036' },
- { "IS1", '\037' },
- { "US", '\037' },
- { "space", ' ' },
- { "exclamation-mark", '!' },
- { "quotation-mark", '"' },
- { "number-sign", '#' },
- { "dollar-sign", '$' },
- { "percent-sign", '%' },
- { "ampersand", '&' },
- { "apostrophe", '\'' },
- { "left-parenthesis", '(' },
- { "right-parenthesis", ')' },
- { "asterisk", '*' },
- { "plus-sign", '+' },
- { "comma", ',' },
- { "hyphen", '-' },
- { "hyphen-minus", '-' },
- { "period", '.' },
- { "full-stop", '.' },
- { "slash", '/' },
- { "solidus", '/' },
- { "zero", '0' },
- { "one", '1' },
- { "two", '2' },
- { "three", '3' },
- { "four", '4' },
- { "five", '5' },
- { "six", '6' },
- { "seven", '7' },
- { "eight", '8' },
- { "nine", '9' },
- { "colon", ':' },
- { "semicolon", ';' },
- { "less-than-sign", '<' },
- { "equals-sign", '=' },
- { "greater-than-sign", '>' },
- { "question-mark", '?' },
- { "commercial-at", '@' },
- { "left-square-bracket", '[' },
- { "backslash", '\\' },
- { "reverse-solidus", '\\' },
- { "right-square-bracket", ']' },
- { "circumflex", '^' },
- { "circumflex-accent", '^' },
- { "underscore", '_' },
- { "low-line", '_' },
- { "grave-accent", '`' },
- { "left-brace", '{' },
- { "left-curly-bracket", '{' },
- { "vertical-line", '|' },
- { "right-brace", '}' },
- { "right-curly-bracket", '}' },
- { "tilde", '~' },
- { "DEL", '\177' },
- { NULL, 0 },
-};
diff --git a/pkgtools/libnbcompat/files/private/pwcache.h b/pkgtools/libnbcompat/files/private/pwcache.h
deleted file mode 100644
index 81d8582c82d..00000000000
--- a/pkgtools/libnbcompat/files/private/pwcache.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $NetBSD: pwcache.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992 Keith Muller.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Keith Muller of the University of California, San Diego.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cache.h 8.1 (Berkeley) 5/31/93
- */
-
-/*
- * Constants and data structures used to implement group and password file
- * caches. Traditional passwd/group cache routines perform quite poorly with
- * archives. The chances of hitting a valid lookup with an archive is quite a
- * bit worse than with files already resident on the file system. These misses
- * create a MAJOR performance cost. To address this problem, these routines
- * cache both hits and misses.
- *
- * NOTE: name lengths must be as large as those stored in ANY PROTOCOL and
- * as stored in the passwd and group files. CACHE SIZES MUST BE PRIME
- */
-#define UNMLEN 32 /* >= user name found in any protocol */
-#define GNMLEN 32 /* >= group name found in any protocol */
-#define UID_SZ 317 /* size of uid to user_name cache */
-#define UNM_SZ 317 /* size of user_name to uid cache */
-#define GID_SZ 251 /* size of gid to group_name cache */
-#define GNM_SZ 251 /* size of group_name to gid cache */
-#define VALID 1 /* entry and name are valid */
-#define INVALID 2 /* entry valid, name NOT valid */
-
-/*
- * Node structures used in the user, group, uid, and gid caches.
- */
-
-typedef struct uidc {
- int valid; /* is this a valid or a miss entry */
- char name[UNMLEN]; /* uid name */
- uid_t uid; /* cached uid */
-} UIDC;
-
-typedef struct gidc {
- int valid; /* is this a valid or a miss entry */
- char name[GNMLEN]; /* gid name */
- gid_t gid; /* cached gid */
-} GIDC;
diff --git a/pkgtools/libnbcompat/files/private/regex2.h b/pkgtools/libnbcompat/files/private/regex2.h
deleted file mode 100644
index 9404bc24e7d..00000000000
--- a/pkgtools/libnbcompat/files/private/regex2.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* $NetBSD: regex2.h,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex2.h 8.4 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex2.h 8.4 (Berkeley) 3/20/94
- */
-
-/*
- * First, the stuff that ends up in the outside-world include file
- = typedef off_t regoff_t;
- = typedef struct {
- = int re_magic;
- = size_t re_nsub; // number of parenthesized subexpressions
- = const char *re_endp; // end pointer for REG_PEND
- = struct re_guts *re_g; // none of your business :-)
- = } regex_t;
- = typedef struct {
- = regoff_t rm_so; // start of match
- = regoff_t rm_eo; // end of match
- = } regmatch_t;
- */
-/*
- * internals of regex_t
- */
-#define MAGIC1 ((('r'^0200)<<8) | 'e')
-
-/*
- * The internal representation is a *strip*, a sequence of
- * operators ending with an endmarker. (Some terminology etc. is a
- * historical relic of earlier versions which used multiple strips.)
- * Certain oddities in the representation are there to permit running
- * the machinery backwards; in particular, any deviation from sequential
- * flow must be marked at both its source and its destination. Some
- * fine points:
- *
- * - OPLUS_ and O_PLUS are *inside* the loop they create.
- * - OQUEST_ and O_QUEST are *outside* the bypass they create.
- * - OCH_ and O_CH are *outside* the multi-way branch they create, while
- * OOR1 and OOR2 are respectively the end and the beginning of one of
- * the branches. Note that there is an implicit OOR2 following OCH_
- * and an implicit OOR1 preceding O_CH.
- *
- * In state representations, an operator's bit is on to signify a state
- * immediately *preceding* "execution" of that operator.
- */
-typedef u_int32_t sop; /* strip operator */
-typedef int sopno;
-#define OPRMASK ((u_int32_t)0xf8000000UL)
-#define OPDMASK ((u_int32_t)0x07ffffffUL)
-#define OPSHIFT ((unsigned)27)
-#define OP(n) ((n)&OPRMASK)
-#define OPND(n) ((int)((n)&OPDMASK))
-#define SOP(op, opnd) ((op)|(opnd))
-
-#define OPC(n) (((u_int32_t)(n))<<OPSHIFT)
-/* operators meaning operand */
-/* (back, fwd are offsets) */
-#define OEND OPC(1) /* endmarker - */
-#define OCHAR OPC(2) /* character unsigned char */
-#define OBOL OPC(3) /* left anchor - */
-#define OEOL OPC(4) /* right anchor - */
-#define OANY OPC(5) /* . - */
-#define OANYOF OPC(6) /* [...] set number */
-#define OBACK_ OPC(7) /* begin \d paren number */
-#define O_BACK OPC(8) /* end \d paren number */
-#define OPLUS_ OPC(9) /* + prefix fwd to suffix */
-#define O_PLUS OPC(10) /* + suffix back to prefix */
-#define OQUEST_ OPC(11) /* ? prefix fwd to suffix */
-#define O_QUEST OPC(12) /* ? suffix back to prefix */
-#define OLPAREN OPC(13) /* ( fwd to ) */
-#define ORPAREN OPC(14) /* ) back to ( */
-#define OCH_ OPC(15) /* begin choice fwd to OOR2 */
-#define OOR1 OPC(16) /* | pt. 1 back to OOR1 or OCH_ */
-#define OOR2 OPC(17) /* | pt. 2 fwd to OOR2 or O_CH */
-#define O_CH OPC(18) /* end choice back to OOR1 */
-#define OBOW OPC(19) /* begin word - */
-#define OEOW OPC(20) /* end word - */
-
-/*
- * Structure for [] character-set representation. Character sets are
- * done as bit vectors, grouped 8 to a byte vector for compactness.
- * The individual set therefore has both a pointer to the byte vector
- * and a mask to pick out the relevant bit of each byte. A hash code
- * simplifies testing whether two sets could be identical.
- *
- * This will get trickier for multicharacter collating elements. As
- * preliminary hooks for dealing with such things, we also carry along
- * a string of multi-character elements, and decide the size of the
- * vectors at run time.
- */
-typedef struct {
- uch *ptr; /* -> uch [csetsize] */
- uch mask; /* bit within array */
- uch hash; /* hash code */
- size_t smultis;
- char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
-} cset;
-/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
-#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
-#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
-#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
-#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */
-#define MCsub(p, cs, cp) mcsub(p, cs, cp)
-#define MCin(p, cs, cp) mcin(p, cs, cp)
-
-/* stuff for character categories */
-typedef unsigned char cat_t;
-
-/*
- * main compiled-expression structure
- */
-struct re_guts {
- int magic;
-# define MAGIC2 ((('R'^0200)<<8)|'E')
- sop *strip; /* malloced area for strip */
- int csetsize; /* number of bits in a cset vector */
- int ncsets; /* number of csets in use */
- cset *sets; /* -> cset [ncsets] */
- uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */
- int cflags; /* copy of regcomp() cflags argument */
- sopno nstates; /* = number of sops */
- sopno firststate; /* the initial OEND (normally 0) */
- sopno laststate; /* the final OEND */
- int iflags; /* internal flags */
-# define USEBOL 01 /* used ^ */
-# define USEEOL 02 /* used $ */
-# define BAD 04 /* something wrong */
- int nbol; /* number of ^ used */
- int neol; /* number of $ used */
- int ncategories; /* how many character categories */
- cat_t *categories; /* ->catspace[-CHAR_MIN] */
- char *must; /* match must contain this string */
- int mlen; /* length of must */
- sopno nsub; /* copy of re_nsub */
- int backrefs; /* does it use back references? */
- sopno nplus; /* how deep does it nest +s? */
- /* catspace must be last */
- cat_t catspace[1]; /* actually [NC] */
-};
-
-/* misc utilities */
-#define OUT (CHAR_MAX+1) /* a non-character value */
-#define ISWORD(c) (isalnum((unsigned char)c) || (c) == '_')
diff --git a/pkgtools/libnbcompat/files/private/utils.h b/pkgtools/libnbcompat/files/private/utils.h
deleted file mode 100644
index 2e1a0696082..00000000000
--- a/pkgtools/libnbcompat/files/private/utils.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* $NetBSD: utils.h,v 1.2 2005/11/28 20:47:29 schwarz Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)utils.h 8.3 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)utils.h 8.3 (Berkeley) 3/20/94
- */
-
-/* utility definitions */
-#ifdef _POSIX2_RE_DUP_MAX
-#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */
-#else
-#define DUPMAX 255 /* xxx is that reasonable? */
-#endif
-#define INFINITY (DUPMAX + 1)
-#define NC (CHAR_MAX - CHAR_MIN + 1)
-typedef unsigned char uch;
-
-/* switch off assertions (if not already off) if no REDEBUG */
-#ifndef REDEBUG
-#ifndef NDEBUG
-#define NDEBUG /* no assertions please */
-#endif
-#endif
-#include <nbcompat/assert.h>
-
-/*
- * Workaround bug in some assert.h. This is okay since we really don't
- * want assertions in the regex code.
- */
-#undef assert
-#define assert(cond) ((void) 0)
-
-/* for old systems with bcopy() but no memmove() */
-#ifdef USEBCOPY
-#define memmove(d, s, c) bcopy(s, d, c)
-#endif
diff --git a/pkgtools/libnbcompat/files/pwcache.c b/pkgtools/libnbcompat/files/pwcache.c
deleted file mode 100644
index 493de4a4b65..00000000000
--- a/pkgtools/libnbcompat/files/pwcache.c
+++ /dev/null
@@ -1,668 +0,0 @@
-/* $NetBSD: pwcache.c,v 1.8 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992 Keith Muller.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Keith Muller of the University of California, San Diego.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-/*
- * XXX Undefine the renames of these functions so that we don't
- * XXX rename the versions found in the host's <pwd.h> by mistake!
- */
-#undef group_from_gid
-#undef user_from_uid
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93";
-#else
-__RCSID("$NetBSD: pwcache.c,v 1.8 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/types.h>
-#include <nbcompat/param.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/grp.h>
-#include <nbcompat/pwd.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-#include <nbcompat/unistd.h>
-
-#if HAVE_NBTOOL_CONFIG_H
-/* XXX Now, re-apply the renaming that we undid above. */
-#define group_from_gid __nbcompat_group_from_gid
-#define user_from_uid __nbcompat_user_from_uid
-#endif
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(user_from_uid,_user_from_uid)
-__weak_alias(group_from_gid,_group_from_gid)
-__weak_alias(pwcache_userdb,_pwcache_userdb)
-__weak_alias(pwcache_groupdb,_pwcache_groupdb)
-#endif
-#endif
-
-#if !HAVE_PWCACHE_USERDB || HAVE_NBTOOL_CONFIG_H
-#include "private/pwcache.h"
-
-/*
- * routines that control user, group, uid and gid caches (for the archive
- * member print routine).
- * IMPORTANT:
- * these routines cache BOTH hits and misses, a major performance improvement
- */
-
-/*
- * function pointers to various name lookup routines.
- * these may be changed as necessary.
- */
-static int (*_pwcache_setgroupent)(int) = setgroupent;
-static void (*_pwcache_endgrent)(void) = endgrent;
-static struct group * (*_pwcache_getgrnam)(const char *) = getgrnam;
-static struct group * (*_pwcache_getgrgid)(gid_t) = getgrgid;
-static int (*_pwcache_setpassent)(int) = setpassent;
-static void (*_pwcache_endpwent)(void) = endpwent;
-static struct passwd * (*_pwcache_getpwnam)(const char *) = getpwnam;
-static struct passwd * (*_pwcache_getpwuid)(uid_t) = getpwuid;
-
-/*
- * internal state
- */
-static int pwopn; /* is password file open */
-static int gropn; /* is group file open */
-static UIDC **uidtb; /* uid to name cache */
-static GIDC **gidtb; /* gid to name cache */
-static UIDC **usrtb; /* user name to uid cache */
-static GIDC **grptb; /* group name to gid cache */
-
-static int uidtb_fail; /* uidtb_start() failed ? */
-static int gidtb_fail; /* gidtb_start() failed ? */
-static int usrtb_fail; /* usrtb_start() failed ? */
-static int grptb_fail; /* grptb_start() failed ? */
-
-
-static u_int st_hash(const char *, size_t, int);
-static int uidtb_start(void);
-static int gidtb_start(void);
-static int usrtb_start(void);
-static int grptb_start(void);
-
-
-static u_int
-st_hash(const char *name, size_t len, int tabsz)
-{
- u_int key = 0;
-
- _DIAGASSERT(name != NULL);
-
- while (len--) {
- key += *name++;
- key = (key << 8) | (key >> 24);
- }
-
- return (key % tabsz);
-}
-
-/*
- * uidtb_start
- * creates an an empty uidtb
- * Return:
- * 0 if ok, -1 otherwise
- */
-static int
-uidtb_start(void)
-{
-
- if (uidtb != NULL)
- return (0);
- if (uidtb_fail)
- return (-1);
- if ((uidtb = (UIDC **)calloc(UID_SZ, sizeof(UIDC *))) == NULL) {
- ++uidtb_fail;
- return (-1);
- }
- return (0);
-}
-
-/*
- * gidtb_start
- * creates an an empty gidtb
- * Return:
- * 0 if ok, -1 otherwise
- */
-static int
-gidtb_start(void)
-{
-
- if (gidtb != NULL)
- return (0);
- if (gidtb_fail)
- return (-1);
- if ((gidtb = (GIDC **)calloc(GID_SZ, sizeof(GIDC *))) == NULL) {
- ++gidtb_fail;
- return (-1);
- }
- return (0);
-}
-
-/*
- * usrtb_start
- * creates an an empty usrtb
- * Return:
- * 0 if ok, -1 otherwise
- */
-static int
-usrtb_start(void)
-{
-
- if (usrtb != NULL)
- return (0);
- if (usrtb_fail)
- return (-1);
- if ((usrtb = (UIDC **)calloc(UNM_SZ, sizeof(UIDC *))) == NULL) {
- ++usrtb_fail;
- return (-1);
- }
- return (0);
-}
-
-/*
- * grptb_start
- * creates an an empty grptb
- * Return:
- * 0 if ok, -1 otherwise
- */
-static int
-grptb_start(void)
-{
-
- if (grptb != NULL)
- return (0);
- if (grptb_fail)
- return (-1);
- if ((grptb = (GIDC **)calloc(GNM_SZ, sizeof(GIDC *))) == NULL) {
- ++grptb_fail;
- return (-1);
- }
- return (0);
-}
-
-/*
- * user_from_uid()
- * caches the name (if any) for the uid. If noname clear, we always
- * return the stored name (if valid or invalid match).
- * We use a simple hash table.
- * Return
- * Pointer to stored name (or a empty string)
- */
-#if !HAVE_USER_FROM_UID
-const char *
-user_from_uid(uid_t uid, int noname)
-{
- struct passwd *pw;
- UIDC *ptr, **pptr;
-
- if ((uidtb == NULL) && (uidtb_start() < 0))
- return (NULL);
-
- /*
- * see if we have this uid cached
- */
- pptr = uidtb + (uid % UID_SZ);
- ptr = *pptr;
-
- if ((ptr != NULL) && (ptr->valid > 0) && (ptr->uid == uid)) {
- /*
- * have an entry for this uid
- */
- if (!noname || (ptr->valid == VALID))
- return (ptr->name);
- return (NULL);
- }
-
- /*
- * No entry for this uid, we will add it
- */
- if (!pwopn) {
- if (_pwcache_setpassent != NULL)
- (*_pwcache_setpassent)(1);
- ++pwopn;
- }
-
- if (ptr == NULL)
- *pptr = ptr = (UIDC *)malloc(sizeof(UIDC));
-
- if ((pw = (*_pwcache_getpwuid)(uid)) == NULL) {
- /*
- * no match for this uid in the local password file
- * a string that is the uid in numeric format
- */
- if (ptr == NULL)
- return (NULL);
- ptr->uid = uid;
- (void)snprintf(ptr->name, UNMLEN, "%lu", (long) uid);
- ptr->valid = INVALID;
- if (noname)
- return (NULL);
- } else {
- /*
- * there is an entry for this uid in the password file
- */
- if (ptr == NULL)
- return (pw->pw_name);
- ptr->uid = uid;
- (void)strlcpy(ptr->name, pw->pw_name, UNMLEN);
- ptr->valid = VALID;
- }
- return (ptr->name);
-}
-#endif /* !HAVE_USER_FROM_UID */
-
-/*
- * group_from_gid()
- * caches the name (if any) for the gid. If noname clear, we always
- * return the stored name (if valid or invalid match).
- * We use a simple hash table.
- * Return
- * Pointer to stored name (or a empty string)
- */
-#if !HAVE_GROUP_FROM_GID
-const char *
-group_from_gid(gid_t gid, int noname)
-{
- struct group *gr;
- GIDC *ptr, **pptr;
-
- if ((gidtb == NULL) && (gidtb_start() < 0))
- return (NULL);
-
- /*
- * see if we have this gid cached
- */
- pptr = gidtb + (gid % GID_SZ);
- ptr = *pptr;
-
- if ((ptr != NULL) && (ptr->valid > 0) && (ptr->gid == gid)) {
- /*
- * have an entry for this gid
- */
- if (!noname || (ptr->valid == VALID))
- return (ptr->name);
- return (NULL);
- }
-
- /*
- * No entry for this gid, we will add it
- */
- if (!gropn) {
- if (_pwcache_setgroupent != NULL)
- (*_pwcache_setgroupent)(1);
- ++gropn;
- }
-
- if (ptr == NULL)
- *pptr = ptr = (GIDC *)malloc(sizeof(GIDC));
-
- if ((gr = (*_pwcache_getgrgid)(gid)) == NULL) {
- /*
- * no match for this gid in the local group file, put in
- * a string that is the gid in numberic format
- */
- if (ptr == NULL)
- return (NULL);
- ptr->gid = gid;
- (void)snprintf(ptr->name, GNMLEN, "%lu", (long) gid);
- ptr->valid = INVALID;
- if (noname)
- return (NULL);
- } else {
- /*
- * there is an entry for this group in the group file
- */
- if (ptr == NULL)
- return (gr->gr_name);
- ptr->gid = gid;
- (void)strlcpy(ptr->name, gr->gr_name, GNMLEN);
- ptr->valid = VALID;
- }
- return (ptr->name);
-}
-#endif /* !HAVE_GROUP_FROM_GID */
-
-/*
- * uid_from_user()
- * caches the uid for a given user name. We use a simple hash table.
- * Return
- * the uid (if any) for a user name, or a -1 if no match can be found
- */
-#if !HAVE_UID_FROM_USER
-int
-uid_from_user(const char *name, uid_t *uid)
-{
- struct passwd *pw;
- UIDC *ptr, **pptr;
- size_t namelen;
-
- /*
- * return -1 for mangled names
- */
- if (name == NULL || ((namelen = strlen(name)) == 0))
- return (-1);
- if ((usrtb == NULL) && (usrtb_start() < 0))
- return (-1);
-
- /*
- * look up in hash table, if found and valid return the uid,
- * if found and invalid, return a -1
- */
- pptr = usrtb + st_hash(name, namelen, UNM_SZ);
- ptr = *pptr;
-
- if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) {
- if (ptr->valid == INVALID)
- return (-1);
- *uid = ptr->uid;
- return (0);
- }
-
- if (!pwopn) {
- if (_pwcache_setpassent != NULL)
- (*_pwcache_setpassent)(1);
- ++pwopn;
- }
-
- if (ptr == NULL)
- *pptr = ptr = (UIDC *)malloc(sizeof(UIDC));
-
- /*
- * no match, look it up, if no match store it as an invalid entry,
- * or store the matching uid
- */
- if (ptr == NULL) {
- if ((pw = (*_pwcache_getpwnam)(name)) == NULL)
- return (-1);
- *uid = pw->pw_uid;
- return (0);
- }
- (void)strlcpy(ptr->name, name, UNMLEN);
- if ((pw = (*_pwcache_getpwnam)(name)) == NULL) {
- ptr->valid = INVALID;
- return (-1);
- }
- ptr->valid = VALID;
- *uid = ptr->uid = pw->pw_uid;
- return (0);
-}
-#endif /* !HAVE_UID_FROM_USER */
-
-/*
- * gid_from_group()
- * caches the gid for a given group name. We use a simple hash table.
- * Return
- * the gid (if any) for a group name, or a -1 if no match can be found
- */
-#if !HAVE_GID_FROM_GROUP
-int
-gid_from_group(const char *name, gid_t *gid)
-{
- struct group *gr;
- GIDC *ptr, **pptr;
- size_t namelen;
-
- /*
- * return -1 for mangled names
- */
- if (name == NULL || ((namelen = strlen(name)) == 0))
- return (-1);
- if ((grptb == NULL) && (grptb_start() < 0))
- return (-1);
-
- /*
- * look up in hash table, if found and valid return the uid,
- * if found and invalid, return a -1
- */
- pptr = grptb + st_hash(name, namelen, GID_SZ);
- ptr = *pptr;
-
- if ((ptr != NULL) && (ptr->valid > 0) && !strcmp(name, ptr->name)) {
- if (ptr->valid == INVALID)
- return (-1);
- *gid = ptr->gid;
- return (0);
- }
-
- if (!gropn) {
- if (_pwcache_setgroupent != NULL)
- (*_pwcache_setgroupent)(1);
- ++gropn;
- }
-
- if (ptr == NULL)
- *pptr = ptr = (GIDC *)malloc(sizeof(GIDC));
-
- /*
- * no match, look it up, if no match store it as an invalid entry,
- * or store the matching gid
- */
- if (ptr == NULL) {
- if ((gr = (*_pwcache_getgrnam)(name)) == NULL)
- return (-1);
- *gid = gr->gr_gid;
- return (0);
- }
-
- (void)strlcpy(ptr->name, name, GNMLEN);
- if ((gr = (*_pwcache_getgrnam)(name)) == NULL) {
- ptr->valid = INVALID;
- return (-1);
- }
- ptr->valid = VALID;
- *gid = ptr->gid = gr->gr_gid;
- return (0);
-}
-#endif /* !HAVE_GID_FROM_GROUP */
-
-#define FLUSHTB(arr, len, fail) \
- do { \
- if (arr != NULL) { \
- for (i = 0; i < len; i++) \
- if (arr[i] != NULL) \
- free(arr[i]); \
- arr = NULL; \
- } \
- fail = 0; \
- } while (/* CONSTCOND */0);
-
-#if !HAVE_PWCACHE_USERDB
-int
-pwcache_userdb(
- int (*a_setpassent)(int),
- void (*a_endpwent)(void),
- struct passwd * (*a_getpwnam)(const char *),
- struct passwd * (*a_getpwuid)(uid_t))
-{
- int i;
-
- /* a_setpassent and a_endpwent may be NULL */
- if (a_getpwnam == NULL || a_getpwuid == NULL)
- return (-1);
-
- if (_pwcache_endpwent != NULL)
- (*_pwcache_endpwent)();
- FLUSHTB(uidtb, UID_SZ, uidtb_fail);
- FLUSHTB(usrtb, UNM_SZ, usrtb_fail);
- pwopn = 0;
- _pwcache_setpassent = a_setpassent;
- _pwcache_endpwent = a_endpwent;
- _pwcache_getpwnam = a_getpwnam;
- _pwcache_getpwuid = a_getpwuid;
-
- return (0);
-}
-#endif /* !HAVE_PWCACHE_USERDB */
-
-#if !HAVE_PWCACHE_GROUPDB
-int
-pwcache_groupdb(
- int (*a_setgroupent)(int),
- void (*a_endgrent)(void),
- struct group * (*a_getgrnam)(const char *),
- struct group * (*a_getgrgid)(gid_t))
-{
- int i;
-
- /* a_setgroupent and a_endgrent may be NULL */
- if (a_getgrnam == NULL || a_getgrgid == NULL)
- return (-1);
-
- if (_pwcache_endgrent != NULL)
- (*_pwcache_endgrent)();
- FLUSHTB(gidtb, GID_SZ, gidtb_fail);
- FLUSHTB(grptb, GNM_SZ, grptb_fail);
- gropn = 0;
- _pwcache_setgroupent = a_setgroupent;
- _pwcache_endgrent = a_endgrent;
- _pwcache_getgrnam = a_getgrnam;
- _pwcache_getgrgid = a_getgrgid;
-
- return (0);
-}
-#endif /* !HAVE_PWCACHE_GROUPDB */
-
-
-#ifdef TEST_PWCACHE
-
-struct passwd *
-test_getpwnam(const char *name)
-{
- static struct passwd foo;
-
- memset(&foo, 0, sizeof(foo));
- if (strcmp(name, "toor") == 0) {
- foo.pw_uid = 666;
- return &foo;
- }
- return (getpwnam(name));
-}
-
-int
-main(int argc, char *argv[])
-{
- uid_t u;
- int r, i;
-
- printf("pass 1 (default userdb)\n");
- for (i = 1; i < argc; i++) {
- printf("i: %d, pwopn %d usrtb_fail %d usrtb %p\n",
- i, pwopn, usrtb_fail, usrtb);
- r = uid_from_user(argv[i], &u);
- if (r == -1)
- printf(" uid_from_user %s: failed\n", argv[i]);
- else
- printf(" uid_from_user %s: %d\n", argv[i], u);
- }
- printf("pass 1 finish: pwopn %d usrtb_fail %d usrtb %p\n",
- pwopn, usrtb_fail, usrtb);
-
- puts("");
- printf("pass 2 (replacement userdb)\n");
- printf("pwcache_userdb returned %d\n",
- pwcache_userdb(setpassent, test_getpwnam, getpwuid));
- printf("pwopn %d usrtb_fail %d usrtb %p\n", pwopn, usrtb_fail, usrtb);
-
- for (i = 1; i < argc; i++) {
- printf("i: %d, pwopn %d usrtb_fail %d usrtb %p\n",
- i, pwopn, usrtb_fail, usrtb);
- u = -1;
- r = uid_from_user(argv[i], &u);
- if (r == -1)
- printf(" uid_from_user %s: failed\n", argv[i]);
- else
- printf(" uid_from_user %s: %d\n", argv[i], u);
- }
- printf("pass 2 finish: pwopn %d usrtb_fail %d usrtb %p\n",
- pwopn, usrtb_fail, usrtb);
-
- puts("");
- printf("pass 3 (null pointers)\n");
- printf("pwcache_userdb returned %d\n",
- pwcache_userdb(NULL, NULL, NULL));
-
- return (0);
-}
-#endif /* TEST_PWCACHE */
-#endif /* !HAVE_PWCACHE_USERDB */
diff --git a/pkgtools/libnbcompat/files/regcomp.c b/pkgtools/libnbcompat/files/regcomp.c
deleted file mode 100644
index b64a85c7aa3..00000000000
--- a/pkgtools/libnbcompat/files/regcomp.c
+++ /dev/null
@@ -1,1905 +0,0 @@
-/* $NetBSD: regcomp.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
-#else
-__RCSID("$NetBSD: regcomp.c,v 1.2 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#include <nbcompat/limits.h>
-#include <nbcompat/regex.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(regcomp,_regcomp)
-#endif
-#endif
-
-#include "private/utils.h"
-#include "private/regex2.h"
-
-#include "private/cclass.h"
-#include "private/cname.h"
-
-/*
- * parse structure, passed up and down to avoid global variables and
- * other clumsinesses
- */
-struct parse {
- char *next; /* next character in RE */
- char *end; /* end of string (-> NUL normally) */
- int error; /* has an error been seen? */
- sop *strip; /* malloced strip */
- sopno ssize; /* malloced strip size (allocated) */
- sopno slen; /* malloced strip length (used) */
- int ncsalloc; /* number of csets allocated */
- struct re_guts *g;
-# define NPAREN 10 /* we need to remember () 1-9 for back refs */
- sopno pbegin[NPAREN]; /* -> ( ([0] unused) */
- sopno pend[NPAREN]; /* -> ) ([0] unused) */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regcomp.c === */
-static void p_ere __P((struct parse *p, int stop));
-static void p_ere_exp __P((struct parse *p));
-static void p_str __P((struct parse *p));
-static void p_bre __P((struct parse *p, int end1, int end2));
-static int p_simp_re __P((struct parse *p, int starordinary));
-static int p_count __P((struct parse *p));
-static void p_bracket __P((struct parse *p));
-static void p_b_term __P((struct parse *p, cset *cs));
-static void p_b_cclass __P((struct parse *p, cset *cs));
-static void p_b_eclass __P((struct parse *p, cset *cs));
-static char p_b_symbol __P((struct parse *p));
-static char p_b_coll_elem __P((struct parse *p, int endc));
-static char othercase __P((int ch));
-static void bothcases __P((struct parse *p, int ch));
-static void ordinary __P((struct parse *p, int ch));
-static void nonnewline __P((struct parse *p));
-static void repeat __P((struct parse *p, sopno start, int from, int to));
-static int seterr __P((struct parse *p, int e));
-static cset *allocset __P((struct parse *p));
-static void freeset __P((struct parse *p, cset *cs));
-static int freezeset __P((struct parse *p, cset *cs));
-static int firstch __P((struct parse *p, cset *cs));
-static int nch __P((struct parse *p, cset *cs));
-static void mcadd __P((struct parse *p, cset *cs, const char *cp));
-#if 0
-static void mcsub __P((cset *cs, char *cp));
-static int mcin __P((cset *cs, char *cp));
-static char *mcfind __P((cset *cs, char *cp));
-#endif
-static void mcinvert __P((struct parse *p, cset *cs));
-static void mccase __P((struct parse *p, cset *cs));
-static int isinsets __P((struct re_guts *g, int c));
-static int samesets __P((struct re_guts *g, int c1, int c2));
-static void categorize __P((struct parse *p, struct re_guts *g));
-static sopno dupl __P((struct parse *p, sopno start, sopno finish));
-static void doemit __P((struct parse *p, sop op, sopno opnd));
-static void doinsert __P((struct parse *p, sop op, sopno opnd, sopno pos));
-static void dofwd __P((struct parse *p, sopno pos, sopno value));
-static void enlarge __P((struct parse *p, sopno size));
-static void stripsnug __P((struct parse *p, struct re_guts *g));
-static void findmust __P((struct parse *p, struct re_guts *g));
-static sopno pluscount __P((struct parse *p, struct re_guts *g));
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-static char nuls[10]; /* place to point scanner in event of error */
-
-/*
- * macros for use with parse structure
- * BEWARE: these know that the parse structure is named `p' !!!
- */
-#define PEEK() (*p->next)
-#define PEEK2() (*(p->next+1))
-#define MORE() (p->next < p->end)
-#define MORE2() (p->next+1 < p->end)
-#define SEE(c) (MORE() && PEEK() == (c))
-#define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
-#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
-#define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
-#define NEXT() (p->next++)
-#define NEXT2() (p->next += 2)
-#define NEXTn(n) (p->next += (n))
-#define GETNEXT() (*p->next++)
-#define SETERROR(e) seterr(p, (e))
-#define REQUIRE(co, e) (void) ((co) || SETERROR(e))
-#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
-#define MUSTEAT(c, e) (void) (REQUIRE(MORE() && GETNEXT() == (c), e))
-#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))
-#define EMIT(op, sopnd) doemit(p, (sop)(op), sopnd)
-#define INSERT(op, pos) doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
-#define AHEAD(pos) dofwd(p, pos, HERE()-(pos))
-#define ASTERN(sop, pos) EMIT(sop, HERE()-pos)
-#define HERE() (p->slen)
-#define THERE() (p->slen - 1)
-#define THERETHERE() (p->slen - 2)
-#define DROP(n) (p->slen -= (n))
-
-#ifndef NDEBUG
-static int never = 0; /* for use in asserts; shuts lint up */
-#else
-#define never 0 /* some <assert.h>s have bugs too */
-#endif
-
-/*
- - regcomp - interface for parser and compilation
- = extern int regcomp(regex_t *, const char *, int);
- = #define REG_BASIC 0000
- = #define REG_EXTENDED 0001
- = #define REG_ICASE 0002
- = #define REG_NOSUB 0004
- = #define REG_NEWLINE 0010
- = #define REG_NOSPEC 0020
- = #define REG_PEND 0040
- = #define REG_DUMP 0200
- */
-int /* 0 success, otherwise REG_something */
-regcomp(preg, pattern, cflags)
-regex_t *preg;
-const char *pattern;
-int cflags;
-{
- struct parse pa;
- struct re_guts *g;
- struct parse *p = &pa;
- int i;
- size_t len;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&~REG_DUMP)
-#endif
-
- _DIAGASSERT(preg != NULL);
- _DIAGASSERT(pattern != NULL);
-
- cflags = GOODFLAGS(cflags);
- if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC))
- return(REG_INVARG);
-
- if (cflags&REG_PEND) {
- if (preg->re_endp < pattern)
- return(REG_INVARG);
- len = preg->re_endp - pattern;
- } else
- len = strlen(pattern);
-
- /* do the mallocs early so failure handling is easy */
- g = (struct re_guts *)malloc(sizeof(struct re_guts) +
- (NC-1)*sizeof(cat_t));
- if (g == NULL)
- return(REG_ESPACE);
- p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */
- p->strip = (sop *)malloc(p->ssize * sizeof(sop));
- p->slen = 0;
- if (p->strip == NULL) {
- free(g);
- return(REG_ESPACE);
- }
-
- /* set things up */
- p->g = g;
- /* LINTED convenience; we do not modify it */
- p->next = (char *)pattern;
- p->end = p->next + len;
- p->error = 0;
- p->ncsalloc = 0;
- for (i = 0; i < NPAREN; i++) {
- p->pbegin[i] = 0;
- p->pend[i] = 0;
- }
- g->csetsize = NC;
- g->sets = NULL;
- g->setbits = NULL;
- g->ncsets = 0;
- g->cflags = cflags;
- g->iflags = 0;
- g->nbol = 0;
- g->neol = 0;
- g->must = NULL;
- g->mlen = 0;
- g->nsub = 0;
- g->ncategories = 1; /* category 0 is "everything else" */
- g->categories = &g->catspace[-(CHAR_MIN)];
- (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
- g->backrefs = 0;
-
- /* do it */
- EMIT(OEND, 0);
- g->firststate = THERE();
- if (cflags&REG_EXTENDED)
- p_ere(p, OUT);
- else if (cflags&REG_NOSPEC)
- p_str(p);
- else
- p_bre(p, OUT, OUT);
- EMIT(OEND, 0);
- g->laststate = THERE();
-
- /* tidy up loose ends and fill things in */
- categorize(p, g);
- stripsnug(p, g);
- findmust(p, g);
- g->nplus = pluscount(p, g);
- g->magic = MAGIC2;
- preg->re_nsub = g->nsub;
- preg->re_g = g;
- preg->re_magic = MAGIC1;
-#ifndef REDEBUG
- /* not debugging, so can't rely on the assert() in regexec() */
- if (g->iflags&BAD)
- SETERROR(REG_ASSERT);
-#endif
-
- /* win or lose, we're done */
- if (p->error != 0) /* lose */
- regfree(preg);
- return(p->error);
-}
-
-/*
- - p_ere - ERE parser top level, concatenation and alternation
- == static void p_ere(struct parse *p, int stop);
- */
-static void
-p_ere(p, stop)
-struct parse *p;
-int stop; /* character this ERE should end at */
-{
- char c;
- sopno prevback = 0; /* pacify gcc */
- sopno prevfwd = 0; /* pacify gcc */
- sopno conc;
- int first = 1; /* is this the first alternative? */
-
- _DIAGASSERT(p != NULL);
-
- for (;;) {
- /* do a bunch of concatenated expressions */
- conc = HERE();
- while (MORE() && (c = PEEK()) != '|' && c != stop)
- p_ere_exp(p);
- REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */
-
- if (!EAT('|'))
- break; /* NOTE BREAK OUT */
-
- if (first) {
- INSERT(OCH_, conc); /* offset is wrong */
- prevfwd = conc;
- prevback = conc;
- first = 0;
- }
- ASTERN(OOR1, prevback);
- prevback = THERE();
- AHEAD(prevfwd); /* fix previous offset */
- prevfwd = HERE();
- EMIT(OOR2, 0); /* offset is very wrong */
- }
-
- if (!first) { /* tail-end fixups */
- AHEAD(prevfwd);
- ASTERN(O_CH, prevback);
- }
-
- assert(!MORE() || SEE(stop));
-}
-
-/*
- - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
- == static void p_ere_exp(struct parse *p);
- */
-static void
-p_ere_exp(p)
-struct parse *p;
-{
- char c;
- sopno pos;
- int count;
- int count2;
- sopno subno;
- int wascaret = 0;
-
- _DIAGASSERT(p != NULL);
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
-
- pos = HERE();
- switch (c) {
- case '(':
- REQUIRE(MORE(), REG_EPAREN);
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- if (!SEE(')'))
- p_ere(p, ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- MUSTEAT(')', REG_EPAREN);
- break;
-#ifndef POSIX_MISTAKE
- case ')': /* happens only if no current unmatched ( */
- /*
- * You may ask, why the ifndef? Because I didn't notice
- * this until slightly too late for 1003.2, and none of the
- * other 1003.2 regular-expression reviewers noticed it at
- * all. So an unmatched ) is legal POSIX, at least until
- * we can get it fixed.
- */
- SETERROR(REG_EPAREN);
- break;
-#endif
- case '^':
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- wascaret = 1;
- break;
- case '$':
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- break;
- case '|':
- SETERROR(REG_EMPTY);
- break;
- case '*':
- case '+':
- case '?':
- SETERROR(REG_BADRPT);
- break;
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case '\\':
- REQUIRE(MORE(), REG_EESCAPE);
- c = GETNEXT();
- ordinary(p, c);
- break;
- case '{': /* okay as ordinary except if digit follows */
- REQUIRE(!MORE() || !isdigit((unsigned char)PEEK()), REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, c);
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- /* we call { a repetition if followed by a digit */
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit((unsigned char)PEEK2())) ))
- return; /* no repetition, we're done */
- NEXT();
-
- REQUIRE(!wascaret, REG_BADRPT);
- switch (c) {
- case '*': /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- break;
- case '+':
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- break;
- case '?':
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, pos); /* offset slightly wrong */
- ASTERN(OOR1, pos); /* this one's right */
- AHEAD(pos); /* fix the OCH_ */
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- break;
- case '{':
- count = p_count(p);
- if (EAT(',')) {
- if (isdigit((unsigned char)PEEK())) {
- count2 = p_count(p);
- REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EAT('}')) { /* error heuristics */
- while (MORE() && PEEK() != '}')
- NEXT();
- REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit((unsigned char)PEEK2())) ) )
- return;
- SETERROR(REG_BADRPT);
-}
-
-/*
- - p_str - string (no metacharacters) "parser"
- == static void p_str(struct parse *p);
- */
-static void
-p_str(p)
-struct parse *p;
-{
-
- _DIAGASSERT(p != NULL);
-
- REQUIRE(MORE(), REG_EMPTY);
- while (MORE())
- ordinary(p, GETNEXT());
-}
-
-/*
- - p_bre - BRE parser top level, anchoring and concatenation
- == static void p_bre(struct parse *p, int end1, \
- == int end2);
- * Giving end1 as OUT essentially eliminates the end1/end2 check.
- *
- * This implementation is a bit of a kludge, in that a trailing $ is first
- * taken as an ordinary character and then revised to be an anchor. The
- * only undesirable side effect is that '$' gets included as a character
- * category in such cases. This is fairly harmless; not worth fixing.
- * The amount of lookahead needed to avoid this kludge is excessive.
- */
-static void
-p_bre(p, end1, end2)
-struct parse *p;
-int end1; /* first terminating character */
-int end2; /* second terminating character */
-{
- sopno start;
- int first = 1; /* first subexpression? */
- int wasdollar = 0;
-
- _DIAGASSERT(p != NULL);
-
- start = HERE();
-
- if (EAT('^')) {
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- }
- while (MORE() && !SEETWO(end1, end2)) {
- wasdollar = p_simp_re(p, first);
- first = 0;
- }
- if (wasdollar) { /* oops, that was a trailing anchor */
- DROP(1);
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- }
-
- REQUIRE(HERE() != start, REG_EMPTY); /* require nonempty */
-}
-
-/*
- - p_simp_re - parse a simple RE, an atom possibly followed by a repetition
- == static int p_simp_re(struct parse *p, int starordinary);
- */
-static int /* was the simple RE an unbackslashed $? */
-p_simp_re(p, starordinary)
-struct parse *p;
-int starordinary; /* is a leading * an ordinary character? */
-{
- int c;
- int count;
- int count2;
- sopno pos;
- int i;
- sopno subno;
-# define BACKSL (1<<CHAR_BIT)
-
- _DIAGASSERT(p != NULL);
-
- pos = HERE(); /* repetion op, if any, covers from here */
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
- if (c == '\\') {
- REQUIRE(MORE(), REG_EESCAPE);
- c = BACKSL | (unsigned char)GETNEXT();
- }
- switch (c) {
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case BACKSL|'{':
- SETERROR(REG_BADRPT);
- break;
- case BACKSL|'(':
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- /* the MORE here is an error heuristic */
- if (MORE() && !SEETWO('\\', ')'))
- p_bre(p, '\\', ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
- break;
- case BACKSL|')': /* should not get here -- must be user */
- case BACKSL|'}':
- SETERROR(REG_EPAREN);
- break;
- case BACKSL|'1':
- case BACKSL|'2':
- case BACKSL|'3':
- case BACKSL|'4':
- case BACKSL|'5':
- case BACKSL|'6':
- case BACKSL|'7':
- case BACKSL|'8':
- case BACKSL|'9':
- i = (c&~BACKSL) - '0';
- assert(i < NPAREN);
- if (p->pend[i] != 0) {
- assert(i <= p->g->nsub);
- EMIT(OBACK_, i);
- assert(p->pbegin[i] != 0);
- assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
- assert(OP(p->strip[p->pend[i]]) == ORPAREN);
- (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
- EMIT(O_BACK, i);
- } else
- SETERROR(REG_ESUBREG);
- p->g->backrefs = 1;
- break;
- case '*':
- REQUIRE(starordinary, REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, c &~ BACKSL);
- break;
- }
-
- if (EAT('*')) { /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- } else if (EATTWO('\\', '{')) {
- count = p_count(p);
- if (EAT(',')) {
- if (MORE() && isdigit((unsigned char)PEEK())) {
- count2 = p_count(p);
- REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EATTWO('\\', '}')) { /* error heuristics */
- while (MORE() && !SEETWO('\\', '}'))
- NEXT();
- REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- } else if (c == (unsigned char)'$') /* $ (but not \$) ends it */
- return(1);
-
- return(0);
-}
-
-/*
- - p_count - parse a repetition count
- == static int p_count(struct parse *p);
- */
-static int /* the value */
-p_count(p)
-struct parse *p;
-{
- int count = 0;
- int ndigits = 0;
-
- _DIAGASSERT(p != NULL);
-
- while (MORE() && isdigit((unsigned char)PEEK()) && count <= DUPMAX) {
- count = count*10 + (GETNEXT() - '0');
- ndigits++;
- }
-
- REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR);
- return(count);
-}
-
-/*
- - p_bracket - parse a bracketed character list
- == static void p_bracket(struct parse *p);
- *
- * Note a significant property of this code: if the allocset() did SETERROR,
- * no set operations are done.
- */
-static void
-p_bracket(p)
-struct parse *p;
-{
- cset *cs;
- int invert = 0;
-
- _DIAGASSERT(p != NULL);
-
- cs = allocset(p);
-
- /* Dept of Truly Sickening Special-Case Kludges */
- if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]",
- (size_t)6) == 0) {
- EMIT(OBOW, 0);
- NEXTn(6);
- return;
- }
- if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]",
- (size_t)6) == 0) {
- EMIT(OEOW, 0);
- NEXTn(6);
- return;
- }
-
- if (EAT('^'))
- invert++; /* make note to invert set at end */
- if (EAT(']'))
- CHadd(cs, ']');
- else if (EAT('-'))
- CHadd(cs, '-');
- while (MORE() && PEEK() != ']' && !SEETWO('-', ']'))
- p_b_term(p, cs);
- if (EAT('-'))
- CHadd(cs, '-');
- MUSTEAT(']', REG_EBRACK);
-
- if (p->error != 0) /* don't mess things up further */
- return;
-
- if (p->g->cflags&REG_ICASE) {
- int i;
- int ci;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i) && isalpha(i)) {
- ci = othercase(i);
- if (ci != i)
- CHadd(cs, ci);
- }
- if (cs->multis != NULL)
- mccase(p, cs);
- }
- if (invert) {
- int i;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i))
- CHsub(cs, i);
- else
- CHadd(cs, i);
- if (p->g->cflags&REG_NEWLINE)
- CHsub(cs, '\n');
- if (cs->multis != NULL)
- mcinvert(p, cs);
- }
-
- assert(cs->multis == NULL); /* xxx */
-
- if (nch(p, cs) == 1) { /* optimize singleton sets */
- ordinary(p, firstch(p, cs));
- freeset(p, cs);
- } else
- EMIT(OANYOF, freezeset(p, cs));
-}
-
-/*
- - p_b_term - parse one term of a bracketed character list
- == static void p_b_term(struct parse *p, cset *cs);
- */
-static void
-p_b_term(p, cs)
-struct parse *p;
-cset *cs;
-{
- char c;
- char start, finish;
- int i;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- /* classify what we've got */
- switch ((MORE()) ? PEEK() : '\0') {
- case '[':
- c = (MORE2()) ? PEEK2() : '\0';
- break;
-
- case '-':
- SETERROR(REG_ERANGE);
- return; /* NOTE RETURN */
-
- default:
- c = '\0';
- break;
- }
-
- switch (c) {
- case ':': /* character class */
- NEXT2();
- REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- REQUIRE(c != '-' && c != ']', REG_ECTYPE);
- p_b_cclass(p, cs);
- REQUIRE(MORE(), REG_EBRACK);
- REQUIRE(EATTWO(':', ']'), REG_ECTYPE);
- break;
- case '=': /* equivalence class */
- NEXT2();
- REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- REQUIRE(c != '-' && c != ']', REG_ECOLLATE);
- p_b_eclass(p, cs);
- REQUIRE(MORE(), REG_EBRACK);
- REQUIRE(EATTWO('=', ']'), REG_ECOLLATE);
- break;
- default: /* symbol, ordinary character, or range */
-/* xxx revision needed for multichar stuff */
- start = p_b_symbol(p);
- if (SEE('-') && MORE2() && PEEK2() != ']') {
- /* range */
- NEXT();
- if (EAT('-'))
- finish = '-';
- else
- finish = p_b_symbol(p);
- } else
- finish = start;
-/* xxx what about signed chars here... */
- REQUIRE(start <= finish, REG_ERANGE);
- for (i = start; i <= finish; i++)
- CHadd(cs, i);
- break;
- }
-}
-
-/*
- - p_b_cclass - parse a character-class name and deal with it
- == static void p_b_cclass(struct parse *p, cset *cs);
- */
-static void
-p_b_cclass(p, cs)
-struct parse *p;
-cset *cs;
-{
- char *sp;
- const struct cclass *cp;
- size_t len;
- const char *u;
- char c;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- sp = p->next;
-
- while (MORE() && isalpha((unsigned char)PEEK()))
- NEXT();
- len = p->next - sp;
- for (cp = cclasses; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- break;
- if (cp->name == NULL) {
- /* oops, didn't find it */
- SETERROR(REG_ECTYPE);
- return;
- }
-
- u = cp->chars;
- while ((c = *u++) != '\0')
- CHadd(cs, c);
- for (u = cp->multis; *u != '\0'; u += strlen(u) + 1)
- MCadd(p, cs, u);
-}
-
-/*
- - p_b_eclass - parse an equivalence-class name and deal with it
- == static void p_b_eclass(struct parse *p, cset *cs);
- *
- * This implementation is incomplete. xxx
- */
-static void
-p_b_eclass(p, cs)
-struct parse *p;
-cset *cs;
-{
- char c;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- c = p_b_coll_elem(p, '=');
- CHadd(cs, c);
-}
-
-/*
- - p_b_symbol - parse a character or [..]ed multicharacter collating symbol
- == static char p_b_symbol(struct parse *p);
- */
-static char /* value of symbol */
-p_b_symbol(p)
-struct parse *p;
-{
- char value;
-
- _DIAGASSERT(p != NULL);
-
- REQUIRE(MORE(), REG_EBRACK);
- if (!EATTWO('[', '.'))
- return(GETNEXT());
-
- /* collating symbol */
- value = p_b_coll_elem(p, '.');
- REQUIRE(EATTWO('.', ']'), REG_ECOLLATE);
- return(value);
-}
-
-/*
- - p_b_coll_elem - parse a collating-element name and look it up
- == static char p_b_coll_elem(struct parse *p, int endc);
- */
-static char /* value of collating element */
-p_b_coll_elem(p, endc)
-struct parse *p;
-int endc; /* name ended by endc,']' */
-{
- char *sp;
- const struct cname *cp;
- size_t len;
-
- _DIAGASSERT(p != NULL);
-
- sp = p->next;
-
- while (MORE() && !SEETWO(endc, ']'))
- NEXT();
- if (!MORE()) {
- SETERROR(REG_EBRACK);
- return(0);
- }
- len = p->next - sp;
- for (cp = cnames; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- return(cp->code); /* known name */
- if (len == 1)
- return(*sp); /* single character */
- SETERROR(REG_ECOLLATE); /* neither */
- return(0);
-}
-
-/*
- - othercase - return the case counterpart of an alphabetic
- == static char othercase(int ch);
- */
-static char /* if no counterpart, return ch */
-othercase(ch)
-int ch;
-{
- assert(isalpha(ch));
- if (isupper(ch))
- return(tolower(ch));
- else if (islower(ch))
- return(toupper(ch));
- else /* peculiar, but could happen */
- return(ch);
-}
-
-/*
- - bothcases - emit a dualcase version of a two-case character
- == static void bothcases(struct parse *p, int ch);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-bothcases(p, ch)
-struct parse *p;
-int ch;
-{
- char *oldnext;
- char *oldend;
- char bracket[3];
-
- _DIAGASSERT(p != NULL);
-
- oldnext = p->next;
- oldend = p->end;
-
- assert(othercase(ch) != ch); /* p_bracket() would recurse */
- p->next = bracket;
- p->end = bracket+2;
- bracket[0] = ch;
- bracket[1] = ']';
- bracket[2] = '\0';
- p_bracket(p);
- assert(p->next == bracket+2);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - ordinary - emit an ordinary character
- == static void ordinary(struct parse *p, int ch);
- */
-static void
-ordinary(p, ch)
-struct parse *p;
-int ch;
-{
- cat_t *cap;
-
- _DIAGASSERT(p != NULL);
-
- cap = p->g->categories;
- if ((p->g->cflags&REG_ICASE) && isalpha((unsigned char) ch)
- && othercase((unsigned char) ch) != (unsigned char) ch)
- bothcases(p, (unsigned char) ch);
- else {
- EMIT(OCHAR, (unsigned char)ch);
- if (cap[ch] == 0)
- cap[ch] = p->g->ncategories++;
- }
-}
-
-/*
- - nonnewline - emit REG_NEWLINE version of OANY
- == static void nonnewline(struct parse *p);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-nonnewline(p)
-struct parse *p;
-{
- char *oldnext;
- char *oldend;
- char bracket[4];
-
- _DIAGASSERT(p != NULL);
-
- oldnext = p->next;
- oldend = p->end;
-
- p->next = bracket;
- p->end = bracket+3;
- bracket[0] = '^';
- bracket[1] = '\n';
- bracket[2] = ']';
- bracket[3] = '\0';
- p_bracket(p);
- assert(p->next == bracket+3);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - repeat - generate code for a bounded repetition, recursively if needed
- == static void repeat(struct parse *p, sopno start, int from, int to);
- */
-static void
-repeat(p, start, from, to)
-struct parse *p;
-sopno start; /* operand from here to end of strip */
-int from; /* repeated from this number */
-int to; /* to this number of times (maybe INFINITY) */
-{
- sopno finish;
-# define N 2
-# define INF 3
-# define REP(f, t) ((f)*8 + (t))
-# define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
- sopno copy;
-
- _DIAGASSERT(p != NULL);
-
- finish = HERE();
-
- if (p->error != 0) /* head off possible runaway recursion */
- return;
-
- assert(from <= to);
-
- switch (REP(MAP(from), MAP(to))) {
- case REP(0, 0): /* must be user doing this */
- DROP(finish-start); /* drop the operand */
- break;
- case REP(0, 1): /* as x{1,1}? */
- case REP(0, N): /* as x{1,n}? */
- case REP(0, INF): /* as x{1,}? */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start); /* offset is wrong... */
- repeat(p, start+1, 1, to);
- ASTERN(OOR1, start);
- AHEAD(start); /* ... fix it */
- EMIT(OOR2, 0);
- AHEAD(THERE());
- ASTERN(O_CH, THERETHERE());
- break;
- case REP(1, 1): /* trivial case */
- /* done */
- break;
- case REP(1, N): /* as x?x{1,n-1} */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start);
- ASTERN(OOR1, start);
- AHEAD(start);
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- copy = dupl(p, start+1, finish+1);
- assert(copy == finish+4);
- repeat(p, copy, 1, to-1);
- break;
- case REP(1, INF): /* as x+ */
- INSERT(OPLUS_, start);
- ASTERN(O_PLUS, start);
- break;
- case REP(N, N): /* as xx{m-1,n-1} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to-1);
- break;
- case REP(N, INF): /* as xx{n-1,INF} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to);
- break;
- default: /* "can't happen" */
- SETERROR(REG_ASSERT); /* just in case */
- break;
- }
-}
-
-/*
- - seterr - set an error condition
- == static int seterr(struct parse *p, int e);
- */
-static int /* useless but makes type checking happy */
-seterr(p, e)
-struct parse *p;
-int e;
-{
-
- _DIAGASSERT(p != NULL);
-
- if (p->error == 0) /* keep earliest error condition */
- p->error = e;
- p->next = nuls; /* try to bring things to a halt */
- p->end = nuls;
- return(0); /* make the return value well-defined */
-}
-
-/*
- - allocset - allocate a set of characters for []
- == static cset *allocset(struct parse *p);
- */
-static cset *
-allocset(p)
-struct parse *p;
-{
- int no;
- size_t nc;
- size_t nbytes;
- cset *cs;
- size_t css;
- int i;
-
- _DIAGASSERT(p != NULL);
-
- no = p->g->ncsets++;
- css = (size_t)p->g->csetsize;
- if (no >= p->ncsalloc) { /* need another column of space */
- p->ncsalloc += CHAR_BIT;
- nc = p->ncsalloc;
- assert(nc % CHAR_BIT == 0);
- nbytes = nc / CHAR_BIT * css;
- if (p->g->sets == NULL)
- p->g->sets = malloc(nc * sizeof(cset));
- else
- p->g->sets = realloc(p->g->sets, nc * sizeof(cset));
- if (p->g->setbits == NULL)
- p->g->setbits = malloc(nbytes);
- else {
- p->g->setbits = realloc(p->g->setbits, nbytes);
- /* xxx this isn't right if setbits is now NULL */
- for (i = 0; i < no; i++)
- p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
- }
- if (p->g->sets != NULL && p->g->setbits != NULL)
- (void) memset((char *)p->g->setbits + (nbytes - css),
- 0, css);
- else {
- no = 0;
- SETERROR(REG_ESPACE);
- /* caller's responsibility not to do set ops */
- }
- }
-
- assert(p->g->sets != NULL); /* xxx */
- cs = &p->g->sets[no];
- cs->ptr = p->g->setbits + css*((no)/CHAR_BIT);
- cs->mask = 1 << ((no) % CHAR_BIT);
- cs->hash = 0;
- cs->smultis = 0;
- cs->multis = NULL;
-
- return(cs);
-}
-
-/*
- - freeset - free a now-unused set
- == static void freeset(struct parse *p, cset *cs);
- */
-static void
-freeset(p, cs)
-struct parse *p;
-cset *cs;
-{
- int i;
- cset *top;
- size_t css;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- top = &p->g->sets[p->g->ncsets];
- css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- CHsub(cs, i);
- if (cs == top-1) /* recover only the easy case */
- p->g->ncsets--;
-}
-
-/*
- - freezeset - final processing on a set of characters
- == static int freezeset(struct parse *p, cset *cs);
- *
- * The main task here is merging identical sets. This is usually a waste
- * of time (although the hash code minimizes the overhead), but can win
- * big if REG_ICASE is being used. REG_ICASE, by the way, is why the hash
- * is done using addition rather than xor -- all ASCII [aA] sets xor to
- * the same value!
- */
-static int /* set number */
-freezeset(p, cs)
-struct parse *p;
-cset *cs;
-{
- uch h;
- int i;
- cset *top;
- cset *cs2;
- size_t css;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- h = cs->hash;
- top = &p->g->sets[p->g->ncsets];
- css = (size_t)p->g->csetsize;
-
- /* look for an earlier one which is the same */
- for (cs2 = &p->g->sets[0]; cs2 < top; cs2++)
- if (cs2->hash == h && cs2 != cs) {
- /* maybe */
- for (i = 0; i < css; i++)
- if (!!CHIN(cs2, i) != !!CHIN(cs, i))
- break; /* no */
- if (i == css)
- break; /* yes */
- }
-
- if (cs2 < top) { /* found one */
- freeset(p, cs);
- cs = cs2;
- }
-
- return((int)(cs - p->g->sets));
-}
-
-/*
- - firstch - return first character in a set (which must have at least one)
- == static int firstch(struct parse *p, cset *cs);
- */
-static int /* character; there is no "none" value */
-firstch(p, cs)
-struct parse *p;
-cset *cs;
-{
- int i;
- size_t css;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- return((char)i);
- assert(never);
- return(0); /* arbitrary */
-}
-
-/*
- - nch - number of characters in a set
- == static int nch(struct parse *p, cset *cs);
- */
-static int
-nch(p, cs)
-struct parse *p;
-cset *cs;
-{
- int i;
- size_t css;
- int n = 0;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- n++;
- return(n);
-}
-
-/*
- - mcadd - add a collating element to a cset
- == static void mcadd(struct parse *p, cset *cs, \
- == char *cp);
- */
-static void
-mcadd(p, cs, cp)
-struct parse *p;
-cset *cs;
-const char *cp;
-{
- size_t oldend;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
- _DIAGASSERT(cp != NULL);
-
- oldend = cs->smultis;
-
- cs->smultis += strlen(cp) + 1;
- if (cs->multis == NULL)
- cs->multis = malloc(cs->smultis);
- else
- cs->multis = realloc(cs->multis, cs->smultis);
- if (cs->multis == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
-
- (void) strcpy(cs->multis + oldend - 1, cp);
- cs->multis[cs->smultis - 1] = '\0';
-}
-
-#if 0
-/*
- - mcsub - subtract a collating element from a cset
- == static void mcsub(cset *cs, char *cp);
- */
-static void
-mcsub(cs, cp)
-cset *cs;
-char *cp;
-{
- char *fp;
- size_t len;
-
- _DIAGASSERT(cs != NULL);
- _DIAGASSERT(cp != NULL);
-
- fp = mcfind(cs, cp);
- len = strlen(fp);
-
- assert(fp != NULL);
- (void) memmove(fp, fp + len + 1,
- cs->smultis - (fp + len + 1 - cs->multis));
- cs->smultis -= len;
-
- if (cs->smultis == 0) {
- free(cs->multis);
- cs->multis = NULL;
- return;
- }
-
- cs->multis = realloc(cs->multis, cs->smultis);
- assert(cs->multis != NULL);
-}
-
-/*
- - mcin - is a collating element in a cset?
- == static int mcin(cset *cs, char *cp);
- */
-static int
-mcin(cs, cp)
-cset *cs;
-char *cp;
-{
-
- _DIAGASSERT(cs != NULL);
- _DIAGASSERT(cp != NULL);
-
- return(mcfind(cs, cp) != NULL);
-}
-
-/*
- - mcfind - find a collating element in a cset
- == static char *mcfind(cset *cs, char *cp);
- */
-static char *
-mcfind(cs, cp)
-cset *cs;
-char *cp;
-{
- char *p;
-
- _DIAGASSERT(cs != NULL);
- _DIAGASSERT(cp != NULL);
-
- if (cs->multis == NULL)
- return(NULL);
- for (p = cs->multis; *p != '\0'; p += strlen(p) + 1)
- if (strcmp(cp, p) == 0)
- return(p);
- return(NULL);
-}
-#endif
-
-/*
- - mcinvert - invert the list of collating elements in a cset
- == static void mcinvert(struct parse *p, cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-/* ARGSUSED */
-static void
-mcinvert(p, cs)
-struct parse *p;
-cset *cs;
-{
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - mccase - add case counterparts of the list of collating elements in a cset
- == static void mccase(struct parse *p, cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-/* ARGSUSED */
-static void
-mccase(p, cs)
-struct parse *p;
-cset *cs;
-{
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(cs != NULL);
-
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - isinsets - is this character in any sets?
- == static int isinsets(struct re_guts *g, int c);
- */
-static int /* predicate */
-isinsets(g, c)
-struct re_guts *g;
-int c;
-{
- uch *col;
- int i;
- int ncols;
- unsigned uc = (unsigned char)c;
-
- _DIAGASSERT(g != NULL);
-
- ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc] != 0)
- return(1);
- return(0);
-}
-
-/*
- - samesets - are these two characters in exactly the same sets?
- == static int samesets(struct re_guts *g, int c1, int c2);
- */
-static int /* predicate */
-samesets(g, c1, c2)
-struct re_guts *g;
-int c1;
-int c2;
-{
- uch *col;
- int i;
- int ncols;
- unsigned uc1 = (unsigned char)c1;
- unsigned uc2 = (unsigned char)c2;
-
- _DIAGASSERT(g != NULL);
-
- ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc1] != col[uc2])
- return(0);
- return(1);
-}
-
-/*
- - categorize - sort out character categories
- == static void categorize(struct parse *p, struct re_guts *g);
- */
-static void
-categorize(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- cat_t *cats;
- int c;
- int c2;
- cat_t cat;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(g != NULL);
-
- cats = g->categories;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (cats[c] == 0 && isinsets(g, c)) {
- cat = g->ncategories++;
- cats[c] = cat;
- for (c2 = c+1; c2 <= CHAR_MAX; c2++)
- if (cats[c2] == 0 && samesets(g, c, c2))
- cats[c2] = cat;
- }
-}
-
-/*
- - dupl - emit a duplicate of a bunch of sops
- == static sopno dupl(struct parse *p, sopno start, sopno finish);
- */
-static sopno /* start of duplicate */
-dupl(p, start, finish)
-struct parse *p;
-sopno start; /* from here */
-sopno finish; /* to this less one */
-{
- sopno ret;
- sopno len = finish - start;
-
- _DIAGASSERT(p != NULL);
-
- ret = HERE();
-
- assert(finish >= start);
- if (len == 0)
- return(ret);
- enlarge(p, p->ssize + len); /* this many unexpected additions */
- assert(p->ssize >= p->slen + len);
- (void)memcpy(p->strip + p->slen, p->strip + start,
- (size_t)len * sizeof(sop));
- p->slen += len;
- return(ret);
-}
-
-/*
- - doemit - emit a strip operator
- == static void doemit(struct parse *p, sop op, size_t opnd);
- *
- * It might seem better to implement this as a macro with a function as
- * hard-case backup, but it's just too big and messy unless there are
- * some changes to the data structures. Maybe later.
- */
-static void
-doemit(p, op, opnd)
-struct parse *p;
-sop op;
-sopno opnd;
-{
-
- _DIAGASSERT(p != NULL);
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* deal with oversize operands ("can't happen", more or less) */
- assert(opnd < 1<<OPSHIFT);
-
- /* deal with undersized strip */
- if (p->slen >= p->ssize)
- enlarge(p, (p->ssize+1) / 2 * 3); /* +50% */
- assert(p->slen < p->ssize);
-
- /* finally, it's all reduced to the easy case */
- p->strip[p->slen++] = SOP(op, opnd);
-}
-
-/*
- - doinsert - insert a sop into the strip
- == static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
- */
-static void
-doinsert(p, op, opnd, pos)
-struct parse *p;
-sop op;
-sopno opnd;
-sopno pos;
-{
- sopno sn;
- sop s;
- int i;
-
- _DIAGASSERT(p != NULL);
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- sn = HERE();
- EMIT(op, opnd); /* do checks, ensure space */
- assert(HERE() == sn+1);
- s = p->strip[sn];
-
- /* adjust paren pointers */
- assert(pos > 0);
- for (i = 1; i < NPAREN; i++) {
- if (p->pbegin[i] >= pos) {
- p->pbegin[i]++;
- }
- if (p->pend[i] >= pos) {
- p->pend[i]++;
- }
- }
-
- memmove(&p->strip[pos+1], &p->strip[pos], (HERE()-pos-1)*sizeof(sop));
- p->strip[pos] = s;
-}
-
-/*
- - dofwd - complete a forward reference
- == static void dofwd(struct parse *p, sopno pos, sop value);
- */
-static void
-dofwd(p, pos, value)
-struct parse *p;
-sopno pos;
-sopno value;
-{
-
- _DIAGASSERT(p != NULL);
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- assert(value < 1<<OPSHIFT);
- p->strip[pos] = OP(p->strip[pos]) | value;
-}
-
-/*
- - enlarge - enlarge the strip
- == static void enlarge(struct parse *p, sopno size);
- */
-static void
-enlarge(p, size)
-struct parse *p;
-sopno size;
-{
- sop *sp;
-
- _DIAGASSERT(p != NULL);
-
- if (p->ssize >= size)
- return;
-
- sp = (sop *)realloc(p->strip, size*sizeof(sop));
- if (sp == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
- p->strip = sp;
- p->ssize = size;
-}
-
-/*
- - stripsnug - compact the strip
- == static void stripsnug(struct parse *p, struct re_guts *g);
- */
-static void
-stripsnug(p, g)
-struct parse *p;
-struct re_guts *g;
-{
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(g != NULL);
-
- g->nstates = p->slen;
- g->strip = realloc(p->strip, p->slen * sizeof(sop));
- if (g->strip == NULL) {
- SETERROR(REG_ESPACE);
- g->strip = p->strip;
- }
-}
-
-/*
- - findmust - fill in must and mlen with longest mandatory literal string
- == static void findmust(struct parse *p, struct re_guts *g);
- *
- * This algorithm could do fancy things like analyzing the operands of |
- * for common subsequences. Someday. This code is simple and finds most
- * of the interesting cases.
- *
- * Note that must and mlen got initialized during setup.
- */
-static void
-findmust(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- sop *scan;
- sop *start = NULL;
- sop *newstart = NULL;
- sopno newlen;
- sop s;
- char *cp;
- sopno i;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(g != NULL);
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* find the longest OCHAR sequence in strip */
- newlen = 0;
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OCHAR: /* sequence member */
- if (newlen == 0) /* new sequence */
- newstart = scan - 1;
- newlen++;
- break;
- case OPLUS_: /* things that don't break one */
- case OLPAREN:
- case ORPAREN:
- break;
- case OQUEST_: /* things that must be skipped */
- case OCH_:
- scan--;
- do {
- scan += OPND(s);
- s = *scan;
- /* assert() interferes w debug printouts */
- if (OP(s) != O_QUEST && OP(s) != O_CH &&
- OP(s) != OOR2) {
- g->iflags |= BAD;
- return;
- }
- } while (OP(s) != O_QUEST && OP(s) != O_CH);
- /* FALLTHROUGH */
- default: /* things that break a sequence */
- if (newlen > g->mlen) { /* ends one */
- start = newstart;
- g->mlen = newlen;
- }
- newlen = 0;
- break;
- }
- } while (OP(s) != OEND);
-
- if (g->mlen == 0) /* there isn't one */
- return;
-
- /* turn it into a character string */
- g->must = malloc((size_t)g->mlen + 1);
- if (g->must == NULL) { /* argh; just forget it */
- g->mlen = 0;
- return;
- }
- cp = g->must;
- scan = start;
- for (i = g->mlen; i > 0; i--) {
- while (OP(s = *scan++) != OCHAR)
- continue;
- assert(cp < g->must + g->mlen);
- *cp++ = (char)OPND(s);
- }
- assert(cp == g->must + g->mlen);
- *cp++ = '\0'; /* just on general principles */
-}
-
-/*
- - pluscount - count + nesting
- == static sopno pluscount(struct parse *p, struct re_guts *g);
- */
-static sopno /* nesting depth */
-pluscount(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- sop *scan;
- sop s;
- sopno plusnest = 0;
- sopno maxnest = 0;
-
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(g != NULL);
-
- if (p->error != 0)
- return(0); /* there may not be an OEND */
-
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OPLUS_:
- plusnest++;
- break;
- case O_PLUS:
- if (plusnest > maxnest)
- maxnest = plusnest;
- plusnest--;
- break;
- }
- } while (OP(s) != OEND);
- if (plusnest != 0)
- g->iflags |= BAD;
- return(maxnest);
-}
diff --git a/pkgtools/libnbcompat/files/regerror.c b/pkgtools/libnbcompat/files/regerror.c
deleted file mode 100644
index aa2e7279af0..00000000000
--- a/pkgtools/libnbcompat/files/regerror.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* $NetBSD: regerror.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regerror.c 8.4 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regerror.c 8.4 (Berkeley) 3/20/94
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
-#else
-__RCSID("$NetBSD: regerror.c,v 1.2 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#include <nbcompat/limits.h>
-#include <nbcompat/regex.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(regerror,_regerror)
-#endif
-#endif
-
-#include "private/utils.h"
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regerror.c === */
-static char *regatoi __P((const regex_t *preg, char *localbuf, size_t buflen));
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-/*
- = #define REG_NOMATCH 1
- = #define REG_BADPAT 2
- = #define REG_ECOLLATE 3
- = #define REG_ECTYPE 4
- = #define REG_EESCAPE 5
- = #define REG_ESUBREG 6
- = #define REG_EBRACK 7
- = #define REG_EPAREN 8
- = #define REG_EBRACE 9
- = #define REG_BADBR 10
- = #define REG_ERANGE 11
- = #define REG_ESPACE 12
- = #define REG_BADRPT 13
- = #define REG_EMPTY 14
- = #define REG_ASSERT 15
- = #define REG_INVARG 16
- = #define REG_ATOI 255 // convert name to number (!)
- = #define REG_ITOA 0400 // convert number to name (!)
- */
-static const struct rerr {
- int code;
- const char *name;
- const char *explain;
-} rerrs[] = {
- { REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match" },
- { REG_BADPAT, "REG_BADPAT", "invalid regular expression" },
- { REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element" },
- { REG_ECTYPE, "REG_ECTYPE", "invalid character class" },
- { REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)" },
- { REG_ESUBREG, "REG_ESUBREG", "invalid backreference number" },
- { REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced" },
- { REG_EPAREN, "REG_EPAREN", "parentheses not balanced" },
- { REG_EBRACE, "REG_EBRACE", "braces not balanced" },
- { REG_BADBR, "REG_BADBR", "invalid repetition count(s)" },
- { REG_ERANGE, "REG_ERANGE", "invalid character range" },
- { REG_ESPACE, "REG_ESPACE", "out of memory" },
- { REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid" },
- { REG_EMPTY, "REG_EMPTY", "empty (sub)expression" },
- { REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug" },
- { REG_INVARG, "REG_INVARG", "invalid argument to regex routine" },
- { 0, "", "*** unknown regexp error code ***" }
-};
-
-/*
- * regerror - the interface to error numbers
- * extern size_t regerror(int, const regex_t *, char *, size_t);
- */
-/* ARGSUSED */
-size_t
-regerror(errcode, preg, errbuf, errbuf_size)
-int errcode;
-const regex_t *preg;
-char *errbuf;
-size_t errbuf_size;
-{
- const struct rerr *r;
- size_t len;
- int target = errcode &~ REG_ITOA;
- const char *s;
- char convbuf[50];
-
- _DIAGASSERT(errcode != REG_ATOI || preg != NULL);
- _DIAGASSERT(errbuf != NULL);
-
- if (errcode == REG_ATOI)
- s = regatoi(preg, convbuf, sizeof convbuf);
- else {
- for (r = rerrs; r->code != 0; r++)
- if (r->code == target)
- break;
-
- if (errcode & REG_ITOA) {
- if (r->code != 0) {
- (void)strlcpy(convbuf, r->name, sizeof convbuf);
- } else
- (void)snprintf(convbuf, sizeof convbuf,
- "REG_0x%x", target);
- s = convbuf;
- } else
- s = r->explain;
- }
-
- len = strlen(s) + 1;
- if (errbuf_size > 0)
- (void)strlcpy(errbuf, s, errbuf_size);
-
- return(len);
-}
-
-/*
- * regatoi - internal routine to implement REG_ATOI
- * static char *regatoi(const regex_t *preg, char *localbuf, size_t buflen);
- */
-static char *
-regatoi(preg, localbuf, buflen)
-const regex_t *preg;
-char *localbuf;
-size_t buflen;
-{
- const struct rerr *r;
-
- for (r = rerrs; r->code != 0; r++)
- if (strcmp(r->name, preg->re_endp) == 0)
- break;
- if (r->code == 0)
- return("0");
-
- (void)snprintf(localbuf, buflen, "%d", r->code);
- return(localbuf);
-}
diff --git a/pkgtools/libnbcompat/files/regexec.c b/pkgtools/libnbcompat/files/regexec.c
deleted file mode 100644
index 4eec33063f6..00000000000
--- a/pkgtools/libnbcompat/files/regexec.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/* $NetBSD: regexec.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regexec.c 8.3 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regexec.c 8.3 (Berkeley) 3/20/94
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
-#else
-__RCSID("$NetBSD: regexec.c,v 1.2 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * the outer shell of regexec()
- *
- * This file includes engine.c *twice*, after muchos fiddling with the
- * macros that code uses. This lets the same code operate on two different
- * representations for state sets.
- */
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#include <nbcompat/limits.h>
-#include <nbcompat/regex.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(regexec,_regexec)
-#endif
-#endif
-
-#include "private/utils.h"
-#include "private/regex2.h"
-
-/* macros for manipulating states, small version */
-#define states unsigned long
-#define states1 unsigned long /* for later use in regexec() decision */
-#define CLEAR(v) ((v) = 0)
-#define SET0(v, n) ((v) &= ~((unsigned long)1 << (n)))
-#define SET1(v, n) ((v) |= (unsigned long)1 << (n))
-#define ISSET(v, n) (((v) & ((unsigned long)1 << (n))) != 0)
-#define ASSIGN(d, s) ((d) = (s))
-#define EQ(a, b) ((a) == (b))
-#define STATEVARS int dummy /* dummy version */
-#define STATESETUP(m, n) /* nothing */
-#define STATETEARDOWN(m) /* nothing */
-#define SETUP(v) ((v) = 0)
-#define onestate unsigned long
-#define INIT(o, n) ((o) = (unsigned long)1 << (n))
-#define INC(o) ((o) <<= 1)
-#define ISSTATEIN(v, o) (((v) & (o)) != 0)
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst) |= ((unsigned long)(src)&(here)) << (n))
-#define BACK(dst, src, n) ((dst) |= ((unsigned long)(src)&(here)) >> (n))
-#define ISSETBACK(v, n) (((v) & ((unsigned long)here >> (n))) != 0)
-/* function names */
-#define SNAMES /* engine.c looks after details */
-
-#include "engine.c"
-
-/* now undo things */
-#undef states
-#undef CLEAR
-#undef SET0
-#undef SET1
-#undef ISSET
-#undef ASSIGN
-#undef EQ
-#undef STATEVARS
-#undef STATESETUP
-#undef STATETEARDOWN
-#undef SETUP
-#undef onestate
-#undef INIT
-#undef INC
-#undef ISSTATEIN
-#undef FWD
-#undef BACK
-#undef ISSETBACK
-#undef SNAMES
-
-/* macros for manipulating states, large version */
-#define states char *
-#define CLEAR(v) memset(v, 0, (size_t)m->g->nstates)
-#define SET0(v, n) ((v)[n] = 0)
-#define SET1(v, n) ((v)[n] = 1)
-#define ISSET(v, n) ((v)[n])
-#define ASSIGN(d, s) memcpy(d, s, (size_t)m->g->nstates)
-#define EQ(a, b) (memcmp(a, b, (size_t)m->g->nstates) == 0)
-#define STATEVARS int vn; char *space
-#define STATESETUP(m, nv) \
- if (((m)->space = malloc((size_t)((nv)*(m)->g->nstates))) == NULL) \
- return(REG_ESPACE); \
- else \
- (m)->vn = 0
-
-#define STATETEARDOWN(m) { free((m)->space); m->space = NULL; }
-#define SETUP(v) ((v) = &m->space[(size_t)(m->vn++ * m->g->nstates)])
-#define onestate int
-#define INIT(o, n) ((o) = (n))
-#define INC(o) ((o)++)
-#define ISSTATEIN(v, o) ((v)[o])
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here])
-#define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here])
-#define ISSETBACK(v, n) ((v)[here - (n)])
-/* function names */
-#define LNAMES /* flag */
-
-#include "engine.c"
-
-/*
- - regexec - interface for matching
- = extern int regexec(const regex_t *, const char *, size_t, \
- = regmatch_t [], int);
- = #define REG_NOTBOL 00001
- = #define REG_NOTEOL 00002
- = #define REG_STARTEND 00004
- = #define REG_TRACE 00400 // tracing of execution
- = #define REG_LARGE 01000 // force large representation
- = #define REG_BACKR 02000 // force use of backref code
- *
- * We put this here so we can exploit knowledge of the state representation
- * when choosing which matcher to call. Also, by this point the matchers
- * have been prototyped.
- */
-int /* 0 success, REG_NOMATCH failure */
-regexec(preg, string, nmatch, pmatch, eflags)
-const regex_t *preg;
-const char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- struct re_guts *g = preg->re_g;
- char *s;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
-#endif
-
- _DIAGASSERT(preg != NULL);
- _DIAGASSERT(string != NULL);
-
- if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
- return(REG_BADPAT);
- assert(!(g->iflags&BAD));
- if (g->iflags&BAD) /* backstop for no-debug case */
- return(REG_BADPAT);
- eflags = GOODFLAGS(eflags);
-
- /* LINTED we believe that the regex routines do not change the string */
- s = (char *)string;
-
- if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
- return(smatcher(g, s, nmatch, pmatch, eflags));
- else
- return(lmatcher(g, s, nmatch, pmatch, eflags));
-}
diff --git a/pkgtools/libnbcompat/files/regfree.c b/pkgtools/libnbcompat/files/regfree.c
deleted file mode 100644
index 98e096272a6..00000000000
--- a/pkgtools/libnbcompat/files/regfree.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/* $NetBSD: regfree.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regfree.c 8.3 (Berkeley) 3/20/94
- */
-
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regfree.c 8.3 (Berkeley) 3/20/94
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)regfree.c 8.3 (Berkeley) 3/20/94";
-#else
-__RCSID("$NetBSD: regfree.c,v 1.2 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/regex.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(regfree,_regfree)
-#endif
-#endif
-
-#include "private/utils.h"
-#include "private/regex2.h"
-
-/*
- - regfree - free everything
- = extern void regfree(regex_t *);
- */
-void
-regfree(preg)
-regex_t *preg;
-{
- struct re_guts *g;
-
- _DIAGASSERT(preg != NULL);
-
- _DIAGASSERT(preg->re_magic == MAGIC1);
- if (preg->re_magic != MAGIC1) /* oops */
- return; /* nice to complain, but hard */
-
- g = preg->re_g;
- if (g == NULL || g->magic != MAGIC2) /* oops again */
- return;
- preg->re_magic = 0; /* mark it invalid */
- g->magic = 0; /* mark it invalid */
-
- if (g->strip != NULL)
- free(g->strip);
- if (g->sets != NULL)
- free(g->sets);
- if (g->setbits != NULL)
- free(g->setbits);
- if (g->must != NULL)
- free(g->must);
- free(g);
-}
diff --git a/pkgtools/libnbcompat/files/rmd160.c b/pkgtools/libnbcompat/files/rmd160.c
deleted file mode 100644
index e8a34533f97..00000000000
--- a/pkgtools/libnbcompat/files/rmd160.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/* $NetBSD: rmd160.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
-
-/********************************************************************\
- *
- * FILE: rmd160.c
- *
- * CONTENTS: A sample C-implementation of the RIPEMD-160
- * hash-function.
- * TARGET: any computer with an ANSI C compiler
- *
- * AUTHOR: Antoon Bosselaers, ESAT-COSIC
- * (Arranged for libc by Todd C. Miller)
- * DATE: 1 March 1996
- * VERSION: 1.0
- *
- * Copyright (c) Katholieke Universiteit Leuven
- * 1996, All Rights Reserved
- *
-\********************************************************************/
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: rmd160.c,v 1.6 2004/08/23 03:32:12 jlam Exp $");
-#endif /* not lint */
-
-/* header files */
-#include <nbcompat/types.h>
-#include <nbcompat/endian.h>
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#include <nbcompat/rmd160.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-
-#if !HAVE_RMD160_H
-
-#if 0
-#if !defined(_KERNEL) && defined(__weak_alias)
-__weak_alias(RMD160Transform,_RMD160Transform)
-__weak_alias(RMD160Init,_RMD160Init)
-__weak_alias(RMD160Update,_RMD160Update)
-__weak_alias(RMD160Final,_RMD160Final)
-#endif
-#endif
-
-#if defined(HAVE_MEMSET)
-#define ZEROIZE(d, l) memset((d), 0, (l))
-#else
-# if defined(HAVE_BZERO)
-#define ZEROIZE(d, l) bzero((d), (l))
-# else
-#error You need either memset or bzero
-# endif
-#endif
-
-/********************************************************************/
-
-/* macro definitions */
-
-/* collect four bytes into one word: */
-#define BYTES_TO_DWORD(strptr) \
- (((u_int32_t) *((strptr)+3) << 24) | \
- ((u_int32_t) *((strptr)+2) << 16) | \
- ((u_int32_t) *((strptr)+1) << 8) | \
- ((u_int32_t) *(strptr)))
-
-/* ROL(x, n) cyclically rotates x over n bits to the left */
-/* x must be of an unsigned 32 bits type and 0 <= n < 32. */
-#define ROL(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* the three basic functions F(), G() and H() */
-#define F(x, y, z) ((x) ^ (y) ^ (z))
-#define G(x, y, z) (((x) & (y)) | (~(x) & (z)))
-#define H(x, y, z) (((x) | ~(y)) ^ (z))
-#define I(x, y, z) (((x) & (z)) | ((y) & ~(z)))
-#define J(x, y, z) ((x) ^ ((y) | ~(z)))
-
-/* the eight basic operations FF() through III() */
-#define FF(a, b, c, d, e, x, s) { \
- (a) += F((b), (c), (d)) + (x); \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define GG(a, b, c, d, e, x, s) { \
- (a) += G((b), (c), (d)) + (x) + 0x5a827999U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define HH(a, b, c, d, e, x, s) { \
- (a) += H((b), (c), (d)) + (x) + 0x6ed9eba1U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define II(a, b, c, d, e, x, s) { \
- (a) += I((b), (c), (d)) + (x) + 0x8f1bbcdcU; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define JJ(a, b, c, d, e, x, s) { \
- (a) += J((b), (c), (d)) + (x) + 0xa953fd4eU; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define FFF(a, b, c, d, e, x, s) { \
- (a) += F((b), (c), (d)) + (x); \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define GGG(a, b, c, d, e, x, s) { \
- (a) += G((b), (c), (d)) + (x) + 0x7a6d76e9U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define HHH(a, b, c, d, e, x, s) { \
- (a) += H((b), (c), (d)) + (x) + 0x6d703ef3U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define III(a, b, c, d, e, x, s) { \
- (a) += I((b), (c), (d)) + (x) + 0x5c4dd124U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-#define JJJ(a, b, c, d, e, x, s) { \
- (a) += J((b), (c), (d)) + (x) + 0x50a28be6U; \
- (a) = ROL((a), (s)) + (e); \
- (c) = ROL((c), 10); \
-}
-
-/********************************************************************/
-
-void
-RMD160Init(RMD160_CTX *context)
-{
-
- _DIAGASSERT(context != NULL);
-
- /* ripemd-160 initialization constants */
- context->state[0] = 0x67452301U;
- context->state[1] = 0xefcdab89U;
- context->state[2] = 0x98badcfeU;
- context->state[3] = 0x10325476U;
- context->state[4] = 0xc3d2e1f0U;
- context->length[0] = context->length[1] = 0;
- context->buflen = 0;
-}
-
-/********************************************************************/
-
-void
-RMD160Transform(u_int32_t state[5], const u_int32_t block[16])
-{
- u_int32_t aa, bb, cc, dd, ee;
- u_int32_t aaa, bbb, ccc, ddd, eee;
-
- _DIAGASSERT(state != NULL);
- _DIAGASSERT(block != NULL);
-
- aa = aaa = state[0];
- bb = bbb = state[1];
- cc = ccc = state[2];
- dd = ddd = state[3];
- ee = eee = state[4];
-
- /* round 1 */
- FF(aa, bb, cc, dd, ee, block[ 0], 11);
- FF(ee, aa, bb, cc, dd, block[ 1], 14);
- FF(dd, ee, aa, bb, cc, block[ 2], 15);
- FF(cc, dd, ee, aa, bb, block[ 3], 12);
- FF(bb, cc, dd, ee, aa, block[ 4], 5);
- FF(aa, bb, cc, dd, ee, block[ 5], 8);
- FF(ee, aa, bb, cc, dd, block[ 6], 7);
- FF(dd, ee, aa, bb, cc, block[ 7], 9);
- FF(cc, dd, ee, aa, bb, block[ 8], 11);
- FF(bb, cc, dd, ee, aa, block[ 9], 13);
- FF(aa, bb, cc, dd, ee, block[10], 14);
- FF(ee, aa, bb, cc, dd, block[11], 15);
- FF(dd, ee, aa, bb, cc, block[12], 6);
- FF(cc, dd, ee, aa, bb, block[13], 7);
- FF(bb, cc, dd, ee, aa, block[14], 9);
- FF(aa, bb, cc, dd, ee, block[15], 8);
-
- /* round 2 */
- GG(ee, aa, bb, cc, dd, block[ 7], 7);
- GG(dd, ee, aa, bb, cc, block[ 4], 6);
- GG(cc, dd, ee, aa, bb, block[13], 8);
- GG(bb, cc, dd, ee, aa, block[ 1], 13);
- GG(aa, bb, cc, dd, ee, block[10], 11);
- GG(ee, aa, bb, cc, dd, block[ 6], 9);
- GG(dd, ee, aa, bb, cc, block[15], 7);
- GG(cc, dd, ee, aa, bb, block[ 3], 15);
- GG(bb, cc, dd, ee, aa, block[12], 7);
- GG(aa, bb, cc, dd, ee, block[ 0], 12);
- GG(ee, aa, bb, cc, dd, block[ 9], 15);
- GG(dd, ee, aa, bb, cc, block[ 5], 9);
- GG(cc, dd, ee, aa, bb, block[ 2], 11);
- GG(bb, cc, dd, ee, aa, block[14], 7);
- GG(aa, bb, cc, dd, ee, block[11], 13);
- GG(ee, aa, bb, cc, dd, block[ 8], 12);
-
- /* round 3 */
- HH(dd, ee, aa, bb, cc, block[ 3], 11);
- HH(cc, dd, ee, aa, bb, block[10], 13);
- HH(bb, cc, dd, ee, aa, block[14], 6);
- HH(aa, bb, cc, dd, ee, block[ 4], 7);
- HH(ee, aa, bb, cc, dd, block[ 9], 14);
- HH(dd, ee, aa, bb, cc, block[15], 9);
- HH(cc, dd, ee, aa, bb, block[ 8], 13);
- HH(bb, cc, dd, ee, aa, block[ 1], 15);
- HH(aa, bb, cc, dd, ee, block[ 2], 14);
- HH(ee, aa, bb, cc, dd, block[ 7], 8);
- HH(dd, ee, aa, bb, cc, block[ 0], 13);
- HH(cc, dd, ee, aa, bb, block[ 6], 6);
- HH(bb, cc, dd, ee, aa, block[13], 5);
- HH(aa, bb, cc, dd, ee, block[11], 12);
- HH(ee, aa, bb, cc, dd, block[ 5], 7);
- HH(dd, ee, aa, bb, cc, block[12], 5);
-
- /* round 4 */
- II(cc, dd, ee, aa, bb, block[ 1], 11);
- II(bb, cc, dd, ee, aa, block[ 9], 12);
- II(aa, bb, cc, dd, ee, block[11], 14);
- II(ee, aa, bb, cc, dd, block[10], 15);
- II(dd, ee, aa, bb, cc, block[ 0], 14);
- II(cc, dd, ee, aa, bb, block[ 8], 15);
- II(bb, cc, dd, ee, aa, block[12], 9);
- II(aa, bb, cc, dd, ee, block[ 4], 8);
- II(ee, aa, bb, cc, dd, block[13], 9);
- II(dd, ee, aa, bb, cc, block[ 3], 14);
- II(cc, dd, ee, aa, bb, block[ 7], 5);
- II(bb, cc, dd, ee, aa, block[15], 6);
- II(aa, bb, cc, dd, ee, block[14], 8);
- II(ee, aa, bb, cc, dd, block[ 5], 6);
- II(dd, ee, aa, bb, cc, block[ 6], 5);
- II(cc, dd, ee, aa, bb, block[ 2], 12);
-
- /* round 5 */
- JJ(bb, cc, dd, ee, aa, block[ 4], 9);
- JJ(aa, bb, cc, dd, ee, block[ 0], 15);
- JJ(ee, aa, bb, cc, dd, block[ 5], 5);
- JJ(dd, ee, aa, bb, cc, block[ 9], 11);
- JJ(cc, dd, ee, aa, bb, block[ 7], 6);
- JJ(bb, cc, dd, ee, aa, block[12], 8);
- JJ(aa, bb, cc, dd, ee, block[ 2], 13);
- JJ(ee, aa, bb, cc, dd, block[10], 12);
- JJ(dd, ee, aa, bb, cc, block[14], 5);
- JJ(cc, dd, ee, aa, bb, block[ 1], 12);
- JJ(bb, cc, dd, ee, aa, block[ 3], 13);
- JJ(aa, bb, cc, dd, ee, block[ 8], 14);
- JJ(ee, aa, bb, cc, dd, block[11], 11);
- JJ(dd, ee, aa, bb, cc, block[ 6], 8);
- JJ(cc, dd, ee, aa, bb, block[15], 5);
- JJ(bb, cc, dd, ee, aa, block[13], 6);
-
- /* parallel round 1 */
- JJJ(aaa, bbb, ccc, ddd, eee, block[ 5], 8);
- JJJ(eee, aaa, bbb, ccc, ddd, block[14], 9);
- JJJ(ddd, eee, aaa, bbb, ccc, block[ 7], 9);
- JJJ(ccc, ddd, eee, aaa, bbb, block[ 0], 11);
- JJJ(bbb, ccc, ddd, eee, aaa, block[ 9], 13);
- JJJ(aaa, bbb, ccc, ddd, eee, block[ 2], 15);
- JJJ(eee, aaa, bbb, ccc, ddd, block[11], 15);
- JJJ(ddd, eee, aaa, bbb, ccc, block[ 4], 5);
- JJJ(ccc, ddd, eee, aaa, bbb, block[13], 7);
- JJJ(bbb, ccc, ddd, eee, aaa, block[ 6], 7);
- JJJ(aaa, bbb, ccc, ddd, eee, block[15], 8);
- JJJ(eee, aaa, bbb, ccc, ddd, block[ 8], 11);
- JJJ(ddd, eee, aaa, bbb, ccc, block[ 1], 14);
- JJJ(ccc, ddd, eee, aaa, bbb, block[10], 14);
- JJJ(bbb, ccc, ddd, eee, aaa, block[ 3], 12);
- JJJ(aaa, bbb, ccc, ddd, eee, block[12], 6);
-
- /* parallel round 2 */
- III(eee, aaa, bbb, ccc, ddd, block[ 6], 9);
- III(ddd, eee, aaa, bbb, ccc, block[11], 13);
- III(ccc, ddd, eee, aaa, bbb, block[ 3], 15);
- III(bbb, ccc, ddd, eee, aaa, block[ 7], 7);
- III(aaa, bbb, ccc, ddd, eee, block[ 0], 12);
- III(eee, aaa, bbb, ccc, ddd, block[13], 8);
- III(ddd, eee, aaa, bbb, ccc, block[ 5], 9);
- III(ccc, ddd, eee, aaa, bbb, block[10], 11);
- III(bbb, ccc, ddd, eee, aaa, block[14], 7);
- III(aaa, bbb, ccc, ddd, eee, block[15], 7);
- III(eee, aaa, bbb, ccc, ddd, block[ 8], 12);
- III(ddd, eee, aaa, bbb, ccc, block[12], 7);
- III(ccc, ddd, eee, aaa, bbb, block[ 4], 6);
- III(bbb, ccc, ddd, eee, aaa, block[ 9], 15);
- III(aaa, bbb, ccc, ddd, eee, block[ 1], 13);
- III(eee, aaa, bbb, ccc, ddd, block[ 2], 11);
-
- /* parallel round 3 */
- HHH(ddd, eee, aaa, bbb, ccc, block[15], 9);
- HHH(ccc, ddd, eee, aaa, bbb, block[ 5], 7);
- HHH(bbb, ccc, ddd, eee, aaa, block[ 1], 15);
- HHH(aaa, bbb, ccc, ddd, eee, block[ 3], 11);
- HHH(eee, aaa, bbb, ccc, ddd, block[ 7], 8);
- HHH(ddd, eee, aaa, bbb, ccc, block[14], 6);
- HHH(ccc, ddd, eee, aaa, bbb, block[ 6], 6);
- HHH(bbb, ccc, ddd, eee, aaa, block[ 9], 14);
- HHH(aaa, bbb, ccc, ddd, eee, block[11], 12);
- HHH(eee, aaa, bbb, ccc, ddd, block[ 8], 13);
- HHH(ddd, eee, aaa, bbb, ccc, block[12], 5);
- HHH(ccc, ddd, eee, aaa, bbb, block[ 2], 14);
- HHH(bbb, ccc, ddd, eee, aaa, block[10], 13);
- HHH(aaa, bbb, ccc, ddd, eee, block[ 0], 13);
- HHH(eee, aaa, bbb, ccc, ddd, block[ 4], 7);
- HHH(ddd, eee, aaa, bbb, ccc, block[13], 5);
-
- /* parallel round 4 */
- GGG(ccc, ddd, eee, aaa, bbb, block[ 8], 15);
- GGG(bbb, ccc, ddd, eee, aaa, block[ 6], 5);
- GGG(aaa, bbb, ccc, ddd, eee, block[ 4], 8);
- GGG(eee, aaa, bbb, ccc, ddd, block[ 1], 11);
- GGG(ddd, eee, aaa, bbb, ccc, block[ 3], 14);
- GGG(ccc, ddd, eee, aaa, bbb, block[11], 14);
- GGG(bbb, ccc, ddd, eee, aaa, block[15], 6);
- GGG(aaa, bbb, ccc, ddd, eee, block[ 0], 14);
- GGG(eee, aaa, bbb, ccc, ddd, block[ 5], 6);
- GGG(ddd, eee, aaa, bbb, ccc, block[12], 9);
- GGG(ccc, ddd, eee, aaa, bbb, block[ 2], 12);
- GGG(bbb, ccc, ddd, eee, aaa, block[13], 9);
- GGG(aaa, bbb, ccc, ddd, eee, block[ 9], 12);
- GGG(eee, aaa, bbb, ccc, ddd, block[ 7], 5);
- GGG(ddd, eee, aaa, bbb, ccc, block[10], 15);
- GGG(ccc, ddd, eee, aaa, bbb, block[14], 8);
-
- /* parallel round 5 */
- FFF(bbb, ccc, ddd, eee, aaa, block[12] , 8);
- FFF(aaa, bbb, ccc, ddd, eee, block[15] , 5);
- FFF(eee, aaa, bbb, ccc, ddd, block[10] , 12);
- FFF(ddd, eee, aaa, bbb, ccc, block[ 4] , 9);
- FFF(ccc, ddd, eee, aaa, bbb, block[ 1] , 12);
- FFF(bbb, ccc, ddd, eee, aaa, block[ 5] , 5);
- FFF(aaa, bbb, ccc, ddd, eee, block[ 8] , 14);
- FFF(eee, aaa, bbb, ccc, ddd, block[ 7] , 6);
- FFF(ddd, eee, aaa, bbb, ccc, block[ 6] , 8);
- FFF(ccc, ddd, eee, aaa, bbb, block[ 2] , 13);
- FFF(bbb, ccc, ddd, eee, aaa, block[13] , 6);
- FFF(aaa, bbb, ccc, ddd, eee, block[14] , 5);
- FFF(eee, aaa, bbb, ccc, ddd, block[ 0] , 15);
- FFF(ddd, eee, aaa, bbb, ccc, block[ 3] , 13);
- FFF(ccc, ddd, eee, aaa, bbb, block[ 9] , 11);
- FFF(bbb, ccc, ddd, eee, aaa, block[11] , 11);
-
- /* combine results */
- ddd += cc + state[1]; /* final result for state[0] */
- state[1] = state[2] + dd + eee;
- state[2] = state[3] + ee + aaa;
- state[3] = state[4] + aa + bbb;
- state[4] = state[0] + bb + ccc;
- state[0] = ddd;
-}
-
-/********************************************************************/
-
-void
-RMD160Update(RMD160_CTX *context, const u_char *data, u_int32_t nbytes)
-{
- u_int32_t X[16];
- u_int32_t ofs = 0;
- u_int32_t i;
-#if BYTE_ORDER != LITTLE_ENDIAN
- u_int32_t j;
-#endif
-
- _DIAGASSERT(context != NULL);
- _DIAGASSERT(data != NULL);
-
- /* update length[] */
- if (context->length[0] + nbytes < context->length[0])
- context->length[1]++; /* overflow to msb of length */
- context->length[0] += nbytes;
-
- ZEROIZE(X, sizeof(X));
-
- if ( context->buflen + nbytes < 64 )
- {
- (void)memcpy(context->bbuffer + context->buflen, data, nbytes);
- context->buflen += nbytes;
- }
- else
- {
- /* process first block */
- ofs = 64 - context->buflen;
- (void)memcpy(context->bbuffer + context->buflen, data, ofs);
-#if BYTE_ORDER == LITTLE_ENDIAN
- (void)memcpy(X, context->bbuffer, sizeof(X));
-#else
- for (j=0; j < 16; j++)
- X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));
-#endif
- RMD160Transform(context->state, X);
- nbytes -= ofs;
-
- /* process remaining complete blocks */
- for (i = 0; i < (nbytes >> 6); i++) {
-#if BYTE_ORDER == LITTLE_ENDIAN
- (void)memcpy(X, data + (64 * i) + ofs, sizeof(X));
-#else
- for (j=0; j < 16; j++)
- X[j] = BYTES_TO_DWORD(data + (64 * i) + (4 * j) + ofs);
-#endif
- RMD160Transform(context->state, X);
- }
-
- /*
- * Put last bytes from data into context's buffer
- */
- context->buflen = nbytes & 63;
- memcpy(context->bbuffer, data + (64 * i) + ofs, context->buflen);
- }
-}
-
-/********************************************************************/
-
-void
-RMD160Final(u_char digest[20], RMD160_CTX *context)
-{
- u_int32_t i;
- u_int32_t X[16];
-#if BYTE_ORDER != LITTLE_ENDIAN
- u_int32_t j;
-#endif
-
- _DIAGASSERT(digest != NULL);
- _DIAGASSERT(context != NULL);
-
- /* append the bit m_n == 1 */
- context->bbuffer[context->buflen] = (u_char)'\200';
-
- ZEROIZE(context->bbuffer + context->buflen + 1,
- 63 - context->buflen);
-#if BYTE_ORDER == LITTLE_ENDIAN
- (void)memcpy(X, context->bbuffer, sizeof(X));
-#else
- for (j=0; j < 16; j++)
- X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));
-#endif
- if ((context->buflen) > 55) {
- /* length goes to next block */
- RMD160Transform(context->state, X);
- ZEROIZE(X, sizeof(X));
- }
-
- /* append length in bits */
- X[14] = context->length[0] << 3;
- X[15] = (context->length[0] >> 29) |
- (context->length[1] << 3);
- RMD160Transform(context->state, X);
-
- if (digest != NULL) {
- for (i = 0; i < 20; i += 4) {
- /* extracts the 8 least significant bits. */
- digest[i] = context->state[i>>2];
- digest[i + 1] = (context->state[i>>2] >> 8);
- digest[i + 2] = (context->state[i>>2] >> 16);
- digest[i + 3] = (context->state[i>>2] >> 24);
- }
- }
-}
-
-/************************ end of file rmd160.c **********************/
-#endif /* HAVE_RMD160_H */
diff --git a/pkgtools/libnbcompat/files/rmd160hl.c b/pkgtools/libnbcompat/files/rmd160hl.c
deleted file mode 100644
index aa2d002f07e..00000000000
--- a/pkgtools/libnbcompat/files/rmd160hl.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* $NetBSD: rmd160hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
-
-/* rmd160hl.c
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * from OpenBSD: rmd160hl.c,v 1.2 1999/08/17 09:13:12 millert Exp $
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: rmd160hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $");
-#endif /* not lint */
-
-#include <nbcompat/types.h>
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <nbcompat/rmd160.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/unistd.h>
-
-#if !HAVE_RMD160_H
-
-#if 0
-#if defined(__weak_alias)
-__weak_alias(RMD160End,_RMD160End)
-__weak_alias(RMD160File,_RMD160File)
-__weak_alias(RMD160Data,_RMD160Data)
-#endif
-#endif
-
-char *
-RMD160End(RMD160_CTX *ctx, char *buf)
-{
- int i;
- char *p = buf;
- u_char digest[20];
- static const char hex[]="0123456789abcdef";
-
- _DIAGASSERT(ctx != NULL);
- /* buf may be NULL */
-
- if (p == NULL && (p = malloc(41)) == NULL)
- return 0;
-
- RMD160Final(digest,ctx);
- for (i = 0; i < 20; i++) {
- p[i + i] = hex[(u_int32_t)digest[i] >> 4];
- p[i + i + 1] = hex[digest[i] & 0x0f];
- }
- p[i + i] = '\0';
- return(p);
-}
-
-char *
-RMD160File(char *filename, char *buf)
-{
- u_char buffer[BUFSIZ];
- RMD160_CTX ctx;
- int fd, num, oerrno;
-
- _DIAGASSERT(filename != NULL);
- /* XXX: buf may be NULL ? */
-
- RMD160Init(&ctx);
-
- if ((fd = open(filename, O_RDONLY)) < 0)
- return(0);
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0)
- RMD160Update(&ctx, buffer, (size_t)num);
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
- return(num < 0 ? 0 : RMD160End(&ctx, buf));
-}
-
-char *
-RMD160Data(const u_char *data, size_t len, char *buf)
-{
- RMD160_CTX ctx;
-
- _DIAGASSERT(data != NULL);
- /* XXX: buf may be NULL ? */
-
- RMD160Init(&ctx);
- RMD160Update(&ctx, data, len);
- return(RMD160End(&ctx, buf));
-}
-
-#endif /* HAVE_RMD160_H */
diff --git a/pkgtools/libnbcompat/files/setenv.c b/pkgtools/libnbcompat/files/setenv.c
deleted file mode 100644
index f2450ec7d93..00000000000
--- a/pkgtools/libnbcompat/files/setenv.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* $NetBSD: setenv.c,v 1.10 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)setenv.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: setenv.c,v 1.10 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-#if 0
-#include "local.h"
-#include "reentrant.h"
-#endif
-
-char *__findenv __P((const char *, int *));
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(setenv,_setenv)
-#endif
-#endif
-
-#if 0
-#ifdef _REENTRANT
-extern rwlock_t __environ_lock;
-#endif
-#endif
-
-extern char **environ;
-
-#ifndef rwlock_wrlock
-#define rwlock_wrlock(lock) ((void)0)
-#endif
-#ifndef rwlock_unlock
-#define rwlock_unlock(lock) ((void)0)
-#endif
-
-/*
- * setenv --
- * Set the value of the environmental variable "name" to be
- * "value". If rewrite is set, replace any current value.
- */
-int
-setenv(name, value, rewrite)
- const char *name;
- const char *value;
- int rewrite;
-{
- static int alloced; /* if allocated space before */
- char *c;
- const char *cc;
- size_t l_value;
- int offset;
-
- _DIAGASSERT(name != NULL);
- _DIAGASSERT(value != NULL);
-
- if (*value == '=') /* no `=' in value */
- ++value;
- l_value = strlen(value);
- rwlock_wrlock(&__environ_lock);
- /* find if already exists */
- if ((c = __findenv(name, &offset)) != NULL) {
- if (!rewrite) {
- rwlock_unlock(&__environ_lock);
- return (0);
- }
- if (strlen(c) >= l_value) { /* old larger; copy over */
- while ((*c++ = *value++) != '\0');
- rwlock_unlock(&__environ_lock);
- return (0);
- }
- } else { /* create new slot */
- int cnt;
- char **p;
-
- for (p = environ, cnt = 0; *p; ++p, ++cnt);
- if (alloced) { /* just increase size */
- environ = realloc(environ,
- (size_t)(sizeof(char *) * (cnt + 2)));
- if (!environ) {
- rwlock_unlock(&__environ_lock);
- return (-1);
- }
- }
- else { /* get new space */
- alloced = 1; /* copy old entries into it */
- p = malloc((size_t)(sizeof(char *) * (cnt + 2)));
- if (!p) {
- rwlock_unlock(&__environ_lock);
- return (-1);
- }
- memcpy(p, environ, cnt * sizeof(char *));
- environ = p;
- }
- environ[cnt + 1] = NULL;
- offset = cnt;
- }
- for (cc = name; *cc && *cc != '='; ++cc)/* no `=' in name */
- continue;
- if (!(environ[offset] = /* name + `=' + value */
- malloc((size_t)((int)(cc - name) + l_value + 2)))) {
- rwlock_unlock(&__environ_lock);
- return (-1);
- }
- for (c = environ[offset]; (*c = *name++) && *c != '='; ++c);
- for (*c++ = '='; (*c++ = *value++) != '\0'; );
- rwlock_unlock(&__environ_lock);
- return (0);
-}
diff --git a/pkgtools/libnbcompat/files/setgroupent.c b/pkgtools/libnbcompat/files/setgroupent.c
deleted file mode 100644
index ca2ce26e329..00000000000
--- a/pkgtools/libnbcompat/files/setgroupent.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $NetBSD: setgroupent.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/grp.h>
-
-int
-setgroupent(int stayopen)
-{
-#if HAVE_SETGRENT
- setgrent();
-#endif
- return 1;
-}
diff --git a/pkgtools/libnbcompat/files/setmode.c b/pkgtools/libnbcompat/files/setmode.c
deleted file mode 100644
index e6fb53d2581..00000000000
--- a/pkgtools/libnbcompat/files/setmode.c
+++ /dev/null
@@ -1,492 +0,0 @@
-/* $NetBSD: setmode.c,v 1.9 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Dave Borman at Cray Research, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)setmode.c 8.2 (Berkeley) 3/25/94";
-#else
-__RCSID("$NetBSD: setmode.c,v 1.9 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-#include <nbcompat/stat.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#include <nbcompat/stdlib.h>
-#include <nbcompat/unistd.h>
-
-#ifdef SETMODE_DEBUG
-#include <nbcompat/stdio.h>
-#endif
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(getmode,_getmode)
-__weak_alias(setmode,_setmode)
-#endif
-#endif
-
-#define SET_LEN 6 /* initial # of bitcmd struct to malloc */
-#define SET_LEN_INCR 4 /* # of bitcmd structs to add as needed */
-
-typedef struct bitcmd {
- char cmd;
- char cmd2;
- mode_t bits;
-} BITCMD;
-
-#define CMD2_CLR 0x01
-#define CMD2_SET 0x02
-#define CMD2_GBITS 0x04
-#define CMD2_OBITS 0x08
-#define CMD2_UBITS 0x10
-
-static BITCMD *addcmd __P((BITCMD *, int, int, int, u_int));
-static void compress_mode __P((BITCMD *));
-#ifdef SETMODE_DEBUG
-static void dumpmode __P((BITCMD *));
-#endif
-
-#if !HAVE_GETMODE
-/*
- * Given the old mode and an array of bitcmd structures, apply the operations
- * described in the bitcmd structures to the old mode, and return the new mode.
- * Note that there is no '=' command; a strict assignment is just a '-' (clear
- * bits) followed by a '+' (set bits).
- */
-mode_t
-getmode(bbox, omode)
- const void *bbox;
- mode_t omode;
-{
- const BITCMD *set;
- mode_t clrval, newmode, value;
-
- _DIAGASSERT(bbox != NULL);
-
- set = (const BITCMD *)bbox;
- newmode = omode;
- for (value = 0;; set++)
- switch(set->cmd) {
- /*
- * When copying the user, group or other bits around, we "know"
- * where the bits are in the mode so that we can do shifts to
- * copy them around. If we don't use shifts, it gets real
- * grundgy with lots of single bit checks and bit sets.
- */
- case 'u':
- value = (newmode & S_IRWXU) >> 6;
- goto common;
-
- case 'g':
- value = (newmode & S_IRWXG) >> 3;
- goto common;
-
- case 'o':
- value = newmode & S_IRWXO;
-common: if (set->cmd2 & CMD2_CLR) {
- clrval =
- (set->cmd2 & CMD2_SET) ? S_IRWXO : value;
- if (set->cmd2 & CMD2_UBITS)
- newmode &= ~((clrval<<6) & set->bits);
- if (set->cmd2 & CMD2_GBITS)
- newmode &= ~((clrval<<3) & set->bits);
- if (set->cmd2 & CMD2_OBITS)
- newmode &= ~(clrval & set->bits);
- }
- if (set->cmd2 & CMD2_SET) {
- if (set->cmd2 & CMD2_UBITS)
- newmode |= (value<<6) & set->bits;
- if (set->cmd2 & CMD2_GBITS)
- newmode |= (value<<3) & set->bits;
- if (set->cmd2 & CMD2_OBITS)
- newmode |= value & set->bits;
- }
- break;
-
- case '+':
- newmode |= set->bits;
- break;
-
- case '-':
- newmode &= ~set->bits;
- break;
-
- case 'X':
- if (omode & (S_IFDIR|S_IXUSR|S_IXGRP|S_IXOTH))
- newmode |= set->bits;
- break;
-
- case '\0':
- default:
-#ifdef SETMODE_DEBUG
- (void)printf("getmode:%04o -> %04o\n", omode, newmode);
-#endif
- return (newmode);
- }
-}
-#endif /* !HAVE_GETMODE */
-
-#define ADDCMD(a, b, c, d) do { \
- if (set >= endset) { \
- BITCMD *newset; \
- setlen += SET_LEN_INCR; \
- newset = realloc(saveset, sizeof(BITCMD) * setlen); \
- if (newset == NULL) { \
- free(saveset); \
- return (NULL); \
- } \
- set = newset + (set - saveset); \
- saveset = newset; \
- endset = newset + (setlen - 2); \
- } \
- set = addcmd(set, (a), (b), (c), (d)); \
-} while (/*CONSTCOND*/0)
-
-#define STANDARD_BITS (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#if !HAVE_SETMODE
-void *
-setmode(p)
- const char *p;
-{
- int perm, who;
- char op, *ep;
- BITCMD *set, *saveset, *endset;
- sigset_t signset, sigoset;
- mode_t mask;
- int equalopdone = 0; /* pacify gcc */
- int permXbits, setlen;
-
- if (!*p)
- return (NULL);
-
- /*
- * Get a copy of the mask for the permissions that are mask relative.
- * Flip the bits, we want what's not set. Since it's possible that
- * the caller is opening files inside a signal handler, protect them
- * as best we can.
- */
- sigfillset(&signset);
- (void)sigprocmask(SIG_BLOCK, &signset, &sigoset);
- (void)umask(mask = umask(0));
- mask = ~mask;
- (void)sigprocmask(SIG_SETMASK, &sigoset, NULL);
-
- setlen = SET_LEN + 2;
-
- if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL)
- return (NULL);
- saveset = set;
- endset = set + (setlen - 2);
-
- /*
- * If an absolute number, get it and return; disallow non-octal digits
- * or illegal bits.
- */
- if (isdigit((unsigned char)*p)) {
- perm = (mode_t)strtol(p, &ep, 8);
- if (*ep || perm & ~(STANDARD_BITS|S_ISTXT)) {
- free(saveset);
- return (NULL);
- }
- ADDCMD('=', (STANDARD_BITS|S_ISTXT), perm, mask);
- set->cmd = 0;
- return (saveset);
- }
-
- /*
- * Build list of structures to set/clear/copy bits as described by
- * each clause of the symbolic mode.
- */
- for (;;) {
- /* First, find out which bits might be modified. */
- for (who = 0;; ++p) {
- switch (*p) {
- case 'a':
- who |= STANDARD_BITS;
- break;
- case 'u':
- who |= S_ISUID|S_IRWXU;
- break;
- case 'g':
- who |= S_ISGID|S_IRWXG;
- break;
- case 'o':
- who |= S_IRWXO;
- break;
- default:
- goto getop;
- }
- }
-
-getop: if ((op = *p++) != '+' && op != '-' && op != '=') {
- free(saveset);
- return (NULL);
- }
- if (op == '=')
- equalopdone = 0;
-
- who &= ~S_ISTXT;
- for (perm = 0, permXbits = 0;; ++p) {
- switch (*p) {
- case 'r':
- perm |= S_IRUSR|S_IRGRP|S_IROTH;
- break;
- case 's':
- /*
- * If specific bits where requested and
- * only "other" bits ignore set-id.
- */
- if (who == 0 || (who & ~S_IRWXO))
- perm |= S_ISUID|S_ISGID;
- break;
- case 't':
- /*
- * If specific bits where requested and
- * only "other" bits ignore set-id.
- */
- if (who == 0 || (who & ~S_IRWXO)) {
- who |= S_ISTXT;
- perm |= S_ISTXT;
- }
- break;
- case 'w':
- perm |= S_IWUSR|S_IWGRP|S_IWOTH;
- break;
- case 'X':
- permXbits = S_IXUSR|S_IXGRP|S_IXOTH;
- break;
- case 'x':
- perm |= S_IXUSR|S_IXGRP|S_IXOTH;
- break;
- case 'u':
- case 'g':
- case 'o':
- /*
- * When ever we hit 'u', 'g', or 'o', we have
- * to flush out any partial mode that we have,
- * and then do the copying of the mode bits.
- */
- if (perm) {
- ADDCMD(op, who, perm, mask);
- perm = 0;
- }
- if (op == '=')
- equalopdone = 1;
- if (op == '+' && permXbits) {
- ADDCMD('X', who, permXbits, mask);
- permXbits = 0;
- }
- ADDCMD(*p, who, op, mask);
- break;
-
- default:
- /*
- * Add any permissions that we haven't already
- * done.
- */
- if (perm || (op == '=' && !equalopdone)) {
- if (op == '=')
- equalopdone = 1;
- ADDCMD(op, who, perm, mask);
- perm = 0;
- }
- if (permXbits) {
- ADDCMD('X', who, permXbits, mask);
- permXbits = 0;
- }
- goto apply;
- }
- }
-
-apply: if (!*p)
- break;
- if (*p != ',')
- goto getop;
- ++p;
- }
- set->cmd = 0;
-#ifdef SETMODE_DEBUG
- (void)printf("Before compress_mode()\n");
- dumpmode(saveset);
-#endif
- compress_mode(saveset);
-#ifdef SETMODE_DEBUG
- (void)printf("After compress_mode()\n");
- dumpmode(saveset);
-#endif
- return (saveset);
-}
-#endif /* !HAVE_SETMODE */
-
-static BITCMD *
-addcmd(set, op, who, oparg, mask)
- BITCMD *set;
- int oparg, who;
- int op;
- u_int mask;
-{
-
- _DIAGASSERT(set != NULL);
-
- switch (op) {
- case '=':
- set->cmd = '-';
- set->bits = who ? who : STANDARD_BITS;
- set++;
-
- op = '+';
- /* FALLTHROUGH */
- case '+':
- case '-':
- case 'X':
- set->cmd = op;
- set->bits = (who ? who : mask) & oparg;
- break;
-
- case 'u':
- case 'g':
- case 'o':
- set->cmd = op;
- if (who) {
- set->cmd2 = ((who & S_IRUSR) ? CMD2_UBITS : 0) |
- ((who & S_IRGRP) ? CMD2_GBITS : 0) |
- ((who & S_IROTH) ? CMD2_OBITS : 0);
- set->bits = (mode_t)~0;
- } else {
- set->cmd2 = CMD2_UBITS | CMD2_GBITS | CMD2_OBITS;
- set->bits = mask;
- }
-
- if (oparg == '+')
- set->cmd2 |= CMD2_SET;
- else if (oparg == '-')
- set->cmd2 |= CMD2_CLR;
- else if (oparg == '=')
- set->cmd2 |= CMD2_SET|CMD2_CLR;
- break;
- }
- return (set + 1);
-}
-
-#ifdef SETMODE_DEBUG
-static void
-dumpmode(set)
- BITCMD *set;
-{
-
- _DIAGASSERT(set != NULL);
-
- for (; set->cmd; ++set)
- (void)printf("cmd: '%c' bits %04o%s%s%s%s%s%s\n",
- set->cmd, set->bits, set->cmd2 ? " cmd2:" : "",
- set->cmd2 & CMD2_CLR ? " CLR" : "",
- set->cmd2 & CMD2_SET ? " SET" : "",
- set->cmd2 & CMD2_UBITS ? " UBITS" : "",
- set->cmd2 & CMD2_GBITS ? " GBITS" : "",
- set->cmd2 & CMD2_OBITS ? " OBITS" : "");
-}
-#endif
-
-/*
- * Given an array of bitcmd structures, compress by compacting consecutive
- * '+', '-' and 'X' commands into at most 3 commands, one of each. The 'u',
- * 'g' and 'o' commands continue to be separate. They could probably be
- * compacted, but it's not worth the effort.
- */
-static void
-compress_mode(set)
- BITCMD *set;
-{
- BITCMD *nset;
- int setbits, clrbits, Xbits, op;
-
- _DIAGASSERT(set != NULL);
-
- for (nset = set;;) {
- /* Copy over any 'u', 'g' and 'o' commands. */
- while ((op = nset->cmd) != '+' && op != '-' && op != 'X') {
- *set++ = *nset++;
- if (!op)
- return;
- }
-
- for (setbits = clrbits = Xbits = 0;; nset++) {
- if ((op = nset->cmd) == '-') {
- clrbits |= nset->bits;
- setbits &= ~nset->bits;
- Xbits &= ~nset->bits;
- } else if (op == '+') {
- setbits |= nset->bits;
- clrbits &= ~nset->bits;
- Xbits &= ~nset->bits;
- } else if (op == 'X')
- Xbits |= nset->bits & ~setbits;
- else
- break;
- }
- if (clrbits) {
- set->cmd = '-';
- set->cmd2 = 0;
- set->bits = clrbits;
- set++;
- }
- if (setbits) {
- set->cmd = '+';
- set->cmd2 = 0;
- set->bits = setbits;
- set++;
- }
- if (Xbits) {
- set->cmd = 'X';
- set->cmd2 = 0;
- set->bits = Xbits;
- set++;
- }
- }
-}
diff --git a/pkgtools/libnbcompat/files/setpassent.c b/pkgtools/libnbcompat/files/setpassent.c
deleted file mode 100644
index bc454470cc1..00000000000
--- a/pkgtools/libnbcompat/files/setpassent.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $NetBSD: setpassent.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Johnny C. Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/pwd.h>
-
-int
-setpassent(int stayopen)
-{
-#if HAVE_SETPWENT
- setpwent();
-#endif
- return 1;
-}
diff --git a/pkgtools/libnbcompat/files/setprogname.c b/pkgtools/libnbcompat/files/setprogname.c
deleted file mode 100644
index 3ec12efcdb7..00000000000
--- a/pkgtools/libnbcompat/files/setprogname.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* $NetBSD: setprogname.c,v 1.3 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 2001 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: setprogname.c,v 1.3 2004/08/23 03:32:12 jlam Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-/* In NetBSD, the program name is set by crt0. It can't be overridden. */
-#undef REALLY_SET_PROGNAME
-#define REALLY_SET_PROGNAME
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/stdlib.h>
-
-#ifdef REALLY_SET_PROGNAME
-#include <nbcompat/string.h>
-
-static const char *__progname = "<unset_progname>";
-#endif
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(getprogname,_getprogname)
-#endif
-#endif
-
-/*ARGSUSED*/
-void
-setprogname(const char *progname)
-{
-
-#ifdef REALLY_SET_PROGNAME
- __progname = strrchr(progname, '/');
- if (__progname == NULL)
- __progname = progname;
- else
- __progname++;
-#endif
-}
-
-const char *
-getprogname(void)
-{
-
- return (__progname);
-}
diff --git a/pkgtools/libnbcompat/files/sha1.c b/pkgtools/libnbcompat/files/sha1.c
deleted file mode 100644
index e72ca8e5673..00000000000
--- a/pkgtools/libnbcompat/files/sha1.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/* $NetBSD: sha1.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
-/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
-
-/*
- * SHA-1 in C
- * By Steve Reid <steve@edmweb.com>
- * 100% Public Domain
- *
- * Test Vectors (from FIPS PUB 180-1)
- * "abc"
- * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
- * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
- * 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
- * A million repetitions of "a"
- * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
- */
-
-#define SHA1HANDSOFF /* Copies data before messing with it. */
-
-#if defined(_KERNEL) || defined(_STANDALONE)
-#include <sys/param.h>
-#include <sys/sha1.h>
-#include <sys/systm.h>
-#define _DIAGASSERT(x) (void)0
-#else
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat.h>
-#include <nbcompat/types.h>
-#include <nbcompat/assert.h>
-#include <nbcompat/sha1.h>
-#include <nbcompat/string.h>
-#endif
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#if !HAVE_SHA1_H
-
-/*
- * XXX Kludge until there is resolution regarding mem*() functions
- * XXX in the kernel.
- */
-#if defined(_KERNEL) || defined(_STANDALONE)
-#define memcpy(s, d, l) bcopy((d), (s), (l))
-#endif
-
-#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
-
-/*
- * blk0() and blk() perform the initial expand.
- * I got the idea of expanding during the round function from SSLeay
- */
-#if BYTE_ORDER == LITTLE_ENDIAN
-# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
- |(rol(block->l[i],8)&0x00FF00FF))
-#else
-# define blk0(i) block->l[i]
-#endif
-#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
- ^block->l[(i+2)&15]^block->l[i&15],1))
-
-/*
- * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1
- */
-#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
-#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
-#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
-#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
-#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
-
-
-#if 0
-#if !defined(_KERNEL) && defined(__weak_alias)
-__weak_alias(SHA1Transform,_SHA1Transform)
-__weak_alias(SHA1Init,_SHA1Init)
-__weak_alias(SHA1Update,_SHA1Update)
-__weak_alias(SHA1Final,_SHA1Final)
-#endif
-#endif
-
-typedef union {
- u_char c[64];
- u_int l[16];
-} CHAR64LONG16;
-
-/* old sparc64 gcc could not compile this */
-#undef SPARC64_GCC_WORKAROUND
-#if defined(__sparc64__) && defined(__GNUC__) && __GNUC__ < 3
-#define SPARC64_GCC_WORKAROUND
-#endif
-
-#ifdef SPARC64_GCC_WORKAROUND
-void do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-void do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-void do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-void do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
-
-#define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i)
-#define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i)
-#define nR2(v,w,x,y,z,i) R2(*v,*w,*x,*y,*z,i)
-#define nR3(v,w,x,y,z,i) R3(*v,*w,*x,*y,*z,i)
-#define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i)
-
-void
-do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3);
- nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7);
- nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11);
- nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15);
- nR1(e,a,b,c,d,16); nR1(d,e,a,b,c,17); nR1(c,d,e,a,b,18); nR1(b,c,d,e,a,19);
-}
-
-void
-do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23);
- nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27);
- nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31);
- nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35);
- nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39);
-}
-
-void
-do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43);
- nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47);
- nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51);
- nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55);
- nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59);
-}
-
-void
-do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
-{
- nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63);
- nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67);
- nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71);
- nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75);
- nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79);
-}
-#endif
-
-/*
- * Hash a single 512-bit block. This is the core of the algorithm.
- */
-void SHA1Transform(state, buffer)
- u_int32_t state[5];
- const u_char buffer[64];
-{
- u_int32_t a, b, c, d, e;
- CHAR64LONG16 *block;
-
-#ifdef SHA1HANDSOFF
- CHAR64LONG16 workspace;
-#endif
-
- _DIAGASSERT(buffer != 0);
- _DIAGASSERT(state != 0);
-
-#ifdef SHA1HANDSOFF
- block = &workspace;
- (void)memcpy(block, buffer, 64);
-#else
- block = (CHAR64LONG16 *)(void *)buffer;
-#endif
-
- /* Copy context->state[] to working vars */
- a = state[0];
- b = state[1];
- c = state[2];
- d = state[3];
- e = state[4];
-
-#ifdef SPARC64_GCC_WORKAROUND
- do_R01(&a, &b, &c, &d, &e, block);
- do_R2(&a, &b, &c, &d, &e, block);
- do_R3(&a, &b, &c, &d, &e, block);
- do_R4(&a, &b, &c, &d, &e, block);
-#else
- /* 4 rounds of 20 operations each. Loop unrolled. */
- R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
- R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
- R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
- R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
- R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
- R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
- R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
- R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
- R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
- R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
- R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
- R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
- R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
- R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
- R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
- R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
- R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
- R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
- R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
- R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
-#endif
-
- /* Add the working vars back into context.state[] */
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- state[4] += e;
-
- /* Wipe variables */
- a = b = c = d = e = 0;
-}
-
-
-/*
- * SHA1Init - Initialize new context
- */
-void SHA1Init(context)
- SHA1_CTX *context;
-{
-
- _DIAGASSERT(context != 0);
-
- /* SHA1 initialization constants */
- context->state[0] = 0x67452301;
- context->state[1] = 0xEFCDAB89;
- context->state[2] = 0x98BADCFE;
- context->state[3] = 0x10325476;
- context->state[4] = 0xC3D2E1F0;
- context->count[0] = context->count[1] = 0;
-}
-
-
-/*
- * Run your data through this.
- */
-void SHA1Update(context, data, len)
- SHA1_CTX *context;
- const u_char *data;
- u_int len;
-{
- u_int i, j;
-
- _DIAGASSERT(context != 0);
- _DIAGASSERT(data != 0);
-
- j = context->count[0];
- if ((context->count[0] += len << 3) < j)
- context->count[1] += (len>>29)+1;
- j = (j >> 3) & 63;
- if ((j + len) > 63) {
- (void)memcpy(&context->buffer[j], data, (i = 64-j));
- SHA1Transform(context->state, context->buffer);
- for ( ; i + 63 < len; i += 64)
- SHA1Transform(context->state, &data[i]);
- j = 0;
- } else {
- i = 0;
- }
- (void)memcpy(&context->buffer[j], &data[i], len - i);
-}
-
-
-/*
- * Add padding and return the message digest.
- */
-void SHA1Final(digest, context)
- u_char digest[20];
- SHA1_CTX* context;
-{
- u_int i;
- u_char finalcount[8];
-
- _DIAGASSERT(digest != 0);
- _DIAGASSERT(context != 0);
-
- for (i = 0; i < 8; i++) {
- finalcount[i] = (u_char)((context->count[(i >= 4 ? 0 : 1)]
- >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
- }
- SHA1Update(context, (u_char *)"\200", 1);
- while ((context->count[0] & 504) != 448)
- SHA1Update(context, (u_char *)"\0", 1);
- SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
-
- if (digest) {
- for (i = 0; i < 20; i++)
- digest[i] = (u_char)
- ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
- }
-}
-
-#endif /* HAVE_SHA1_H */
diff --git a/pkgtools/libnbcompat/files/sha1hl.c b/pkgtools/libnbcompat/files/sha1hl.c
deleted file mode 100644
index 26591a187a3..00000000000
--- a/pkgtools/libnbcompat/files/sha1hl.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/* $NetBSD: sha1hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
-
-/* sha1hl.c
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if HAVE_SYS_FILE_H
-#include <sys/file.h>
-#endif
-#include <nbcompat/types.h>
-#if HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <nbcompat/sha1.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/stdlib.h>
-#include <nbcompat/unistd.h>
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#if !HAVE_SHA1_H
-
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: sha1hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#if defined(__weak_alias)
-__weak_alias(SHA1End,_SHA1End)
-__weak_alias(SHA1File,_SHA1File)
-__weak_alias(SHA1Data,_SHA1Data)
-#endif
-#endif
-
-/* ARGSUSED */
-char *
-SHA1End(ctx, buf)
- SHA1_CTX *ctx;
- char *buf;
-{
- int i;
- char *p = buf;
- u_char digest[20];
- static const char hex[]="0123456789abcdef";
-
- _DIAGASSERT(ctx != NULL);
- /* buf may be NULL */
-
- if (p == NULL && (p = malloc(41)) == NULL)
- return 0;
-
- SHA1Final(digest,ctx);
- for (i = 0; i < 20; i++) {
- p[i + i] = hex[((u_int32_t)digest[i]) >> 4];
- p[i + i + 1] = hex[digest[i] & 0x0f];
- }
- p[i + i] = '\0';
- return(p);
-}
-
-char *
-SHA1File (filename, buf)
- char *filename;
- char *buf;
-{
- u_char buffer[BUFSIZ];
- SHA1_CTX ctx;
- int fd, num, oerrno;
-
- _DIAGASSERT(filename != NULL);
- /* XXX: buf may be NULL ? */
-
- SHA1Init(&ctx);
-
- if ((fd = open(filename,O_RDONLY)) < 0)
- return(0);
-
- while ((num = read(fd, buffer, sizeof(buffer))) > 0)
- SHA1Update(&ctx, buffer, (size_t)num);
-
- oerrno = errno;
- close(fd);
- errno = oerrno;
- return(num < 0 ? 0 : SHA1End(&ctx, buf));
-}
-
-char *
-SHA1Data (data, len, buf)
- const u_char *data;
- size_t len;
- char *buf;
-{
- SHA1_CTX ctx;
-
- _DIAGASSERT(data != NULL);
- /* XXX: buf may be NULL ? */
-
- SHA1Init(&ctx);
- SHA1Update(&ctx, data, len);
- return(SHA1End(&ctx, buf));
-}
-
-#endif /* HAVE_SHA1_H */
diff --git a/pkgtools/libnbcompat/files/snprintf.c b/pkgtools/libnbcompat/files/snprintf.c
deleted file mode 100644
index c7c64dcded9..00000000000
--- a/pkgtools/libnbcompat/files/snprintf.c
+++ /dev/null
@@ -1,790 +0,0 @@
-/* $NetBSD: snprintf.c,v 1.3 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright Patrick Powell 1995
- * This code is based on code written by Patrick Powell (papowell@astart.com)
- * It may be used for any purpose as long as this notice remains intact
- * on all source code distributions
- */
-
-/**************************************************************
- * Original:
- * Patrick Powell Tue Apr 11 09:48:21 PDT 1995
- * A bombproof version of doprnt (dopr) included.
- * Sigh. This sort of thing is always nasty do deal with. Note that
- * the version here does not include floating point...
- *
- * snprintf() is used instead of sprintf() as it does limit checks
- * for string length. This covers a nasty loophole.
- *
- * The other functions are there to prevent NULL pointers from
- * causing nast effects.
- *
- * More Recently:
- * Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43
- * This was ugly. It is still ugly. I opted out of floating point
- * numbers, but the formatter understands just about everything
- * from the normal C string format, at least as far as I can tell from
- * the Solaris 2.5 printf(3S) man page.
- *
- * Brandon Long <blong@fiction.net> 10/22/97 for mutt 0.87.1
- * Ok, added some minimal floating point support, which means this
- * probably requires libm on most operating systems. Don't yet
- * support the exponent (e,E) and sigfig (g,G). Also, fmtint()
- * was pretty badly broken, it just wasn't being exercised in ways
- * which showed it, so that's been fixed. Also, formated the code
- * to mutt conventions, and removed dead code left over from the
- * original. Also, there is now a builtin-test, just compile with:
- * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
- * and run snprintf for results.
- *
- * Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
- * The PGP code was using unsigned hexadecimal formats.
- * Unfortunately, unsigned formats simply didn't work.
- *
- * Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
- * The original code assumed that both snprintf() and vsnprintf() were
- * missing. Some systems only have snprintf() but not vsnprintf(), so
- * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
- *
- * Andrew Tridgell (tridge@samba.org) Oct 1998
- * fixed handling of %.0f
- * added test for HAVE_LONG_DOUBLE
- *
- * Luke Mewburn <lukem@netbsd.org>, Thu Sep 30 23:28:21 EST 1999
- * cleaned up formatting, autoconf tests
- * added long long support
- *
- **************************************************************/
-
-#include <nbcompat.h>
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-
-#if HAVE_LONG_DOUBLE
-#define LDOUBLE long double
-#else
-#define LDOUBLE double
-#endif
-
-#if HAVE_LONG_LONG
-#define LLONG long long
-#else
-#define LLONG long
-#endif
-
-static void dopr(char *buffer, size_t maxlen, size_t *retlen,
- const char *format, va_list args);
-static void fmtstr(char *buffer, size_t * currlen, size_t maxlen,
- char *value, int min, int max, int flags);
-static void fmtint(char *buffer, size_t * currlen, size_t maxlen,
- LLONG value, int base, int min, int max, int flags);
-static void fmtfp(char *buffer, size_t * currlen, size_t maxlen,
- LDOUBLE fvalue, int min, int max, int flags);
-static void dopr_outch(char *buffer, size_t * currlen, size_t maxlen, int c);
-
-/*
- * dopr(): poor man's version of doprintf
- */
-
-/* format read states */
-#define DP_S_DEFAULT 0
-#define DP_S_FLAGS 1
-#define DP_S_MIN 2
-#define DP_S_DOT 3
-#define DP_S_MAX 4
-#define DP_S_MOD 5
-#define DP_S_CONV 6
-#define DP_S_DONE 7
-
-/* format flags - Bits */
-#define DP_F_MINUS (1 << 0)
-#define DP_F_PLUS (1 << 1)
-#define DP_F_SPACE (1 << 2)
-#define DP_F_NUM (1 << 3)
-#define DP_F_ZERO (1 << 4)
-#define DP_F_UP (1 << 5)
-#define DP_F_UNSIGNED (1 << 6)
-
-/* Conversion Flags */
-#define DP_C_SHORT 1
-#define DP_C_LONG 2
-#define DP_C_LDOUBLE 3
-#define DP_C_LLONG 4
-
-#define char_to_int(p) (p - '0')
-
-static void
-dopr(char *buffer, size_t maxlen, size_t *retlen, const char *format,
- va_list args)
-{
- char ch;
- LLONG value;
- LDOUBLE fvalue;
- char *strvalue;
- int min;
- int max;
- int state;
- int flags;
- int cflags;
- size_t currlen;
-
- state = DP_S_DEFAULT;
- flags = currlen = cflags = min = 0;
- max = -1;
- ch = *format++;
-
- while (state != DP_S_DONE) {
- if ((ch == '\0') || (currlen >= maxlen))
- state = DP_S_DONE;
-
- switch (state) {
- case DP_S_DEFAULT:
- if (ch == '%')
- state = DP_S_FLAGS;
- else
- dopr_outch(buffer, &currlen, maxlen, ch);
- ch = *format++;
- break;
- case DP_S_FLAGS:
- switch (ch) {
- case '-':
- flags |= DP_F_MINUS;
- ch = *format++;
- break;
- case '+':
- flags |= DP_F_PLUS;
- ch = *format++;
- break;
- case ' ':
- flags |= DP_F_SPACE;
- ch = *format++;
- break;
- case '#':
- flags |= DP_F_NUM;
- ch = *format++;
- break;
- case '0':
- flags |= DP_F_ZERO;
- ch = *format++;
- break;
- default:
- state = DP_S_MIN;
- break;
- }
- break;
- case DP_S_MIN:
- if (isdigit((unsigned char) ch)) {
- min = 10 * min + char_to_int(ch);
- ch = *format++;
- } else if (ch == '*') {
- min = va_arg(args, int);
- ch = *format++;
- state = DP_S_DOT;
- } else
- state = DP_S_DOT;
- break;
- case DP_S_DOT:
- if (ch == '.') {
- state = DP_S_MAX;
- ch = *format++;
- } else
- state = DP_S_MOD;
- break;
- case DP_S_MAX:
- if (isdigit((unsigned char) ch)) {
- if (max < 0)
- max = 0;
- max = 10 * max + char_to_int(ch);
- ch = *format++;
- } else if (ch == '*') {
- max = va_arg(args, int);
- ch = *format++;
- state = DP_S_MOD;
- } else
- state = DP_S_MOD;
- break;
- case DP_S_MOD:
- switch (ch) {
- case 'h':
- cflags = DP_C_SHORT;
- ch = *format++;
- break;
- case 'l':
- if (*format == 'l') {
- cflags = DP_C_LLONG;
- format++;
- } else
- cflags = DP_C_LONG;
- ch = *format++;
- break;
- case 'q':
- cflags = DP_C_LLONG;
- ch = *format++;
- break;
- case 'L':
- cflags = DP_C_LDOUBLE;
- ch = *format++;
- break;
- default:
- break;
- }
- state = DP_S_CONV;
- break;
- case DP_S_CONV:
- switch (ch) {
- case 'd':
- case 'i':
- switch (cflags) {
- case DP_C_SHORT:
- value = va_arg(args, int);
- break;
- case DP_C_LONG:
- value = va_arg(args, long int);
- break;
- case DP_C_LLONG:
- value = va_arg(args, LLONG);
- break;
- default:
- value = va_arg(args, int);
- break;
- }
- fmtint(buffer, &currlen, maxlen, value, 10,
- min, max, flags);
- break;
- case 'X':
- flags |= DP_F_UP;
- /* FALLTHROUGH */
- case 'x':
- case 'o':
- case 'u':
- flags |= DP_F_UNSIGNED;
- switch (cflags) {
- case DP_C_SHORT:
- value = va_arg(args, unsigned int);
- break;
- case DP_C_LONG:
- value = (LLONG) va_arg(args,
- unsigned long int);
- break;
- case DP_C_LLONG:
- value = va_arg(args, unsigned LLONG);
- break;
- default:
- value = (LLONG) va_arg(args,
- unsigned int);
- break;
- }
- fmtint(buffer, &currlen, maxlen, value,
- ch == 'o' ? 8 : (ch == 'u' ? 10 : 16),
- min, max, flags);
- break;
- case 'f':
- if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg(args, LDOUBLE);
- else
- fvalue = va_arg(args, double);
- /* um, floating point? */
- fmtfp(buffer, &currlen, maxlen, fvalue, min,
- max, flags);
- break;
- case 'E':
- flags |= DP_F_UP;
- case 'e':
- if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg(args, LDOUBLE);
- else
- fvalue = va_arg(args, double);
- break;
- case 'G':
- flags |= DP_F_UP;
- case 'g':
- if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg(args, LDOUBLE);
- else
- fvalue = va_arg(args, double);
- break;
- case 'c':
- dopr_outch(buffer, &currlen, maxlen,
- va_arg(args, int));
- break;
- case 's':
- strvalue = va_arg(args, char *);
- if (max < 0)
- max = maxlen; /* ie, no max */
- fmtstr(buffer, &currlen, maxlen, strvalue,
- min, max, flags);
- break;
- case 'p':
- value = (long)va_arg(args, void *);
- fmtint(buffer, &currlen, maxlen,
- value, 16, min, max, flags);
- break;
- case 'n':
-/* XXX */
- if (cflags == DP_C_SHORT) {
- short int *num;
- num = va_arg(args, short int *);
- *num = currlen;
- } else if (cflags == DP_C_LONG) { /* XXX */
- long int *num;
- num = va_arg(args, long int *);
- *num = (long int) currlen;
- } else if (cflags == DP_C_LLONG) { /* XXX */
- LLONG *num;
- num = va_arg(args, LLONG *);
- *num = (LLONG) currlen;
- } else {
- int *num;
- num = va_arg(args, int *);
- *num = currlen;
- }
- break;
- case '%':
- dopr_outch(buffer, &currlen, maxlen, ch);
- break;
- case 'w':
- /* not supported yet, treat as next char */
- ch = *format++;
- break;
- default:
- /* Unknown, skip */
- break;
- }
- ch = *format++;
- state = DP_S_DEFAULT;
- flags = cflags = min = 0;
- max = -1;
- break;
- case DP_S_DONE:
- break;
- default:
- /* hmm? */
- break; /* some picky compilers need this */
- }
- }
- if (currlen >= maxlen - 1)
- currlen = maxlen - 1;
- buffer[currlen] = '\0';
- *retlen = currlen;
-}
-
-static void
-fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value,
- int min, int max, int flags)
-{
- int padlen, strln; /* amount to pad */
- int cnt = 0;
-
- if (value == 0) {
- value = "<NULL>";
- }
- for (strln = 0; value[strln]; ++strln)
- ; /* strlen */
- padlen = min - strln;
- if (padlen < 0)
- padlen = 0;
- if (flags & DP_F_MINUS)
- padlen = -padlen; /* Left Justify */
-
- while ((padlen > 0) && (cnt < max)) {
- dopr_outch(buffer, currlen, maxlen, ' ');
- --padlen;
- ++cnt;
- }
- while (*value && (cnt < max)) {
- dopr_outch(buffer, currlen, maxlen, *value++);
- ++cnt;
- }
- while ((padlen < 0) && (cnt < max)) {
- dopr_outch(buffer, currlen, maxlen, ' ');
- ++padlen;
- ++cnt;
- }
-}
-/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
-
-static void
-fmtint(char *buffer, size_t *currlen, size_t maxlen, LLONG value, int base,
- int min, int max, int flags)
-{
- int signvalue = 0;
- unsigned LLONG uvalue;
- char convert[20];
- int place = 0;
- int spadlen = 0; /* amount to space pad */
- int zpadlen = 0; /* amount to zero pad */
- int caps = 0;
-
- if (max < 0)
- max = 0;
-
- uvalue = value;
-
- if (!(flags & DP_F_UNSIGNED)) {
- if (value < 0) {
- signvalue = '-';
- uvalue = -value;
- } else if (flags & DP_F_PLUS) /* Do a sign (+/i) */
- signvalue = '+';
- else if (flags & DP_F_SPACE)
- signvalue = ' ';
- }
- if (flags & DP_F_UP)
- caps = 1; /* Should characters be upper case? */
-
- do {
- convert[place++] =
- (caps ? "0123456789ABCDEF" : "0123456789abcdef")
- [uvalue % (unsigned) base];
- uvalue = (uvalue / (unsigned) base);
- } while (uvalue && (place < 20));
- if (place == 20)
- place--;
- convert[place] = 0;
-
- zpadlen = max - place;
- spadlen = min - MAX(max, place) - (signvalue ? 1 : 0);
- if (zpadlen < 0)
- zpadlen = 0;
- if (spadlen < 0)
- spadlen = 0;
- if (flags & DP_F_ZERO) {
- zpadlen = MAX(zpadlen, spadlen);
- spadlen = 0;
- }
- if (flags & DP_F_MINUS)
- spadlen = -spadlen; /* Left Justifty */
-
-#ifdef DEBUG_SNPRINTF
- printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
- zpadlen, spadlen, min, max, place);
-#endif
-
- /* Spaces */
- while (spadlen > 0) {
- dopr_outch(buffer, currlen, maxlen, ' ');
- --spadlen;
- }
-
- /* Sign */
- if (signvalue)
- dopr_outch(buffer, currlen, maxlen, signvalue);
-
- /* Zeros */
- if (zpadlen > 0) {
- while (zpadlen > 0) {
- dopr_outch(buffer, currlen, maxlen, '0');
- --zpadlen;
- }
- }
- /* Digits */
- while (place > 0)
- dopr_outch(buffer, currlen, maxlen, convert[--place]);
-
- /* Left Justified spaces */
- while (spadlen < 0) {
- dopr_outch(buffer, currlen, maxlen, ' ');
- ++spadlen;
- }
-}
-
-static LDOUBLE
-abs_val(LDOUBLE value)
-{
- LDOUBLE result = value;
-
- if (value < 0)
- result = -value;
-
- return result;
-}
-
-static LDOUBLE
-pow10(int exp)
-{
- LDOUBLE result = 1;
-
- while (exp) {
- result *= 10;
- exp--;
- }
-
- return result;
-}
-
-static long
-round(LDOUBLE value)
-{
- long intpart;
-
- intpart = (long) value;
- value = value - intpart;
- if (value >= 0.5)
- intpart++;
-
- return intpart;
-}
-
-static void
-fmtfp(char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
- int min, int max, int flags)
-{
- int signvalue = 0;
- LDOUBLE ufvalue;
- char iconvert[20];
- char fconvert[20];
- int iplace = 0;
- int fplace = 0;
- int padlen = 0; /* amount to pad */
- int zpadlen = 0;
- int caps = 0;
- long intpart;
- long fracpart;
-
- /* AIX manpage says the default is 0, but Solaris says the default is
- * 6, and sprintf on AIX defaults to 6 */
- if (max < 0)
- max = 6;
-
- ufvalue = abs_val(fvalue);
-
- if (fvalue < 0)
- signvalue = '-';
- else if (flags & DP_F_PLUS) /* Do a sign (+/i) */
- signvalue = '+';
- else if (flags & DP_F_SPACE)
- signvalue = ' ';
-
-#if 0
- if (flags & DP_F_UP)
- caps = 1; /* Should characters be upper case? */
-#endif
-
- intpart = (long) ufvalue;
-
- /* Sorry, we only support 9 digits past the decimal because of our
- * conversion method */
- if (max > 9)
- max = 9;
-
- /* We "cheat" by converting the fractional part to integer by
- * multiplying by a factor of 10 */
- fracpart = round((pow10(max)) * (ufvalue - intpart));
-
- if (fracpart >= pow10(max)) {
- intpart++;
- fracpart -= pow10(max);
- }
-#ifdef DEBUG_SNPRINTF
- printf("fmtfp: %g %d.%d min=%d max=%d\n",
- (double) fvalue, intpart, fracpart, min, max);
-#endif
-
- /* Convert integer part */
- do {
- iconvert[iplace++] =
- (caps ? "0123456789ABCDEF"
- : "0123456789abcdef")[intpart % 10];
- intpart = (intpart / 10);
- } while (intpart && (iplace < 20));
- if (iplace == 20)
- iplace--;
- iconvert[iplace] = 0;
-
- /* Convert fractional part */
- do {
- fconvert[fplace++] =
- (caps ? "0123456789ABCDEF"
- : "0123456789abcdef")[fracpart % 10];
- fracpart = (fracpart / 10);
- } while (fracpart && (fplace < 20));
- if (fplace == 20)
- fplace--;
- fconvert[fplace] = 0;
-
- /* -1 for decimal point, another -1 if we are printing a sign */
- padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
- zpadlen = max - fplace;
- if (zpadlen < 0)
- zpadlen = 0;
- if (padlen < 0)
- padlen = 0;
- if (flags & DP_F_MINUS)
- padlen = -padlen; /* Left Justifty */
-
- if ((flags & DP_F_ZERO) && (padlen > 0)) {
- if (signvalue) {
- dopr_outch(buffer, currlen, maxlen, signvalue);
- --padlen;
- signvalue = 0;
- }
- while (padlen > 0) {
- dopr_outch(buffer, currlen, maxlen, '0');
- --padlen;
- }
- }
- while (padlen > 0) {
- dopr_outch(buffer, currlen, maxlen, ' ');
- --padlen;
- }
- if (signvalue)
- dopr_outch(buffer, currlen, maxlen, signvalue);
-
- while (iplace > 0)
- dopr_outch(buffer, currlen, maxlen, iconvert[--iplace]);
-
-
-#ifdef DEBUG_SNPRINTF
- printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen);
-#endif
-
- /*
- * Decimal point. This should probably use locale to find the correct
- * char to print out.
- */
- if (max > 0) {
- dopr_outch(buffer, currlen, maxlen, '.');
-
- while (fplace > 0)
- dopr_outch(buffer, currlen, maxlen, fconvert[--fplace]);
- }
- while (zpadlen > 0) {
- dopr_outch(buffer, currlen, maxlen, '0');
- --zpadlen;
- }
-
- while (padlen < 0) {
- dopr_outch(buffer, currlen, maxlen, ' ');
- ++padlen;
- }
-}
-
-static void
-dopr_outch(char *buffer, size_t *currlen, size_t maxlen, int c)
-{
- if (*currlen < maxlen)
- buffer[(*currlen)++] = (char)c;
-}
-
-int
-vsnprintf(char *str, size_t count, const char *fmt, va_list args)
-{
- size_t retlen;
-
- str[0] = 0;
- dopr(str, count, &retlen, fmt, args);
- return (retlen);
-}
-
-/* VARARGS3 */
-int
-snprintf(char *str, size_t count, const char *fmt, ...)
-{
- va_list ap;
- int rv;
-
- va_start(ap, fmt);
- rv = vsnprintf(str, count, fmt, ap);
- va_end(ap);
- return (rv);
-}
-
-
-#ifdef TEST_SNPRINTF
-#ifndef LONG_STRING
-#define LONG_STRING 1024
-#endif
-
-int
-main(int argc, char *argv[])
-{
- char buf1[LONG_STRING];
- char buf2[LONG_STRING];
- char *fp_fmt[] = {
- "%-1.5f",
- "%1.5f",
- "%123.9f",
- "%10.5f",
- "% 10.5f",
- "%+22.9f",
- "%+4.9f",
- "%01.3f",
- "%4f",
- "%3.1f",
- "%3.2f",
- "%.0f",
- "%.1f",
- NULL
- };
- double fp_nums[] = {
- -1.5, 134.21, 91340.2, 341.1234, 0203.9,
- 0.96, 0.996, 0.9996, 1.996, 4.136,
- 0
- };
- char *int_fmt[] = {
- "%-1.5d",
- "%1.5d",
- "%123.9d",
- "%5.5d",
- "%10.5d",
- "% 10.5d",
- "%+22.33d",
- "%01.3d",
- "%4d",
-#if HAVE_LONG_LONG
- "%12lld",
-#endif
- NULL
- };
- LLONG int_nums[] = {
- -1, 134, 91340, 341, 0203,
- 4294967290,
- 4294967297,
- 0
- };
- int x, y;
- int fail = 0;
- int num = 0;
- int len;
-
- printf("Testing snprintf format codes against system sprintf...\n");
-
- for (x = 0; fp_fmt[x] != NULL; x++) {
- printf("testing %s\n", fp_fmt[x]);
- for (y = 0; fp_nums[y] != 0; y++) {
- snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]);
- sprintf(buf2, fp_fmt[x], fp_nums[y]);
- if (strcmp(buf1, buf2)) {
- printf("snprintf doesn't match Format: %s\n",
- fp_fmt[x]);
- printf("\tsnprintf = %s\n\tsprintf = %s\n",
- buf1, buf2);
- fail++;
- }
- num++;
- }
- }
-
- for (x = 0; int_fmt[x] != NULL; x++) {
- printf("testing %s\n", int_fmt[x]);
- for (y = 0; int_nums[y] != 0; y++) {
- len = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]);
-printf("got %d >%s< (%d)\n", len, buf1, (int)strlen(buf1));
- sprintf(buf2, int_fmt[x], int_nums[y]);
- if (strcmp(buf1, buf2)) {
- printf("snprintf doesn't match Format: %s\n",
- int_fmt[x]);
- printf("\tsnprintf = %s\n\tsprintf = %s\n",
- buf1, buf2);
- fail++;
- }
- num++;
- }
- }
-
- printf("%d tests failed out of %d.\n", fail, num);
- exit(0);
-}
-#endif /* TEST_SNPRINTF */
diff --git a/pkgtools/libnbcompat/files/src2nbcompat b/pkgtools/libnbcompat/files/src2nbcompat
deleted file mode 100755
index ddfceff182d..00000000000
--- a/pkgtools/libnbcompat/files/src2nbcompat
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: src2nbcompat,v 1.8 2005/02/04 00:43:42 jlam Exp $
-#
-# Copyright (c) 2003 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-if [ $# -lt 2 ]; then echo "src2nbcompat src dest"; exit 1; fi
-
-src=$1
-dest=$2
-
-case $src in
-/*) ;;
-*) src=`pwd`/$src ;;
-esac
-
-case $dest in
-/*) ;;
-*) dest=`pwd`/$dest ;;
-esac
-
-make_dir()
-{
- _d="$1"
- _destdir="$2"
- _newd=${3-`echo $_d | sed 's,^\./,,'`}
- case $_newd in
- *CVS)
- ;;
- .)
- ;;
- *)
- mkdir -p $_destdir/$_newd
- ;;
- esac
-}
-
-copy_file()
-{
- _f="$1"
- _destdir="$2"
- _newf=${3-`echo $_f | sed 's,^\./,,'`}
- case $_newf in
- *CVS/*)
- # Skip copying over any CVS information.
- ;;
- *Makefile|*Makefile.inc)
- # Skip copying over the Makefiles since we'll be using
- # a GNU autoconf-based build infrastructure.
- ;;
- *.sh)
- # Assume shell scripts will require variable substitution
- # by the GNU configure script.
- #
- cp $_f $_destdir/$_newf.in
- ;;
- *.[ch])
- # Add "#include <nbcompat.h>" before the first system
- # header inclusion. Protect all system headers with
- # "#if HAVE_FOO_H ... #endif" guards.
- #
- gawk ' \
- BEGIN { config = 0; nbcompat = 0 } \
- /^#[ ]*if[ ]+HAVE_NBTOOL_CONFIG_H/ { \
- if (config == 0) { \
- print "#if HAVE_CONFIG_H"; \
- print "#include \"config.h\""; \
- print "#endif"; \
- config = 1; \
- } \
- } \
- /^#[ ]*include[ ]+/ { \
- if (config == 0) { \
- print "#if HAVE_CONFIG_H"; \
- print "#include \"config.h\""; \
- print "#endif"; \
- config = 1; \
- } \
- } \
- /^#[ ]*include[ ]+<[^ ]*>/ { \
- guard = toupper(gensub("[-/.]", "_", "g", gensub("#[ ]*include[ ]+<([^ ]*)>", "HAVE_\\1", "g"))); \
- if (nbcompat == 0) { \
- print "#include <nbcompat.h>"; \
- nbcompat = 1; \
- }; \
- print "#if " guard; \
- print $0; \
- print "#endif"; \
- next; \
- } \
- { print } \
- ' $_f > $_destdir/$_newf.tmp
- if [ -f $_destdir/$_newf ] && \
- diff -q -I "\$NetBSD.*\$" $_destdir/$_newf $_destdir/$_newf.tmp >/dev/null; then
- rm -f $_destdir/$_newf.tmp
- else
- rm -f $_destdir/$_newf
- mv $_destdir/$_newf.tmp $_destdir/$_newf
- fi
- ;;
- *.[1-9])
- # Copy the manpage over, and generate the catpage.
- cp $_newf $_destdir/$_newf.tmp
- if [ -f $_destdir/$_newf ] && \
- diff -q -I "\$NetBSD.*\$" $_destdir/$_newf $_destdir/$_newf.tmp >/dev/null; then
- rm -f $_destdir/$_newf.tmp
- else
- mv -f $_destdir/$_newf.tmp $_destdir/$_newf
- _catf=`echo $_newf | sed 's,\.\([1-9]\),.cat\1,'`
- nroff -mandoc $_newf > $_destdir/$_catf
- fi
- ;;
- *)
- # Everything else just gets copied verbatim.
- cp $_newf $_destdir/$_newf.tmp
- if [ -f $_destdir/$_newf ] && \
- diff -q -I "\$NetBSD.*\$" $_destdir/$_newf $_destdir/$_newf.tmp >/dev/null; then
- rm -f $_destdir/$_newf.tmp
- else
- mv -f $_destdir/$_newf.tmp $_destdir/$_newf
- fi
- ;;
- esac
-}
-
-if [ -f "$src" ]; then
- srcdir=`dirname $src`
- destdir=`dirname $dest`
-else
- srcdir="$src"
- destdir="$dest"
-fi
-
-echo "Preparing directory $destdir"
-mkdir -p $destdir
-
-if [ -f "$src" ]; then
- echo "Copying $src to $dest"
- cd $srcdir
- copy_file `basename $src` $destdir `basename $dest`
-else
- echo "Copying files and directories to $destdir"
- cd $srcdir
- find . -type d -print |
- while read d; do
- make_dir $d $destdir
- done
- find . \! -type d -print |
- while read f; do
- copy_file $f $destdir
- done
-fi
diff --git a/pkgtools/libnbcompat/files/statvfs.c b/pkgtools/libnbcompat/files/statvfs.c
deleted file mode 100644
index d132dd15756..00000000000
--- a/pkgtools/libnbcompat/files/statvfs.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* $NetBSD: statvfs.c,v 1.3 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Christos Zoulas.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/string.h>
-#include <nbcompat/statvfs.h>
-
-static void fs2vfs(struct statvfs *vfs, const struct statfs *sfs);
-
-static void
-fs2vfs(struct statvfs *vfs, const struct statfs *sfs)
-{
- vfs->f_flag = 0;
- if (sfs->f_flags & MNT_RDONLY)
- vfs->f_flag |= ST_RDONLY;
- if (sfs->f_flags & MNT_NOSUID)
- vfs->f_flag |= ST_NOSUID;
-
-#if HAVE_STRUCT_STATFS_F_FSIZE
- vfs->f_bsize = sfs->f_fsize
-#else
- vfs->f_bsize = sfs->f_bsize;
-#endif
- vfs->f_frsize = sfs->f_bsize;
-#if HAVE_STRUCT_STATFS_F_IOSIZE
- vfs->f_iosize = sfs->f_iosize;
-#else
- vfs->f_iosize = sfs->f_bsize;
-#endif
- vfs->f_blocks = sfs->f_blocks;
- vfs->f_bfree = sfs->f_bfree;
- vfs->f_bavail = sfs->f_bavail;
- vfs->f_bresvd = 0; /* XXX */
-
- vfs->f_files = sfs->f_files;
- vfs->f_ffree = sfs->f_ffree;
- /*
- * f_favail is supposed to only be free nodes available to non-root
- * but that info isn't available via statfs(). Just fudge it by
- * assigning it f_ffree as well, which is the total free nodes.
- */
- vfs->f_favail = sfs->f_ffree;
- vfs->f_fresvd = 0; /* XXX */
-
- vfs->f_syncreads = 0; /* XXX */
- vfs->f_syncwrites= 0; /* XXX */
- vfs->f_asyncreads = 0; /* XXX */
- vfs->f_asyncwrites= 0; /* XXX */
-
- (void) memcpy(&vfs->f_fsidx, &sfs->f_fsid, sizeof(fsid_t));
- vfs->f_fsid = sfs->f_fsid.val[0];
-
-#if HAVE_STRUCT_STATFS_F_IOSIZE
- vfs->f_namemax = sfs->f_name_max;
-#else
- vfs->f_namemax = VFS_MNAMELEN; /* XXX */
-#endif
- vfs->f_owner = 0; /* XXX */
- vfs->f_fstypename[0] = '\0'; /* XXX */
- vfs->f_mntonname[0] = '\0'; /* XXX */
- vfs->f_mntfromname[0] = '\0'; /* XXX */
-}
-
-int
-statvfs(const char *path, struct statvfs *vfs)
-{
- struct statfs sfs;
-
- if (statfs(path, &sfs) == -1)
- return -1;
- fs2vfs(vfs, &sfs);
- return 0;
-}
-
-int
-fstatvfs(int fd, struct statvfs *vfs)
-{
- struct statfs sfs;
-
- if (fstatfs(fd, &sfs) == -1)
- return -1;
-
- fs2vfs(vfs, &sfs);
- return 0;
-}
diff --git a/pkgtools/libnbcompat/files/strdup.c b/pkgtools/libnbcompat/files/strdup.c
deleted file mode 100644
index a756ba2c7f1..00000000000
--- a/pkgtools/libnbcompat/files/strdup.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* $NetBSD: strdup.c,v 1.4 2004/08/23 03:32:12 jlam Exp $ */
-
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: strdup.c,v 1.4 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/stdlib.h>
-#include <nbcompat/string.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(strdup,_strdup)
-#endif
-#endif
-
-char *
-strdup(str)
- const char *str;
-{
- size_t len;
- char *copy;
-
- _DIAGASSERT(str != NULL);
-
- len = strlen(str) + 1;
- if (!(copy = malloc(len)))
- return (NULL);
- memcpy(copy, str, len);
- return (copy);
-}
diff --git a/pkgtools/libnbcompat/files/strerror.c b/pkgtools/libnbcompat/files/strerror.c
deleted file mode 100644
index c284ad04d27..00000000000
--- a/pkgtools/libnbcompat/files/strerror.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* $NetBSD: strerror.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
-
-#include <nbcompat.h>
-#include <nbcompat/string.h>
-
-char *
-strerror(int n)
-{
- static char msg[] = "Unknown error (1234567890)";
-
- extern int sys_nerr;
- extern char *sys_errlist[];
-
- if (n >= sys_nerr) {
- snprintf(msg, sizeof(msg), "Unknown error (%d)", n);
- return(msg);
- } else {
- return(sys_errlist[n]);
- }
-}
diff --git a/pkgtools/libnbcompat/files/strlcat.c b/pkgtools/libnbcompat/files/strlcat.c
deleted file mode 100644
index dd10bb0c77a..00000000000
--- a/pkgtools/libnbcompat/files/strlcat.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $NetBSD: strlcat.c,v 1.5 2004/08/31 17:55:17 jlam Exp $ */
-/* $OpenBSD: strlcat.c,v 1.10 2003/04/12 21:56:39 millert Exp $ */
-
-/*
- * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
- * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strlcat.c,v 1.5 2004/08/31 17:55:17 jlam Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef _LIBC
-#undef _LIBC
-#endif
-
-#ifdef _LIBC
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-#include <nbcompat/assert.h>
-#include <nbcompat/string.h>
-
-#ifdef _LIBC
-# ifdef __weak_alias
-__weak_alias(strlcat, _strlcat)
-# endif
-#endif
-
-#if !HAVE_STRLCAT
-/*
- * Appends src to string dst of size siz (unlike strncat, siz is the
- * full size of dst, not space left). At most siz-1 characters
- * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
- * Returns strlen(src) + MIN(siz, strlen(initial dst)).
- * If retval >= siz, truncation occurred.
- */
-size_t
-#ifdef _LIBC
-_strlcat(dst, src, siz)
-#else
-strlcat(dst, src, siz)
-#endif
- char *dst;
- const char *src;
- size_t siz;
-{
- char *d = dst;
- const char *s = src;
- size_t n = siz;
- size_t dlen;
-
- _DIAGASSERT(dst != NULL);
- _DIAGASSERT(src != NULL);
-
- /* Find the end of dst and adjust bytes left but don't go past end */
- while (n-- != 0 && *d != '\0')
- d++;
- dlen = d - dst;
- n = siz - dlen;
-
- if (n == 0)
- return(dlen + strlen(s));
- while (*s != '\0') {
- if (n != 1) {
- *d++ = *s;
- n--;
- }
- s++;
- }
- *d = '\0';
-
- return(dlen + (s - src)); /* count does not include NUL */
-}
-#endif
diff --git a/pkgtools/libnbcompat/files/strlcpy.c b/pkgtools/libnbcompat/files/strlcpy.c
deleted file mode 100644
index 75291bb6826..00000000000
--- a/pkgtools/libnbcompat/files/strlcpy.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* $NetBSD: strlcpy.c,v 1.5 2004/08/31 17:55:17 jlam Exp $ */
-/* $OpenBSD: strlcpy.c,v 1.7 2003/04/12 21:56:39 millert Exp $ */
-
-/*
- * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
- * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strlcpy.c,v 1.5 2004/08/31 17:55:17 jlam Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef _LIBC
-#undef _LIBC
-#endif
-
-#ifdef _LIBC
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-#include <nbcompat/assert.h>
-#include <nbcompat/string.h>
-
-#ifdef _LIBC
-# ifdef __weak_alias
-__weak_alias(strlcpy, _strlcpy)
-# endif
-#endif
-
-#if !HAVE_STRLCPY
-/*
- * Copy src to string dst of size siz. At most siz-1 characters
- * will be copied. Always NUL terminates (unless siz == 0).
- * Returns strlen(src); if retval >= siz, truncation occurred.
- */
-size_t
-#ifdef _LIBC
-_strlcpy(dst, src, siz)
-#else
-strlcpy(dst, src, siz)
-#endif
- char *dst;
- const char *src;
- size_t siz;
-{
- char *d = dst;
- const char *s = src;
- size_t n = siz;
-
- _DIAGASSERT(dst != NULL);
- _DIAGASSERT(src != NULL);
-
- /* Copy as many bytes as will fit */
- if (n != 0 && --n != 0) {
- do {
- if ((*d++ = *s++) == 0)
- break;
- } while (--n != 0);
- }
-
- /* Not enough room in dst, add NUL and traverse rest of src */
- if (n == 0) {
- if (siz != 0)
- *d = '\0'; /* NUL-terminate dst */
- while (*s++)
- ;
- }
-
- return(s - src - 1); /* count does not include NUL */
-}
-#endif
diff --git a/pkgtools/libnbcompat/files/strmode.c b/pkgtools/libnbcompat/files/strmode.c
deleted file mode 100644
index 372fb2ed7df..00000000000
--- a/pkgtools/libnbcompat/files/strmode.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* $NetBSD: strmode.c,v 1.5 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)strmode.c 8.3 (Berkeley) 8/15/94";
-#else
-__RCSID("$NetBSD: strmode.c,v 1.5 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-#include <nbcompat/stat.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/unistd.h>
-
-void
-strmode(mode, p)
- mode_t mode;
- char *p;
-{
-
- _DIAGASSERT(p != NULL);
-
- /* print type */
- switch (mode & S_IFMT) {
- case S_IFDIR: /* directory */
- *p++ = 'd';
- break;
- case S_IFCHR: /* character special */
- *p++ = 'c';
- break;
- case S_IFBLK: /* block special */
- *p++ = 'b';
- break;
- case S_IFREG: /* regular */
-#ifdef S_ARCH2
- if ((mode & S_ARCH2) != 0) {
- *p++ = 'A';
- } else if ((mode & S_ARCH1) != 0) {
- *p++ = 'a';
- } else {
-#endif
- *p++ = '-';
-#ifdef S_ARCH2
- }
-#endif
- break;
- case S_IFLNK: /* symbolic link */
- *p++ = 'l';
- break;
-#ifdef S_IFSOCK
- case S_IFSOCK: /* socket */
- *p++ = 's';
- break;
-#endif
-#ifdef S_IFIFO
- case S_IFIFO: /* fifo */
- *p++ = 'p';
- break;
-#endif
-#ifdef S_IFWHT
- case S_IFWHT: /* whiteout */
- *p++ = 'w';
- break;
-#endif
-#ifdef S_IFDOOR
- case S_IFDOOR: /* door */
- *p++ = 'D';
- break;
-#endif
- default: /* unknown */
- *p++ = '?';
- break;
- }
- /* usr */
- if (mode & S_IRUSR)
- *p++ = 'r';
- else
- *p++ = '-';
- if (mode & S_IWUSR)
- *p++ = 'w';
- else
- *p++ = '-';
- switch (mode & (S_IXUSR | S_ISUID)) {
- case 0:
- *p++ = '-';
- break;
- case S_IXUSR:
- *p++ = 'x';
- break;
- case S_ISUID:
- *p++ = 'S';
- break;
- case S_IXUSR | S_ISUID:
- *p++ = 's';
- break;
- }
- /* group */
- if (mode & S_IRGRP)
- *p++ = 'r';
- else
- *p++ = '-';
- if (mode & S_IWGRP)
- *p++ = 'w';
- else
- *p++ = '-';
- switch (mode & (S_IXGRP | S_ISGID)) {
- case 0:
- *p++ = '-';
- break;
- case S_IXGRP:
- *p++ = 'x';
- break;
- case S_ISGID:
- *p++ = 'S';
- break;
- case S_IXGRP | S_ISGID:
- *p++ = 's';
- break;
- }
- /* other */
- if (mode & S_IROTH)
- *p++ = 'r';
- else
- *p++ = '-';
- if (mode & S_IWOTH)
- *p++ = 'w';
- else
- *p++ = '-';
- switch (mode & (S_IXOTH | S_ISVTX)) {
- case 0:
- *p++ = '-';
- break;
- case S_IXOTH:
- *p++ = 'x';
- break;
- case S_ISVTX:
- *p++ = 'T';
- break;
- case S_IXOTH | S_ISVTX:
- *p++ = 't';
- break;
- }
- *p++ = ' '; /* will be a '+' if ACL's implemented */
- *p = '\0';
-}
diff --git a/pkgtools/libnbcompat/files/strsep.c b/pkgtools/libnbcompat/files/strsep.c
deleted file mode 100644
index cd5e4589144..00000000000
--- a/pkgtools/libnbcompat/files/strsep.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $NetBSD: strsep.c,v 1.4 2004/08/23 03:32:12 jlam Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: strsep.c,v 1.4 2004/08/23 03:32:12 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#include <nbcompat/string.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(strsep,_strsep)
-#endif
-#endif
-
-#if !HAVE_STRSEP
-/*
- * Get next token from string *stringp, where tokens are possibly-empty
- * strings separated by characters from delim.
- *
- * Writes NULs into the string at *stringp to end tokens.
- * delim need not remain constant from call to call.
- * On return, *stringp points past the last NUL written (if there might
- * be further tokens), or is NULL (if there are definitely no more tokens).
- *
- * If *stringp is NULL, strsep returns NULL.
- */
-char *
-strsep(stringp, delim)
- char **stringp;
- const char *delim;
-{
- char *s;
- const char *spanp;
- int c, sc;
- char *tok;
-
- _DIAGASSERT(stringp != NULL);
- _DIAGASSERT(delim != NULL);
-
- if ((s = *stringp) == NULL)
- return (NULL);
- for (tok = s;;) {
- c = *s++;
- spanp = delim;
- do {
- if ((sc = *spanp++) == c) {
- if (c == 0)
- s = NULL;
- else
- s[-1] = 0;
- *stringp = s;
- return (tok);
- }
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
-#endif
diff --git a/pkgtools/libnbcompat/files/strtoll.c b/pkgtools/libnbcompat/files/strtoll.c
deleted file mode 100644
index 799f881aaa8..00000000000
--- a/pkgtools/libnbcompat/files/strtoll.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* $NetBSD: strtoll.c,v 1.7 2004/08/31 17:55:17 jlam Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "from: @(#)strtoq.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: strtoll.c,v 1.7 2004/08/31 17:55:17 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef _LIBC
-#undef _LIBC
-#endif
-
-#ifdef _LIBC
-#include "namespace.h"
-#endif
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <nbcompat/limits.h>
-#include <nbcompat/stdlib.h>
-
-#ifdef _LIBC
-#ifdef __weak_alias
-__weak_alias(strtoll, _strtoll)
-#endif
-#endif
-
-#if !HAVE_STRTOLL
-/*
- * Convert a string to a long long integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-/* LONGLONG */
-long long int
-#ifdef _LIBC
-_strtoll(nptr, endptr, base)
-#else
-strtoll(nptr, endptr, base)
-#endif
- const char *nptr;
- char **endptr;
- int base;
-{
- const char *s;
- /* LONGLONG */
- long long int acc, cutoff;
- int c;
- int neg, any, cutlim;
-
- _DIAGASSERT(nptr != NULL);
- /* endptr may be NULL */
-
-#ifdef __GNUC__
- /* This outrageous construct just to shut up a GCC warning. */
- (void) &acc; (void) &cutoff;
-#endif
-
- /*
- * Skip white space and pick up leading +/- sign if any.
- * If base is 0, allow 0x for hex and 0 for octal, else
- * assume decimal; if base is already 16, allow 0x.
- */
- s = nptr;
- do {
- c = (unsigned char) *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else {
- neg = 0;
- if (c == '+')
- c = *s++;
- }
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
-
- /*
- * Compute the cutoff value between legal numbers and illegal
- * numbers. That is the largest legal value, divided by the
- * base. An input number that is greater than this value, if
- * followed by a legal input character, is too big. One that
- * is equal to this value may be valid or not; the limit
- * between valid and invalid numbers is then based on the last
- * digit. For instance, if the range for long longs is
- * [-9223372036854775808..9223372036854775807] and the input base
- * is 10, cutoff will be set to 922337203685477580 and cutlim to
- * either 7 (neg==0) or 8 (neg==1), meaning that if we have
- * accumulated a value > 922337203685477580, or equal but the
- * next digit is > 7 (or 8), the number is too big, and we will
- * return a range error.
- *
- * Set any if any `digits' consumed; make it negative to indicate
- * overflow.
- */
- cutoff = neg ? LLONG_MIN : LLONG_MAX;
- cutlim = (int)(cutoff % base);
- cutoff /= base;
- if (neg) {
- if (cutlim > 0) {
- cutlim -= base;
- cutoff += 1;
- }
- cutlim = -cutlim;
- }
- for (acc = 0, any = 0;; c = (unsigned char) *s++) {
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0)
- continue;
- if (neg) {
- if (acc < cutoff || (acc == cutoff && c > cutlim)) {
- any = -1;
- acc = LLONG_MIN;
- errno = ERANGE;
- } else {
- any = 1;
- acc *= base;
- acc -= c;
- }
- } else {
- if (acc > cutoff || (acc == cutoff && c > cutlim)) {
- any = -1;
- acc = LLONG_MAX;
- errno = ERANGE;
- } else {
- any = 1;
- acc *= base;
- acc += c;
- }
- }
- }
- if (endptr != 0)
- /* LINTED interface specification */
- *endptr = (char *)(any ? s - 1 : nptr);
- return (acc);
-}
-#endif
diff --git a/pkgtools/libnbcompat/files/unsetenv.c b/pkgtools/libnbcompat/files/unsetenv.c
deleted file mode 100644
index a4e8fad0e2c..00000000000
--- a/pkgtools/libnbcompat/files/unsetenv.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $NetBSD: unsetenv.c,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*
- * Written by Klaus Klein <kleink@NetBSD.org>, April 1, 2003.
- * Public domain.
- */
-
-#if 0
-#define __LIBC12_SOURCE__
-#endif
-
-#include "__unsetenv13.c"
diff --git a/pkgtools/libnbcompat/files/unvis.c b/pkgtools/libnbcompat/files/unvis.c
deleted file mode 100644
index b392309e995..00000000000
--- a/pkgtools/libnbcompat/files/unvis.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/* $NetBSD: unvis.c,v 1.11 2004/12/04 23:31:40 grant Exp $ */
-
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: unvis.c,v 1.11 2004/12/04 23:31:40 grant Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#define __LIBC12_SOURCE__
-#endif
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/ctype.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/vis.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(strunvis,_strunvis)
-__weak_alias(unvis,_unvis)
-#endif
-#endif
-
-#if 0
-#ifdef __warn_references
-__warn_references(unvis,
- "warning: reference to compatibility unvis(); include <vis.h> for correct reference")
-#endif
-#endif
-
-/*
- * decode driven by state machine
- */
-#define S_GROUND 0 /* haven't seen escape char */
-#define S_START 1 /* start decoding special sequence */
-#define S_META 2 /* metachar started (M) */
-#define S_META1 3 /* metachar more, regular char (-) */
-#define S_CTRL 4 /* control char started (^) */
-#define S_OCTAL2 5 /* octal digit 2 */
-#define S_OCTAL3 6 /* octal digit 3 */
-#define S_HEX1 7 /* hex digit */
-#define S_HEX2 8 /* hex digit 2 */
-
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10))
-
-int
-unvis(cp, c, astate, flag)
- char *cp;
- int c;
- int *astate, flag;
-{
- return __nbcompat_unvis13(cp, (int)c, astate, flag);
-}
-
-/*
- * unvis - decode characters previously encoded by vis
- */
-int
-__nbcompat_unvis13(cp, c, astate, flag)
- char *cp;
- int c;
- int *astate, flag;
-{
-
- _DIAGASSERT(cp != NULL);
- _DIAGASSERT(astate != NULL);
-
- if (flag & UNVIS_END) {
- if (*astate == S_OCTAL2 || *astate == S_OCTAL3
- || *astate == S_HEX2) {
- *astate = S_GROUND;
- return (UNVIS_VALID);
- }
- return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
- }
-
- switch (*astate) {
-
- case S_GROUND:
- *cp = 0;
- if (c == '\\') {
- *astate = S_START;
- return (0);
- }
- if ((flag & VIS_HTTPSTYLE) && c == '%') {
- *astate = S_HEX1;
- return (0);
- }
- *cp = c;
- return (UNVIS_VALID);
-
- case S_START:
- switch(c) {
- case '\\':
- *cp = c;
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- *cp = (c - '0');
- *astate = S_OCTAL2;
- return (0);
- case 'M':
- *cp = (char)0200;
- *astate = S_META;
- return (0);
- case '^':
- *astate = S_CTRL;
- return (0);
- case 'n':
- *cp = '\n';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'r':
- *cp = '\r';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'b':
- *cp = '\b';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'a':
- *cp = '\007';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'v':
- *cp = '\v';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 't':
- *cp = '\t';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'f':
- *cp = '\f';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 's':
- *cp = ' ';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'E':
- *cp = '\033';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case '\n':
- /*
- * hidden newline
- */
- *astate = S_GROUND;
- return (UNVIS_NOCHAR);
- case '$':
- /*
- * hidden marker
- */
- *astate = S_GROUND;
- return (UNVIS_NOCHAR);
- }
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
-
- case S_META:
- if (c == '-')
- *astate = S_META1;
- else if (c == '^')
- *astate = S_CTRL;
- else {
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
- }
- return (0);
-
- case S_META1:
- *astate = S_GROUND;
- *cp |= c;
- return (UNVIS_VALID);
-
- case S_CTRL:
- if (c == '?')
- *cp |= 0177;
- else
- *cp |= c & 037;
- *astate = S_GROUND;
- return (UNVIS_VALID);
-
- case S_OCTAL2: /* second possible octal digit */
- if (isoctal(c)) {
- /*
- * yes - and maybe a third
- */
- *cp = (*cp << 3) + (c - '0');
- *astate = S_OCTAL3;
- return (0);
- }
- /*
- * no - done with current sequence, push back passed char
- */
- *astate = S_GROUND;
- return (UNVIS_VALIDPUSH);
-
- case S_OCTAL3: /* third possible octal digit */
- *astate = S_GROUND;
- if (isoctal(c)) {
- *cp = (*cp << 3) + (c - '0');
- return (UNVIS_VALID);
- }
- /*
- * we were done, push back passed char
- */
- return (UNVIS_VALIDPUSH);
- case S_HEX1:
- if (isxdigit(c)) {
- *cp = xtod(c);
- *astate = S_HEX2;
- return (0);
- }
- /*
- * no - done with current sequence, push back passed char
- */
- *astate = S_GROUND;
- return (UNVIS_VALIDPUSH);
- case S_HEX2:
- *astate = S_GROUND;
- if (isxdigit(c)) {
- *cp = xtod(c) | (*cp << 4);
- return (UNVIS_VALID);
- }
- return (UNVIS_VALIDPUSH);
- default:
- /*
- * decoder in unknown state - (probably uninitialized)
- */
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
- }
-}
-
-/*
- * strunvis - decode src into dst
- *
- * Number of chars decoded into dst is returned, -1 on error.
- * Dst is null terminated.
- */
-
-int
-strunvisx(dst, src, flag)
- char *dst;
- const char *src;
- int flag;
-{
- char c;
- char *start = dst;
- int state = 0;
-
- _DIAGASSERT(src != NULL);
- _DIAGASSERT(dst != NULL);
-
- while ((c = *src++) != '\0') {
- again:
- switch (__nbcompat_unvis13(dst, c, &state, flag)) {
- case UNVIS_VALID:
- dst++;
- break;
- case UNVIS_VALIDPUSH:
- dst++;
- goto again;
- case 0:
- case UNVIS_NOCHAR:
- break;
- default:
- return (-1);
- }
- }
- if (__nbcompat_unvis13(dst, c, &state, UNVIS_END) == UNVIS_VALID)
- dst++;
- *dst = '\0';
- return (dst - start);
-}
-
-int
-strunvis(dst, src)
- char *dst;
- const char *src;
-{
- return strunvisx(dst, src, 0);
-}
diff --git a/pkgtools/libnbcompat/files/usleep.c b/pkgtools/libnbcompat/files/usleep.c
deleted file mode 100644
index 6c7ce86d993..00000000000
--- a/pkgtools/libnbcompat/files/usleep.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $NetBSD: usleep.c,v 1.3 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 1999-2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-
-int
-usleep(unsigned int usec)
-{
-#if HAVE_SELECT
- struct timeval tv;
-
- tv.tv_sec = 0;
- tv.tv_usec = usec;
- return (select(1, NULL, NULL, NULL, &tv));
-#else
- return (poll(NULL, 0, usec / 1000);
-#endif
-}
diff --git a/pkgtools/libnbcompat/files/utimes.c b/pkgtools/libnbcompat/files/utimes.c
deleted file mode 100644
index 3b66e43860d..00000000000
--- a/pkgtools/libnbcompat/files/utimes.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* $NetBSD: utimes.c,v 1.2 2004/08/23 03:32:13 jlam Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Your OS is old, eh?
- * Emulate utimes(2) using utime(2), but losing sub-second granularity.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/unistd.h>
-#if HAVE_UTIME_H
-#include <utime.h>
-#endif
-
-int
-utimes(const char *path, const struct timeval *times)
-{
- if (times != NULL) {
- struct utimbuf ut;
-
- ut.actime = times[0].tv_sec;
- ut.modtime = times[1].tv_sec;
-
- return (utime(path, &ut));
- }
-
- return (utime(path, NULL));
-}
diff --git a/pkgtools/libnbcompat/files/vis.c b/pkgtools/libnbcompat/files/vis.c
deleted file mode 100644
index f3b852f6d9c..00000000000
--- a/pkgtools/libnbcompat/files/vis.c
+++ /dev/null
@@ -1,380 +0,0 @@
-/* $NetBSD: vis.c,v 1.9 2005/11/18 09:03:06 grant Exp $ */
-
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.9 2005/11/18 09:03:06 grant Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#if 0
-#include "namespace.h"
-#endif
-#include <nbcompat/types.h>
-
-#include <nbcompat/assert.h>
-#include <nbcompat/vis.h>
-#include <nbcompat/stdlib.h>
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(strsvis,_strsvis)
-__weak_alias(strsvisx,_strsvisx)
-__weak_alias(strvis,_strvis)
-__weak_alias(strvisx,_strvisx)
-__weak_alias(svis,_svis)
-__weak_alias(vis,_vis)
-#endif
-#endif
-
-#include <nbcompat/ctype.h>
-#include <nbcompat/limits.h>
-#include <nbcompat/stdio.h>
-#include <nbcompat/string.h>
-
-#undef BELL
-#define BELL '\a'
-
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-#define iswhite(c) (c == ' ' || c == '\t' || c == '\n')
-#define issafe(c) (c == '\b' || c == BELL || c == '\r')
-#define xtoa(c) "0123456789abcdef"[c]
-
-#define MAXEXTRAS 5
-
-
-#define MAKEEXTRALIST(flag, extra, orig_str) \
-do { \
- const char *orig = orig_str; \
- const char *o = orig; \
- char *e; \
- while (*o++) \
- continue; \
- extra = alloca((size_t)((o - orig) + MAXEXTRAS)); \
- for (o = orig, e = extra; (*e++ = *o++) != '\0';) \
- continue; \
- e--; \
- if (flag & VIS_SP) *e++ = ' '; \
- if (flag & VIS_TAB) *e++ = '\t'; \
- if (flag & VIS_NL) *e++ = '\n'; \
- if ((flag & VIS_NOSLASH) == 0) *e++ = '\\'; \
- *e = '\0'; \
-} while (/*CONSTCOND*/0)
-
-
-/*
- * This is HVIS, the macro of vis used to HTTP style (RFC 1808)
- */
-#define HVIS(dst, c, flag, nextc, extra) \
-do \
- if (!isascii(c) || !isalnum(c) || strchr("$-_.+!*'(),", c) != NULL) { \
- *dst++ = '%'; \
- *dst++ = xtoa(((unsigned int)c >> 4) & 0xf); \
- *dst++ = xtoa((unsigned int)c & 0xf); \
- } else { \
- SVIS(dst, c, flag, nextc, extra); \
- } \
-while (/*CONSTCOND*/0)
-
-/*
- * This is SVIS, the central macro of vis.
- * dst: Pointer to the destination buffer
- * c: Character to encode
- * flag: Flag word
- * nextc: The character following 'c'
- * extra: Pointer to the list of extra characters to be
- * backslash-protected.
- */
-#define SVIS(dst, c, flag, nextc, extra) \
-do { \
- int isextra; \
- isextra = strchr(extra, c) != NULL; \
- if (!isextra && isascii(c) && (isgraph(c) || iswhite(c) || \
- ((flag & VIS_SAFE) && issafe(c)))) { \
- *dst++ = c; \
- break; \
- } \
- if (flag & VIS_CSTYLE) { \
- switch (c) { \
- case '\n': \
- *dst++ = '\\'; *dst++ = 'n'; \
- continue; \
- case '\r': \
- *dst++ = '\\'; *dst++ = 'r'; \
- continue; \
- case '\b': \
- *dst++ = '\\'; *dst++ = 'b'; \
- continue; \
- case BELL: \
- *dst++ = '\\'; *dst++ = 'a'; \
- continue; \
- case '\v': \
- *dst++ = '\\'; *dst++ = 'v'; \
- continue; \
- case '\t': \
- *dst++ = '\\'; *dst++ = 't'; \
- continue; \
- case '\f': \
- *dst++ = '\\'; *dst++ = 'f'; \
- continue; \
- case ' ': \
- *dst++ = '\\'; *dst++ = 's'; \
- continue; \
- case '\0': \
- *dst++ = '\\'; *dst++ = '0'; \
- if (isoctal(nextc)) { \
- *dst++ = '0'; \
- *dst++ = '0'; \
- } \
- continue; \
- default: \
- if (isgraph(c)) { \
- *dst++ = '\\'; *dst++ = c; \
- continue; \
- } \
- } \
- } \
- if (isextra || ((c & 0177) == ' ') || (flag & VIS_OCTAL)) { \
- *dst++ = '\\'; \
- *dst++ = (u_char)(((u_int32_t)(u_char)c >> 6) & 03) + '0'; \
- *dst++ = (u_char)(((u_int32_t)(u_char)c >> 3) & 07) + '0'; \
- *dst++ = (c & 07) + '0'; \
- } else { \
- if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; \
- if (c & 0200) { \
- c &= 0177; *dst++ = 'M'; \
- } \
- if (iscntrl(c)) { \
- *dst++ = '^'; \
- if (c == 0177) \
- *dst++ = '?'; \
- else \
- *dst++ = c + '@'; \
- } else { \
- *dst++ = '-'; *dst++ = c; \
- } \
- } \
-} while (/*CONSTCOND*/0)
-
-
-/*
- * svis - visually encode characters, also encoding the characters
- * pointed to by `extra'
- */
-char *
-svis(dst, c, flag, nextc, extra)
- char *dst;
- int c, flag, nextc;
- const char *extra;
-{
- char *nextra;
- _DIAGASSERT(dst != NULL);
- _DIAGASSERT(extra != NULL);
- MAKEEXTRALIST(flag, nextra, extra);
- if (flag & VIS_HTTPSTYLE)
- HVIS(dst, c, flag, nextc, nextra);
- else
- SVIS(dst, c, flag, nextc, nextra);
- *dst = '\0';
- return(dst);
-}
-
-
-/*
- * strsvis, strsvisx - visually encode characters from src into dst
- *
- * Extra is a pointer to a \0-terminated list of characters to
- * be encoded, too. These functions are useful e. g. to
- * encode strings in such a way so that they are not interpreted
- * by a shell.
- *
- * Dst must be 4 times the size of src to account for possible
- * expansion. The length of dst, not including the trailing NULL,
- * is returned.
- *
- * Strsvisx encodes exactly len bytes from src into dst.
- * This is useful for encoding a block of data.
- */
-int
-strsvis(dst, csrc, flag, extra)
- char *dst;
- const char *csrc;
- int flag;
- const char *extra;
-{
- int c;
- char *start;
- char *nextra;
- const unsigned char *src = (const unsigned char *)csrc;
-
- _DIAGASSERT(dst != NULL);
- _DIAGASSERT(src != NULL);
- _DIAGASSERT(extra != NULL);
- MAKEEXTRALIST(flag, nextra, extra);
- if (flag & VIS_HTTPSTYLE) {
- for (start = dst; (c = *src++) != '\0'; /* empty */)
- HVIS(dst, c, flag, *src, nextra);
- } else {
- for (start = dst; (c = *src++) != '\0'; /* empty */)
- SVIS(dst, c, flag, *src, nextra);
- }
- *dst = '\0';
- return (dst - start);
-}
-
-
-int
-strsvisx(dst, csrc, len, flag, extra)
- char *dst;
- const char *csrc;
- size_t len;
- int flag;
- const char *extra;
-{
- int c;
- char *start;
- char *nextra;
- const unsigned char *src = (const unsigned char *)csrc;
-
- _DIAGASSERT(dst != NULL);
- _DIAGASSERT(src != NULL);
- _DIAGASSERT(extra != NULL);
- MAKEEXTRALIST(flag, nextra, extra);
-
- if (flag & VIS_HTTPSTYLE) {
- for (start = dst; len > 0; len--) {
- c = *src++;
- HVIS(dst, c, flag, len ? *src : '\0', nextra);
- }
- } else {
- for (start = dst; len > 0; len--) {
- c = *src++;
- SVIS(dst, c, flag, len ? *src : '\0', nextra);
- }
- }
- *dst = '\0';
- return (dst - start);
-}
-
-/*
- * vis - visually encode characters
- */
-char *
-vis(dst, c, flag, nextc)
- char *dst;
- int c, flag, nextc;
-
-{
- char *extra;
-
- _DIAGASSERT(dst != NULL);
-
- MAKEEXTRALIST(flag, extra, "");
- if (flag & VIS_HTTPSTYLE)
- HVIS(dst, c, flag, nextc, extra);
- else
- SVIS(dst, c, flag, nextc, extra);
- *dst = '\0';
- return (dst);
-}
-
-
-/*
- * strvis, strvisx - visually encode characters from src into dst
- *
- * Dst must be 4 times the size of src to account for possible
- * expansion. The length of dst, not including the trailing NULL,
- * is returned.
- *
- * Strvisx encodes exactly len bytes from src into dst.
- * This is useful for encoding a block of data.
- */
-int
-strvis(dst, src, flag)
- char *dst;
- const char *src;
- int flag;
-{
- char *extra;
-
- MAKEEXTRALIST(flag, extra, "");
- return (strsvis(dst, src, flag, extra));
-}
-
-
-int
-strvisx(dst, src, len, flag)
- char *dst;
- const char *src;
- size_t len;
- int flag;
-{
- char *extra;
-
- MAKEEXTRALIST(flag, extra, "");
- return (strsvisx(dst, src, len, flag, extra));
-}
diff --git a/pkgtools/libnbcompat/files/warn.c b/pkgtools/libnbcompat/files/warn.c
deleted file mode 100644
index e3522c854d3..00000000000
--- a/pkgtools/libnbcompat/files/warn.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* $NetBSD: warn.c,v 1.1 2004/08/23 03:32:13 jlam Exp $ */
-
-/*
- * Copyright 1997-2000 Luke Mewburn <lukem@netbsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#include <nbcompat/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: warn.c,v 1.1 2004/08/23 03:32:13 jlam Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#ifndef __NO_NAMESPACE_H /* XXX */
-#if 0
-#include "namespace.h"
-#endif
-#endif
-#include <nbcompat/err.h>
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-
-#if 0
-#ifdef __weak_alias
-__weak_alias(warn, _warn)
-#endif
-#endif
-
-void
-warn(const char *fmt, ...)
-{
- va_list ap;
- int sverrno;
-
- sverrno = errno;
- (void)fprintf(stderr, "%s: ", getprogname());
- va_start(ap, fmt);
- if (fmt != NULL) {
- (void)vfprintf(stderr, fmt, ap);
- (void)fprintf(stderr, ": ");
- }
- va_end(ap);
- (void)fprintf(stderr, "%s\n", strerror(sverrno));
-}
-
-void
-warnx(const char *fmt, ...)
-{
- va_list ap;
-
- (void)fprintf(stderr, "%s: ", getprogname());
- va_start(ap, fmt);
- if (fmt != NULL)
- (void)vfprintf(stderr, fmt, ap);
- va_end(ap);
- (void)fprintf(stderr, "\n");
-}
-
-void
-vwarn(fmt, ap)
- const char *fmt;
- va_list ap;
-{
- int sverrno;
-
- sverrno = errno;
- (void)fprintf(stderr, "%s: ", getprogname());
- if (fmt != NULL) {
- (void)vfprintf(stderr, fmt, ap);
- (void)fprintf(stderr, ": ");
- }
- (void)fprintf(stderr, "%s\n", strerror(sverrno));
-}
-
-void
-vwarnx(fmt, ap)
- const char *fmt;
- va_list ap;
-{
- (void)fprintf(stderr, "%s: ", getprogname());
- if (fmt != NULL)
- (void)vfprintf(stderr, fmt, ap);
- (void)fprintf(stderr, "\n");
-}
diff --git a/pkgtools/libnbcompat/inplace.mk b/pkgtools/libnbcompat/inplace.mk
deleted file mode 100644
index 5750ae20727..00000000000
--- a/pkgtools/libnbcompat/inplace.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# $NetBSD: inplace.mk,v 1.1 2004/08/13 22:34:28 jlam Exp $
-#
-# This Makefile fragment builds a working copy of libnbcompat inside
-# ${WRKDIR} and adds the appropriate paths to CPPFLAGS and LDFLAGS.
-# This can be used in place of libnbcompat/buildlink3.mk where it is
-# included by a bootstrap package Makefile.
-
-LIBNBCOMPAT_FILESDIR= ${.CURDIR}/../../pkgtools/libnbcompat/files
-LIBNBCOMPAT_SRCDIR= ${WRKDIR}/libnbcompat
-
-CPPFLAGS+= -I${LIBNBCOMPAT_SRCDIR}
-LDFLAGS+= -L${LIBNBCOMPAT_SRCDIR}
-LIBS+= -lnbcompat
-
-do-extract: libnbcompat-extract
-libnbcompat-extract:
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${CP} -Rp ${LIBNBCOMPAT_FILESDIR} ${LIBNBCOMPAT_SRCDIR}
-
-pre-configure: libnbcompat-build
-libnbcompat-build:
- ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
- cd ${LIBNBCOMPAT_SRCDIR} && ${SETENV} \
- AWK="${AWK}" CC="${CC}" CFLAGS="${CFLAGS:M*}" \
- CPPFLAGS="${CPPFLAGS:M*}" \
- ${CONFIGURE_ENV:NLIBS=*} ${CONFIG_SHELL} \
- ${CONFIGURE_SCRIPT} && ${MAKE_PROGRAM}
diff --git a/pkgtools/mtree/DESCR b/pkgtools/mtree/DESCR
deleted file mode 100644
index a4f891564ab..00000000000
--- a/pkgtools/mtree/DESCR
+++ /dev/null
@@ -1,6 +0,0 @@
-The mtree utility compares the file hierarchy rooted in the current
-directory against a specification read from the standard input.
-Messages are written to the standard output for any files whose
-characteristics do not match the specification, or which are missing
-from either the file hierarchy or the specification. It can be used
-as a file integrity checker.
diff --git a/pkgtools/mtree/Makefile b/pkgtools/mtree/Makefile
deleted file mode 100644
index 2a9939ee02a..00000000000
--- a/pkgtools/mtree/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# $NetBSD: Makefile,v 1.20 2006/07/14 20:11:10 jlam Exp $
-#
-# This version of mtree installs into ${PKG_TOOLS_BIN}.
-#
-
-.include "Makefile.common"
-
-CATEGORIES= pkgtools
-
-NO_PKGTOOLS_REQD_CHECK= # defined
-PKG_PRESERVE= # defined
-
-PKG_TOOLS_PREFIX= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
-
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR= share/man
-.endif
-
-.include "../../pkgtools/libnbcompat/inplace.mk"
-.include "../../mk/bsd.pkg.mk"
-
-PREFIX:= ${PKG_TOOLS_PREFIX}
diff --git a/pkgtools/mtree/Makefile.common b/pkgtools/mtree/Makefile.common
deleted file mode 100644
index 7248ac5362e..00000000000
--- a/pkgtools/mtree/Makefile.common
+++ /dev/null
@@ -1,28 +0,0 @@
-# $NetBSD: Makefile.common,v 1.2 2006/07/14 20:11:10 jlam Exp $#
-#
-# This Makefile fragment is included by:
-#
-# pkgsrc/pkgtools/mtree/Makefile
-# pkgsrc/sysutils/mtree/Makefile
-#
-
-DISTNAME= mtree-20040722
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= grant@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/
-COMMENT= Utility for mapping and checking directory hierarchies
-
-GNU_CONFIGURE= yes
-
-NO_CHECKSUM= yes
-NO_MTREE= yes
-
-FILESDIR= ${.CURDIR}/../../pkgtools/mtree/files
-PKGDIR= ${.CURDIR}/../../pkgtools/mtree
-
-.include "../../mk/bsd.prefs.mk"
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
diff --git a/pkgtools/mtree/PLIST b/pkgtools/mtree/PLIST
deleted file mode 100644
index 3cbb06f715f..00000000000
--- a/pkgtools/mtree/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2006/07/14 19:23:09 jlam Exp $
-man/cat8/mtree.0
-man/man8/mtree.8
-sbin/mtree
diff --git a/pkgtools/mtree/files/Makefile.in b/pkgtools/mtree/files/Makefile.in
deleted file mode 100644
index dd7f1680c4b..00000000000
--- a/pkgtools/mtree/files/Makefile.in
+++ /dev/null
@@ -1,49 +0,0 @@
-# $NetBSD: Makefile.in,v 1.7 2004/08/21 06:33:39 jlam Exp $
-
-srcdir= @srcdir@
-
-prefix= @prefix@
-exec_prefix= @exec_prefix@
-sbindir= @sbindir@
-mandir= @mandir@
-
-man8dir= $(mandir)/man8
-cat8dir= $(mandir)/cat8
-
-CC= @CC@
-CCLD= $(CC)
-LIBS= @LIBS@
-CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir)
-DEFS= @DEFS@
-CFLAGS= @CFLAGS@
-LDFLAGS= @LDFLAGS@
-
-INSTALL= @INSTALL@
-
-PROG= mtree
-
-OBJS= compare.o crc.o create.o excludes.o misc.o mtree.o spec.o verify.o \
- getid.o stat_flags.o pack_dev.o
-
-all: $(PROG)
-
-.c.o:
- $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(PROG): $(OBJS)
- $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) $(PROG)
-
-distclean: clean
- rm -f Makefile config.cache config.h config.status
- rm -f configure.lineno config.log
-
-install:
- $(INSTALL) -m 755 -d $(sbindir)
- $(INSTALL) -m 755 -d $(man8dir)
- $(INSTALL) -m 755 -d $(cat8dir)
- $(INSTALL) $(PROG) $(sbindir)
- $(INSTALL) -m 444 $(PROG).8 $(man8dir)/$(PROG).8
- $(INSTALL) -m 444 $(PROG).cat8 $(cat8dir)/$(PROG).0
diff --git a/pkgtools/mtree/files/compare.c b/pkgtools/mtree/files/compare.c
deleted file mode 100644
index 94ba6bb7586..00000000000
--- a/pkgtools/mtree/files/compare.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/* $NetBSD: compare.c,v 1.4 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if defined(__RCSID) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: compare.c,v 1.4 2004/08/21 04:10:45 jlam Exp $");
-#endif
-#endif /* not lint */
-
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifndef NO_MD5
-#if HAVE_MD5_H
-#include <md5.h>
-#endif
-#endif
-#ifndef NO_RMD160
-#if HAVE_RMD160_H
-#include <rmd160.h>
-#endif
-#endif
-#ifndef NO_SHA1
-#if HAVE_SHA1_H
-#include <sha1.h>
-#endif
-#endif
-
-#include "extern.h"
-
-#define INDENTNAMELEN 8
-#define MARK \
-do { \
- len = printf("%s: ", RP(p)); \
- if (len > INDENTNAMELEN) { \
- tab = "\t"; \
- printf("\n"); \
- } else { \
- tab = ""; \
- printf("%*s", INDENTNAMELEN - (int)len, ""); \
- } \
-} while (0)
-#define LABEL if (!label++) MARK
-
-#if HAVE_FILE_FLAGS
-
-
-#define CHANGEFLAGS \
- if (flags != p->fts_statp->st_flags) { \
- if (!label) { \
- MARK; \
- printf("%sflags (\"%s\"", tab, \
- flags_to_string(p->fts_statp->st_flags, "none")); \
- } \
- if (lchflags(p->fts_accpath, flags)) { \
- label++; \
- printf(", not modified: %s)\n", \
- strerror(errno)); \
- } else \
- printf(", modified to \"%s\")\n", \
- flags_to_string(flags, "none")); \
- }
-
-/* SETFLAGS:
- * given pflags, additionally set those flags specified in s->st_flags and
- * selected by mask (the other flags are left unchanged).
- */
-#define SETFLAGS(pflags, mask) \
-do { \
- flags = (s->st_flags & (mask)) | (pflags); \
- CHANGEFLAGS; \
-} while (0)
-
-/* CLEARFLAGS:
- * given pflags, reset the flags specified in s->st_flags and selected by mask
- * (the other flags are left unchanged).
- */
-#define CLEARFLAGS(pflags, mask) \
-do { \
- flags = (~(s->st_flags & (mask)) & CH_MASK) & (pflags); \
- CHANGEFLAGS; \
-} while (0)
-#endif /* HAVE_FILE_FLAGS */
-
-int
-compare(NODE *s, FTSENT *p)
-{
- u_int32_t len, val, flags;
- int fd, label;
- const char *cp, *tab;
-#if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1)
- char digestbuf[41]; /* large enough for {MD5,RMD160,SHA1}File() */
-#endif
-
- tab = NULL;
- label = 0;
- switch(s->type) {
- case F_BLOCK:
- if (!S_ISBLK(p->fts_statp->st_mode))
- goto typeerr;
- break;
- case F_CHAR:
- if (!S_ISCHR(p->fts_statp->st_mode))
- goto typeerr;
- break;
- case F_DIR:
- if (!S_ISDIR(p->fts_statp->st_mode))
- goto typeerr;
- break;
- case F_FIFO:
- if (!S_ISFIFO(p->fts_statp->st_mode))
- goto typeerr;
- break;
- case F_FILE:
- if (!S_ISREG(p->fts_statp->st_mode))
- goto typeerr;
- break;
- case F_LINK:
- if (!S_ISLNK(p->fts_statp->st_mode))
- goto typeerr;
- break;
-#ifdef S_ISSOCK
- case F_SOCK:
- if (!S_ISSOCK(p->fts_statp->st_mode))
- goto typeerr;
- break;
-#endif
-typeerr: LABEL;
- printf("\ttype (%s, %s)\n",
- nodetype(s->type), inotype(p->fts_statp->st_mode));
- return (label);
- }
- if (mtree_Wflag)
- goto afterpermwhack;
-#if HAVE_FILE_FLAGS
- if (iflag && !uflag) {
- if (s->flags & F_FLAGS)
- SETFLAGS(p->fts_statp->st_flags, SP_FLGS);
- return (label);
- }
- if (mflag && !uflag) {
- if (s->flags & F_FLAGS)
- CLEARFLAGS(p->fts_statp->st_flags, SP_FLGS);
- return (label);
- }
-#endif
- if (s->flags & F_DEV &&
- (s->type == F_BLOCK || s->type == F_CHAR) &&
- s->st_rdev != p->fts_statp->st_rdev) {
- LABEL;
- printf("%sdevice (%#x, %#x",
- tab, s->st_rdev, p->fts_statp->st_rdev);
- if (uflag) {
- if ((unlink(p->fts_accpath) == -1) ||
- (mknod(p->fts_accpath,
- s->st_mode | nodetoino(s->type),
- s->st_rdev) == -1) ||
- (lchown(p->fts_accpath, p->fts_statp->st_uid,
- p->fts_statp->st_gid) == -1) )
- printf(", not modified: %s)\n",
- strerror(errno));
- else
- printf(", modified)\n");
- } else
- printf(")\n");
- tab = "\t";
- }
- /* Set the uid/gid first, then set the mode. */
- if (s->flags & (F_UID | F_UNAME) && s->st_uid != p->fts_statp->st_uid) {
- LABEL;
- printf("%suser (%lu, %lu",
- tab, (u_long)s->st_uid, (u_long)p->fts_statp->st_uid);
- if (uflag) {
- if (lchown(p->fts_accpath, s->st_uid, -1))
- printf(", not modified: %s)\n",
- strerror(errno));
- else
- printf(", modified)\n");
- } else
- printf(")\n");
- tab = "\t";
- }
- if (s->flags & (F_GID | F_GNAME) && s->st_gid != p->fts_statp->st_gid) {
- LABEL;
- printf("%sgid (%lu, %lu",
- tab, (u_long)s->st_gid, (u_long)p->fts_statp->st_gid);
- if (uflag) {
- if (lchown(p->fts_accpath, -1, s->st_gid))
- printf(", not modified: %s)\n",
- strerror(errno));
- else
- printf(", modified)\n");
- }
- else
- printf(")\n");
- tab = "\t";
- }
- if (s->flags & F_MODE &&
- s->st_mode != (p->fts_statp->st_mode & MBITS)) {
- if (lflag) {
- mode_t tmode, mode;
-
- tmode = s->st_mode;
- mode = p->fts_statp->st_mode & MBITS;
- /*
- * if none of the suid/sgid/etc bits are set,
- * then if the mode is a subset of the target,
- * skip.
- */
- if (!((tmode & ~(S_IRWXU|S_IRWXG|S_IRWXO)) ||
- (mode & ~(S_IRWXU|S_IRWXG|S_IRWXO))))
- if ((mode | tmode) == tmode)
- goto skip;
- }
-
- LABEL;
- printf("%spermissions (%#lo, %#lo",
- tab, (u_long)s->st_mode,
- (u_long)p->fts_statp->st_mode & MBITS);
- if (uflag) {
- if (lchmod(p->fts_accpath, s->st_mode))
- printf(", not modified: %s)\n",
- strerror(errno));
- else
- printf(", modified)\n");
- }
- else
- printf(")\n");
- tab = "\t";
- skip: ;
- }
- if (s->flags & F_NLINK && s->type != F_DIR &&
- s->st_nlink != p->fts_statp->st_nlink) {
- LABEL;
- printf("%slink count (%lu, %lu)\n",
- tab, (u_long)s->st_nlink, (u_long)p->fts_statp->st_nlink);
- tab = "\t";
- }
- if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) {
- LABEL;
- printf("%ssize (%lld, %lld)\n",
- tab, (long long)s->st_size,
- (long long)p->fts_statp->st_size);
- tab = "\t";
- }
- /*
- * XXX
- * Since utimes(2) only takes a timeval, there's no point in
- * comparing the low bits of the timespec nanosecond field. This
- * will only result in mismatches that we can never fix.
- *
- * Doesn't display microsecond differences.
- */
- if (s->flags & F_TIME) {
- struct timeval tv[2];
- struct stat *ps = p->fts_statp;
- time_t smtime = s->st_mtimespec.tv_sec;
-
-#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H)
- time_t pmtime = ps->st_mtimespec.tv_sec;
-
- TIMESPEC_TO_TIMEVAL(&tv[0], &s->st_mtimespec);
- TIMESPEC_TO_TIMEVAL(&tv[1], &ps->st_mtimespec);
-#else
- time_t pmtime = (time_t)ps->st_mtime;
-
- tv[0].tv_sec = smtime;
- tv[0].tv_usec = 0;
- tv[1].tv_sec = pmtime;
- tv[1].tv_usec = 0;
-#endif
-
- if (tv[0].tv_sec != tv[1].tv_sec ||
- tv[0].tv_usec != tv[1].tv_usec) {
- LABEL;
- printf("%smodification time (%.24s, ",
- tab, ctime(&smtime));
- printf("%.24s", ctime(&pmtime));
- if (tflag) {
- tv[1] = tv[0];
- if (utimes(p->fts_accpath, tv))
- printf(", not modified: %s)\n",
- strerror(errno));
- else
- printf(", modified)\n");
- } else
- printf(")\n");
- tab = "\t";
- }
- }
-#if HAVE_FILE_FLAGS
- /*
- * XXX
- * since lchflags(2) will reset file times, the utimes() above
- * may have been useless! oh well, we'd rather have correct
- * flags, rather than times?
- */
- if ((s->flags & F_FLAGS) && ((s->st_flags != p->fts_statp->st_flags)
- || mflag || iflag)) {
- if (s->st_flags != p->fts_statp->st_flags) {
- LABEL;
- printf("%sflags (\"%s\" is not ", tab,
- flags_to_string(s->st_flags, "none"));
- printf("\"%s\"",
- flags_to_string(p->fts_statp->st_flags, "none"));
- }
- if (uflag) {
- if (iflag)
- SETFLAGS(0, CH_MASK);
- else if (mflag)
- CLEARFLAGS(0, SP_FLGS);
- else
- SETFLAGS(0, (~SP_FLGS & CH_MASK));
- } else
- printf(")\n");
- tab = "\t";
- }
-#endif /* HAVE_FILE_FLAGS */
-
- /*
- * from this point, no more permission checking or whacking
- * occurs, only checking of stuff like checksums and symlinks.
- */
- afterpermwhack:
- if (s->flags & F_CKSUM) {
- if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
- LABEL;
- printf("%scksum: %s: %s\n",
- tab, p->fts_accpath, strerror(errno));
- tab = "\t";
- } else if (crc(fd, &val, &len)) {
- close(fd);
- LABEL;
- printf("%scksum: %s: %s\n",
- tab, p->fts_accpath, strerror(errno));
- tab = "\t";
- } else {
- close(fd);
- if (s->cksum != val) {
- LABEL;
- printf("%scksum (%lu, %lu)\n",
- tab, s->cksum, (unsigned long)val);
- }
- tab = "\t";
- }
- }
-#ifndef NO_MD5
- if (s->flags & F_MD5) {
- if (MD5File(p->fts_accpath, digestbuf) == NULL) {
- LABEL;
- printf("%smd5: %s: %s\n",
- tab, p->fts_accpath, strerror(errno));
- tab = "\t";
- } else {
- if (strcmp(s->md5digest, digestbuf)) {
- LABEL;
- printf("%smd5 (0x%s, 0x%s)\n",
- tab, s->md5digest, digestbuf);
- }
- tab = "\t";
- }
- }
-#endif /* ! NO_MD5 */
-#ifndef NO_RMD160
- if (s->flags & F_RMD160) {
- if (RMD160File(p->fts_accpath, digestbuf) == NULL) {
- LABEL;
- printf("%srmd160: %s: %s\n",
- tab, p->fts_accpath, strerror(errno));
- tab = "\t";
- } else {
- if (strcmp(s->rmd160digest, digestbuf)) {
- LABEL;
- printf("%srmd160 (0x%s, 0x%s)\n",
- tab, s->rmd160digest, digestbuf);
- }
- tab = "\t";
- }
- }
-#endif /* ! NO_RMD160 */
-#ifndef NO_SHA1
- if (s->flags & F_SHA1) {
- if (SHA1File(p->fts_accpath, digestbuf) == NULL) {
- LABEL;
- printf("%ssha1: %s: %s\n",
- tab, p->fts_accpath, strerror(errno));
- tab = "\t";
- } else {
- if (strcmp(s->sha1digest, digestbuf)) {
- LABEL;
- printf("%ssha1 (0x%s, 0x%s)\n",
- tab, s->sha1digest, digestbuf);
- }
- tab = "\t";
- }
- }
-#endif /* ! NO_SHA1 */
- if (s->flags & F_SLINK &&
- strcmp(cp = rlink(p->fts_accpath), s->slink)) {
- LABEL;
- printf("%slink ref (%s, %s", tab, cp, s->slink);
- if (uflag) {
- if ((unlink(p->fts_accpath) == -1) ||
- (symlink(s->slink, p->fts_accpath) == -1) )
- printf(", not modified: %s)\n",
- strerror(errno));
- else
- printf(", modified)\n");
- } else
- printf(")\n");
- }
- return (label);
-}
-
-const char *
-rlink(const char *name)
-{
- static char lbuf[MAXPATHLEN];
- int len;
-
- if ((len = readlink(name, lbuf, sizeof(lbuf) - 1)) == -1)
- mtree_err("%s: %s", name, strerror(errno));
- lbuf[len] = '\0';
- return (lbuf);
-}
diff --git a/pkgtools/mtree/files/config.guess b/pkgtools/mtree/files/config.guess
deleted file mode 100755
index 0f0fe712ae6..00000000000
--- a/pkgtools/mtree/files/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /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 Free Software Foundation,
-# Inc.
-
-timestamp='2007-03-06'
-
-# 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted 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.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-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
-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' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# 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" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { 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 __ELF__ >/dev/null
- 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 ;;
- 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:SunOS:5.*:*)
- echo i386-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:*:[45])
- 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 __LP64__ >/dev/null
- 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*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-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 ;;
- 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 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- 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 ;;
- 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:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- 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 ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-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 ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*)
- 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 i386.
- echo i386-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; } ;;
- 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.0*:*)
- 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 ;;
- 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
- 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 ;;
- 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 ;;
-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://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-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/pkgtools/mtree/files/config.h.in b/pkgtools/mtree/files/config.h.in
deleted file mode 100644
index a594ed6087b..00000000000
--- a/pkgtools/mtree/files/config.h.in
+++ /dev/null
@@ -1,243 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the `btowc' function. */
-#undef HAVE_BTOWC
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
-
-/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
- */
-#undef HAVE_DECL_GETENV
-
-/* Define to 1 if you have the declaration of `SF_SETTABLE', and to 0 if you
- don't. */
-#undef HAVE_DECL_SF_SETTABLE
-
-/* Define to 1 if you have the declaration of `UF_SETTABLE', and to 0 if you
- don't. */
-#undef HAVE_DECL_UF_SETTABLE
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the `endgrent' function. */
-#undef HAVE_ENDGRENT
-
-/* Define to 1 if you have the `endpwent' function. */
-#undef HAVE_ENDPWENT
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the <fnmatch.h> header file. */
-#undef HAVE_FNMATCH_H
-
-/* Define to 1 if you have the <fts.h> header file. */
-#undef HAVE_FTS_H
-
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
-
-/* Define to 1 if you have the `gethostname' function. */
-#undef HAVE_GETHOSTNAME
-
-/* Define to 1 if you have the <grp.h> header file. */
-#undef HAVE_GRP_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `util' library (-lutil). */
-#undef HAVE_LIBUTIL
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the `mbsrtowcs' function. */
-#undef HAVE_MBSRTOWCS
-
-/* Define to 1 if <wchar.h> declares mbstate_t. */
-#undef HAVE_MBSTATE_T
-
-/* Define to 1 if you have the <md5.h> header file. */
-#undef HAVE_MD5_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `mempcpy' function. */
-#undef HAVE_MEMPCPY
-
-/* Define to 1 if you have the `mkdir' function. */
-#undef HAVE_MKDIR
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define to 1 if you have the <rmd160.h> header file. */
-#undef HAVE_RMD160_H
-
-/* Define to 1 if you have the <sha1.h> header file. */
-#undef HAVE_SHA1_H
-
-/* 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 `strchr' function. */
-#undef HAVE_STRCHR
-
-/* 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 `strpbrk' function. */
-#undef HAVE_STRPBRK
-
-/* Define to 1 if you have the `strstr' function. */
-#undef HAVE_STRSTR
-
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
-
-/* Define to 1 if you have the `strtoul' function. */
-#undef HAVE_STRTOUL
-
-/* Define to 1 if `st_flags' is member of `struct stat'. */
-#undef HAVE_STRUCT_STAT_ST_FLAGS
-
-/* Define to 1 if `st_rdev' is member of `struct stat'. */
-#undef HAVE_STRUCT_STAT_ST_RDEV
-
-/* Define to 1 if you have the <sys/cdefs.h> header file. */
-#undef HAVE_SYS_CDEFS_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/queue.h> header file. */
-#undef HAVE_SYS_QUEUE_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/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <util.h> header file. */
-#undef HAVE_UTIL_H
-
-/* Define to 1 if you have the <vis.h> header file. */
-#undef HAVE_VIS_H
-
-/* Define to 1 if you have the <wchar.h> header file. */
-#undef HAVE_WCHAR_H
-
-/* Define to 1 if you have the <wctype.h> header file. */
-#undef HAVE_WCTYPE_H
-
-/* Define to 1 if you have the `wmempcpy' function. */
-#undef HAVE_WMEMPCPY
-
-/* 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 version of this package. */
-#undef PACKAGE_VERSION
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-#undef STACK_DIRECTION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to rpl_fnmatch if the replacement function should be used. */
-#undef fnmatch
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef gid_t
-
-/* Define to a type if <wchar.h> does not define. */
-#undef mbstate_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef mode_t
-
-/* Define to `long' if <sys/types.h> does not define. */
-#undef off_t
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef uid_t
-
-/* Define to 1 if the user- and root-changeable masks were detected */
-#if HAVE_STRUCT_STAT_ST_FLAGS && HAVE_DECL_UF_SETTABLE && HAVE_DECL_SF_SETTABLE
-#define HAVE_FILE_FLAGS 1
-#endif
-
diff --git a/pkgtools/mtree/files/config.sub b/pkgtools/mtree/files/config.sub
deleted file mode 100755
index 5defff65a6e..00000000000
--- a/pkgtools/mtree/files/config.sub
+++ /dev/null
@@ -1,1622 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-01-18'
-
-# 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 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.
-
-# 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
-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-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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)
- os=
- basic_machine=$1
- ;;
- -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 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | 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 | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # 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-* | c54x-* | c55x-* | c6x-* \
- | 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-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | 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-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | 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-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # 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
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- 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
- ;;
- cr16c)
- basic_machine=cr16c-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
- ;;
- 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
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- 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
- ;;
- 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[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.
- -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* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -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* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -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*)
- # 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
- ;;
- -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
- ;;
- # 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
- ;;
- -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/pkgtools/mtree/files/configure b/pkgtools/mtree/files/configure
deleted file mode 100755
index 7bf7add7bde..00000000000
--- a/pkgtools/mtree/files/configure
+++ /dev/null
@@ -1,6225 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for mtree 20040722.
-#
-# Report bugs to <grant@NetBSD.org>.
-#
-# Copyright (C) 2003 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 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='mtree'
-PACKAGE_TARNAME='mtree'
-PACKAGE_VERSION='20040722'
-PACKAGE_STRING='mtree 20040722'
-PACKAGE_BUGREPORT='grant@NetBSD.org'
-
-ac_unique_file="mtree.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#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"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP ALLOCA LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# 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.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-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
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -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 | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$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 ;;
-
- -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 ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- 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 ;;
-
- -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=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 ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- 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'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-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
- 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
-
-
-# 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 its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- 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
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# 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 mtree 20040722 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 \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-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]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --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]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of mtree 20040722:";;
- esac
- cat <<\_ACEOF
-
-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>
- CPPFLAGS 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 <grant@NetBSD.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style 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
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-mtree configure 20040722
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by mtree $as_me 20040722, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-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`
-hostinfo = `(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=.
- echo "PATH: $as_dir"
-done
-
-} >&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_sep=
-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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$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
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >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
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- 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.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-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 `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-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
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`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.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-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_config_headers="$ac_config_headers config.h"
-
-
-# Checks for programs.
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-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
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- 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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; 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 | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$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
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 -std1 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 -std1. */
-int osf4_cc_array ['\x00' == 0 ? 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
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-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_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# 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.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- 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
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-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. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$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'
-
-
-# Checks for libraries.
-
-
-echo "$as_me:$LINENO: checking for fparseln in -lutil" >&5
-echo $ECHO_N "checking for fparseln in -lutil... $ECHO_C" >&6
-if test "${ac_cv_lib_util_fparseln+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lutil $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char fparseln ();
-int
-main ()
-{
-fparseln ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_util_fparseln=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_util_fparseln=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_util_fparseln" >&5
-echo "${ECHO_T}$ac_cv_lib_util_fparseln" >&6
-if test $ac_cv_lib_util_fparseln = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUTIL 1
-_ACEOF
-
- LIBS="-lutil $LIBS"
-
-fi
-
-
-# Checks for header files.
-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
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
- echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-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
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.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))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in ctype.h dirent.h err.h errno.h fcntl.h fnmatch.h fts.h \
- grp.h limits.h md5.h netdb.h pwd.h rmd160.h sha1.h \
- stdarg.h stddef.h stdio.h stdlib.h string.h time.h unistd.h \
- util.h vis.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-for ac_header in sys/cdefs.h sys/param.h sys/queue.h sys/stat.h sys/types.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# Checks for typedefs, structures, and compiler characteristics.
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* 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";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 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;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
-if test "${ac_cv_type_uid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then
- ac_cv_type_uid_t=yes
-else
- ac_cv_type_uid_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
-if test $ac_cv_type_uid_t = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define uid_t int
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define gid_t int
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for mode_t" >&5
-echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
-if test "${ac_cv_type_mode_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((mode_t *) 0)
- return 0;
-if (sizeof (mode_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_mode_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_mode_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
-echo "${ECHO_T}$ac_cv_type_mode_t" >&6
-if test $ac_cv_type_mode_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_off_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
-echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
-if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (ac_aggr.st_rdev)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_stat_st_rdev=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_rdev)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_stat_st_rdev=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_member_struct_stat_st_rdev=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
-if test $ac_cv_member_struct_stat_st_rdev = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_RDEV 1
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
-echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
-if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (ac_aggr.st_flags)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_stat_st_flags=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_flags)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_member_struct_stat_st_flags=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_member_struct_stat_st_flags=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
-if test $ac_cv_member_struct_stat_st_flags = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_FLAGS 1
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking whether UF_SETTABLE is declared" >&5
-echo $ECHO_N "checking whether UF_SETTABLE is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_UF_SETTABLE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef UF_SETTABLE
- char *p = (char *) UF_SETTABLE;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_UF_SETTABLE=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_UF_SETTABLE=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_UF_SETTABLE" >&5
-echo "${ECHO_T}$ac_cv_have_decl_UF_SETTABLE" >&6
-if test $ac_cv_have_decl_UF_SETTABLE = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_UF_SETTABLE 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_UF_SETTABLE 0
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking whether SF_SETTABLE is declared" >&5
-echo $ECHO_N "checking whether SF_SETTABLE is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_SF_SETTABLE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef SF_SETTABLE
- char *p = (char *) SF_SETTABLE;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_SF_SETTABLE=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_SF_SETTABLE=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_SF_SETTABLE" >&5
-echo "${ECHO_T}$ac_cv_have_decl_SF_SETTABLE" >&6
-if test $ac_cv_have_decl_SF_SETTABLE = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SF_SETTABLE 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SF_SETTABLE 0
-_ACEOF
-
-
-fi
-
-
-
-
-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
-if test "${ac_cv_header_time+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_time=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_time=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6
-if test $ac_cv_header_time = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
-
-fi
-
-
-# Checks for library functions.
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <alloca.h>
-int
-main ()
-{
-char *p = (char *) alloca (2 * sizeof (int));
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_working_alloca_h=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-
-int
-main ()
-{
-char *p = (char *) alloca (1);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_alloca_works=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-
-if test $ac_cv_func_alloca_works = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
-
-else
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-# that cause trouble. Some versions do not even contain alloca or
-# contain a buggy version. If you still want to use their alloca,
-# use ar to extract alloca.o from them instead of compiling alloca.c.
-
-ALLOCA=alloca.$ac_objext
-
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
- break
-fi
-
- done
-fi
-
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
-if test "${ac_cv_type_mbstate_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-# include <wchar.h>
-int
-main ()
-{
-mbstate_t x; return sizeof x;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
-echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
- if test $ac_cv_type_mbstate_t = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- else
-
-cat >>confdefs.h <<\_ACEOF
-#define mbstate_t int
-_ACEOF
-
- fi
-echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5
-echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6
-if test "${ac_cv_func_fnmatch_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Some versions of Solaris, SCO, and the GNU C Library
- # have a broken or incompatible fnmatch.
- # So we run a test program. If we are cross-compiling, take no chance.
- # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
- if test "$cross_compiling" = yes; then
- ac_cv_func_fnmatch_works=cross
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <fnmatch.h>
-# define y(a, b, c) (fnmatch (a, b, c) == 0)
-# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
-
-int
-main ()
-{
-exit
- (!(y ("a*", "abc", 0)
- && n ("d*/*1", "d/s/1", FNM_PATHNAME)
- && y ("a\\\\bc", "abc", 0)
- && n ("a\\\\bc", "abc", FNM_NOESCAPE)
- && y ("*x", ".x", 0)
- && n ("*x", ".x", FNM_PERIOD)
- && 1));
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_fnmatch_works=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_fnmatch_works=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5
-echo "${ECHO_T}$ac_cv_func_fnmatch_works" >&6
-if test $ac_cv_func_fnmatch_works = yes; then
- rm -f $ac_config_libobj_dir/fnmatch.h
-else
- echo "$as_me:$LINENO: checking whether getenv is declared" >&5
-echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_getenv+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-#ifndef getenv
- char *p = (char *) getenv;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_have_decl_getenv=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_decl_getenv=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
-echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
-if test $ac_cv_have_decl_getenv = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETENV 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETENV 0
-_ACEOF
-
-
-fi
-
-
-
-
-
-
-for ac_func in btowc mbsrtowcs mempcpy wmempcpy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-for ac_header in wchar.h wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-case $LIBOBJS in
- "fnmatch.$ac_objext" | \
- *" fnmatch.$ac_objext" | \
- "fnmatch.$ac_objext "* | \
- *" fnmatch.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext" ;;
-esac
-
- ac_config_links="$ac_config_links $ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h"
-
-
-cat >>confdefs.h <<\_ACEOF
-#define fnmatch rpl_fnmatch
-_ACEOF
-
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in endgrent endpwent getcwd gethostname mkdir strchr strpbrk strstr strtol strtoul
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- ac_config_files="$ac_config_files 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, don't put newlines in cache variables' values.
-# 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.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *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 \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!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" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- 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}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $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}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by mtree $as_me 20040722, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet 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 links:
-$config_links
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-mtree config.status 20040722
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-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=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- 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
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "$ac_config_libobj_dir/fnmatch.h" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- 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_LINKS+set}" = set || CONFIG_LINKS=$config_links
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@ALLOCA@,$ALLOCA,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # 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. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #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.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # 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. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_LINKS section.
-#
-
-for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-
- { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
-echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
-
- if test ! -r $srcdir/$ac_source; then
- { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
-echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
- { (exit 1); exit 1; }; }
- fi
- rm -f $ac_dest
-
- # Make relative symlinks.
- ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dest_dir"
- else
- as_dir="$ac_dest_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dest_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dest_dir";;
-*)
- case "$ac_dest_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $srcdir in
- [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
- *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
- esac
-
- # Try a symlink, then a hard link, then a copy.
- ln -s $ac_rel_source $ac_dest 2>/dev/null ||
- ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
- cp -p $srcdir/$ac_source $ac_dest ||
- { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
-echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
- { (exit 1); exit 1; }; }
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# 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 || { (exit 1); exit 1; }
-fi
-
diff --git a/pkgtools/mtree/files/configure.ac b/pkgtools/mtree/files/configure.ac
deleted file mode 100644
index d80e8cf538b..00000000000
--- a/pkgtools/mtree/files/configure.ac
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.57)
-AC_INIT([mtree], [20040722], [grant@NetBSD.org])
-AC_CONFIG_SRCDIR([mtree.c])
-AC_CONFIG_HEADER([config.h])
-
-# Checks for programs.
-AC_PROG_CC
-AC_PROG_INSTALL
-
-# Checks for libraries.
-AC_CHECK_LIB(util, fparseln)
-
-# Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([ctype.h dirent.h err.h errno.h fcntl.h fnmatch.h fts.h \
- grp.h limits.h md5.h netdb.h pwd.h rmd160.h sha1.h \
- stdarg.h stddef.h stdio.h stdlib.h string.h time.h unistd.h \
- util.h vis.h])
-AC_CHECK_HEADERS([sys/cdefs.h sys/param.h sys/queue.h sys/stat.h sys/types.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_UID_T
-AC_TYPE_MODE_T
-AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-AC_CHECK_MEMBERS([struct stat.st_rdev])
-AC_CHECK_MEMBERS([struct stat.st_flags])
-AC_CHECK_DECLS([UF_SETTABLE, SF_SETTABLE])
-AH_BOTTOM([/* Define to 1 if the user- and root-changeable masks were detected */
-#if HAVE_STRUCT_STAT_ST_FLAGS && HAVE_DECL_UF_SETTABLE && HAVE_DECL_SF_SETTABLE
-#define HAVE_FILE_FLAGS 1
-#endif
-])
-AC_HEADER_TIME
-
-# Checks for library functions.
-AC_REPLACE_FNMATCH
-AC_CHECK_FUNCS([endgrent endpwent getcwd gethostname mkdir strchr strpbrk strstr strtol strtoul])
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/pkgtools/mtree/files/crc.c b/pkgtools/mtree/files/crc.c
deleted file mode 100644
index 3d4008ea6dd..00000000000
--- a/pkgtools/mtree/files/crc.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/* $NetBSD: crc.c,v 1.3 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * James W. Williams of NASA Goddard Space Flight Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if defined(__RCSID) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93";
-#else
-__RCSID("$NetBSD: crc.c,v 1.3 2004/08/21 04:10:45 jlam Exp $");
-#endif
-#endif /* not lint */
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "extern.h"
-
-static const u_int32_t crctab[] = {
- 0x0,
- 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
- 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
- 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
- 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac,
- 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f,
- 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a,
- 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
- 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58,
- 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033,
- 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe,
- 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
- 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4,
- 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
- 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5,
- 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
- 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07,
- 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c,
- 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1,
- 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
- 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b,
- 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698,
- 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d,
- 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
- 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f,
- 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
- 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80,
- 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
- 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a,
- 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629,
- 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c,
- 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
- 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e,
- 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65,
- 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8,
- 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
- 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2,
- 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
- 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74,
- 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
- 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21,
- 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a,
- 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087,
- 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
- 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d,
- 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce,
- 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb,
- 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
- 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09,
- 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
- 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf,
- 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
-};
-
-/*
- * Compute a POSIX 1003.2 checksum. This routine has been broken out so that
- * other programs can use it. It takes a file descriptor to read from and
- * locations to store the crc and the number of bytes read. It returns 0 on
- * success and 1 on failure. Errno is set on failure.
- */
-extern int sflag;
-u_int32_t crc_total = ~0; /* The crc over a number of files. */
-
-int
-crc(fd, cval, clen)
- register int fd;
- u_int32_t *cval, *clen;
-{
- register u_char *p;
- register int nr;
- register u_int32_t thecrc, len;
- register u_int32_t crctot;
- u_char buf[16 * 1024];
-
-#define COMPUTE(var, ch) (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)]
-
- thecrc = len = 0;
- if (sflag)
- crctot = ~crc_total;
- while ((nr = read(fd, buf, sizeof(buf))) > 0)
- if (sflag) {
- for (len += nr, p = buf; nr--; ++p) {
- COMPUTE(thecrc, *p);
- COMPUTE(crctot, *p);
- }
- } else {
- for (len += nr, p = buf; nr--; ++p)
- COMPUTE(thecrc, *p);
- }
- if (nr < 0)
- return (1);
-
- *clen = len;
-
- /* Include the length of the file. */
- if (sflag) {
- for (; len != 0; len >>= 8) {
- COMPUTE(thecrc, len & 0xff);
- COMPUTE(crctot, len & 0xff);
- }
- } else {
- for (; len != 0; len >>= 8)
- COMPUTE(thecrc, len & 0xff);
- }
-
- *cval = ~thecrc;
- if (sflag)
- crc_total = ~crctot;
- return (0);
-}
diff --git a/pkgtools/mtree/files/create.c b/pkgtools/mtree/files/create.c
deleted file mode 100644
index 1a3f693b5e7..00000000000
--- a/pkgtools/mtree/files/create.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/* $NetBSD: create.c,v 1.4 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if defined(__RCSID) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: create.c,v 1.4 2004/08/21 04:10:45 jlam Exp $");
-#endif
-#endif /* not lint */
-
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if ! HAVE_NBTOOL_CONFIG_H
-#if HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#endif
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#if HAVE_GRP_H
-#include <grp.h>
-#endif
-#if HAVE_PWD_H
-#include <pwd.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifndef NO_MD5
-#if HAVE_MD5_H
-#include <md5.h>
-#endif
-#endif
-#ifndef NO_RMD160
-#if HAVE_RMD160_H
-#include <rmd160.h>
-#endif
-#endif
-#ifndef NO_SHA1
-#if HAVE_SHA1_H
-#include <sha1.h>
-#endif
-#endif
-
-#include "extern.h"
-
-#define INDENTNAMELEN 15
-#define MAXLINELEN 80
-
-static gid_t gid;
-static uid_t uid;
-static mode_t mode;
-static u_long flags;
-
-static int dsort(const FTSENT **, const FTSENT **);
-static void output(int *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
-static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *);
-static void statf(FTSENT *);
-
-void
-cwalk(void)
-{
- FTS *t;
- FTSENT *p;
- time_t clocktime;
- char host[MAXHOSTNAMELEN + 1];
- char *argv[2];
- char dot[] = ".";
- argv[0] = dot;
- argv[1] = NULL;
-
- time(&clocktime);
- gethostname(host, sizeof(host));
- host[sizeof(host) - 1] = '\0';
- printf(
- "#\t user: %s\n#\tmachine: %s\n#\t tree: %s\n#\t date: %s",
- getlogin(), host, fullpath, ctime(&clocktime));
-
- if ((t = fts_open(argv, ftsoptions, dsort)) == NULL)
- mtree_err("fts_open: %s", strerror(errno));
- while ((p = fts_read(t)) != NULL) {
- if (check_excludes(p->fts_name, p->fts_path)) {
- fts_set(t, p, FTS_SKIP);
- continue;
- }
- switch(p->fts_info) {
- case FTS_D:
- printf("\n# %s\n", p->fts_path);
- statd(t, p, &uid, &gid, &mode, &flags);
- statf(p);
- break;
- case FTS_DP:
- if (p->fts_level > 0)
- printf("# %s\n..\n\n", p->fts_path);
- break;
- case FTS_DNR:
- case FTS_ERR:
- case FTS_NS:
- mtree_err("%s: %s",
- p->fts_path, strerror(p->fts_errno));
- break;
- default:
- if (!dflag)
- statf(p);
- break;
-
- }
- }
- fts_close(t);
- if (sflag && keys & F_CKSUM)
- mtree_err("%s checksum: %u", fullpath, crc_total);
-}
-
-static void
-statf(FTSENT *p)
-{
- u_int32_t len, val;
- int fd, indent;
- const char *name, *path;
-#if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1)
- char digestbuf[41]; /* large enough for {MD5,RMD160,SHA1}File() */
-#endif
-
- path = vispath(p->fts_name);
- indent = printf("%s%s",
- S_ISDIR(p->fts_statp->st_mode) ? "" : " ", path);
-
- if (indent > INDENTNAMELEN)
- indent = MAXLINELEN;
- else
- indent += printf("%*s", INDENTNAMELEN - indent, "");
-
- if (!S_ISREG(p->fts_statp->st_mode))
- output(&indent, "type=%s", inotype(p->fts_statp->st_mode));
- if (keys & (F_UID | F_UNAME) && p->fts_statp->st_uid != uid) {
- if (keys & F_UNAME &&
- (name = user_from_uid(p->fts_statp->st_uid, 1)) != NULL)
- output(&indent, "uname=%s", name);
- else /* if (keys & F_UID) */
- output(&indent, "uid=%u", p->fts_statp->st_uid);
- }
- if (keys & (F_GID | F_GNAME) && p->fts_statp->st_gid != gid) {
- if (keys & F_GNAME &&
- (name = group_from_gid(p->fts_statp->st_gid, 1)) != NULL)
- output(&indent, "gname=%s", name);
- else /* if (keys & F_GID) */
- output(&indent, "gid=%u", p->fts_statp->st_gid);
- }
- if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode)
- output(&indent, "mode=%#o", p->fts_statp->st_mode & MBITS);
- if (keys & F_DEV &&
- (S_ISBLK(p->fts_statp->st_mode) || S_ISCHR(p->fts_statp->st_mode)))
- output(&indent, "device=%#x", p->fts_statp->st_rdev);
- if (keys & F_NLINK && p->fts_statp->st_nlink != 1)
- output(&indent, "nlink=%u", p->fts_statp->st_nlink);
- if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode))
- output(&indent, "size=%lld", (long long)p->fts_statp->st_size);
-#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H)
- if (keys & F_TIME)
- output(&indent, "time=%ld.%ld",
- (long)p->fts_statp->st_mtimespec.tv_sec,
- p->fts_statp->st_mtimespec.tv_nsec);
-#else
- output(&indent, "time=%ld.%ld",
- p->fts_statp->st_mtime, 0);
-#endif
- if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) {
- if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 ||
- crc(fd, &val, &len))
- mtree_err("%s: %s", p->fts_accpath, strerror(errno));
- close(fd);
- output(&indent, "cksum=%lu", (long)val);
- }
-#ifndef NO_MD5
- if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) {
- if (MD5File(p->fts_accpath, digestbuf) == NULL)
- mtree_err("%s: %s", p->fts_accpath, "MD5File");
- output(&indent, "md5=%s", digestbuf);
- }
-#endif /* ! NO_MD5 */
-#ifndef NO_RMD160
- if (keys & F_RMD160 && S_ISREG(p->fts_statp->st_mode)) {
- if (RMD160File(p->fts_accpath, digestbuf) == NULL)
- mtree_err("%s: %s", p->fts_accpath, "RMD160File");
- output(&indent, "rmd160=%s", digestbuf);
- }
-#endif /* ! NO_RMD160 */
-#ifndef NO_SHA1
- if (keys & F_SHA1 && S_ISREG(p->fts_statp->st_mode)) {
- if (SHA1File(p->fts_accpath, digestbuf) == NULL)
- mtree_err("%s: %s", p->fts_accpath, "SHA1File");
- output(&indent, "sha1=%s", digestbuf);
- }
-#endif /* ! NO_SHA1 */
- if (keys & F_SLINK &&
- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE))
- output(&indent, "link=%s", rlink(p->fts_accpath));
-#if HAVE_FILE_FLAGS
- if (keys & F_FLAGS && p->fts_statp->st_flags != flags)
- output(&indent, "flags=%s",
- flags_to_string(p->fts_statp->st_flags, "none"));
-#endif
- putchar('\n');
-}
-
-/* XXX
- * FLAGS2INDEX will fail once the user and system settable bits need more
- * than one byte, respectively.
- */
-#define FLAGS2INDEX(x) (((x >> 8) & 0x0000ff00) | (x & 0x000000ff))
-
-#define MTREE_MAXGID 5000
-#define MTREE_MAXUID 5000
-#define MTREE_MAXMODE (MBITS + 1)
-#if HAVE_FILE_FLAGS
-#define MTREE_MAXFLAGS (FLAGS2INDEX(CH_MASK) + 1) /* 1808 */
-#else
-#define MTREE_MAXFLAGS 1
-#endif
-#define MTREE_MAXS 16
-
-static int
-statd(FTS *t, FTSENT *parent, uid_t *puid, gid_t *pgid, mode_t *pmode,
- u_long *pflags)
-{
- FTSENT *p;
- gid_t sgid;
- uid_t suid;
- mode_t smode;
- u_long sflags = 0;
- const char *name;
- gid_t savegid;
- uid_t saveuid;
- mode_t savemode;
- u_long saveflags;
- u_short maxgid, maxuid, maxmode, maxflags;
- u_short g[MTREE_MAXGID], u[MTREE_MAXUID],
- m[MTREE_MAXMODE], f[MTREE_MAXFLAGS];
- static int first = 1;
-
- savegid = *pgid;
- saveuid = *puid;
- savemode = *pmode;
- saveflags = *pflags;
- if ((p = fts_children(t, 0)) == NULL) {
- if (errno)
- mtree_err("%s: %s", RP(parent), strerror(errno));
- return (1);
- }
-
- memset(g, 0, sizeof(g));
- memset(u, 0, sizeof(u));
- memset(m, 0, sizeof(m));
- memset(f, 0, sizeof(f));
-
- maxuid = maxgid = maxmode = maxflags = 0;
- for (; p; p = p->fts_link) {
- smode = p->fts_statp->st_mode & MBITS;
- if (smode < MTREE_MAXMODE && ++m[smode] > maxmode) {
- savemode = smode;
- maxmode = m[smode];
- }
- sgid = p->fts_statp->st_gid;
- if (sgid < MTREE_MAXGID && ++g[sgid] > maxgid) {
- savegid = sgid;
- maxgid = g[sgid];
- }
- suid = p->fts_statp->st_uid;
- if (suid < MTREE_MAXUID && ++u[suid] > maxuid) {
- saveuid = suid;
- maxuid = u[suid];
- }
-
-#if HAVE_FILE_FLAGS
- sflags = FLAGS2INDEX(p->fts_statp->st_flags);
- if (sflags < MTREE_MAXFLAGS && ++f[sflags] > maxflags) {
- saveflags = p->fts_statp->st_flags;
- maxflags = f[sflags];
- }
-#endif
- }
- /*
- * If the /set record is the same as the last one we do not need to
- * output a new one. So first we check to see if anything changed.
- * Note that we always output a /set record for the first directory.
- */
- if (((keys & (F_UNAME | F_UID)) && (*puid != saveuid)) ||
- ((keys & (F_GNAME | F_GID)) && (*pgid != savegid)) ||
- ((keys & F_MODE) && (*pmode != savemode)) ||
- ((keys & F_FLAGS) && (*pflags != saveflags)) ||
- first) {
- first = 0;
- printf("/set type=file");
- if (keys & (F_UID | F_UNAME)) {
- if (keys & F_UNAME &&
- (name = user_from_uid(saveuid, 1)) != NULL)
- printf(" uname=%s", name);
- else /* if (keys & F_UID) */
- printf(" uid=%lu", (u_long)saveuid);
- }
- if (keys & (F_GID | F_GNAME)) {
- if (keys & F_GNAME &&
- (name = group_from_gid(savegid, 1)) != NULL)
- printf(" gname=%s", name);
- else /* if (keys & F_UID) */
- printf(" gid=%lu", (u_long)savegid);
- }
- if (keys & F_MODE)
- printf(" mode=%#lo", (u_long)savemode);
- if (keys & F_NLINK)
- printf(" nlink=1");
- if (keys & F_FLAGS)
- printf(" flags=%s",
- flags_to_string(saveflags, "none"));
- printf("\n");
- *puid = saveuid;
- *pgid = savegid;
- *pmode = savemode;
- *pflags = saveflags;
- }
- return (0);
-}
-
-static int
-dsort(const FTSENT **a, const FTSENT **b)
-{
-
- if (S_ISDIR((*a)->fts_statp->st_mode)) {
- if (!S_ISDIR((*b)->fts_statp->st_mode))
- return (1);
- } else if (S_ISDIR((*b)->fts_statp->st_mode))
- return (-1);
- return (strcmp((*a)->fts_name, (*b)->fts_name));
-}
-
-void
-output(int *offset, const char *fmt, ...)
-{
- va_list ap;
- char buf[1024];
-
- va_start(ap, fmt);
- vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
-
- if (*offset + strlen(buf) > MAXLINELEN - 3) {
- printf(" \\\n%*s", INDENTNAMELEN, "");
- *offset = INDENTNAMELEN;
- }
- *offset += printf(" %s", buf) + 1;
-}
diff --git a/pkgtools/mtree/files/excludes.c b/pkgtools/mtree/files/excludes.c
deleted file mode 100644
index 111da4e82c0..00000000000
--- a/pkgtools/mtree/files/excludes.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/* $NetBSD: excludes.c,v 1.4 2004/08/21 04:10:45 jlam Exp $ */
-
-/*
- * Copyright 2000 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
-#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: excludes.c,v 1.4 2004/08/21 04:10:45 jlam Exp $");
-#endif
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-
-#if HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_UTIL_H
-#include <util.h>
-#endif
-
-#include "extern.h"
-
-
-/*
- * We're assuming that there won't be a whole lot of excludes,
- * so it's OK to use a stupid algorithm.
- */
-struct exclude {
- LIST_ENTRY(exclude) link;
- const char *glob;
- int pathname;
-};
-static LIST_HEAD(, exclude) excludes;
-
-
-void
-init_excludes(void)
-{
-
- LIST_INIT(&excludes);
-}
-
-void
-read_excludes_file(const char *name)
-{
- FILE *fp;
- char *line;
- struct exclude *e;
-
- fp = fopen(name, "r");
- if (fp == 0)
- err(1, "%s", name);
-
- while ((line = fparseln(fp, NULL, NULL, NULL,
- FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT | FPARSELN_UNESCESC))
- != NULL) {
- if (line[0] == '\0')
- continue;
-
- if ((e = malloc(sizeof *e)) == NULL)
- mtree_err("memory allocation error");
-
- e->glob = line;
- if (strchr(e->glob, '/') != NULL)
- e->pathname = 1;
- else
- e->pathname = 0;
- LIST_INSERT_HEAD(&excludes, e, link);
- }
- fclose(fp);
-}
-
-int
-check_excludes(const char *fname, const char *path)
-{
- struct exclude *e;
-
- /* fnmatch(3) has a funny return value convention... */
-#define MATCH(g, n) (fnmatch((g), (n), FNM_PATHNAME) == 0)
-
- e = LIST_FIRST(&excludes);
- while (e) {
- if ((e->pathname && MATCH(e->glob, path))
- || MATCH(e->glob, fname)) {
- return (1);
- }
- e = LIST_NEXT(e, link);
- }
- return (0);
-}
diff --git a/pkgtools/mtree/files/extern.h b/pkgtools/mtree/files/extern.h
deleted file mode 100644
index df10fde4164..00000000000
--- a/pkgtools/mtree/files/extern.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* $NetBSD: extern.h,v 1.2 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)extern.h 8.1 (Berkeley) 6/6/93
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include "mtree.h"
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_FTS_H
-#include <fts.h>
-#endif
-
-#if HAVE_NETDB_H
-/* For MAXHOSTNAMELEN on some platforms. */
-#if HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#endif
-
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 256
-#endif
-
-void addtag(slist_t *, char *);
-int check_excludes(const char *, const char *);
-int compare(NODE *, FTSENT *);
-int crc(int, u_int32_t *, u_int32_t *);
-void cwalk(void);
-void dump_nodes(const char *, NODE *, int);
-void init_excludes(void);
-int matchtags(NODE *);
-void mtree_err(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
-const char *nodetype(u_int);
-u_int parsekey(const char *, int *);
-void parsetags(slist_t *, char *);
-u_int parsetype(const char *);
-void read_excludes_file(const char *);
-const char *rlink(const char *);
-int verify(void);
-
-extern int dflag, eflag, iflag, lflag, mflag, rflag, sflag, tflag, uflag;
-extern int mtree_Mflag, mtree_Wflag;
-extern size_t mtree_lineno;
-extern u_int32_t crc_total;
-extern int ftsoptions, keys;
-extern char fullpath[];
-extern slist_t includetags, excludetags;
-
-
-#include "stat_flags.h"
diff --git a/pkgtools/mtree/files/getid.c b/pkgtools/mtree/files/getid.c
deleted file mode 100644
index 55b93ed3b96..00000000000
--- a/pkgtools/mtree/files/getid.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/* $NetBSD: getid.c,v 1.2 2004/08/21 04:10:45 jlam Exp $ */
-/* from: NetBSD: getpwent.c,v 1.48 2000/10/03 03:22:26 enami Exp */
-/* from: NetBSD: getgrent.c,v 1.41 2002/01/12 23:51:30 lukem Exp */
-
-/*
- * Copyright (c) 1987, 1988, 1989, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*-
- * Copyright (c) 2002 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn of Wasabi Systems.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#if HAVE_GRP_H
-#include <grp.h>
-#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_PWD_H
-#include <pwd.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "extern.h"
-
-static struct group * gi_getgrnam(const char *);
-static struct group * gi_getgrgid(gid_t);
-static int gi_setgroupent(int);
-static void gi_endgrent(void);
-static int grstart(void);
-static int grscan(int, gid_t, const char *);
-static int grmatchline(int, gid_t, const char *);
-
-static struct passwd * gi_getpwnam(const char *);
-static struct passwd * gi_getpwuid(uid_t);
-static int gi_setpassent(int);
-static void gi_endpwent(void);
-static int pwstart(void);
-static int pwscan(int, uid_t, const char *);
-static int pwmatchline(int, uid_t, const char *);
-
-#define MAXGRP 200
-#define MAXLINELENGTH 1024
-
-static FILE *_gr_fp;
-static struct group _gr_group;
-static int _gr_stayopen;
-static int _gr_filesdone;
-static FILE *_pw_fp;
-static struct passwd _pw_passwd; /* password structure */
-static int _pw_stayopen; /* keep fd's open */
-static int _pw_filesdone;
-
-static char grfile[MAXPATHLEN];
-static char pwfile[MAXPATHLEN];
-
-static char *members[MAXGRP];
-static char grline[MAXLINELENGTH];
-static char pwline[MAXLINELENGTH];
-
-int
-setup_getid(const char *dir)
-{
- if (dir == NULL)
- return (0);
-
- /* close existing databases */
- gi_endgrent();
- gi_endpwent();
-
- /* build paths to new databases */
- snprintf(grfile, sizeof(grfile), "%s/group", dir);
- snprintf(pwfile, sizeof(pwfile), "%s/master.passwd", dir);
-
- /* try to open new databases */
- if (!grstart() || !pwstart())
- return (0);
-
- /* switch pwcache(3) lookup functions */
- if (pwcache_groupdb(gi_setgroupent, gi_endgrent,
- gi_getgrnam, gi_getgrgid) == -1
- || pwcache_userdb(gi_setpassent, gi_endpwent,
- gi_getpwnam, gi_getpwuid) == -1)
- return (0);
-
- return (1);
-}
-
-
-/*
- * group lookup functions
- */
-
-static struct group *
-gi_getgrnam(const char *name)
-{
- int rval;
-
- if (!grstart())
- return NULL;
- rval = grscan(1, 0, name);
- if (!_gr_stayopen)
- endgrent();
- return (rval) ? &_gr_group : NULL;
-}
-
-static struct group *
-gi_getgrgid(gid_t gid)
-{
- int rval;
-
- if (!grstart())
- return NULL;
- rval = grscan(1, gid, NULL);
- if (!_gr_stayopen)
- endgrent();
- return (rval) ? &_gr_group : NULL;
-}
-
-static int
-gi_setgroupent(int stayopen)
-{
-
- if (!grstart())
- return 0;
- _gr_stayopen = stayopen;
- return 1;
-}
-
-static void
-gi_endgrent(void)
-{
-
- _gr_filesdone = 0;
- if (_gr_fp) {
- (void)fclose(_gr_fp);
- _gr_fp = NULL;
- }
-}
-
-static int
-grstart(void)
-{
-
- _gr_filesdone = 0;
- if (_gr_fp) {
- rewind(_gr_fp);
- return 1;
- }
- if (grfile[0] == '\0') /* sanity check */
- return 0;
- return (_gr_fp = fopen(grfile, "r")) ? 1 : 0;
-}
-
-
-static int
-grscan(int search, gid_t gid, const char *name)
-{
-
- if (_gr_filesdone)
- return 0;
- for (;;) {
- if (!fgets(grline, sizeof(grline), _gr_fp)) {
- if (!search)
- _gr_filesdone = 1;
- return 0;
- }
- /* skip lines that are too big */
- if (!strchr(grline, '\n')) {
- int ch;
-
- while ((ch = getc(_gr_fp)) != '\n' && ch != EOF)
- ;
- continue;
- }
- if (grmatchline(search, gid, name))
- return 1;
- }
- /* NOTREACHED */
-}
-
-static int
-grmatchline(int search, gid_t gid, const char *name)
-{
- unsigned long id;
- char **m;
- char *cp, *bp, *ep;
-
- /* name may be NULL if search is nonzero */
-
- bp = grline;
- memset(&_gr_group, 0, sizeof(_gr_group));
- _gr_group.gr_name = strsep(&bp, ":\n");
- if (search && name && strcmp(_gr_group.gr_name, name))
- return 0;
- _gr_group.gr_passwd = strsep(&bp, ":\n");
- if (!(cp = strsep(&bp, ":\n")))
- return 0;
- id = strtoul(cp, &ep, 10);
- if (id > GID_MAX || *ep != '\0')
- return 0;
- _gr_group.gr_gid = (gid_t)id;
- if (search && name == NULL && _gr_group.gr_gid != gid)
- return 0;
- cp = NULL;
- if (bp == NULL)
- return 0;
- for (_gr_group.gr_mem = m = members;; bp++) {
- if (m == &members[MAXGRP - 1])
- break;
- if (*bp == ',') {
- if (cp) {
- *bp = '\0';
- *m++ = cp;
- cp = NULL;
- }
- } else if (*bp == '\0' || *bp == '\n' || *bp == ' ') {
- if (cp) {
- *bp = '\0';
- *m++ = cp;
- }
- break;
- } else if (cp == NULL)
- cp = bp;
- }
- *m = NULL;
- return 1;
-}
-
-
-/*
- * user lookup functions
- */
-
-static struct passwd *
-gi_getpwnam(const char *name)
-{
- int rval;
-
- if (!pwstart())
- return NULL;
- rval = pwscan(1, 0, name);
- if (!_pw_stayopen)
- endpwent();
- return (rval) ? &_pw_passwd : NULL;
-}
-
-static struct passwd *
-gi_getpwuid(uid_t uid)
-{
- int rval;
-
- if (!pwstart())
- return NULL;
- rval = pwscan(1, uid, NULL);
- if (!_pw_stayopen)
- endpwent();
- return (rval) ? &_pw_passwd : NULL;
-}
-
-static int
-gi_setpassent(int stayopen)
-{
-
- if (!pwstart())
- return 0;
- _pw_stayopen = stayopen;
- return 1;
-}
-
-static void
-gi_endpwent(void)
-{
-
- _pw_filesdone = 0;
- if (_pw_fp) {
- (void)fclose(_pw_fp);
- _pw_fp = NULL;
- }
-}
-
-static int
-pwstart(void)
-{
-
- _pw_filesdone = 0;
- if (_pw_fp) {
- rewind(_pw_fp);
- return 1;
- }
- if (pwfile[0] == '\0') /* sanity check */
- return 0;
- return (_pw_fp = fopen(pwfile, "r")) ? 1 : 0;
-}
-
-
-static int
-pwscan(int search, uid_t uid, const char *name)
-{
-
- if (_pw_filesdone)
- return 0;
- for (;;) {
- if (!fgets(pwline, sizeof(pwline), _pw_fp)) {
- if (!search)
- _pw_filesdone = 1;
- return 0;
- }
- /* skip lines that are too big */
- if (!strchr(pwline, '\n')) {
- int ch;
-
- while ((ch = getc(_pw_fp)) != '\n' && ch != EOF)
- ;
- continue;
- }
- if (pwmatchline(search, uid, name))
- return 1;
- }
- /* NOTREACHED */
-}
-
-static int
-pwmatchline(int search, uid_t uid, const char *name)
-{
- unsigned long id;
- char *cp, *bp, *ep;
-
- /* name may be NULL if search is nonzero */
-
- bp = pwline;
- memset(&_pw_passwd, 0, sizeof(_pw_passwd));
- _pw_passwd.pw_name = strsep(&bp, ":\n"); /* name */
- if (search && name && strcmp(_pw_passwd.pw_name, name))
- return 0;
-
- _pw_passwd.pw_passwd = strsep(&bp, ":\n"); /* passwd */
-
- if (!(cp = strsep(&bp, ":\n"))) /* uid */
- return 0;
- id = strtoul(cp, &ep, 10);
- if (id > UID_MAX || *ep != '\0')
- return 0;
- _pw_passwd.pw_uid = (uid_t)id;
- if (search && name == NULL && _pw_passwd.pw_uid != uid)
- return 0;
-
- if (!(cp = strsep(&bp, ":\n"))) /* gid */
- return 0;
- id = strtoul(cp, &ep, 10);
- if (id > GID_MAX || *ep != '\0')
- return 0;
- _pw_passwd.pw_gid = (gid_t)id;
-
- if (!(ep = strsep(&bp, ":"))) /* class */
- return 0;
- if (!(ep = strsep(&bp, ":"))) /* change */
- return 0;
- if (!(ep = strsep(&bp, ":"))) /* expire */
- return 0;
-
- if (!(_pw_passwd.pw_gecos = strsep(&bp, ":\n"))) /* gecos */
- return 0;
- if (!(_pw_passwd.pw_dir = strsep(&bp, ":\n"))) /* directory */
- return 0;
- if (!(_pw_passwd.pw_shell = strsep(&bp, ":\n"))) /* shell */
- return 0;
-
- if (strchr(bp, ':') != NULL)
- return 0;
-
- return 1;
-}
-
diff --git a/pkgtools/mtree/files/install-sh b/pkgtools/mtree/files/install-sh
deleted file mode 100755
index e9de23842dc..00000000000
--- a/pkgtools/mtree/files/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# 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. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# 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 $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/pkgtools/mtree/files/misc.c b/pkgtools/mtree/files/misc.c
deleted file mode 100644
index 4a759116fc5..00000000000
--- a/pkgtools/mtree/files/misc.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/* $NetBSD: misc.c,v 1.2 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)misc.c 8.1 (Berkeley) 6/6/93
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: misc.c,v 1.2 2004/08/21 04:10:45 jlam Exp $");
-#endif /* not lint */
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "extern.h"
-
-typedef struct _key {
- const char *name; /* key name */
- u_int val; /* value */
-
-#define NEEDVALUE 0x01
- u_int flags;
-} KEY;
-
-/* NB: the following tables must be sorted lexically. */
-static KEY keylist[] = {
- {"cksum", F_CKSUM, NEEDVALUE},
- {"device", F_DEV, NEEDVALUE},
- {"flags", F_FLAGS, NEEDVALUE},
- {"gid", F_GID, NEEDVALUE},
- {"gname", F_GNAME, NEEDVALUE},
- {"ignore", F_IGN, 0},
- {"link", F_SLINK, NEEDVALUE},
- {"md5", F_MD5, NEEDVALUE},
- {"md5digest", F_MD5, NEEDVALUE},
- {"mode", F_MODE, NEEDVALUE},
- {"nlink", F_NLINK, NEEDVALUE},
- {"optional", F_OPT, 0},
- {"rmd160", F_RMD160, NEEDVALUE},
- {"rmd160digest",F_RMD160, NEEDVALUE},
- {"sha1", F_SHA1, NEEDVALUE},
- {"sha1digest", F_SHA1, NEEDVALUE},
- {"size", F_SIZE, NEEDVALUE},
- {"tags", F_TAGS, NEEDVALUE},
- {"time", F_TIME, NEEDVALUE},
- {"type", F_TYPE, NEEDVALUE},
- {"uid", F_UID, NEEDVALUE},
- {"uname", F_UNAME, NEEDVALUE}
-};
-
-static KEY typelist[] = {
- {"block", F_BLOCK, },
- {"char", F_CHAR, },
- {"dir", F_DIR, },
- {"fifo", F_FIFO, },
- {"file", F_FILE, },
- {"link", F_LINK, },
- {"socket", F_SOCK, },
-};
-
-slist_t excludetags, includetags;
-int keys = KEYDEFAULT;
-
-
-int keycompare(const void *, const void *);
-
-u_int
-parsekey(const char *name, int *needvaluep)
-{
- static int allbits;
- KEY *k, tmp;
-
- if (allbits == 0) {
- int i;
-
- for (i = 0; i < sizeof(keylist) / sizeof(KEY); i++)
- allbits |= keylist[i].val;
- }
- tmp.name = name;
- if (strcmp(name, "all") == 0)
- return (allbits);
- k = (KEY *)bsearch(&tmp, keylist, sizeof(keylist) / sizeof(KEY),
- sizeof(KEY), keycompare);
- if (k == NULL)
- mtree_err("unknown keyword `%s'", name);
-
- if (needvaluep)
- *needvaluep = k->flags & NEEDVALUE ? 1 : 0;
-
- return (k->val);
-}
-
-u_int
-parsetype(const char *name)
-{
- KEY *k, tmp;
-
- tmp.name = name;
- k = (KEY *)bsearch(&tmp, typelist, sizeof(typelist) / sizeof(KEY),
- sizeof(KEY), keycompare);
- if (k == NULL)
- mtree_err("unknown file type `%s'", name);
-
- return (k->val);
-}
-
-int
-keycompare(const void *a, const void *b)
-{
-
- return (strcmp(((const KEY *)a)->name, ((const KEY *)b)->name));
-}
-
-void
-mtree_err(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vwarnx(fmt, ap);
- va_end(ap);
- if (mtree_lineno)
- warnx("failed at line %lu of the specification",
- (u_long) mtree_lineno);
- exit(1);
- /* NOTREACHED */
-}
-
-void
-addtag(slist_t *list, char *elem)
-{
-
-#define TAG_CHUNK 20
-
- if ((list->count % TAG_CHUNK) == 0) {
- char **new;
-
- new = (char **)realloc(list->list, (list->count + TAG_CHUNK)
- * sizeof(char *));
- if (new == NULL)
- mtree_err("memory allocation error");
- list->list = new;
- }
- list->list[list->count] = elem;
- list->count++;
-}
-
-void
-parsetags(slist_t *list, char *args)
-{
- char *p, *e;
- int len;
-
- if (args == NULL) {
- addtag(list, NULL);
- return;
- }
- while ((p = strsep(&args, ",")) != NULL) {
- if (*p == '\0')
- continue;
- len = strlen(p) + 3; /* "," + p + ",\0" */
- if ((e = malloc(len)) == NULL)
- mtree_err("memory allocation error");
- snprintf(e, len, ",%s,", p);
- addtag(list, e);
- }
-}
-
-/*
- * matchtags
- * returns 0 if there's a match from the exclude list in the node's tags,
- * or there's an include list and no match.
- * return 1 otherwise.
- */
-int
-matchtags(NODE *node)
-{
- int i;
-
- if (node->tags) {
- for (i = 0; i < excludetags.count; i++)
- if (strstr(node->tags, excludetags.list[i]))
- break;
- if (i < excludetags.count)
- return (0);
-
- for (i = 0; i < includetags.count; i++)
- if (strstr(node->tags, includetags.list[i]))
- break;
- if (i > 0 && i == includetags.count)
- return (0);
- } else if (includetags.count > 0) {
- return (0);
- }
- return (1);
-}
-
-u_int
-nodetoino(u_int type)
-{
-
- switch (type) {
- case F_BLOCK:
- return S_IFBLK;
- case F_CHAR:
- return S_IFCHR;
- case F_DIR:
- return S_IFDIR;
- case F_FIFO:
- return S_IFIFO;
- case F_FILE:
- return S_IFREG;
- case F_LINK:
- return S_IFLNK;
-#ifdef S_IFSOCK
- case F_SOCK:
- return S_IFSOCK;
-#endif
- default:
- printf("unknown type %d", type);
- abort();
- }
- /* NOTREACHED */
-}
-
-const char *
-nodetype(u_int type)
-{
-
- return (inotype(nodetoino(type)));
-}
-
-
-const char *
-inotype(u_int type)
-{
-
- switch (type & S_IFMT) {
- case S_IFBLK:
- return ("block");
- case S_IFCHR:
- return ("char");
- case S_IFDIR:
- return ("dir");
- case S_IFIFO:
- return ("fifo");
- case S_IFREG:
- return ("file");
- case S_IFLNK:
- return ("link");
-#ifdef S_IFSOCK
- case S_IFSOCK:
- return ("socket");
-#endif
- default:
- return ("unknown");
- }
- /* NOTREACHED */
-}
diff --git a/pkgtools/mtree/files/mtree.8 b/pkgtools/mtree/files/mtree.8
deleted file mode 100644
index 1166a07fef3..00000000000
--- a/pkgtools/mtree/files/mtree.8
+++ /dev/null
@@ -1,660 +0,0 @@
-.\" $NetBSD: mtree.8,v 1.3 2004/08/21 04:10:45 jlam Exp $
-.\"
-.\" Copyright (c) 1989, 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" Copyright (c) 2001-2004 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Luke Mewburn of Wasabi Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" @(#)mtree.8 8.2 (Berkeley) 12/11/93
-.\"
-.Dd July 22, 2004
-.Dt MTREE 8
-.Os
-.Sh NAME
-.Nm mtree
-.Nd map a directory hierarchy
-.Sh SYNOPSIS
-.Nm
-.Op Fl cCdDelLMPruUWx
-.Bk -words
-.Op Fl i | Fl m
-.Ek
-.Bk -words
-.Op Fl f Ar spec
-.Ek
-.Bk -words
-.Op Fl p Ar path
-.Ek
-.Bk -words
-.Op Fl k Ar keywords
-.Ek
-.Bk -words
-.Op Fl K Ar keywords
-.Ek
-.Bk -words
-.Op Fl R Ar keywords
-.Ek
-.Bk -words
-.Op Fl E Ar tags
-.Ek
-.Bk -words
-.Op Fl I Ar tags
-.Ek
-.Bk -words
-.Op Fl N Ar dbdir
-.Ek
-.Bk -words
-.Op Fl s Ar seed
-.Ek
-.Bk -words
-.Op Fl X Ar exclude-file
-.Ek
-.Sh DESCRIPTION
-The
-.Nm
-utility compares the file hierarchy rooted in the current directory
-against a specification read from the standard input.
-Messages are written to the standard output for any files whose
-characteristics do not match the specification, or which are
-missing from either the file hierarchy or the specification.
-.Pp
-The options are as follows:
-.Bl -tag -width flag
-.It Fl c
-Print a specification for the file hierarchy to the standard output.
-.It Fl d
-Ignore everything except directory type files.
-.It Fl C
-Print
-.Pq Sq dump
-the specification as provided by
-.Fl f Ar spec
-in a format that's easier to parse with various tools.
-The full path name is always printed as the first field, and
-.Fl k ,
-.Fl K ,
-and
-.Fl R
-can be used to control which other keywords are printed,
-and
-.Fl E
-and
-.Fl I
-can be used to control which files are printed.
-.It Fl D
-As per
-.Fl C ,
-except that the path name is always printed as the last field instead of
-the first.
-.It Fl E Ar tags
-Add the comma separated tags to the
-.Dq exclusion
-list.
-Non-directories with tags which are in the exclusion list are not printed with
-.Fl D .
-.It Fl e
-Don't complain about files that are in the file hierarchy, but not in the
-specification.
-.It Fl f Ar spec
-Read the specification from
-.Ar file ,
-instead of from the standard input.
-.It Fl I Ar tags
-Add the comma separated tags to the
-.Dq inclusion
-list.
-Non-directories with tags which are in the inclusion list are printed with
-.Fl D .
-If no inclusion list is provided, the default is to display all files.
-.It Fl i
-If specified, set the schg and/or sappnd flags.
-.It Fl K Ar keywords
-Add the specified (whitespace or comma separated) keywords to the current
-set of keywords.
-If
-.Ql all
-is specified, add all of the other keywords.
-.It Fl k Ar keywords
-Use the
-.Sy type
-keyword plus the specified (whitespace or comma separated)
-keywords instead of the current set of keywords.
-If
-.Ql all
-is specified, use all of the other keywords.
-.It Fl l
-Do
-.Dq loose
-permissions checks, in which more stringent permissions
-will match less stringent ones. For example, a file marked mode 0444
-will pass a check for mode 0644.
-.Dq Loose
-checks apply only to read, write and execute permissions -- in
-particular, if other bits like the sticky bit or suid/sgid bits are
-set either in the specification or the file, exact checking will be
-performed. This flag may not be set at the same time as the
-.Fl u
-or
-.Fl U
-flags.
-.It Fl L
-Follow all symbolic links in the file hierarchy.
-.It Fl m
-If the schg and/or sappnd flags are specified, reset these flags. Note that
-this is only possible with securelevel less than 1 (i. e. in single user mode
-or while the system is running in insecure mode). See
-.Xr init 8
-for information on security levels.
-.It Fl M
-Permit merging of specification entries with different types,
-with the last entry take precedence.
-.It Fl N Ar dbdir
-Use the user database text file
-.Pa master.passwd
-and group database text file
-.Pa group
-from
-.Ar dbdir ,
-rather than using the results from the system's
-.Xr getpwnam 3
-and
-.Xr getgrnam 3
-(and related) library calls.
-.It Fl p Ar path
-Use the file hierarchy rooted in
-.Ar path ,
-instead of the current directory.
-.It Fl P
-Don't follow symbolic links in the file hierarchy, instead consider
-the symbolic link itself in any comparisons.
-This is the default.
-.It Fl r
-Remove any files in the file hierarchy that are not described in the
-specification.
-.It Fl R Ar keywords
-Remove the specified (whitespace or comma separated) keywords from the current
-set of keywords.
-If
-.Ql all
-is specified, remove all of the other keywords.
-.It Fl s Ar seed
-Display a single checksum to the standard error output that represents all
-of the files for which the keyword
-.Sy cksum
-was specified.
-The checksum is seeded with the specified value.
-.It Fl u
-Modify the owner, group, permissions, and flags of existing files,
-the device type of devices, and symbolic link targets,
-to match the specification.
-Create any missing directories, devices or symbolic links.
-User, group, and permissions must all be specified for missing directories
-to be created.
-Note that unless the
-.Fl i
-option is given, the schg and sappnd flags will not be set, even if
-specified. If
-.Fl m
-is given, these flags will be reset.
-Exit with a status of 0 on success,
-2 if the file hierarchy did not match the specification, and
-1 if any other error occurred.
-.It Fl U
-Same as
-.Fl u
-except that a mismatch is not considered to be an error if it was corrected.
-.It Fl W
-Don't attempt to set various file attributes such as the
-ownership, mode, flags, or time
-when creating new directories or changing existing entries.
-This option will be most useful when used in conjunction with
-.Fl u
-or
-.Fl U .
-.It Fl x
-Don't descend below mount points in the file hierarchy.
-.It Fl X Ar exclude-file
-The specified file contains
-.Xr fnmatch 3
-patterns matching files to be excluded from
-the specification, one to a line.
-If the pattern contains a
-.Ql \&/
-character, it will be matched against entire pathnames (relative to
-the starting directory); otherwise,
-it will be matched against basenames only.
-Comments are permitted in
-the
-.Ar exclude-list
-file.
-.El
-.Pp
-Specifications are mostly composed of
-.Dq keywords ,
-i.e. strings that
-that specify values relating to files.
-No keywords have default values, and if a keyword has no value set, no
-checks based on it are performed.
-.Pp
-Currently supported keywords are as follows:
-.Bl -tag -width Sy
-.It Sy cksum
-The checksum of the file using the default algorithm specified by
-the
-.Xr cksum 1
-utility.
-.It Sy device
-The device number to use for
-.Sy block
-or
-.Sy char
-file types.
-The argument must be one of the following forms:
-.Pp
-.Bl -tag -width 4n
-.It Xo
-.Sm off
-.Ar format ,
-.Ar major ,
-.Ar minor
-.Sm on
-.Xc
-A device with
-.Ar major
-and
-.Ar minor
-fields, for an operating system specified with
-.Ar format .
-See below for valid formats.
-.It Xo
-.Sm off
-.Ar format ,
-.Ar major ,
-.Ar unit ,
-.Ar subunit
-.Sm on
-.Xc
-A device with
-.Ar major ,
-.Ar unit ,
-and
-.Ar subunit
-fields, for an operating system specified with
-.Ar format .
-(Currently this is only supported by the
-.Sy bsdos
-format.)
-.It Ar number
-Opaque number (as stored on the file system).
-.El
-.Pp
-The following values for
-.Ar format
-are recognized:
-.Sy native ,
-.Sy 386bsd ,
-.Sy 4bsd ,
-.Sy bsdos ,
-.Sy freebsd ,
-.Sy hpux ,
-.Sy isc ,
-.Sy linux ,
-.Sy netbsd ,
-.Sy osf1 ,
-.Sy sco ,
-.Sy solaris ,
-.Sy sunos ,
-.Sy svr3 ,
-.Sy svr4 ,
-and
-.Sy ultrix .
-.Pp
-See
-.Xr mknod 8
-for more details.
-.It Sy flags
-The file flags as a symbolic name. See
-.Xr chflags 1
-for information on these names. If no flags are to be set the string
-.Ql none
-may be used to override the current default.
-Note that the schg and sappnd flags are treated specially (see the
-.Fl i
-and
-.Fl m
-options).
-.It Sy ignore
-Ignore any file hierarchy below this file.
-.It Sy gid
-The file group as a numeric value.
-.It Sy gname
-The file group as a symbolic name.
-.It Sy link
-The file the symbolic link is expected to reference.
-.It Sy md5
-The
-.Tn MD5
-cryptographic message digest of the file.
-.It Sy md5digest
-Synonym for
-.Sy md5 .
-.It Sy mode
-The current file's permissions as a numeric (octal) or symbolic
-value.
-.It Sy nlink
-The number of hard links the file is expected to have.
-.It Sy optional
-The file is optional; don't complain about the file if it's
-not in the file hierarchy.
-.It Sy rmd160
-The
-.Tn RMD-160
-cryptographic message digest of the file.
-.It Sy rmd160digest
-Synonym for
-.Sy rmd160 .
-.It Sy sha1
-The
-.Tn SHA-1
-cryptographic message digest of the file.
-.It Sy sha1digest
-Synonym for
-.Sy sha1 .
-.It Sy size
-The size, in bytes, of the file.
-.It Sy tags
-Comma delimited tags to be matched with
-.Fl E
-and
-.Fl I .
-These may be specified without leading or trailing commas, but will be
-stored internally with them.
-.It Sy time
-The last modification time of the file.
-.It Sy type
-The type of the file; may be set to any one of the following:
-.Pp
-.Bl -tag -width Sy -compact
-.It Sy block
-block special device
-.It Sy char
-character special device
-.It Sy dir
-directory
-.It Sy fifo
-fifo
-.It Sy file
-regular file
-.It Sy link
-symbolic link
-.It Sy socket
-socket
-.El
-.It Sy uid
-The file owner as a numeric value.
-.It Sy uname
-The file owner as a symbolic name.
-.El
-.Pp
-The default set of keywords are
-.Sy flags ,
-.Sy gid ,
-.Sy link ,
-.Sy mode ,
-.Sy nlink ,
-.Sy size ,
-.Sy time ,
-.Sy type ,
-and
-.Sy uid .
-.Pp
-There are four types of lines in a specification:
-.Pp
-.Bl -enum
-.It
-Set global values for a keyword.
-This consists of the string
-.Ql /set
-followed by whitespace, followed by sets of keyword/value
-pairs, separated by whitespace.
-Keyword/value pairs consist of a keyword, followed by an equals sign
-.Pq Ql = ,
-followed by a value, without whitespace characters.
-Once a keyword has been set, its value remains unchanged until either
-reset or unset.
-.It
-Unset global values for a keyword.
-This consists of the string
-.Ql /unset ,
-followed by whitespace, followed by one or more keywords,
-separated by whitespace.
-If
-.Ql all
-is specified, unset all of the keywords.
-.It
-A file specification, consisting of a path name, followed by whitespace,
-followed by zero or more whitespace separated keyword/value pairs.
-.Pp
-The path name may be preceded by whitespace characters.
-The path name may contain any of the standard path name matching
-characters
-.Po
-.Ql \&[ ,
-.Ql \&] ,
-.Ql \&?
-or
-.Ql *
-.Pc ,
-in which case files
-in the hierarchy will be associated with the first pattern that
-they match.
-.Nm
-uses
-.Xr strsvis 3
-(in VIS_CSTYLE format) to encode path names containing
-non-printable characters. Whitespace characters are encoded as
-.Ql \es
-(space),
-.Ql \et
-(tab), and
-.Ql \en
-(new line).
-.Ql #
-characters in path names are escaped by a preceding backslash
-.Ql \e
-to distinguish them from comments.
-.Pp
-Each of the keyword/value pairs consist of a keyword, followed by an
-equals sign
-.Pq Ql = ,
-followed by the keyword's value, without
-whitespace characters.
-These values override, without changing, the global value of the
-corresponding keyword.
-.Pp
-The first path name entry listed must be a directory named
-.Ql \&. ,
-as this ensures that intermixing full and relative path names will
-work consistently and correctly.
-Multiple entries for a directory named
-.Ql \&.
-are permitted; the settings for the last such entry override those
-of the existing entry.
-.Pp
-A path name that contains a slash
-.Pq Ql /
-that is not the first character will be treated as a full path
-(relative to the root of the tree).
-All parent directories referenced in the path name must exist.
-The current directory path used by relative path names will be updated
-appropriately.
-Multiple entries for the same full path are permitted if the types
-are the same (unless
-.Fl M
-is given, and then the types may differ);
-in this case the settings for the last entry take precedence.
-.Pp
-A path name that does not contain a slash will be treated as a relative path.
-Specifying a directory will cause subsequent files to be searched
-for in that directory hierarchy.
-.It
-A line containing only the string
-.Ql \&..
-which causes the current directory path (used by relative paths)
-to ascend one level.
-.El
-.Pp
-Empty lines and lines whose first non-whitespace character is a hash
-mark
-.Pq Ql #
-are ignored.
-.Pp
-The
-.Nm
-utility exits with a status of 0 on success, 1 if any error occurred,
-and 2 if the file hierarchy did not match the specification.
-.Sh FILES
-.Bl -tag -width /etc/mtree -compact
-.It Pa /etc/mtree
-system specification directory
-.El
-.Sh EXAMPLES
-To detect system binaries that have been
-.Dq trojan horsed ,
-it is recommended that
-.Nm
-be run on the file systems, and a copy of the results stored on a different
-machine, or, at least, in encrypted form.
-The seed for the
-.Fl s
-option should not be an obvious value and the final checksum should not be
-stored on-line under any circumstances!
-Then, periodically,
-.Nm
-should be run against the on-line specifications and the final checksum
-compared with the previous value.
-While it is possible for the bad guys to change the on-line specifications
-to conform to their modified binaries, it shouldn't be possible for them
-to make it produce the same final checksum value.
-If the final checksum value changes, the off-line copies of the specification
-can be used to detect which of the binaries have actually been modified.
-.Pp
-The
-.Fl d
-and
-.Fl u
-options can be used in combination to create directory hierarchies
-for distributions and other such things.
-.Sh SEE ALSO
-.Xr chflags 1 ,
-.Xr chgrp 1 ,
-.Xr chmod 1 ,
-.Xr cksum 1 ,
-.Xr md5 1 ,
-.Xr stat 2 ,
-.Xr fnmatch 3 ,
-.Xr fts 3 ,
-.Xr strsvis 3 ,
-.Xr chown 8 ,
-.Xr mknod 8
-.Sh HISTORY
-The
-.Nm
-utility appeared in
-.Bx 4.3 Reno .
-The
-.Sy optional
-keyword appeared in
-.Nx 1.2 .
-The
-.Fl U
-flag appeared in
-.Nx 1.3 .
-The
-.Sy flags
-and
-.Sy md5
-keywords, and
-.Fl i
-and
-.Fl m
-flags
-appeared in
-.Nx 1.4 .
-The
-.Sy device ,
-.Sy rmd160 ,
-.Sy sha1 ,
-.Sy tags ,
-and
-.Sy all
-keywords,
-.Fl D ,
-.Fl E ,
-.Fl I ,
-.Fl l ,
-.Fl L ,
-.Fl N ,
-.Fl P ,
-.Fl R ,
-.Fl W ,
-and
-.Fl X
-flags, and support for full paths appeared in
-.Nx 1.6 .
diff --git a/pkgtools/mtree/files/mtree.c b/pkgtools/mtree/files/mtree.c
deleted file mode 100644
index 77c4d710b7a..00000000000
--- a/pkgtools/mtree/files/mtree.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/* $NetBSD: mtree.c,v 1.3 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1989, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if defined(__COPYRIGHT) && !defined(lint)
-__COPYRIGHT("@(#) Copyright (c) 1989, 1990, 1993\n\
- The Regents of the University of California. All rights reserved.\n");
-#endif /* not lint */
-
-#if defined(__RCSID) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: mtree.c,v 1.3 2004/08/21 04:10:45 jlam Exp $");
-#endif
-#endif /* not lint */
-
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "extern.h"
-
-int ftsoptions = FTS_PHYSICAL;
-int cflag, Cflag, dflag, Dflag, eflag, iflag, lflag, mflag,
- rflag, sflag, tflag, uflag, Uflag;
-char fullpath[MAXPATHLEN];
-
- int main(int, char **);
-static void usage(void);
-
-int
-main(int argc, char **argv)
-{
- int ch, status;
- char *dir, *p;
-
- setprogname(argv[0]);
-
- dir = NULL;
- init_excludes();
-
- while ((ch = getopt(argc, argv, "cCdDeE:f:I:ik:K:lLmMN:p:PrR:s:tuUWxX:"))
- != -1) {
- switch((char)ch) {
- case 'c':
- cflag = 1;
- break;
- case 'C':
- Cflag = 1;
- break;
- case 'd':
- dflag = 1;
- break;
- case 'D':
- Dflag = 1;
- break;
- case 'E':
- parsetags(&excludetags, optarg);
- break;
- case 'e':
- eflag = 1;
- break;
- case 'f':
- if (!(freopen(optarg, "r", stdin)))
- mtree_err("%s: %s", optarg, strerror(errno));
- break;
- case 'i':
- iflag = 1;
- break;
- case 'I':
- parsetags(&includetags, optarg);
- break;
- case 'k':
- keys = F_TYPE;
- while ((p = strsep(&optarg, " \t,")) != NULL)
- if (*p != '\0')
- keys |= parsekey(p, NULL);
- break;
- case 'K':
- while ((p = strsep(&optarg, " \t,")) != NULL)
- if (*p != '\0')
- keys |= parsekey(p, NULL);
- break;
- case 'l':
- lflag = 1;
- break;
- case 'L':
- ftsoptions &= ~FTS_PHYSICAL;
- ftsoptions |= FTS_LOGICAL;
- break;
- case 'm':
- mflag = 1;
- break;
- case 'M':
- mtree_Mflag = 1;
- break;
- case 'N':
- if (! setup_getid(optarg))
- mtree_err(
- "Unable to use user and group databases in `%s'",
- optarg);
- break;
- case 'p':
- dir = optarg;
- break;
- case 'P':
- ftsoptions &= ~FTS_LOGICAL;
- ftsoptions |= FTS_PHYSICAL;
- break;
- case 'r':
- rflag = 1;
- break;
- case 'R':
- while ((p = strsep(&optarg, " \t,")) != NULL)
- if (*p != '\0')
- keys &= ~parsekey(p, NULL);
- break;
- case 's':
- sflag = 1;
- crc_total = ~strtol(optarg, &p, 0);
- if (*p)
- mtree_err("illegal seed value -- %s", optarg);
- break;
- case 't':
- tflag = 1;
- break;
- case 'u':
- uflag = 1;
- break;
- case 'U':
- Uflag = uflag = 1;
- break;
- case 'W':
- mtree_Wflag = 1;
- break;
- case 'x':
- ftsoptions |= FTS_XDEV;
- break;
- case 'X':
- read_excludes_file(optarg);
- break;
- case '?':
- default:
- usage();
- }
- }
- argc -= optind;
- argv += optind;
-
- if (argc)
- usage();
-
- if (dir && chdir(dir))
- mtree_err("%s: %s", dir, strerror(errno));
-
- if ((cflag || sflag) && !getcwd(fullpath, sizeof(fullpath)))
- mtree_err("%s", strerror(errno));
-
- if ((cflag && Cflag) || (cflag && Dflag) || (Cflag && Dflag))
- mtree_err("-c, -C and -D flags are mutually exclusive");
-
- if (iflag && mflag)
- mtree_err("-i and -m flags are mutually exclusive");
-
- if (lflag && uflag)
- mtree_err("-l and -u flags are mutually exclusive");
-
- if (cflag) {
- cwalk();
- exit(0);
- }
- if (Cflag || Dflag) {
- dump_nodes("", spec(stdin), Dflag);
- exit(0);
- }
- status = verify();
- if (Uflag & (status == MISMATCHEXIT))
- status = 0;
- exit(status);
-}
-
-static void
-usage(void)
-{
-
- fprintf(stderr,
- "usage: %s [-cCdDelLMPruUWx] [-i|-m] [-f spec] [-k key]\n"
- "\t\t[-K addkey] [-R removekey] [-I inctags] [-E exctags]\n"
- "\t\t[-N userdbdir] [-X exclude-file] [-p path] [-s seed]\n",
- getprogname());
- exit(1);
-}
diff --git a/pkgtools/mtree/files/mtree.cat8 b/pkgtools/mtree/files/mtree.cat8
deleted file mode 100644
index 9b93e35ef96..00000000000
--- a/pkgtools/mtree/files/mtree.cat8
+++ /dev/null
@@ -1,320 +0,0 @@
-MTREE(8) NetBSD System Manager's Manual MTREE(8)
-
-NNAAMMEE
- mmttrreeee - map a directory hierarchy
-
-SSYYNNOOPPSSIISS
- mmttrreeee [--ccCCddDDeellLLMMPPrruuUUWWxx] [--ii | --mm] [--ff _s_p_e_c] [--pp _p_a_t_h] [--kk _k_e_y_w_o_r_d_s]
- [--KK _k_e_y_w_o_r_d_s] [--RR _k_e_y_w_o_r_d_s] [--EE _t_a_g_s] [--II _t_a_g_s] [--NN _d_b_d_i_r]
- [--ss _s_e_e_d] [--XX _e_x_c_l_u_d_e_-_f_i_l_e]
-
-DDEESSCCRRIIPPTTIIOONN
- The mmttrreeee utility compares the file hierarchy rooted in the current di-
- rectory against a specification read from the standard input. Messages
- are written to the standard output for any files whose characteristics do
- not match the specification, or which are missing from either the file
- hierarchy or the specification.
-
- The options are as follows:
-
- --cc Print a specification for the file hierarchy to the standard out-
- put.
-
- --dd Ignore everything except directory type files.
-
- --CC Print (`dump') the specification as provided by --ff _s_p_e_c in a format
- that's easier to parse with various tools. The full path name is
- always printed as the first field, and --kk, --KK, and --RR can be used
- to control which other keywords are printed, and --EE and --II can be
- used to control which files are printed.
-
- --DD As per --CC, except that the path name is always printed as the last
- field instead of the first.
-
- --EE _t_a_g_s
- Add the comma separated tags to the ``exclusion'' list. Non-direc-
- tories with tags which are in the exclusion list are not printed
- with --DD.
-
- --ee Don't complain about files that are in the file hierarchy, but not
- in the specification.
-
- --ff _s_p_e_c
- Read the specification from _f_i_l_e, instead of from the standard in-
- put.
-
- --II _t_a_g_s
- Add the comma separated tags to the ``inclusion'' list. Non-direc-
- tories with tags which are in the inclusion list are printed with
- --DD. If no inclusion list is provided, the default is to display all
- files.
-
- --ii If specified, set the schg and/or sappnd flags.
-
- --KK _k_e_y_w_o_r_d_s
- Add the specified (whitespace or comma separated) keywords to the
- current set of keywords. If `all' is specified, add all of the
- other keywords.
-
- --kk _k_e_y_w_o_r_d_s
- Use the ttyyppee keyword plus the specified (whitespace or comma sepa-
- rated) keywords instead of the current set of keywords. If `all'
- is specified, use all of the other keywords.
-
- --ll Do ``loose'' permissions checks, in which more stringent permis-
- sions will match less stringent ones. For example, a file marked
- mode 0444 will pass a check for mode 0644. ``Loose'' checks apply
- only to read, write and execute permissions -- in particular, if
- other bits like the sticky bit or suid/sgid bits are set either in
- the specification or the file, exact checking will be performed.
- This flag may not be set at the same time as the --uu or --UU flags.
-
- --LL Follow all symbolic links in the file hierarchy.
-
- --mm If the schg and/or sappnd flags are specified, reset these flags.
- Note that this is only possible with securelevel less than 1 (i. e.
- in single user mode or while the system is running in insecure
- mode). See init(8) for information on security levels.
-
- --MM Permit merging of specification entries with different types, with
- the last entry take precedence.
-
- --NN _d_b_d_i_r
- Use the user database text file _m_a_s_t_e_r_._p_a_s_s_w_d and group database
- text file _g_r_o_u_p from _d_b_d_i_r, rather than using the results from the
- system's getpwnam(3) and getgrnam(3) (and related) library calls.
-
- --pp _p_a_t_h
- Use the file hierarchy rooted in _p_a_t_h, instead of the current di-
- rectory.
-
- --PP Don't follow symbolic links in the file hierarchy, instead consider
- the symbolic link itself in any comparisons. This is the default.
-
- --rr Remove any files in the file hierarchy that are not described in
- the specification.
-
- --RR _k_e_y_w_o_r_d_s
- Remove the specified (whitespace or comma separated) keywords from
- the current set of keywords. If `all' is specified, remove all of
- the other keywords.
-
- --ss _s_e_e_d
- Display a single checksum to the standard error output that repre-
- sents all of the files for which the keyword cckkssuumm was specified.
- The checksum is seeded with the specified value.
-
- --uu Modify the owner, group, permissions, and flags of existing files,
- the device type of devices, and symbolic link targets, to match the
- specification. Create any missing directories, devices or symbolic
- links. User, group, and permissions must all be specified for
- missing directories to be created. Note that unless the --ii option
- is given, the schg and sappnd flags will not be set, even if speci-
- fied. If --mm is given, these flags will be reset. Exit with a sta-
- tus of 0 on success, 2 if the file hierarchy did not match the
- specification, and 1 if any other error occurred.
-
- --UU Same as --uu except that a mismatch is not considered to be an error
- if it was corrected.
-
- --WW Don't attempt to set various file attributes such as the ownership,
- mode, flags, or time when creating new directories or changing ex-
- isting entries. This option will be most useful when used in con-
- junction with --uu or --UU.
-
- --xx Don't descend below mount points in the file hierarchy.
-
- --XX _e_x_c_l_u_d_e_-_f_i_l_e
- The specified file contains fnmatch(3) patterns matching files to
- be excluded from the specification, one to a line. If the pattern
- contains a `/' character, it will be matched against entire path-
- names (relative to the starting directory); otherwise, it will be
- matched against basenames only. Comments are permitted in the
- _e_x_c_l_u_d_e_-_l_i_s_t file.
-
- Specifications are mostly composed of ``keywords'', i.e. strings that
- that specify values relating to files. No keywords have default values,
- and if a keyword has no value set, no checks based on it are performed.
-
- Currently supported keywords are as follows:
-
- cckkssuumm The checksum of the file using the default algorithm specified by
- the cksum(1) utility.
-
- ddeevviiccee The device number to use for bblloocckk or cchhaarr file types. The argu-
- ment must be one of the following forms:
-
- _f_o_r_m_a_t,_m_a_j_o_r,_m_i_n_o_r
- A device with _m_a_j_o_r and _m_i_n_o_r fields, for an operating sys-
- tem specified with _f_o_r_m_a_t. See below for valid formats.
-
- _f_o_r_m_a_t,_m_a_j_o_r,_u_n_i_t,_s_u_b_u_n_i_t
- A device with _m_a_j_o_r, _u_n_i_t, and _s_u_b_u_n_i_t fields, for an oper-
- ating system specified with _f_o_r_m_a_t. (Currently this is on-
- ly supported by the bbssddooss format.)
-
- _n_u_m_b_e_r
- Opaque number (as stored on the file system).
-
- The following values for _f_o_r_m_a_t are recognized: nnaattiivvee, 338866bbssdd,
- 44bbssdd, bbssddooss, ffrreeeebbssdd, hhppuuxx, iisscc, lliinnuuxx, nneettbbssdd, oossff11, ssccoo,
- ssoollaarriiss, ssuunnooss, ssvvrr33, ssvvrr44, and uullttrriixx.
-
- See mknod(8) for more details.
-
- ffllaaggss The file flags as a symbolic name. See chflags(1) for informa-
- tion on these names. If no flags are to be set the string `none'
- may be used to override the current default. Note that the schg
- and sappnd flags are treated specially (see the --ii and --mm op-
- tions).
-
- iiggnnoorree Ignore any file hierarchy below this file.
-
- ggiidd The file group as a numeric value.
-
- ggnnaammee The file group as a symbolic name.
-
- lliinnkk The file the symbolic link is expected to reference.
-
- mmdd55 The MD5 cryptographic message digest of the file.
-
- mmdd55ddiiggeesstt
- Synonym for mmdd55.
-
- mmooddee The current file's permissions as a numeric (octal) or symbolic
- value.
-
- nnlliinnkk The number of hard links the file is expected to have.
-
- ooppttiioonnaall
- The file is optional; don't complain about the file if it's not
- in the file hierarchy.
-
- rrmmdd116600 The RMD-160 cryptographic message digest of the file.
-
- rrmmdd116600ddiiggeesstt
- Synonym for rrmmdd116600.
-
- sshhaa11 The SHA-1 cryptographic message digest of the file.
-
- sshhaa11ddiiggeesstt
- Synonym for sshhaa11.
-
- ssiizzee The size, in bytes, of the file.
-
- ttaaggss Comma delimited tags to be matched with --EE and --II. These may be
- specified without leading or trailing commas, but will be stored
- internally with them.
-
- ttiimmee The last modification time of the file.
-
- ttyyppee The type of the file; may be set to any one of the following:
-
- bblloocckk block special device
- cchhaarr character special device
- ddiirr directory
- ffiiffoo fifo
- ffiillee regular file
- lliinnkk symbolic link
- ssoocckkeett socket
-
- uuiidd The file owner as a numeric value.
-
- uunnaammee The file owner as a symbolic name.
-
- The default set of keywords are ffllaaggss, ggiidd, lliinnkk, mmooddee, nnlliinnkk, ssiizzee,
- ttiimmee, ttyyppee, and uuiidd.
-
- There are four types of lines in a specification:
-
- 1. Set global values for a keyword. This consists of the string `/set'
- followed by whitespace, followed by sets of keyword/value pairs,
- separated by whitespace. Keyword/value pairs consist of a keyword,
- followed by an equals sign (`='), followed by a value, without
- whitespace characters. Once a keyword has been set, its value re-
- mains unchanged until either reset or unset.
-
- 2. Unset global values for a keyword. This consists of the string
- `/unset', followed by whitespace, followed by one or more keywords,
- separated by whitespace. If `all' is specified, unset all of the
- keywords.
-
- 3. A file specification, consisting of a path name, followed by whites-
- pace, followed by zero or more whitespace separated keyword/value
- pairs.
-
- The path name may be preceded by whitespace characters. The path
- name may contain any of the standard path name matching characters
- (`[', `]', `?' or `*'), in which case files in the hierarchy will be
- associated with the first pattern that they match. mmttrreeee uses
- strsvis(3) (in VIS_CSTYLE format) to encode path names containing
- non-printable characters. Whitespace characters are encoded as `\s'
- (space), `\t' (tab), and `\n' (new line). `#' characters in path
- names are escaped by a preceding backslash `\' to distinguish them
- from comments.
-
- Each of the keyword/value pairs consist of a keyword, followed by an
- equals sign (`='), followed by the keyword's value, without whites-
- pace characters. These values override, without changing, the glob-
- al value of the corresponding keyword.
-
- The first path name entry listed must be a directory named `.', as
- this ensures that intermixing full and relative path names will work
- consistently and correctly. Multiple entries for a directory named
- `.' are permitted; the settings for the last such entry override
- those of the existing entry.
-
- A path name that contains a slash (`/') that is not the first char-
- acter will be treated as a full path (relative to the root of the
- tree). All parent directories referenced in the path name must ex-
- ist. The current directory path used by relative path names will be
- updated appropriately. Multiple entries for the same full path are
- permitted if the types are the same (unless --MM is given, and then
- the types may differ); in this case the settings for the last entry
- take precedence.
-
- A path name that does not contain a slash will be treated as a rela-
- tive path. Specifying a directory will cause subsequent files to be
- searched for in that directory hierarchy.
-
- 4. A line containing only the string `..' which causes the current di-
- rectory path (used by relative paths) to ascend one level.
-
- Empty lines and lines whose first non-whitespace character is a hash mark
- (`#') are ignored.
-
- The mmttrreeee utility exits with a status of 0 on success, 1 if any error oc-
- curred, and 2 if the file hierarchy did not match the specification.
-
-FFIILLEESS
- /etc/mtree system specification directory
-
-EEXXAAMMPPLLEESS
- To detect system binaries that have been ``trojan horsed'', it is recom-
- mended that mmttrreeee be run on the file systems, and a copy of the results
- stored on a different machine, or, at least, in encrypted form. The seed
- for the --ss option should not be an obvious value and the final checksum
- should not be stored on-line under any circumstances! Then, periodical-
- ly, mmttrreeee should be run against the on-line specifications and the final
- checksum compared with the previous value. While it is possible for the
- bad guys to change the on-line specifications to conform to their modi-
- fied binaries, it shouldn't be possible for them to make it produce the
- same final checksum value. If the final checksum value changes, the off-
- line copies of the specification can be used to detect which of the bina-
- ries have actually been modified.
-
- The --dd and --uu options can be used in combination to create directory hi-
- erarchies for distributions and other such things.
-
-SSEEEE AALLSSOO
- chflags(1), chgrp(1), chmod(1), cksum(1), md5(1), stat(2), fnmatch(3),
- fts(3), strsvis(3), chown(8), mknod(8)
-
-HHIISSTTOORRYY
- The mmttrreeee utility appeared in 4.3BSD-Reno. The ooppttiioonnaall keyword appeared
- in NetBSD 1.2. The --UU flag appeared in NetBSD 1.3. The ffllaaggss and mmdd55
- keywords, and --ii and --mm flags appeared in NetBSD 1.4. The ddeevviiccee,
- rrmmdd116600, sshhaa11, ttaaggss, and aallll keywords, --DD, --EE, --II, --ll, --LL, --NN, --PP, --RR, --WW,
- and --XX flags, and support for full paths appeared in NetBSD 1.6.
-
-NetBSD 1.6.2 July 22, 2004 5
diff --git a/pkgtools/mtree/files/mtree.h b/pkgtools/mtree/files/mtree.h
deleted file mode 100644
index 30b81722354..00000000000
--- a/pkgtools/mtree/files/mtree.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* $NetBSD: mtree.h,v 1.2 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mtree.h 8.1 (Berkeley) 6/6/93
- */
-
-#ifndef _MTREE_H_
-#define _MTREE_H_
-
-#define KEYDEFAULT (F_GID | F_MODE | F_NLINK | F_SIZE | F_SLINK | \
- F_TIME | F_TYPE | F_UID | F_FLAGS)
-
-#define MISMATCHEXIT 2
-
-typedef struct _node {
- struct _node *parent, *child; /* up, down */
- struct _node *prev, *next; /* left, right */
- off_t st_size; /* size */
- struct timespec st_mtimespec; /* last modification time */
- char *slink; /* symbolic link reference */
- uid_t st_uid; /* uid */
- gid_t st_gid; /* gid */
-#define MBITS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
- mode_t st_mode; /* mode */
- dev_t st_rdev; /* device type */
- u_long st_flags; /* flags */
- nlink_t st_nlink; /* link count */
- u_long cksum; /* check sum */
- char *md5digest; /* MD5 digest */
- char *rmd160digest; /* RMD-160 digest */
- char *sha1digest; /* SHA1 digest */
- char *tags; /* tags, comma delimited */
- size_t lineno; /* line # entry came from */
-
-#define F_CKSUM 0x00000001 /* cksum(1) check sum */
-#define F_DEV 0x00000002 /* device type */
-#define F_DONE 0x00000004 /* directory done */
-#define F_FLAGS 0x00000008 /* file flags */
-#define F_GID 0x00000010 /* gid */
-#define F_GNAME 0x00000020 /* group name */
-#define F_IGN 0x00000040 /* ignore */
-#define F_MAGIC 0x00000080 /* name has magic chars */
-#define F_MD5 0x00000100 /* MD5 digest */
-#define F_MODE 0x00000200 /* mode */
-#define F_NLINK 0x00000400 /* number of links */
-#define F_OPT 0x00000800 /* existence optional */
-#define F_RMD160 0x00001000 /* RMD-160 digest */
-#define F_SHA1 0x00002000 /* SHA1 digest */
-#define F_SIZE 0x00004000 /* size */
-#define F_SLINK 0x00008000 /* symbolic link */
-#define F_TAGS 0x00010000 /* tags */
-#define F_TIME 0x00020000 /* modification time */
-#define F_TYPE 0x00040000 /* file type */
-#define F_UID 0x00080000 /* uid */
-#define F_UNAME 0x00100000 /* user name */
-#define F_VISIT 0x00200000 /* file visited */
-
- int flags; /* items set */
-
-#define F_BLOCK 0x001 /* block special */
-#define F_CHAR 0x002 /* char special */
-#define F_DIR 0x004 /* directory */
-#define F_FIFO 0x008 /* fifo */
-#define F_FILE 0x010 /* regular file */
-#define F_LINK 0x020 /* symbolic link */
-#define F_SOCK 0x040 /* socket */
- int type; /* file type */
-
- char name[1]; /* file name (must be last) */
-} NODE;
-
-
-typedef struct {
- char **list;
- int count;
-} slist_t;
-
-
-/*
- * prototypes for functions published to other programs which want to use
- * the specfile parser but don't want to pull in all of "extern.h"
- */
-const char *inotype(u_int);
-u_int nodetoino(u_int);
-int setup_getid(const char *);
-NODE *spec(FILE *);
-void free_nodes(NODE *);
-char *vispath(const char *);
-
-
-#define RP(p) \
- ((p)->fts_path[0] == '.' && (p)->fts_path[1] == '/' ? \
- (p)->fts_path + 2 : (p)->fts_path)
-
-#define UF_MASK ((UF_NODUMP | UF_IMMUTABLE | \
- UF_APPEND | UF_OPAQUE) \
- & UF_SETTABLE) /* user settable flags */
-#define SF_MASK ((SF_ARCHIVED | SF_IMMUTABLE | \
- SF_APPEND) & SF_SETTABLE) /* root settable flags */
-#define CH_MASK (UF_MASK | SF_MASK) /* all settable flags */
-#define SP_FLGS (SF_IMMUTABLE | SF_APPEND) /* special flags */
-
-#endif /* _MTREE_H_ */
diff --git a/pkgtools/mtree/files/mtree2nbcompat b/pkgtools/mtree/files/mtree2nbcompat
deleted file mode 100755
index aaa7093ce2e..00000000000
--- a/pkgtools/mtree/files/mtree2nbcompat
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: mtree2nbcompat,v 1.2 2004/08/27 03:19:29 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-if [ $# -lt 1 ]; then echo "mtree2nbcompat dest"; exit 1; fi
-
-: ${PKGSRCDIR:=/usr/pkgsrc}
-: ${BSDSRCDIR:=/usr/src}
-
-if [ ! -d "${BSDSRCDIR}" ]; then
- echo "${BSDSRCDIR} doesn't exist"
- exit 1
-fi
-
-src2nbcompat="${PKGSRCDIR}/pkgtools/libnbcompat/files/src2nbcompat"
-dest=$1
-
-$src2nbcompat ${BSDSRCDIR}/usr.sbin/mtree $dest
-$src2nbcompat ${BSDSRCDIR}/bin/ls/stat_flags.c $dest/stat_flags.c
-$src2nbcompat ${BSDSRCDIR}/bin/ls/stat_flags.h $dest/stat_flags.h
-$src2nbcompat ${BSDSRCDIR}/sbin/mknod/pack_dev.c $dest/pack_dev.c
-$src2nbcompat ${BSDSRCDIR}/sbin/mknod/pack_dev.h $dest/pack_dev.h
diff --git a/pkgtools/mtree/files/pack_dev.c b/pkgtools/mtree/files/pack_dev.c
deleted file mode 100644
index 3a6407be3c2..00000000000
--- a/pkgtools/mtree/files/pack_dev.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/* $NetBSD: pack_dev.c,v 1.2 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Charles M. Hannum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if !defined(lint)
-__RCSID("$NetBSD: pack_dev.c,v 1.2 2004/08/21 04:10:45 jlam Exp $");
-#endif /* not lint */
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "pack_dev.h"
-
-static pack_t pack_netbsd;
-static pack_t pack_freebsd;
-static pack_t pack_8_8;
-static pack_t pack_12_20;
-static pack_t pack_14_18;
-static pack_t pack_8_24;
-static pack_t pack_bsdos;
-static int compare_format(const void *, const void *);
-
-static const char iMajorError[] = "invalid major number";
-static const char iMinorError[] = "invalid minor number";
-static const char tooManyFields[] = "too many fields for format";
-
- /* exported */
-portdev_t
-pack_native(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev(numbers[0], numbers[1]);
- if (major(dev) != numbers[0])
- *error = iMajorError;
- else if (minor(dev) != numbers[1])
- *error = iMinorError;
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
-static portdev_t
-pack_netbsd(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev_netbsd(numbers[0], numbers[1]);
- if (major_netbsd(dev) != numbers[0])
- *error = iMajorError;
- else if (minor_netbsd(dev) != numbers[1])
- *error = iMinorError;
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
-#define major_freebsd(x) ((int32_t)(((x) & 0x0000ff00) >> 8))
-#define minor_freebsd(x) ((int32_t)(((x) & 0xffff00ff) >> 0))
-#define makedev_freebsd(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \
- (((y) << 0) & 0xffff00ff)))
-
-static portdev_t
-pack_freebsd(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev_freebsd(numbers[0], numbers[1]);
- if (major_freebsd(dev) != numbers[0])
- *error = iMajorError;
- if (minor_freebsd(dev) != numbers[1])
- *error = iMinorError;
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
-#define major_8_8(x) ((int32_t)(((x) & 0x0000ff00) >> 8))
-#define minor_8_8(x) ((int32_t)(((x) & 0x000000ff) >> 0))
-#define makedev_8_8(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \
- (((y) << 0) & 0x000000ff)))
-
-static portdev_t
-pack_8_8(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev_8_8(numbers[0], numbers[1]);
- if (major_8_8(dev) != numbers[0])
- *error = iMajorError;
- if (minor_8_8(dev) != numbers[1])
- *error = iMinorError;
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
-#define major_12_20(x) ((int32_t)(((x) & 0xfff00000) >> 20))
-#define minor_12_20(x) ((int32_t)(((x) & 0x000fffff) >> 0))
-#define makedev_12_20(x,y) ((portdev_t)((((x) << 20) & 0xfff00000) | \
- (((y) << 0) & 0x000fffff)))
-
-static portdev_t
-pack_12_20(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev_12_20(numbers[0], numbers[1]);
- if (major_12_20(dev) != numbers[0])
- *error = iMajorError;
- if (minor_12_20(dev) != numbers[1])
- *error = iMinorError;
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
-#define major_14_18(x) ((int32_t)(((x) & 0xfffc0000) >> 18))
-#define minor_14_18(x) ((int32_t)(((x) & 0x0003ffff) >> 0))
-#define makedev_14_18(x,y) ((portdev_t)((((x) << 18) & 0xfffc0000) | \
- (((y) << 0) & 0x0003ffff)))
-
-static portdev_t
-pack_14_18(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev_14_18(numbers[0], numbers[1]);
- if (major_14_18(dev) != numbers[0])
- *error = iMajorError;
- if (minor_14_18(dev) != numbers[1])
- *error = iMinorError;
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
-#define major_8_24(x) ((int32_t)(((x) & 0xff000000) >> 24))
-#define minor_8_24(x) ((int32_t)(((x) & 0x00ffffff) >> 0))
-#define makedev_8_24(x,y) ((portdev_t)((((x) << 24) & 0xff000000) | \
- (((y) << 0) & 0x00ffffff)))
-
-static portdev_t
-pack_8_24(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev_8_24(numbers[0], numbers[1]);
- if (major_8_24(dev) != numbers[0])
- *error = iMajorError;
- if (minor_8_24(dev) != numbers[1])
- *error = iMinorError;
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
-#define major_12_12_8(x) ((int32_t)(((x) & 0xfff00000) >> 20))
-#define unit_12_12_8(x) ((int32_t)(((x) & 0x000fff00) >> 8))
-#define subunit_12_12_8(x) ((int32_t)(((x) & 0x000000ff) >> 0))
-#define makedev_12_12_8(x,y,z) ((portdev_t)((((x) << 20) & 0xfff00000) | \
- (((y) << 8) & 0x000fff00) | \
- (((z) << 0) & 0x000000ff)))
-
-static portdev_t
-pack_bsdos(int n, u_long numbers[], const char **error)
-{
- portdev_t dev = 0;
-
- if (n == 2) {
- dev = makedev_12_20(numbers[0], numbers[1]);
- if (major_12_20(dev) != numbers[0])
- *error = iMajorError;
- if (minor_12_20(dev) != numbers[1])
- *error = iMinorError;
- } else if (n == 3) {
- dev = makedev_12_12_8(numbers[0], numbers[1], numbers[2]);
- if (major_12_12_8(dev) != numbers[0])
- *error = iMajorError;
- if (unit_12_12_8(dev) != numbers[1])
- *error = "invalid unit number";
- if (subunit_12_12_8(dev) != numbers[2])
- *error = "invalid subunit number";
- } else
- *error = tooManyFields;
- return (dev);
-}
-
-
- /* list of formats and pack functions */
- /* this list must be sorted lexically */
-struct format {
- const char *name;
- pack_t *pack;
-} formats[] = {
- {"386bsd", pack_8_8},
- {"4bsd", pack_8_8},
- {"bsdos", pack_bsdos},
- {"freebsd", pack_freebsd},
- {"hpux", pack_8_24},
- {"isc", pack_8_8},
- {"linux", pack_8_8},
- {"native", pack_native},
- {"netbsd", pack_netbsd},
- {"osf1", pack_12_20},
- {"sco", pack_8_8},
- {"solaris", pack_14_18},
- {"sunos", pack_8_8},
- {"svr3", pack_8_8},
- {"svr4", pack_14_18},
- {"ultrix", pack_8_8},
-};
-
-static int
-compare_format(const void *key, const void *element)
-{
- const char *name;
- const struct format *format;
-
- name = key;
- format = element;
-
- return (strcmp(name, format->name));
-}
-
-
-pack_t *
-pack_find(const char *name)
-{
- struct format *format;
-
- format = bsearch(name, formats,
- sizeof(formats)/sizeof(formats[0]),
- sizeof(formats[0]), compare_format);
- if (format == 0)
- return (NULL);
- return (format->pack);
-}
diff --git a/pkgtools/mtree/files/pack_dev.h b/pkgtools/mtree/files/pack_dev.h
deleted file mode 100644
index 9d87c227165..00000000000
--- a/pkgtools/mtree/files/pack_dev.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* $NetBSD: pack_dev.h,v 1.2 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Charles M. Hannum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _PACK_DEV_H
-#define _PACK_DEV_H
-
-#ifdef __CYGWIN__
-typedef __dev32_t portdev_t;
-#else
-typedef dev_t portdev_t;
-#endif
-typedef portdev_t pack_t(int, u_long [], const char **);
-
-pack_t *pack_find(const char *);
-pack_t pack_native;
-
-#define major_netbsd(x) ((int32_t)((((x) & 0x000fff00) >> 8)))
-#define minor_netbsd(x) ((int32_t)((((x) & 0xfff00000) >> 12) | \
- (((x) & 0x000000ff) >> 0)))
-#define makedev_netbsd(x,y) ((dev_t)((((x) << 8) & 0x000fff00) | \
- (((y) << 12) & 0xfff00000) | \
- (((y) << 0) & 0x000000ff)))
-
-#endif /* _PACK_DEV_H */
diff --git a/pkgtools/mtree/files/spec.c b/pkgtools/mtree/files/spec.c
deleted file mode 100644
index 184808a68ca..00000000000
--- a/pkgtools/mtree/files/spec.c
+++ /dev/null
@@ -1,662 +0,0 @@
-/* $NetBSD: spec.c,v 1.3 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*-
- * Copyright (c) 2001-2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn of Wasabi Systems.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if defined(__RCSID) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
-#else
-__RCSID("$NetBSD: spec.c,v 1.3 2004/08/21 04:10:45 jlam Exp $");
-#endif
-#endif /* not lint */
-
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_GRP_H
-#include <grp.h>
-#endif
-#if HAVE_PWD_H
-#include <pwd.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if HAVE_VIS_H
-#include <vis.h>
-#endif
-#if HAVE_UTIL_H
-#include <util.h>
-#endif
-
-#include "extern.h"
-#include "pack_dev.h"
-
-size_t mtree_lineno; /* Current spec line number */
-int mtree_Mflag; /* Merge duplicate entries */
-int mtree_Wflag; /* Don't "whack" permissions */
-
-static dev_t parsedev(char *);
-static void replacenode(NODE *, NODE *);
-static void set(char *, NODE *);
-static void unset(char *, NODE *);
-
-#define REPLACEPTR(x,v) do { if ((x)) free((x)); (x) = (v); } while (0)
-
-NODE *
-spec(FILE *fp)
-{
- NODE *centry, *last, *pathparent, *cur;
- char *p, *e, *next;
- NODE ginfo, *root;
- char *buf, *tname, *ntname;
- size_t tnamelen, plen;
-
- root = NULL;
- centry = last = NULL;
- tname = NULL;
- tnamelen = 0;
- memset(&ginfo, 0, sizeof(ginfo));
- for (mtree_lineno = 0;
- (buf = fparseln(fp, NULL, &mtree_lineno, NULL,
- FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT | FPARSELN_UNESCESC));
- free(buf)) {
- /* Skip leading whitespace. */
- for (p = buf; *p && isspace((unsigned char)*p); ++p)
- continue;
-
- /* If nothing but whitespace, continue. */
- if (!*p)
- continue;
-
-#ifdef DEBUG
- fprintf(stderr, "line %lu: {%s}\n",
- (u_long)mtree_lineno, p);
-#endif
- /* Grab file name, "$", "set", or "unset". */
- next = buf;
- while ((p = strsep(&next, " \t")) != NULL && *p == '\0')
- continue;
- if (p == NULL)
- mtree_err("missing field");
-
- if (p[0] == '/') {
- if (strcmp(p + 1, "set") == 0)
- set(next, &ginfo);
- else if (strcmp(p + 1, "unset") == 0)
- unset(next, &ginfo);
- else
- mtree_err("invalid specification `%s'", p);
- continue;
- }
-
- if (strcmp(p, "..") == 0) {
- /* Don't go up, if haven't gone down. */
- if (root == NULL)
- goto noparent;
- if (last->type != F_DIR || last->flags & F_DONE) {
- if (last == root)
- goto noparent;
- last = last->parent;
- }
- last->flags |= F_DONE;
- continue;
-
-noparent: mtree_err("no parent node");
- }
-
- plen = strlen(p) + 1;
- if (plen > tnamelen) {
- if ((ntname = realloc(tname, plen)) == NULL)
- mtree_err("realloc: %s", strerror(errno));
- tname = ntname;
- tnamelen = plen;
- }
- if (strunvis(tname, p) == -1)
- mtree_err("strunvis failed on `%s'", p);
- p = tname;
-
- pathparent = NULL;
- if (strchr(p, '/') != NULL) {
- cur = root;
- for (; (e = strchr(p, '/')) != NULL; p = e+1) {
- if (p == e)
- continue; /* handle // */
- *e = '\0';
- if (strcmp(p, ".") != 0) {
- while (cur &&
- strcmp(cur->name, p) != 0) {
- cur = cur->next;
- }
- }
- if (cur == NULL || cur->type != F_DIR) {
- mtree_err("%s: %s", tname,
- strerror(ENOENT));
- }
- *e = '/';
- pathparent = cur;
- cur = cur->child;
- }
- if (*p == '\0')
- mtree_err("%s: empty leaf element", tname);
- }
-
- if ((centry = calloc(1, sizeof(NODE) + strlen(p))) == NULL)
- mtree_err("%s", strerror(errno));
- *centry = ginfo;
- centry->lineno = mtree_lineno;
- strcpy(centry->name, p);
-#define MAGIC "?*["
- if (strpbrk(p, MAGIC))
- centry->flags |= F_MAGIC;
- set(next, centry);
-
- if (root == NULL) {
- /*
- * empty tree
- */
- if (strcmp(centry->name, ".") != 0 ||
- centry->type != F_DIR)
- mtree_err(
- "root node must be the directory `.'");
- last = root = centry;
- root->parent = root;
- } else if (pathparent != NULL) {
- /*
- * full path entry
- */
- centry->parent = pathparent;
- cur = pathparent->child;
- if (cur == NULL) {
- pathparent->child = centry;
- last = centry;
- } else {
- for (; cur != NULL; cur = cur->next) {
- if (strcmp(cur->name, centry->name)
- == 0) {
- /* existing entry; replace */
- replacenode(cur, centry);
- break;
- }
- if (cur->next == NULL) {
- /* last entry; add new */
- cur->next = centry;
- centry->prev = cur;
- break;
- }
- }
- last = cur;
- while (last->next != NULL)
- last = last->next;
- }
- } else if (strcmp(centry->name, ".") == 0) {
- /*
- * duplicate "." entry; always replace
- */
- replacenode(root, centry);
- } else if (last->type == F_DIR && !(last->flags & F_DONE)) {
- /*
- * new relative child
- * (no duplicate check)
- */
- centry->parent = last;
- last = last->child = centry;
- } else {
- /*
- * relative entry, up one directory
- * (no duplicate check)
- */
- centry->parent = last->parent;
- centry->prev = last;
- last = last->next = centry;
- }
- }
- return (root);
-}
-
-void
-free_nodes(NODE *root)
-{
- NODE *cur, *next;
-
- if (root == NULL)
- return;
-
- next = NULL;
- for (cur = root; cur != NULL; cur = next) {
- next = cur->next;
- free_nodes(cur->child);
- REPLACEPTR(cur->slink, NULL);
- REPLACEPTR(cur->md5digest, NULL);
- REPLACEPTR(cur->rmd160digest, NULL);
- REPLACEPTR(cur->sha1digest, NULL);
- REPLACEPTR(cur->tags, NULL);
- REPLACEPTR(cur, NULL);
- }
-}
-
-/*
- * dump_nodes --
- * dump the NODEs from `cur', based in the directory `dir'.
- * if pathlast is none zero, print the path last, otherwise print
- * it first.
- */
-void
-dump_nodes(const char *dir, NODE *root, int pathlast)
-{
- NODE *cur;
- char path[MAXPATHLEN];
- const char *name;
-
- for (cur = root; cur != NULL; cur = cur->next) {
- if (cur->type != F_DIR && !matchtags(cur))
- continue;
-
- if (snprintf(path, sizeof(path), "%s%s%s",
- dir, *dir ? "/" : "", cur->name)
- >= sizeof(path))
- mtree_err("Pathname too long.");
-
- if (!pathlast)
- printf("%s ", vispath(path));
-
-#define MATCHFLAG(f) ((keys & (f)) && (cur->flags & (f)))
- if (MATCHFLAG(F_TYPE))
- printf("type=%s ", nodetype(cur->type));
- if (MATCHFLAG(F_UID | F_UNAME)) {
- if (keys & F_UNAME &&
- (name = user_from_uid(cur->st_uid, 1)) != NULL)
- printf("uname=%s ", name);
- else
- printf("uid=%u ", cur->st_uid);
- }
- if (MATCHFLAG(F_GID | F_GNAME)) {
- if (keys & F_GNAME &&
- (name = group_from_gid(cur->st_gid, 1)) != NULL)
- printf("gname=%s ", name);
- else
- printf("gid=%u ", cur->st_gid);
- }
- if (MATCHFLAG(F_MODE))
- printf("mode=%#o ", cur->st_mode);
- if (MATCHFLAG(F_DEV) &&
- (cur->type == F_BLOCK || cur->type == F_CHAR))
- printf("device=%#x ", cur->st_rdev);
- if (MATCHFLAG(F_NLINK))
- printf("nlink=%d ", cur->st_nlink);
- if (MATCHFLAG(F_SLINK))
- printf("link=%s ", cur->slink);
- if (MATCHFLAG(F_SIZE))
- printf("size=%lld ", (long long)cur->st_size);
- if (MATCHFLAG(F_TIME))
- printf("time=%ld.%ld ", (long)cur->st_mtimespec.tv_sec,
- cur->st_mtimespec.tv_nsec);
- if (MATCHFLAG(F_CKSUM))
- printf("cksum=%lu ", cur->cksum);
- if (MATCHFLAG(F_MD5))
- printf("md5=%s ", cur->md5digest);
- if (MATCHFLAG(F_RMD160))
- printf("rmd160=%s ", cur->rmd160digest);
- if (MATCHFLAG(F_SHA1))
- printf("sha1=%s ", cur->sha1digest);
- if (MATCHFLAG(F_FLAGS))
- printf("flags=%s ",
- flags_to_string(cur->st_flags, "none"));
- if (MATCHFLAG(F_IGN))
- printf("ignore ");
- if (MATCHFLAG(F_OPT))
- printf("optional ");
- if (MATCHFLAG(F_TAGS))
- printf("tags=%s ", cur->tags);
- puts(pathlast ? vispath(path) : "");
-
- if (cur->child)
- dump_nodes(path, cur->child, pathlast);
- }
-}
-
-/*
- * vispath --
- * strsvis(3) encodes path, which must not be longer than MAXPATHLEN
- * characters long, and returns a pointer to a static buffer containing
- * the result.
- */
-char *
-vispath(const char *path)
-{
- const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' };
- static char pathbuf[4*MAXPATHLEN + 1];
-
- strsvis(pathbuf, path, VIS_CSTYLE, extra);
- return(pathbuf);
-}
-
-
-static dev_t
-parsedev(char *arg)
-{
-#define MAX_PACK_ARGS 3
- u_long numbers[MAX_PACK_ARGS];
- char *p, *ep, *dev;
- int argc;
- pack_t *pack;
- dev_t result;
- const char *error = NULL;
-
- if ((dev = strchr(arg, ',')) != NULL) {
- *dev++='\0';
- if ((pack = pack_find(arg)) == NULL)
- mtree_err("unknown format `%s'", arg);
- argc = 0;
- while ((p = strsep(&dev, ",")) != NULL) {
- if (*p == '\0')
- mtree_err("missing number");
- numbers[argc++] = strtoul(p, &ep, 0);
- if (*ep != '\0')
- mtree_err("invalid number `%s'",
- p);
- if (argc > MAX_PACK_ARGS)
- mtree_err("too many arguments");
- }
- if (argc < 2)
- mtree_err("not enough arguments");
- result = (*pack)(argc, numbers, &error);
- if (error != NULL)
- mtree_err(error);
- } else {
- result = (dev_t)strtoul(arg, &ep, 0);
- if (*ep != '\0')
- mtree_err("invalid device `%s'", arg);
- }
- return (result);
-}
-
-static void
-replacenode(NODE *cur, NODE *new)
-{
-
-#define REPLACE(x) cur->x = new->x
-#define REPLACESTR(x) REPLACEPTR(cur->x,new->x)
-
- if (cur->type != new->type) {
- if (mtree_Mflag) {
- /*
- * merge entries with different types; we
- * don't want children retained in this case.
- */
- REPLACE(type);
- free_nodes(cur->child);
- cur->child = NULL;
- } else {
- mtree_err(
- "existing entry for `%s', type `%s'"
- " does not match type `%s'",
- cur->name, nodetype(cur->type),
- nodetype(new->type));
- }
- }
-
- REPLACE(st_size);
- REPLACE(st_mtimespec);
- REPLACESTR(slink);
- REPLACE(st_uid);
- REPLACE(st_gid);
- REPLACE(st_mode);
- REPLACE(st_rdev);
- REPLACE(st_flags);
- REPLACE(st_nlink);
- REPLACE(cksum);
- REPLACESTR(md5digest);
- REPLACESTR(rmd160digest);
- REPLACESTR(sha1digest);
- REPLACESTR(tags);
- REPLACE(lineno);
- REPLACE(flags);
- free(new);
-}
-
-static void
-set(char *t, NODE *ip)
-{
- int type, value, len;
- gid_t gid;
- uid_t uid;
- char *kw, *val, *md, *ep;
- void *m;
-
- val = NULL;
- while ((kw = strsep(&t, "= \t")) != NULL) {
- if (*kw == '\0')
- continue;
- if (strcmp(kw, "all") == 0)
- mtree_err("invalid keyword `all'");
- ip->flags |= type = parsekey(kw, &value);
- if (value) {
- while ((val = strsep(&t, " \t")) != NULL &&
- *val == '\0')
- continue;
- if (val == NULL)
- mtree_err("missing value");
- }
- switch(type) {
- case F_CKSUM:
- ip->cksum = strtoul(val, &ep, 10);
- if (*ep)
- mtree_err("invalid checksum `%s'", val);
- break;
- case F_DEV:
- ip->st_rdev = parsedev(val);
- break;
- case F_FLAGS:
- if (strcmp("none", val) == 0)
- ip->st_flags = 0;
- else if (string_to_flags(&val, &ip->st_flags, NULL)
- != 0)
- mtree_err("invalid flag `%s'", val);
- break;
- case F_GID:
- ip->st_gid = (gid_t)strtoul(val, &ep, 10);
- if (*ep)
- mtree_err("invalid gid `%s'", val);
- break;
- case F_GNAME:
- if (mtree_Wflag) /* don't parse if whacking */
- break;
- if (gid_from_group(val, &gid) == -1)
- mtree_err("unknown group `%s'", val);
- ip->st_gid = gid;
- break;
- case F_IGN:
- /* just set flag bit */
- break;
- case F_MD5:
- if (val[0]=='0' && val[1]=='x')
- md=&val[2];
- else
- md=val;
- if ((ip->md5digest = strdup(md)) == NULL)
- mtree_err("memory allocation error");
- break;
- case F_MODE:
- if ((m = setmode(val)) == NULL)
- mtree_err("invalid file mode `%s'", val);
- ip->st_mode = getmode(m, 0);
- free(m);
- break;
- case F_NLINK:
- ip->st_nlink = (nlink_t)strtoul(val, &ep, 10);
- if (*ep)
- mtree_err("invalid link count `%s'", val);
- break;
- case F_OPT:
- /* just set flag bit */
- break;
- case F_RMD160:
- if (val[0]=='0' && val[1]=='x')
- md=&val[2];
- else
- md=val;
- if ((ip->rmd160digest = strdup(md)) == NULL)
- mtree_err("memory allocation error");
- break;
- case F_SHA1:
- if (val[0]=='0' && val[1]=='x')
- md=&val[2];
- else
- md=val;
- if ((ip->sha1digest = strdup(md)) == NULL)
- mtree_err("memory allocation error");
- break;
- case F_SIZE:
- ip->st_size = (off_t)strtoll(val, &ep, 10);
- if (*ep)
- mtree_err("invalid size `%s'", val);
- break;
- case F_SLINK:
- if ((ip->slink = strdup(val)) == NULL)
- mtree_err("memory allocation error");
- break;
- case F_TAGS:
- len = strlen(val) + 3; /* "," + str + ",\0" */
- if ((ip->tags = malloc(len)) == NULL)
- mtree_err("memory allocation error");
- snprintf(ip->tags, len, ",%s,", val);
- break;
- case F_TIME:
- ip->st_mtimespec.tv_sec =
- (time_t)strtoul(val, &ep, 10);
- if (*ep != '.')
- mtree_err("invalid time `%s'", val);
- val = ep + 1;
- ip->st_mtimespec.tv_nsec = strtoul(val, &ep, 10);
- if (*ep)
- mtree_err("invalid time `%s'", val);
- break;
- case F_TYPE:
- ip->type = parsetype(val);
- break;
- case F_UID:
- ip->st_uid = (uid_t)strtoul(val, &ep, 10);
- if (*ep)
- mtree_err("invalid uid `%s'", val);
- break;
- case F_UNAME:
- if (mtree_Wflag) /* don't parse if whacking */
- break;
- if (uid_from_user(val, &uid) == -1)
- mtree_err("unknown user `%s'", val);
- ip->st_uid = uid;
- break;
- default:
- mtree_err(
- "set(): unsupported key type 0x%x (INTERNAL ERROR)",
- type);
- /* NOTREACHED */
- }
- }
-}
-
-static void
-unset(char *t, NODE *ip)
-{
- char *p;
-
- while ((p = strsep(&t, " \t")) != NULL) {
- if (*p == '\0')
- continue;
- ip->flags &= ~parsekey(p, NULL);
- }
-}
diff --git a/pkgtools/mtree/files/stat_flags.c b/pkgtools/mtree/files/stat_flags.c
deleted file mode 100644
index 5d5986d074c..00000000000
--- a/pkgtools/mtree/files/stat_flags.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* $NetBSD: stat_flags.c,v 1.3 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if !defined(lint)
-#if 0
-static char sccsid[] = "@(#)stat_flags.c 8.2 (Berkeley) 7/28/94";
-#else
-__RCSID("$NetBSD: stat_flags.c,v 1.3 2004/08/21 04:10:45 jlam Exp $");
-#endif
-#endif /* not lint */
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#if HAVE_FTS_H
-#include <fts.h>
-#endif
-#if HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "stat_flags.h"
-
-#define SAPPEND(s) do { \
- if (prefix != NULL) \
- (void)strlcat(string, prefix, sizeof(string)); \
- (void)strlcat(string, s, sizeof(string)); \
- prefix = ","; \
-} while (/* CONSTCOND */ 0)
-
-/*
- * flags_to_string --
- * Convert stat flags to a comma-separated string. If no flags
- * are set, return the default string.
- */
-char *
-flags_to_string(u_long flags, const char *def)
-{
- static char string[128];
- const char *prefix;
-
- string[0] = '\0';
- prefix = NULL;
-#if HAVE_FILE_FLAGS
- if (flags & UF_APPEND)
- SAPPEND("uappnd");
- if (flags & UF_IMMUTABLE)
- SAPPEND("uchg");
- if (flags & UF_NODUMP)
- SAPPEND("nodump");
- if (flags & UF_OPAQUE)
- SAPPEND("opaque");
- if (flags & SF_APPEND)
- SAPPEND("sappnd");
- if (flags & SF_ARCHIVED)
- SAPPEND("arch");
- if (flags & SF_IMMUTABLE)
- SAPPEND("schg");
-#ifdef SF_SNAPSHOT
- if (flags & SF_SNAPSHOT)
- SAPPEND("snap");
-#endif
-#endif
- if (prefix == NULL)
- strlcpy(string, def, sizeof(string));
- return (string);
-}
-
-#define TEST(a, b, f) { \
- if (!strcmp(a, b)) { \
- if (clear) { \
- if (clrp) \
- *clrp |= (f); \
- if (setp) \
- *setp &= ~(f); \
- } else { \
- if (setp) \
- *setp |= (f); \
- if (clrp) \
- *clrp &= ~(f); \
- } \
- break; \
- } \
-}
-
-/*
- * string_to_flags --
- * Take string of arguments and return stat flags. Return 0 on
- * success, 1 on failure. On failure, stringp is set to point
- * to the offending token.
- */
-int
-string_to_flags(char **stringp, u_long *setp, u_long *clrp)
-{
- int clear;
- char *string, *p;
-
- if (setp)
- *setp = 0;
- if (clrp)
- *clrp = 0;
-
-#if HAVE_FILE_FLAGS
- string = *stringp;
- while ((p = strsep(&string, "\t ,")) != NULL) {
- clear = 0;
- *stringp = p;
- if (*p == '\0')
- continue;
- if (p[0] == 'n' && p[1] == 'o') {
- clear = 1;
- p += 2;
- }
- switch (p[0]) {
- case 'a':
- TEST(p, "arch", SF_ARCHIVED);
- TEST(p, "archived", SF_ARCHIVED);
- return (1);
- case 'd':
- clear = !clear;
- TEST(p, "dump", UF_NODUMP);
- return (1);
- case 'n':
- /*
- * Support `nonodump'. Note that
- * the state of clear is not changed.
- */
- TEST(p, "nodump", UF_NODUMP);
- return (1);
- case 'o':
- TEST(p, "opaque", UF_OPAQUE);
- return (1);
- case 's':
- TEST(p, "sappnd", SF_APPEND);
- TEST(p, "sappend", SF_APPEND);
- TEST(p, "schg", SF_IMMUTABLE);
- TEST(p, "schange", SF_IMMUTABLE);
- TEST(p, "simmutable", SF_IMMUTABLE);
- return (1);
- case 'u':
- TEST(p, "uappnd", UF_APPEND);
- TEST(p, "uappend", UF_APPEND);
- TEST(p, "uchg", UF_IMMUTABLE);
- TEST(p, "uchange", UF_IMMUTABLE);
- TEST(p, "uimmutable", UF_IMMUTABLE);
- return (1);
- default:
- return (1);
- }
- }
-#endif
-
- return (0);
-}
diff --git a/pkgtools/mtree/files/stat_flags.h b/pkgtools/mtree/files/stat_flags.h
deleted file mode 100644
index bf8b30fb536..00000000000
--- a/pkgtools/mtree/files/stat_flags.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $NetBSD: stat_flags.h,v 1.1 2003/09/05 18:39:00 jlam Exp $ */
-
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)extern.h 8.1 (Berkeley) 5/31/93
- */
-
-char *flags_to_string(u_long, const char *);
-int string_to_flags(char **, u_long *, u_long *);
diff --git a/pkgtools/mtree/files/verify.c b/pkgtools/mtree/files/verify.c
deleted file mode 100644
index ade36f92b8a..00000000000
--- a/pkgtools/mtree/files/verify.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/* $NetBSD: verify.c,v 1.4 2004/08/21 04:10:45 jlam Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if defined(__RCSID) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: verify.c,v 1.4 2004/08/21 04:10:45 jlam Exp $");
-#endif
-#endif /* not lint */
-
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if ! HAVE_NBTOOL_CONFIG_H
-#if HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#endif
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "extern.h"
-
-static NODE *root;
-static char path[MAXPATHLEN];
-
-static void miss(NODE *, char *);
-static int vwalk(void);
-
-int
-verify(void)
-{
- int rval;
-
- root = spec(stdin);
- rval = vwalk();
- miss(root, path);
- return (rval);
-}
-
-static int
-vwalk(void)
-{
- FTS *t;
- FTSENT *p;
- NODE *ep, *level;
- int specdepth, rval;
- char *argv[2];
- char dot[] = ".";
- argv[0] = dot;
- argv[1] = NULL;
-
- if ((t = fts_open(argv, ftsoptions, NULL)) == NULL)
- mtree_err("fts_open: %s", strerror(errno));
- level = root;
- specdepth = rval = 0;
- while ((p = fts_read(t)) != NULL) {
- if (check_excludes(p->fts_name, p->fts_path)) {
- fts_set(t, p, FTS_SKIP);
- continue;
- }
- switch(p->fts_info) {
- case FTS_D:
- case FTS_SL:
- break;
- case FTS_DP:
- if (specdepth > p->fts_level) {
- for (level = level->parent; level->prev;
- level = level->prev)
- continue;
- --specdepth;
- }
- continue;
- case FTS_DNR:
- case FTS_ERR:
- case FTS_NS:
- warnx("%s: %s", RP(p), strerror(p->fts_errno));
- continue;
- default:
- if (dflag)
- continue;
- }
-
- if (specdepth != p->fts_level)
- goto extra;
- for (ep = level; ep; ep = ep->next)
- if ((ep->flags & F_MAGIC &&
- !fnmatch(ep->name, p->fts_name, FNM_PATHNAME)) ||
- !strcmp(ep->name, p->fts_name)) {
- ep->flags |= F_VISIT;
- if (compare(ep, p))
- rval = MISMATCHEXIT;
- if (!(ep->flags & F_IGN) &&
- ep->child && ep->type == F_DIR &&
- p->fts_info == FTS_D) {
- level = ep->child;
- ++specdepth;
- } else
- fts_set(t, p, FTS_SKIP);
- break;
- }
-
- if (ep)
- continue;
- extra:
- if (!eflag) {
- printf("extra: %s", RP(p));
- if (rflag) {
- if ((S_ISDIR(p->fts_statp->st_mode)
- ? rmdir : unlink)(p->fts_accpath)) {
- printf(", not removed: %s",
- strerror(errno));
- } else
- printf(", removed");
- }
- putchar('\n');
- }
- fts_set(t, p, FTS_SKIP);
- }
- fts_close(t);
- if (sflag)
- warnx("%s checksum: %u", fullpath, crc_total);
- return (rval);
-}
-
-static void
-miss(NODE *p, char *tail)
-{
- int create;
- char *tp;
- const char *type;
- u_int32_t flags;
-
- for (; p; p = p->next) {
- if (p->flags & F_OPT && !(p->flags & F_VISIT))
- continue;
- if (p->type != F_DIR && (dflag || p->flags & F_VISIT))
- continue;
- strcpy(tail, p->name);
- if (!(p->flags & F_VISIT))
- printf("missing: %s", path);
- switch (p->type) {
- case F_BLOCK:
- case F_CHAR:
- type = "device";
- break;
- case F_DIR:
- type = "directory";
- break;
- case F_LINK:
- type = "symlink";
- break;
- default:
- putchar('\n');
- continue;
- }
-
- create = 0;
- if (!(p->flags & F_VISIT) && uflag) {
- if (mtree_Wflag || p->type == F_LINK)
- goto createit;
- if (!(p->flags & (F_UID | F_UNAME)))
- printf(
- " (%s not created: user not specified)", type);
- else if (!(p->flags & (F_GID | F_GNAME)))
- printf(
- " (%s not created: group not specified)", type);
- else if (!(p->flags & F_MODE))
- printf(
- " (%s not created: mode not specified)", type);
- else
- createit:
- switch (p->type) {
- case F_BLOCK:
- case F_CHAR:
- if (mtree_Wflag)
- continue;
- if (!(p->flags & F_DEV))
- printf(
- " (%s not created: device not specified)",
- type);
- else if (mknod(path,
- p->st_mode | nodetoino(p->type),
- p->st_rdev) == -1)
- printf(" (%s not created: %s)\n",
- type, strerror(errno));
- else
- create = 1;
- break;
- case F_LINK:
- if (!(p->flags & F_SLINK))
- printf(
- " (%s not created: link not specified)\n",
- type);
- else if (symlink(p->slink, path))
- printf(
- " (%s not created: %s)\n",
- type, strerror(errno));
- else
- create = 1;
- break;
- case F_DIR:
- if (mkdir(path, S_IRWXU|S_IRWXG|S_IRWXO))
- printf(" (not created: %s)",
- strerror(errno));
- else
- create = 1;
- break;
- default:
- mtree_err("can't create create %s",
- nodetype(p->type));
- }
- }
- if (create)
- printf(" (created)");
- if (p->type == F_DIR) {
- if (!(p->flags & F_VISIT))
- putchar('\n');
- for (tp = tail; *tp; ++tp)
- continue;
- *tp = '/';
- miss(p->child, tp + 1);
- *tp = '\0';
- } else
- putchar('\n');
-
- if (!create || mtree_Wflag)
- continue;
- if ((p->flags & (F_UID | F_UNAME)) &&
- (p->flags & (F_GID | F_GNAME)) &&
- (lchown(path, p->st_uid, p->st_gid))) {
- printf("%s: user/group/mode not modified: %s\n",
- path, strerror(errno));
- printf("%s: warning: file mode %snot set\n", path,
- (p->flags & F_FLAGS) ? "and file flags " : "");
- continue;
- }
- if (p->flags & F_MODE) {
- if (lchmod(path, p->st_mode))
- printf("%s: permissions not set: %s\n",
- path, strerror(errno));
- }
-#if HAVE_FILE_FLAGS
- if ((p->flags & F_FLAGS) && p->st_flags) {
- if (iflag)
- flags = p->st_flags;
- else
- flags = p->st_flags & ~SP_FLGS;
- if (lchflags(path, flags))
- printf("%s: file flags not set: %s\n",
- path, strerror(errno));
- }
-#endif /* HAVE_FILE_FLAGS */
- }
-}
diff --git a/pkgtools/p5-pkgsrc-Dewey/DESCR b/pkgtools/p5-pkgsrc-Dewey/DESCR
deleted file mode 100644
index a31643654e9..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/DESCR
+++ /dev/null
@@ -1 +0,0 @@
-This Perl module provides functions to compare pkgsrc Dewey numbers.
diff --git a/pkgtools/p5-pkgsrc-Dewey/Makefile b/pkgtools/p5-pkgsrc-Dewey/Makefile
deleted file mode 100644
index faa754c62b5..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# $NetBSD: Makefile,v 1.8 2007/03/08 08:02:25 rillig Exp $
-
-DISTNAME= p5-pkgsrc-Dewey-1.0
-PKGREVISION= 1
-CATEGORIES= pkgtools perl5
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= wiz@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/Documentation/pkgsrc/
-COMMENT= Perl module to compare pkgsrc Dewey numbers
-
-CPPFLAGS+= -DHAVE_CTYPE_H -DHAVE_STDLIB_H -DHAVE_STRING_H
-CPPFLAGS.NetBSD+= -DHAVE_ERR_H
-
-NO_CHECKSUM= yes
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-PKG_DESTDIR_SUPPORT= user-destdir
-
-PERL5_PACKLIST= auto/pkgsrc/Dewey/.packlist
-
-PKG_INSTALL_FILESDIR= ../../pkgtools/pkg_install/files
-PKG_INSTALL_FILES= lib/dewey.c lib/dewey.h lib/defs.h
-
-do-extract:
- ${MKDIR} ${WRKSRC}
- ${CP} -r ${FILESDIR}/* ${WRKSRC}
- for f in ${PKG_INSTALL_FILES}; do \
- ${CP} ${PKG_INSTALL_FILESDIR}/$$f ${WRKSRC}; \
- done
- ${MV} ${WRKSRC}/dewey.c ${WRKSRC}/lib_dewey.c
- ${TOUCH} ${WRKSRC}/nbcompat.h
-
-.include "../../lang/perl5/module.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/p5-pkgsrc-Dewey/PLIST b/pkgtools/p5-pkgsrc-Dewey/PLIST
deleted file mode 100644
index e2c37ac9137..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/PLIST
+++ /dev/null
@@ -1 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2005/11/13 19:53:19 wiz Exp $
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/Changes b/pkgtools/p5-pkgsrc-Dewey/files/Changes
deleted file mode 100644
index 78eb0f53f38..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/Changes
+++ /dev/null
@@ -1,4 +0,0 @@
-Revision history for Perl extension pkgsrc::Dewey.
-
-1.0 Mon Oct 17 15:46:19 2005
- - first version
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/Dewey.pm b/pkgtools/p5-pkgsrc-Dewey/files/Dewey.pm
deleted file mode 100644
index 5f86161a9a6..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/Dewey.pm
+++ /dev/null
@@ -1,85 +0,0 @@
-package pkgsrc::Dewey;
-
-use strict;
-use warnings;
-
-require Exporter;
-use AutoLoader;
-
-our @ISA = qw(Exporter);
-
-our @EXPORT = qw(dewey_cmp dewey_match);
-
-our $VERSION = '1.0';
-
-require XSLoader;
-XSLoader::load('pkgsrc::Dewey', $VERSION);
-
-# Preloaded methods go here.
-
-# Autoload methods go after =cut, and are processed by the autosplit program.
-
-1;
-__END__
-# Below is stub documentation for your module. You'd better edit it!
-
-=head1 NAME
-
-pkgsrc::Dewey - Perl extension for comparing pkgsrc Dewey version numbers
-
-=head1 SYNOPSIS
-
- use pkgsrc::Dewey;
- dewey_cmp(lhs, op, rhs);
- dewey_match(pattern, package);
-
-=head1 DESCRIPTION
-
-C<pkgsrc::Dewey> is a Perl extension for comparing pkgsrc Dewey version
-numbers.
-It provides two functions:
-C<dewey_cmp()> and C<dewey_match()>.
-
-C<dewey_cmp(pattern, package)>
-compares the C<pattern> against the C<package>, and returns 1 if the
-C<package> matches the C<pattern> and 0 if not. Both the C<pattern>
-and the C<package> should contain a package name.
-
-C<dewey_match(lhs, op, rhs)>
-compares two pkgsrc Dewey version numbers. Both C<lhs> and
-C<rhs> should be version numbers (not containing any package names).
-If the operator C<op> is invalid, C<dewey_match> returns -1.
-Otherwise it returns 1 if the comparison is true and 0 if not.
-
-=head2 EXPORT
-
-C<dewey_cmp()>,
-C<dewey_match()>
-
-=head1 SEE ALSO
-
-Homepage for the Perl module:
-L<http://www.netbsd.org/packages/pkgtools/p5-pkgsrc-Dewey/README.html>
-
-General information about pkgsrc:
-L<http://www.pkgsrc.org/>
-
-The pkgsrc guide:
-L<http://www.netbsd.org/Documentation/pkgsrc/>
-
-=head1 AUTHORS
-
-Dieter Baron E<lt>dillo@NetBSD.orgE<gt>
-and
-Thomas Klausner E<lt>wiz@NetBSD.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (C) 2005 by Dieter Baron and Thomas Klausner
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8.7 or,
-at your option, any later version of Perl 5 you may have available.
-
-
-=cut
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs b/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs
deleted file mode 100644
index 9c696ab5794..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/Dewey.xs
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#include <dewey.h>
-
-MODULE = pkgsrc::Dewey PACKAGE = pkgsrc::Dewey
-
-int
-dewey_match(pattern, package)
- const char * pattern
- const char * package
- PROTOTYPE: $;$
- OUTPUT:
- RETVAL
-
-int
-dewey_cmp(lhs, op, rhs)
- const char * lhs
- const char * op
- const char * rhs
- PROTOTYPE: $;$;$
- INIT:
- int opi;
- CODE:
- if (dewey_mktest(&opi, op) < 0)
- RETVAL = -1;
- else
- RETVAL = dewey_cmp(lhs, opi, rhs);
- OUTPUT:
- RETVAL
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/MANIFEST b/pkgtools/p5-pkgsrc-Dewey/files/MANIFEST
deleted file mode 100644
index 230ce6243cb..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/MANIFEST
+++ /dev/null
@@ -1,8 +0,0 @@
-Changes
-Dewey.pm
-Dewey.xs
-MANIFEST
-Makefile.PL
-README
-t/Dewey.t
-typemap
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/Makefile.PL b/pkgtools/p5-pkgsrc-Dewey/files/Makefile.PL
deleted file mode 100644
index 9b1267d77b4..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/Makefile.PL
+++ /dev/null
@@ -1,8 +0,0 @@
-use 5.008007;
-use ExtUtils::MakeMaker;
-WriteMakefile(
- NAME => 'pkgsrc::Dewey',
- VERSION_FROM => 'Dewey.pm', # finds $VERSION
- INC => '-I.',
- OBJECT => '$(O_FILES)', # link all the C files too
-);
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/README b/pkgtools/p5-pkgsrc-Dewey/files/README
deleted file mode 100644
index 52c41415c03..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/README
+++ /dev/null
@@ -1,26 +0,0 @@
-pkgsrc::Dewey version 1.0
-=========================
-
-This Perl module provides functions to compare pkgsrc Dewey
-numbers.
-
-INSTALLATION
-
-To install this module type the following:
-
- perl Makefile.PL
- make
- make test
- make install
-
-DEPENDENCIES
-
-This module has no dependencies.
-
-COPYRIGHT AND LICENCE
-
-Copyright (C) 2005 by Dieter Baron and Thomas Klausner.
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8.7 or,
-at your option, any later version of Perl 5 you may have available.
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/t/Dewey.t b/pkgtools/p5-pkgsrc-Dewey/files/t/Dewey.t
deleted file mode 100644
index 467165eb914..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/t/Dewey.t
+++ /dev/null
@@ -1,19 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl Dewey.t'
-
-#########################
-
-# change 'tests => 1' to 'tests => last_test_to_print';
-
-use Test::More tests => 5;
-BEGIN { use_ok('pkgsrc::Dewey') };
-
-#########################
-
-# Insert your test code below, the Test::More module is use()ed here so read
-# its man page ( perldoc Test::More ) for help writing this test script.
-
-ok(dewey_cmp("1.0", "<", "2.0") > 0, 'dewey_cmp result incorrect');
-ok(dewey_cmp("1.0", "a", "2.0") == -1, 'incorrect operator');
-ok(dewey_match("foo<1.0", "foo-1.0beta1"), 'beta');
-is(dewey_match("foo<1.0alpha1", "foo-1.0beta1"), 0, 'alpha');
diff --git a/pkgtools/p5-pkgsrc-Dewey/files/typemap b/pkgtools/p5-pkgsrc-Dewey/files/typemap
deleted file mode 100644
index 0618f0d3109..00000000000
--- a/pkgtools/p5-pkgsrc-Dewey/files/typemap
+++ /dev/null
@@ -1 +0,0 @@
-const char * T_PV
diff --git a/pkgtools/pax/Makefile b/pkgtools/pax/Makefile
deleted file mode 100644
index 3d780b96921..00000000000
--- a/pkgtools/pax/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# $NetBSD: Makefile,v 1.13 2006/07/14 20:11:10 jlam Exp $
-#
-# This version of pax installs into ${PKG_TOOLS_BIN}.
-#
-
-.include "../../archivers/pax/Makefile.common"
-
-CATEGORIES= pkgtools
-
-NO_PKGTOOLS_REQD_CHECK= yes
-PKG_PRESERVE= yes
-
-PKG_TOOLS_PREFIX= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
-
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR= share/man
-.endif
-
-.include "../../pkgtools/libnbcompat/inplace.mk"
-.include "../../mk/bsd.pkg.mk"
-
-PREFIX:= ${PKG_TOOLS_PREFIX}
diff --git a/pkgtools/pkg_alternatives/DEINSTALL b/pkgtools/pkg_alternatives/DEINSTALL
deleted file mode 100644
index fcada7755c8..00000000000
--- a/pkgtools/pkg_alternatives/DEINSTALL
+++ /dev/null
@@ -1,8 +0,0 @@
-# $NetBSD: DEINSTALL,v 1.2 2005/01/25 16:48:22 jmmv Exp $
-#
-
-case ${STAGE} in
- DEINSTALL)
- @PKG_ALTERNATIVES@ -gs destroy
- ;;
-esac
diff --git a/pkgtools/pkg_alternatives/DESCR b/pkgtools/pkg_alternatives/DESCR
deleted file mode 100644
index d2c7236144e..00000000000
--- a/pkgtools/pkg_alternatives/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-pkg_alternatives is a tool to manage the alternatives system provided by
-The NetBSD Packages Collection, also known as pkgsrc. It creates, configures
-and destroys generic wrappers used to run programs with similar interfaces.
diff --git a/pkgtools/pkg_alternatives/INSTALL b/pkgtools/pkg_alternatives/INSTALL
deleted file mode 100644
index fc4952bf0bd..00000000000
--- a/pkgtools/pkg_alternatives/INSTALL
+++ /dev/null
@@ -1,8 +0,0 @@
-# $NetBSD: INSTALL,v 1.2 2005/01/25 16:48:22 jmmv Exp $
-#
-
-case ${STAGE} in
- POST-INSTALL)
- @PKG_ALTERNATIVES@ -gs rebuild
- ;;
-esac
diff --git a/pkgtools/pkg_alternatives/Makefile b/pkgtools/pkg_alternatives/Makefile
deleted file mode 100644
index 336d97c3d10..00000000000
--- a/pkgtools/pkg_alternatives/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-# $NetBSD: Makefile,v 1.12 2007/01/15 02:50:06 rillig Exp $
-#
-
-DISTNAME= pkg_alternatives-1.4
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= jmmv@NetBSD.org
-COMMENT= Generic wrappers for programs with similar interfaces
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= YES
-NO_BUILD= YES
-WRKSRC= ${WRKDIR}
-
-DATADIR= ${PREFIX}/share/pkg_alternatives
-DBDIR= ${PREFIX}/libdata/pkg_alternatives
-EGDIR= ${PREFIX}/share/examples/pkg_alternatives
-
-FILES_SUBST+= PKG_ALTERNATIVES=${PREFIX}/sbin/pkg_alternatives
-
-REQD_DIRS= ${DBDIR}
-MAKE_DIRS= ${PKG_SYSCONFDIR}
-
-PKG_SYSCONFSUBDIR= pkg_alternatives
-CONF_FILES= ${EGDIR}/filter.conf ${PKG_SYSCONFDIR}/filter.conf
-
-SUBST_CLASSES+= vars
-SUBST_STAGE.vars= do-configure
-SUBST_MESSAGE.vars= Configuring sources.
-SUBST_FILES.vars= *
-SUBST_SED.vars= -e 's|@CONFDIR@|${PKG_SYSCONFDIR}|g'
-SUBST_SED.vars+= -e 's|@DATADIR@|${DATADIR}|g'
-SUBST_SED.vars+= -e 's|@DBDIR@|${DBDIR}|g'
-SUBST_SED.vars+= -e 's|@PKGMANDIR@|${PKGMANDIR}|g'
-SUBST_SED.vars+= -e 's|@PKG_DBDIR@|${PKG_DBDIR}|g'
-SUBST_SED.vars+= -e 's|@PREFIX@|${PREFIX}|g'
-SUBST_SED.vars+= -e 's|@ROOT_USER@|${ROOT_USER}|g'
-SUBST_SED.vars+= -e 's|@SH@|${SH}|g'
-
-INSTALLATION_DIRS= ${PKGMANDIR}/man8 sbin
-
-CHECK_INTERPRETER_SKIP= ${DATADIR}/wrapper.sh
-
-do-extract:
- ${CP} ${FILESDIR}/pkg_alternatives.sh ${WRKSRC}
- ${CP} ${FILESDIR}/pkg_alternatives.8 ${WRKSRC}
- ${CP} ${FILESDIR}/wrapper.sh ${WRKSRC}
- ${CP} ${FILESDIR}/wrapper.man ${WRKSRC}
- ${CP} ${FILESDIR}/filter.conf ${WRKSRC}
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_alternatives.sh \
- ${PREFIX}/sbin/pkg_alternatives
- ${INSTALL_MAN} ${WRKSRC}/pkg_alternatives.8 ${PREFIX}/${PKGMANDIR}/man8/
- ${INSTALL_DATA_DIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/wrapper.sh ${DATADIR}/
- ${INSTALL_DATA} ${WRKSRC}/wrapper.man ${DATADIR}/
- ${INSTALL_DATA_DIR} ${EGDIR}
- ${INSTALL_DATA} ${WRKSRC}/filter.conf ${EGDIR}/
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_alternatives/PLIST b/pkgtools/pkg_alternatives/PLIST
deleted file mode 100644
index 34d0333c064..00000000000
--- a/pkgtools/pkg_alternatives/PLIST
+++ /dev/null
@@ -1,8 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2005/01/30 12:35:22 jmmv Exp $
-man/man8/pkg_alternatives.8
-share/examples/pkg_alternatives/filter.conf
-share/pkg_alternatives/wrapper.man
-share/pkg_alternatives/wrapper.sh
-sbin/pkg_alternatives
-@dirrm share/pkg_alternatives
-@dirrm share/examples/pkg_alternatives
diff --git a/pkgtools/pkg_alternatives/files/filter.conf b/pkgtools/pkg_alternatives/files/filter.conf
deleted file mode 100644
index 235abda23ea..00000000000
--- a/pkgtools/pkg_alternatives/files/filter.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# $NetBSD: filter.conf,v 1.1 2005/01/30 12:35:22 jmmv Exp $
-#
-# pkg_alternatives - filter.conf
-# See pkg_alternatives(8) for information about the format of this file.
-#
-# !!! AFTER EDITING THIS FILE YOU MUST RUN 'pkg_alternatives rebuild' !!!
-#
-
-# Allow the python wrapper to be created.
-#accept ^bin/python$
-
-# Ignore the vi related wrappers, as we want to keep the vi utility from the
-# base system.
-#ignore ^bin/ex$
-#ignore ^bin/vi$
-#ignore ^bin/view$
-
-# At last, accept anything else.
-#accept .*
diff --git a/pkgtools/pkg_alternatives/files/pkg_alternatives.8 b/pkgtools/pkg_alternatives/files/pkg_alternatives.8
deleted file mode 100644
index 98ba5b3cfb0..00000000000
--- a/pkgtools/pkg_alternatives/files/pkg_alternatives.8
+++ /dev/null
@@ -1,390 +0,0 @@
-.\" $NetBSD: pkg_alternatives.8,v 1.5 2005/01/30 12:35:22 jmmv Exp $
-.\"
-.\" pkg_alternatives - Generic wrappers for programs with similar interfaces
-.\" Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 30, 2005
-.Dt PKG_ALTERNATIVES 8
-.Os
-.Sh NAME
-.Nm pkg_alternatives
-.Nd generic wrappers for programs with similar interfaces
-.Sh SYNOPSIS
-.Nm
-.Op Fl gsw
-.Op Fl p Ar prefix
-.Cm action
-.Ar arg1 ... argN
-.Sh DESCRIPTION
-.Nm
-is a tool to manage the
-.Em alternatives system
-provided by The
-.Nx
-Packages Collection, also known as pkgsrc.
-It creates, configures, and destroys generic wrappers used to run
-programs with similar interfaces.
-.Pp
-Consider, for example, the
-.Xr vi 1
-editor.
-Both
-.Xr nvi 1
-and
-.Xr vim 1
-provide very similar functionality, although neither of them is named
-.Pa vi .
-In this situation, it may be useful to have a
-.Em wrapper
-in place of the generic name which points to one of the multiple
-.Em alternatives
-available.
-.Pp
-The alternatives are classified according to the package they belong to,
-forming
-.Em groups
-of alternatives.
-In other words, a concrete package contains a list of all the wrappers it
-affects by providing alternatives to them.
-This makes things easier for the end user and/or the administrator who has
-to deal with them, as they can manually select a group (package) rather than a
-bunch of wrappers.
-.Pp
-Wrappers are identified by their filename relative to the installation
-prefix, i.e.,
-.Pa @PREFIX@
-if the
-.Fl p
-option is not used.
-In the example above, the wrapper could be identified by the
-.Pa bin/vi
-string.
-The identifier is the string used as the
-.Dq wrapper
-argument in all the actions that require it.
-.Pp
-The generic wrapper scans a list of available alternatives and tries to
-execute them in order; the first one that succeeds is the one used for
-that run.
-This list of alternatives is read from multiple configuration files.
-Each one contains a list of possible alternatives, one per line, with
-optional arguments to them.
-Lines starting with
-.Sq #
-are considered comments and are ignored.
-.Pp
-The following configuration files are read, in strict order, for each
-wrapper (replace the
-.Dq wrapper
-word with the wrapper's absolute file name):
-.Bl -tag -width XXXX
-.It Pa ~/.alternatives/wrapper
-This is called the
-.Em user configuration file
-and is only read when not running as
-.Dq @ROOT_USER@ .
-Otherwise, tools such as
-.Xr sudo 8
-could be used to execute any program in the system.
-This file can be freely edited by the user, either by hand or by using
-the
-.Cm manual
-action described below.
-.It Pa @CONFDIR@/wrapper
-This is called the
-.Em system configuration file
-and is read if found.
-This file can be freely edited by the administrator, either by hand or
-by using the
-.Cm manual
-action described below.
-.It Pa @DATADIR@/wrapper
-This is called the
-.Em database configuration file
-and is always read.
-This file must not be edited by hand; packages providing alternatives
-will take care to (un)register themselves from them when (de)installed.
-.El
-.Ss Options
-The following options are available:
-.Bl -tag -width XpXprefixX
-.It Fl g
-Operate on groups of wrappers rather than individual files.
-This is the opposite of
-.Fl w
-and is currently the default behavior.
-Affects the behavior of all actions.
-.It Fl p Ar prefix
-Set installation prefix.
-This affects where wrappers and their manual pages are looked for.
-The prefix defaults to
-.Pa @PREFIX@
-if this flag is not given.
-.It Fl s
-Run in silent mode: no output except for errors.
-.It Fl w
-Operate on individual wrappers rather than on groups.
-This is the opposite of
-.Fl g .
-Affects the behavior of all actions.
-.El
-.Ss Actions in group mode
-The following table describes each available action and its behavior when
-working in group mode.
-All these actions are at a higher level than the same actions in wrapper
-mode.
-They always end up using the later at some point, so you should also
-read the next section to be aware of the exact effect of each command.
-.Bl -tag -width XXXX
-.It Cm auto Ar package
-Removes any manual configuration from each wrapper associated with the given
-package.
-This means that all affected wrappers are then free to choose whichever
-alternative they prefer.
-.It Cm destroy
-Removes the alternative database, found in
-.Pa @DBDIR@ ,
-and all its associated wrappers and manual pages.
-This action is intended to be used by the
-.Nm
-package.
-.It Cm list
-Lists which of the installed packages provide alternatives.
-Any of the packages shown by this command can then be fed back to the
-.Cm auto
-and
-.Cm manual
-actions.
-.It Cm manual Ar package
-Manually selects all the alternatives that belong to
-.Ar package
-to be the default for their respective wrappers.
-.It Cm rebuild
-Rebuilds the alternatives database, found in
-.Pa @DBDIR@ ,
-based on the contents of the package database, usually available in
-.Pa @PKG_DBDIR@ .
-Basically, it scans the later looking for packages with an
-.Pa +ALTERNATIVES
-file in them, and, for each of those, the
-.Cm register
-action is called with the appropriate file name.
-This action is intended to be used by the
-.Nm
-package or in case of database corruption.
-.It Cm register Ar package wrapper alternative arguments
-Registers a new
-.Ar alternative
-for the given
-.Ar wrapper
-in the specified
-.Ar package .
-If the package does not exist in the database, it is created.
-.Pp
-This action must not be used directly; packages providing alternatives
-will take care to execute it at installation time.
-.It Cm status Ar package
-For each wrapper that belongs to
-.Ar package ,
-shows which alternative will be used by it in the next run.
-It also displays all available candidates for each of them.
-.It Cm unregister Ar package
-Removes the
-.Ar package
-from the database.
-All alternatives associated to it are also removed.
-.Pp
-This action must not be used directly; packages providing alternatives
-will take care to execute it at deinstallation time.
-.El
-.Ss Actions in wrapper mode
-The following table describes each available action and its behavior when
-working in wrapper mode.
-Note that these actions work at a very low level as they are used to manage
-wrappers and alternative commands directly.
-In most situations, you will want to use these actions in group mode.
-.Bl -tag -width XXXX
-.It Cm auto Ar wrapper
-Removes any manual configuration created for the given
-.Ar wrapper .
-That is, if running as
-.Dq @ROOT_USER@ ,
-the system configuration file is deleted; otherwise, the user configuration
-file is removed.
-The effect of this action is that the wrapper is then free to choose any
-alternative it wants.
-.It Cm manual Ar wrapper alternative arguments
-Manually selects the
-.Ar alternative
-for the given
-.Ar wrapper .
-If running as
-.Dq @ROOT_USER@ ,
-the system configuration file is modified; otherwise, the user configuration
-file is changed.
-The effect of this action is that the wrapper will try to use your preferred
-alternatives, regardless of what is installed on the system.
-.It Cm register Ar wrapper alternative arguments
-Registers a new
-.Ar alternative
-for the given
-.Ar wrapper .
-If the wrapper did not exist before, it is created.
-You may optionally pass several
-.Ar arguments
-to the
-.Ar alternative
-program.
-.Pp
-This action should not be used directly; packages providing alternatives
-will take care to execute it at installation time.
-.It Cm status Ar wrapper
-Shows which alternative will be used by the
-.Ar wrapper
-in the next run.
-It also displays all available candidates for it.
-.It Cm unregister Ar wrapper alternative
-Removes the
-.Ar alternative
-from the given
-.Ar wrapper .
-If there are no more alternatives available, the wrapper is removed.
-.Pp
-This action should not be used directly; packages providing alternatives
-will take care to execute it at deinstallation time.
-.El
-.Ss Filtering wrappers
-.Nm
-lets you choose which wrappers you want on your system and which ones should
-simply be ignored.
-This is accomplished by a filter matched against every wrapper, which is
-defined in the
-.Pa @CONFDIR@/filter.conf
-file.
-.Pp
-A filter is composed of multiple entries.
-Each entry contains an action and a regular expression, separated by a
-.Em single space .
-The action can be either
-.Dq accept
-or
-.Dq ignore .
-The former specifies that, if the regular expression is matched against a
-wrapper name, processing should stop and the wrapper should be created.
-The later is exactly the opposite: if the name matches the expression, the
-wrapper is ignored and processing stops.
-.Pp
-Please note that, after modifying the filter configuration file, the
-wrappers database
-.Em must be rebuilt
-using the
-.Dq rebuild
-action.
-Otherwise your changes will take no effect.
-.Sh ENVIRONMENT
-.Bl -tag -width PKG_DBDIR
-.It Ev PKG_DBDIR
-Location of the package database directory.
-Defaults to
-.Pa @PKG_DBDIR@ .
-.El
-.Sh FILES
-.Bl -tag -width XXXX
-.It Pa ~/.pkg_alternatives/
-User-specific configuration directory.
-.It Pa @CONFDIR@/
-System-wide configuration directory.
-.It Pa @CONFDIR@/filter.conf
-Wrapper filter.
-.It Pa @DATADIR@/
-System-wide configuration database.
-.El
-.Sh DIAGNOSTICS
-.Nm
-exists 0 on success and 1 if an error occurred.
-.Sh EXAMPLES
-.Ss Managing wrapper groups
-The following command tells all Vim related wrappers (which include
-.Xr ex 1 ,
-.Xr vi 1
-and
-.Xr view 1 )
-to always prefer Vim in favour of any other program:
-.Bd -literal -offset indent
-# pkg_alternatives manual vim
-.Ed
-.Pp
-And the following command reverts the previous change, configuring the
-affected wrappers to use whichever alternative is available:
-.Bd -literal -offset indent
-# pkg_alternatives auto vim
-.Ed
-.Ss Managing individual wrappers
-Suppose that you want to use Sun's Java 1.5 by default for all Java-related
-wrappers, except for
-.Xr appletviewer 1 ,
-because you want to use Kaffe in that case.
-The following commands do this, by first selecting Sun's Java 1.5 and later
-overriding the exact wrapper to refer to Kaffe:
-.Bd -literal -offset indent
-# pkg_alternatives manual sun-jre15
-# pkg_alternatives manual sun-jdk15
-# pkg_alternatives -w manual bin/appletviewer \\
- /usr/pkg/bin/kaffe-appletviewer
-.Ed
-.Ss Applying filters
-Let us consider a very typical situation: you have just installed a Python
-interpreter and you want the
-.Pa bin/python
-wrapper to be created, but you do not want to pollute your system with any
-other wrapper (such as those coming from Vim).
-You can achieve this by using a filter that first accepts the Python wrapper
-and then ignores everything else.
-The following lines could be added to
-.Pa @CONFDIR@/filter.conf
-to achieve this:
-.Bd -literal -offset indent
-accept ^bin/python$
-ignore .*
-.Ed
-.Pp
-Don't forget to run the following command after doing the above changes:
-.Bd -literal -offset indent
-# pkg_alternatives rebuild
-.Ed
-.Sh SEE ALSO
-.Xr pkg_add 1 ,
-.Xr pkg_delete 1
-.Sh HISTORY
-The
-.Nm
-utility first appeared in pkgsrc-2005Q1.
-.Pp
-This utility was inspired by the alternatives system found in the Debian
-operating system.
-.Sh AUTHORS
-.An Julio M. Merino Vidal Aq jmmv@NetBSD.org
diff --git a/pkgtools/pkg_alternatives/files/pkg_alternatives.sh b/pkgtools/pkg_alternatives/files/pkg_alternatives.sh
deleted file mode 100644
index 6ef7126a6b6..00000000000
--- a/pkgtools/pkg_alternatives/files/pkg_alternatives.sh
+++ /dev/null
@@ -1,718 +0,0 @@
-#!@SH@
-#
-# $NetBSD: pkg_alternatives.sh,v 1.6 2007/01/15 02:50:06 rillig Exp $
-#
-# pkg_alternatives - Generic wrappers for programs with similar interfaces
-# Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without alternative prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-Conf_Dir=@CONFDIR@@PREFIX@
-Data_Dir=@DATADIR@
-Db_Dir=@DBDIR@@PREFIX@
-Filter=
-Filter_Read=no
-Prefix=@PREFIX@
-Prog_Name=${0##*/}
-Verbose=yes
-
-: ${PKG_DBDIR:=@PKG_DBDIR@}
-: ${PKGMANDIR:=@PKGMANDIR@}
-
-# -------------------------------------------------------------------------
-
-# action_auto_package package
-#
-# Configures the given package to be in automatic mode. I.e., it removes
-# local customizations for all related wrappers, so that only the files in
-# the database are taken into account.
-#
-action_auto_package() {
- validate_args auto ${#} -eq 1
- validate_package ${1}
- pkg=${PKG_DBDIR}/${1}*/+ALTERNATIVES
-
- set -- $(cat ${pkg} | tr ' ' '¬')
- while [ ${#} -gt 0 ]; do
- action_auto_wrapper $(echo ${1} | cut -d '¬' -f 1)
- shift
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_auto_wrapper wrapper
-#
-# Configures the given wrapper to be in automatic mode. I.e., it removes
-# local customizations so that only the files in the database are taken
-# into account.
-#
-# wrapper is a path relative to prefix.
-#
-action_auto_wrapper() {
- validate_args auto ${#} -eq 1
- validate_wrapper ${1} yes
-
- conf=$(get_my_config)/${1}
- if [ -f ${conf} ]; then
- info "removing configuration from \`${conf}'"
- rm -f ${conf}
- rmdir_p ${conf%/*}
- else
- info "no existing configuration for \`${1}'; nothing to be done"
- fi
-}
-
-# -------------------------------------------------------------------------
-
-# action_destroy_package
-#
-# Destroys the alternatives database and removes all installed wrappers.
-#
-action_destroy_package() {
- validate_args list ${#} -eq 0
-
- [ -d ${Db_Dir} ] || return 0
-
- wrappers=$(cd ${Db_Dir} ; find . -type f)
-
- for w in ${wrappers}; do
- wrapper=$(echo ${w} | sed -e 's|^./||')
- manpage=$(get_manpage ${wrapper})
- info "removing wrapper \`${wrapper}'"
- rm -f ${Prefix}/${wrapper}
- info "removing manual page \`${manpage}'"
- rm -f ${manpage}
- done
-
- info "removing contents of \`@DBDIR@'"
- rm -rf @DBDIR@/* 2>/dev/null
- rmdir_p @DBDIR@
-}
-
-# -------------------------------------------------------------------------
-
-# action_destroy_wrapper
-#
-# Unavailable action.
-#
-action_destroy_wrapper() {
- err "the \`destroy' action cannot be used in wrapper mode"
-}
-
-# -------------------------------------------------------------------------
-
-# action_list_package
-#
-# Lists all available packages that provide alternatives.
-#
-action_list_package() {
- validate_args list ${#} -eq 0
-
- info "looking for alternatives in \`${PKG_DBDIR}'"
- for d in ${PKG_DBDIR}/*; do
- [ -f ${d}/+ALTERNATIVES ] && echo ${d##${PKG_DBDIR}/}
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_list_wrapper
-#
-# Unavailable action.
-#
-action_list_wrapper() {
- err "the \`list' action cannot be used in wrapper mode"
-}
-
-# -------------------------------------------------------------------------
-
-# action_manual_package package
-#
-# Configures the given package to be the preferred alternative for all the
-# wrappers associated to it.
-#
-action_manual_package() {
- validate_args manual ${#} -eq 1
- validate_package ${1}
- pkg=${PKG_DBDIR}/${1}*/+ALTERNATIVES
-
- set -- $(cat ${pkg} | tr ' ' '¬')
- while [ ${#} -gt 0 ]; do
- action_manual_wrapper $(echo ${1} | tr '¬' ' ')
- shift
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_manual_wrapper wrapper alternative arguments
-#
-# Configures the given wrapper to use the specified alternative.
-# If running as the administrator, the system-wide settings are changed;
-# otherwise, the user-specific settings are affected.
-#
-# wrapper is a path relative to prefix.
-# alternative is an absolute path.
-#
-action_manual_wrapper() {
- validate_args manual ${#} -ge 2
- validate_wrapper ${1} yes
- validate_alternative ${2}
-
- conf=$(get_my_config)/${1}
- info "modifying configuration from \`${conf}'"
- mkdir_p ${conf%/*}
- shift
- echo "${*}" >${conf}
-}
-
-# -------------------------------------------------------------------------
-
-# action_rebuild_package
-#
-# Rebuilds the alternatives database from the package database and also
-# reinstalls the wrappers (so that filter.conf takes effect).
-#
-action_rebuild_package() {
- validate_args list ${#} -eq 0
-
- action_destroy_package
- info "looking for alternatives in \`${PKG_DBDIR}'"
- for d in ${PKG_DBDIR}/*; do
- if [ -f ${d}/+ALTERNATIVES ]; then
- action_register_package ${d}/+ALTERNATIVES
- fi
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_rebuild_wrapper
-#
-# Unavailable action.
-#
-action_rebuild_wrapper() {
- err "the \`rebuild' action cannot be used in wrapper mode"
-}
-
-# -------------------------------------------------------------------------
-
-# action_register_package file
-#
-# Registers all wrapper/alternative pairs listed in the file. This is
-# supposed to be an +ALTERNATIVES file found inside a package in PKG_DBDIR.
-# Each line should follow the semantics expected by action_register_wrapper.
-#
-action_register_package() {
- validate_args register ${#} -eq 1
-
- set -- $(cat ${1} | tr ' ' '¬')
- while [ ${#} -gt 0 ]; do
- action_register_wrapper $(echo ${1} | tr '¬' ' ')
- shift
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_register_wrapper wrapper alternative arguments
-#
-# Registers a new alternative for the given wrapper in the database.
-# The wrapper and its manual page are created if they do not exist.
-#
-action_register_wrapper() {
- validate_args register ${#} -ge 2
- validate_wrapper ${1} no
- validate_alternative ${2}
-
- wbase=${1}; shift
- alt=${1}; shift
- args=${*}
-
- filter ${wbase} || return
-
- wabs=${Prefix}/${wbase}
- manpage=$(get_manpage ${wbase})
- dbconf=${Db_Dir}/${wbase}
- sysconf=${Conf_Dir}/${wbase}
-
- if [ ! -f ${dbconf} ]; then
- info "initializing database entry for \`${wbase}'"
- mkdir_p ${dbconf%/*}
- touch ${dbconf%/*}
- fi
- info "registering alternative \`${alt}' for wrapper \`${wbase}'"
- if [ -n "${args}" ]; then
- echo "${alt} ${args}" >>${dbconf}
- else
- echo "${alt}" >>${dbconf}
- fi
-
- if [ ! -f ${wabs} ]; then
- info "creating wrapper \`${wbase}'"
- mkdir_p ${wabs%/*}
- sed -e "s|__SH__|@SH@|g" \
- -e "s|__CONF_FILE__|${sysconf}|g" \
- -e "s|__CREATOR__|${Prog_Name}|g" \
- -e "s|__DB_FILE__|${dbconf}|g" \
- -e "s|__ROOT_USER__|@ROOT_USER@|g" \
- -e "s|__WRAPPER__|${wabs}|g" \
- <${Data_Dir}/wrapper.sh >${wabs}
- chmod +x ${wabs}
- mkdir_p ${manpage%/*}
- sed -e "s|__CONF_FILE__|${sysconf}|g" \
- -e "s|__CREATOR__|${Prog_Name}|g" \
- -e "s|__DB_FILE__|${dbconf}|g" \
- -e "s|__PREFIX__|${Prefix}|g" \
- -e "s|__SECTION__|$(get_manpage_sect ${wbase})|g" \
- -e "s|__TITLE__|$(echo ${wbase##*/} | tr a-z A-Z)|g" \
- -e "s|__WRAPPER__|${wbase##*/}|g" \
- -e "s|__WRAPPERBASE__|${wbase}|g" \
- <${Data_Dir}/wrapper.man >${manpage}
- fi
-}
-
-# -------------------------------------------------------------------------
-
-# action_status_package package
-#
-# Shows the status of each wrapper associated to the given package.
-#
-action_status_package() {
- validate_args status ${#} -eq 1
- validate_package ${1}
- pkg=${PKG_DBDIR}/${1}*/+ALTERNATIVES
-
- set -- $(cat ${pkg} | tr ' ' '¬')
- while [ ${#} -gt 0 ]; do
- action_status_wrapper $(echo ${1} | cut -d '¬' -f 1)
- shift
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_status_wrapper wrapper
-#
-# Shows the current status for the given wrapper.
-#
-action_status_wrapper() {
- validate_args status ${#} -eq 1
- validate_wrapper ${1} yes
-
- wbase=${1}
- dbconf=${Db_Dir}/${wbase}
- sysconf=${Conf_Dir}/${wbase}
- userconf=~/.pkg_alternatives${Prefix}/${wbase}
-
- [ $(id -un) = @ROOT_USER@ ] && userconf=
- alts=$(cat ${userconf} ${sysconf} ${dbconf} 2>/dev/null | grep -v '^#' | \
- tr ' ' '¬')
-
- found=
- for a in ${alts}; do
- prog=$(echo ${a} | cut -d '¬' -f 1)
- if [ -x ${prog} ]; then
- found=$(echo ${a} | tr '¬' ' ')
- break
- fi
- done
-
- [ -n "${found}" ] ||
- err "the wrapper \`${wbase}' exists but has no valid alternatives"
-
- echo "\`${wbase}' points to \`${found}'"
- for a in $(echo ${alts} | tr ' ' '\n' | sort | uniq); do
- echo " candidate: $(echo ${a} | tr '¬' ' ')"
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_unregister_package file
-#
-# Unregisters the given package (given by its +ALTERNATIVES file) and
-# removes all associated alternatives from their respective wrappers.
-#
-action_unregister_package() {
- validate_args unregister ${#} -eq 1
-
- set -- $(cat ${1} | tr ' ' '¬')
- while [ ${#} -gt 0 ]; do
- action_unregister_wrapper $(echo ${1} | tr '¬' ' ')
- shift
- done
-}
-
-# -------------------------------------------------------------------------
-
-# action_unregister_wrapper wrapper alternative arguments
-#
-# Unregisters an alternative for the given wrapper. The lookup is done
-# based on the alternative name and its arguments. I.e., there must be
-# an exact match. If no alternatives remain after the removal, the wrapper
-# and its manpage are removed.
-#
-action_unregister_wrapper() {
- validate_args unregister ${#} -ge 2
- validate_wrapper ${1} yes
-
- wbase=${1}; shift
- alt=${1}; shift
- args=${*}
-
- manpage=$(get_manpage ${wbase})
- dbconf=${Db_Dir}/${wbase}
-
- if [ -n "${args}" ]; then
- grep -v "^${alt} ${args}$" <${dbconf} >${dbconf}.new
- else
- grep -v "^${alt}$" <${dbconf} >${dbconf}.new
- fi
- if cmp -s ${dbconf} ${dbconf}.new; then
- rm -f ${dbconf}.new
- err "unknown alternative \`${alt}' for wrapper \`${wbase}'"
- fi
- mv ${dbconf}.new ${dbconf}
-
- if ! grep '^/' ${dbconf} >/dev/null; then
- info "no more alternatives for \`${wbase}'; removing"
- rm -f ${dbconf} ${Prefix}/${wbase} ${manpage}
- rmdir_p ${dbconf%/*}
- rmdir_p ${Prefix}/${wbase%/*}
- rmdir_p ${manpage%/*}
- fi
-}
-
-# -------------------------------------------------------------------------
-
-# err message
-#
-# Prints the given error message and exist with an error code.
-#
-err() {
- echo "${Prog_Name}: ${*}" 1>&2
- exit 1
-}
-
-# -------------------------------------------------------------------------
-
-# filter wrapper
-#
-# Reads the configuration filter from CONFDIR/filter.conf and, for the
-# given wrapper, returns whether it is accepted or ignored.
-#
-filter() {
- [ ! -f @CONFDIR@/filter.conf ] && return 0
-
- if [ ${Filter_Read} = no ]; then
- Filter=$(cat @CONFDIR@/filter.conf | grep -v '^#' | tr ' ' '¬')
- Filter_Read=yes
- fi
-
- [ -z "${Filter}" ] && return 0
-
- for f in ${Filter}; do
- what=$(echo ${f} | cut -d '¬' -f 1)
- case ${what} in
- accept)
- name=$(echo ${f} | cut -d '¬' -f 2- | tr '¬' ' ')
- if echo ${1} | grep "${name}" >/dev/null; then
- info "filter accepts \`${1}'"
- return 0
- fi
- ;;
- ignore)
- name=$(echo ${f} | cut -d '¬' -f 2- | tr '¬' ' ')
- if echo ${1} | grep "${name}" >/dev/null; then
- info "filter ignores \`${1}'"
- return 1
- fi
- ;;
- *)
- warn "unknown filter type \`${what}'; ignoring"
- ;;
- esac
- done
-
- true
-}
-
-# -------------------------------------------------------------------------
-
-# get_my_config
-#
-# Prints the configuration directory for the current user. If root, this
-# is the system-wide configuration directory. Otherwise, it is the user's
-# personal directory.
-#
-get_my_config() {
- if [ $(id -un) = @ROOT_USER@ ]; then
- echo ${Conf_Dir}
- else
- echo ~/.pkg_alternatives${Prefix}
- fi
-}
-
-# -------------------------------------------------------------------------
-
-# get_manpage wrapper
-#
-# Prints the absolute path to the manual page associated to wrapper.
-# Does no error checking; validate_wrapper has to be called before this
-# function to ensure wrapper is a valid name.
-#
-get_manpage() {
- sect=$(get_manpage_sect ${1})
- echo ${Prefix}/${PKGMANDIR}/man${sect}/${1##*/}.${sect}
-}
-
-# -------------------------------------------------------------------------
-
-# get_manpage_sect wrapper
-#
-# Prints the section number that will be used by the wrapper's manpage.
-# Does no error checking; validate_wrapper has to be called before this
-# function to ensure wrapper is a valid name.
-#
-get_manpage_sect() {
- case ${1%/*} in
- bin) echo 1 ;;
- libexec|sbin) echo 8 ;;
- esac
-}
-
-# -------------------------------------------------------------------------
-
-# info message
-#
-# Prints the given informative message if running in verbose mode.
-#
-info() {
- [ ${Verbose} = yes ] && echo "${Prog_Name}: ${*}"
-}
-
-# -------------------------------------------------------------------------
-
-# mkdir_p directory
-#
-mkdir_p() {
- if [ ! -d ${1} ]; then
- cnt=2
- max=$(($(echo ${1} | tr '/' ' ' | wc -w | awk '{ print $1; }') + 1))
- while [ ${cnt} -le ${max} ]; do
- mkdir $(echo ${1} | cut -d '/' -f -${cnt}) 2>/dev/null
- cnt=$((${cnt} + 1))
- done
- [ -d ${1} ] || err "cannot create directory \`${1}'"
- fi
-}
-
-# -------------------------------------------------------------------------
-
-# usage
-#
-# Shows an usage message and exits the program with an error condition.
-#
-usage() {
- cat 1>&2 <<EOF
-Usage: ${Prog_Name} [options] action [arg1 ... argN]
-
-Available options:
- -g Select group mode (default).
- -p dir Set installation prefix.
- -s Run in silent mode.
- -w Select wrapper mode.
-
-Available actions in group mode:
- auto destroy list manual rebuild register status unregister
-
-Available actions in wrapper mode:
- auto manual register status unregister
-
-See pkg_alternatives(8) for more information.
-EOF
- exit 1
-}
-
-# -------------------------------------------------------------------------
-
-# rmdir_p directory
-#
-rmdir_p() {
- if [ -d ${1} ]; then
- cnt=$(($(echo ${1} | tr '/' ' ' | wc -w | awk '{ print $1; }') + 1))
- while [ ${cnt} -gt 1 ]; do
- rmdir $(echo ${1} | cut -d '/' -f -${cnt}) 2>/dev/null
- cnt=$((${cnt} - 1))
- done
- fi
-}
-
-# -------------------------------------------------------------------------
-
-# validate_alternative name
-#
-# Verifies that the given program name is valid to be used as an
-# alternative.
-#
-validate_alternative() {
- echo ${1} | grep '^/' >/dev/null || \
- err "the alternative \`${1}' is not an absolute file name"
- [ -x ${1} ] || \
- err "the alternative \`${1}' is not an executable"
-}
-
-# -------------------------------------------------------------------------
-
-# validate_args action argcount operator expected
-#
-# Verifies that the number of arguments passed to the specified action
-# are correct according to its semantics. Prints an error message if
-# incorrect.
-#
-validate_args() {
- [ ${2} ${3} ${4} ] || \
- err "incorrect number of arguments for the \`${1}' action"
-}
-
-# -------------------------------------------------------------------------
-
-# validate_package name
-#
-# Verifies that the specified package is valid.
-#
-validate_package() {
- if [ ! -f ${PKG_DBDIR}/${1}/+ALTERNATIVES ]; then
- cnt=$(cd ${PKG_DBDIR} && ls -d ${1}-[0-9]* 2>/dev/null | wc -l | \
- awk '{ print $1; }')
- if [ "${cnt}" -eq 0 ]; then
- err "the package \`${1}' is not known"
- elif [ "${cnt}" -gt 1 ]; then
- err "multiple matches found for \`${1}'"
- fi
-
- # Reached this point, there is a single match for the package,
- # but it may still be wrong (i.e., no alternatives for it).
- [ ! -f ${PKG_DBDIR}/${1}*/+ALTERNATIVES ] && \
- err "no alternatives defined for the \`${1}' package"
- fi
-}
-
-# -------------------------------------------------------------------------
-
-# validate_wrapper name exists
-#
-# Verifies that the specified wrapper is valid, i.e., if it belongs to a
-# known directory. Also, if the exists parameter is yes, the function
-# ensures that the wrapper already exists (as well as its configuration
-# file in the database).
-#
-validate_wrapper() {
- case ${1%/*} in
- bin|libexec|sbin)
- if [ ${2} = yes ]; then
- [ -x ${Prefix}/${1} ] || \
- err "the wrapper \`${1}' does not exist or is not" \
- "executable"
- [ -f ${Db_Dir}/${1} ] || \
- err "the database configuration \`${Db_Dir}/${1}'" \
- "does not exist"
- fi
- ;;
- *)
- err "wrapper name \`${1}' is invalid"
- ;;
- esac
-}
-
-# -------------------------------------------------------------------------
-
-# warn message
-#
-# Shows a warning message.
-#
-warn() {
- echo "${Prog_Name}: ${*}" 1>&2
-}
-
-# -------------------------------------------------------------------------
-
-# main
-#
-# Main program code. Does argument parsing and executes the required
-# action.
-#
-main() {
- args=$(getopt gp:sw ${*})
- [ ${?} -eq 0 ] || usage
- set -- ${args}
- what=package
- while [ ${#} -gt 0 ]; do
- case ${1} in
- -g)
- what=package
- ;;
- -p)
- Prefix=$2; shift
- Conf_Dir=@CONFDIR@${Prefix}
- Db_Dir=@DBDIR@${Prefix}
- ;;
- -s)
- Verbose=no
- ;;
- -w)
- what=wrapper
- ;;
- --)
- shift; break
- ;;
- esac
- shift
- done
-
- if [ ${#} -eq 0 ]; then
- usage
- fi
-
- action=${1}; shift
- case ${action} in
- auto|destroy|list|manual|rebuild|register|status|unregister)
- action_${action}_${what} "${@}"
- ;;
- *)
- err "unknown action \`${action}'"
- ;;
- esac
-
- return 0
-}
-
-main "${@}"
-
-# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
diff --git a/pkgtools/pkg_alternatives/files/wrapper.man b/pkgtools/pkg_alternatives/files/wrapper.man
deleted file mode 100644
index f5a24186652..00000000000
--- a/pkgtools/pkg_alternatives/files/wrapper.man
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" $NetBSD: wrapper.man,v 1.2 2006/09/20 12:53:21 rillig Exp $
-.\"
-.\" pkg_alternatives - Generic wrappers for programs with similar interfaces
-.\" Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 25, 2005
-.Dt __TITLE__ __SECTION__
-.Os
-.Sh NAME
-.Nm __WRAPPER__
-.Nd generic wrapper created by the alternatives system
-.Sh SYNOPSIS
-.Nm
-.Op arguments
-.Sh DESCRIPTION
-.Nm
-is a generic wrapper created by the
-.Xr pkg_alternatives 1
-utility.
-Its purpose is to execute a program that provides a similar interface
-to the one expected by the more common name
-.Nm .
-.Pp
-The program to be really run is determined from a list of alternatives.
-You can check which one will be executed, as well as all available
-candidates, by issuing:
-.Bd -literal -offset indent
-$ pkg_alternatives -w status __WRAPPERBASE__
-.Ed
-.Pp
-Once you know which alternative is the chosen one, look at its manual page
-for more information.
-.Sh FILES
-.Bl -tag -width XXXX
-.It ~/.pkg_alternatives__PREFIX__/__WRAPPERBASE__
-User-specific list of candidates.
-.It __CONF_FILE__
-System-wide list of candidates, automatically configured by installed
-packages.
-.It __DB_FILE__
-System-wide list of candidates, manually configured by the administrator.
-.El
-.Sh SEE ALSO
-.Xr pkg_alternatives 8
-.Sh AUTHORS
-.An Julio M. Merino Vidal Aq jmmv@NetBSD.org
diff --git a/pkgtools/pkg_alternatives/files/wrapper.sh b/pkgtools/pkg_alternatives/files/wrapper.sh
deleted file mode 100644
index e4a757a2801..00000000000
--- a/pkgtools/pkg_alternatives/files/wrapper.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!__SH__
-#
-# $NetBSD: wrapper.sh,v 1.1.1.1 2005/01/25 13:00:46 jmmv Exp $
-#
-# pkg_alternatives - Generic wrappers for programs with similar interfaces
-# Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without alternative prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-wrapper="__WRAPPER__"
-progname="${wrapper##*/} (wrapper)"
-
-if [ ! -f __DB_FILE__ ]; then
- echo "${progname}: cannot open __DB_FILE__" 1>&2
- exit 1
-fi
-
-if [ $(id -un) = __ROOT_USER__ ]; then
- userfile=
-else
- userfile=~/.pkg_alternatives/${wrapper}
-fi
-alternatives=$(cat ${userfile} __CONF_FILE__ __DB_FILE__ 2>/dev/null | \
- grep -v "^#" | tr ' ' '¬')
-
-found=
-for a in ${alternatives}; do
- prog=$(echo ${a} | cut -d '¬' -f 1)
- if [ -x ${prog} ]; then
- found=$(echo ${a} | tr '¬' ' ')
- break
- fi
-done
-
-if [ -z "${found}" ]; then
- echo "${progname}: no alternatives found" 1>&2
- exit 1
-fi
-
-exec ${found} "${@}"
diff --git a/pkgtools/pkg_chk/DESCR b/pkgtools/pkg_chk/DESCR
deleted file mode 100644
index 5165bcadbe3..00000000000
--- a/pkgtools/pkg_chk/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-pkg_chk verifies that the versions of installed packages matches those in
-pkgsrc, optionally adding missing or updating mismatched packages.
-
-It can verify all installed packages, or check against a set of packages
-based on the hostname, architecture, and other characteristics.
diff --git a/pkgtools/pkg_chk/Makefile b/pkgtools/pkg_chk/Makefile
deleted file mode 100644
index 9ab79852bf2..00000000000
--- a/pkgtools/pkg_chk/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-# $NetBSD: Makefile,v 1.46 2006/11/05 21:53:27 tron Exp $
-
-DISTNAME= pkg_chk-1.83
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= abs@NetBSD.org
-HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
-COMMENT= Check installed package versions against pkgsrc
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= # empty
-USE_LANGUAGES= # empty
-USE_TOOLS+= mktemp:run
-NO_CHECKSUM= YES
-
-CONFLICTS= pkgchk-[0-9]*
-
-INSTALLATION_DIRS= sbin ${PKGMANDIR}/man8
-
-.include "../../mk/bsd.prefs.mk"
-
-MAKECONF?= /etc/mk.conf
-
-#XXX: how to get GZIP_CMD?!
-do-build:
- ${SED} -e 's#@AWK@#${AWK}#g' \
- -e 's#@GREP@#${GREP}#g' \
- -e 's#@GZIP_CMD@#gzip#g' \
- -e 's#@MAKE@#${MAKE}#g' \
- -e 's#@MAKECONF@#${MAKECONF}#g' \
- -e 's#@PKG_ADD@#${PKG_ADD}#g' \
- -e 's#@PKG_DELETE@#${PKG_DELETE}#g' \
- -e 's#@PKG_INFO@#${PKG_INFO}#g' \
- -e 's#@SED@#${SED}#g' \
- -e 's#@SH@#${SH}#g' \
- -e 's#@SORT@#${SORT}#g' \
- -e 's#@TSORT@#${TSORT}#g' \
- -e 's#@PREFIX@#${PREFIX}#g' \
- -e 's#@PKG_DBDIR@#${PKG_DBDIR}#g' \
- ${FILESDIR}/pkg_chk.sh >${WRKSRC}/pkg_chk.sh
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_chk.sh ${PREFIX}/sbin/pkg_chk
- ${INSTALL_MAN} ${FILESDIR}/pkg_chk.8 ${PREFIX}/${PKGMANDIR}/man8/pkg_chk.8
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_chk/PLIST b/pkgtools/pkg_chk/PLIST
deleted file mode 100644
index 63217bab0b7..00000000000
--- a/pkgtools/pkg_chk/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/27 00:02:34 wiz Exp $
-sbin/pkg_chk
-man/man8/pkg_chk.8
diff --git a/pkgtools/pkg_chk/files/pkg_chk.8 b/pkgtools/pkg_chk/files/pkg_chk.8
deleted file mode 100644
index 8278aa64ab8..00000000000
--- a/pkgtools/pkg_chk/files/pkg_chk.8
+++ /dev/null
@@ -1,369 +0,0 @@
-.\" $NetBSD: pkg_chk.8,v 1.24 2006/10/02 07:33:38 abs Exp $
-.\"
-.\" Copyright (c) 2001 by David Brownlee (abs@NetBSD.org)
-.\" Absolutely no warranty.
-.\"
-.Dd September 29, 2006
-.Dt PKG_CHK 8
-.Sh NAME
-.Nm pkg_chk
-.Nd check, and optionally update, installed packages
-.Sh SYNOPSIS
-.Nm
-.Op Fl aBbcfhiklNnpqrsuv
-.Op Fl C Ar conf
-.Op Fl D Ar tags
-.Op Fl L Ar file
-.Op Fl P Ar path
-.Op Fl U Ar tags
-.Sh DESCRIPTION
-.Nm
-verifies that the versions of installed packages matches those in
-pkgsrc, optionally adding missing or updating mismatched packages.
-.Pp
-It can verify all installed packages, or check against a set of packages
-based on the hostname, architecture, and other characteristics.
-.Pp
-When updating packages that depend on each other
-.Nm
-will skip dependent packages to reduce unnecessary rebuilding.
-.Pp
-.Ss Options
-.Bl -tag -width xxxxxxxx
-.It Fl a
-Automatically add any missing packages.
-If a binary package exists in
-.Pa ${PACKAGES}
-it will be used in preference to building from source, unless the
-.Fl b
-or
-.Fl s
-options are given.
-.It Fl B
-Include the "Build version" (see option
-.Fl b
-.Xr pkg_info 1 )
-of packages when determining if a package is up to date.
-.It Fl b
-Use binary packages.
-If
-.Fl s
-is not set this allows
-.Nm
-to run without
-.Ev PKGSRCDIR .
-.It Fl C Ar conf
-Use the
-.Pa pkgchk.conf
-file
-.Sq Ar conf .
-
-.It Fl D Ar tags
-Add the comma separated list of tags to those checked when parsing
-.Pa pkgchk.conf .
-Also includes
-.Ev PKGCHK_TAGS .
-.It Fl f
-Fetch all missing/mismatched packages found.
-Can be used with
-.Fl a
-or
-.Fl u
-to perform the fetch before any building.
-.It Fl g
-Generate an initial
-.Pa pkgchk.conf
-file based upon the packages installed on the host machine.
-.It Fl h
-Brief help.
-.It Fl k
-Continue with further packages if errors are encountered.
-.It Fl L Ar file
-Redirect the output for all commands run into the logfile
-.Pa file .
-Should be specified as a full pathname.
-On any error the tail end of the logfile will be displayed.
-.It Fl l
-List the filename for all binary packages (including the exact dependencies
-against which each package was built) based on
-.Pa pkgchk.conf .
-Will abort if a binary package is missing.
-This can be used (in conjunction with
-.Fl U
-and
-.Fl D )
-to determine what
-packages would need to be copied to a remote machine to ensure it
-was completely up to date.
-The list is sorted so that dependencies
-always come before packages which depend upon them.
-.It Fl N
-For each installed package, look if there is a newer version
-noted in
-.Pa ${PKGSRCDIR}/doc/TODO .
-Good for finding packages to update.
-.It Fl n
-Display actions that would be taken, but do not change anything.
-.It Fl P Ar path
-Set the path to the binary packages.
-Defaults to
-.Ev PACKAGES
-if
-.Ev PKGSRCDIR
-is available, or
-.Dq Pa \&.
-otherwise.
-.It Fl p
-Print list of package directories that will be checked, then exit.
-.It Fl q
-Do not display actions or take any action; only list information
-about package version differences.
-Useful for options that list information about package differences, such as
-.Fl a
-or
-.Fl u .
-.It Fl r
-Recursively delete any mismatched packages found.
-Use with care, this does not record which packages were installed
-for later update.
-.It Fl s
-Building missing packages from source.
-If UPDATE_TARGET=package is set in
-.Pa /etc/mk.conf ,
-then
-.Nm
-will automatically generate binary packages for later reuse.
-.It Fl U Ar tags
-Remove the comma separated list of tags from those checked when
-parsing
-.Pa pkgchk.conf .
-Also includes
-.Ev PKGCHK_NOTAGS .
-Package directories can also be skipped by listing them under
-.Fl U .
-Passing
-.Sq *
-to
-.Fl U
-will result in all default tags being unset
-.It Fl u
-Automatically update any missing packages.
-If a binary package exists in
-.Ev PACKAGES
-it will be used in preference to building from source, unless the
-.Fl b
-or
-.Fl s
-options are given.
-.Pp
-Note: If the update fails (particularly when building from source), the system
-will be left with missing packages.
-Once the error has been fixed, a second run will resume the update.
-.It Fl v
-Verbose - list the tags set when checking
-.Pa pkgchk.conf ,
-and all packages checked.
-.El
-.Ss Deprecated Options
-.Bl -tag -width xxxxxxxx
-.It Fl c
-Check versions of packages specified in
-.Pa pkgchk.conf .
-This is a synomyn for
-.Nm
-.Fl a q ,
-and will be removed in a future version.
-.It Fl i
-Check versions of installed packages, ignoring
-.Pa pkgchk.conf.
-This is a synomyn for
-.Fl u q ,
-and will be removed in a future version.
-.El
-.Sh FILE FORMAT
-Anything after a
-.Sq #
-on a line is considered a comment.
-.Pp
-Each line in
-.Pa pkgchk.conf
-can either define a new tag or a package directory
-(such as sysutils/skill), in each case followed by a list of tags.
-.Ss New tag groups
-Lines that define a new tag can be used to group tags to avoid
-repeating the same set of tags for multiple packages.
-For example:
-.Dl mailserver \= tll gta tycoon jeeves iris
-would cause the mailserver tag to be set for any of the listed hosts.
-Note that the tags after the
-.Sq =
-are parsed with the same set of tag
-evaluation rules as those after package definitions (see later).
-.Ss Package definition lines
-Package directory lines are used to determine which packages are to be
-installed, checking the tags against the current defined set.
-.Ss Tag evaluation
-Tags on package directory are checked against the current machine's set:
-.Bl -bullet
-.It
-If a matched tag starts with a hyphen
-.Sq - ,
-the package is always excluded.
-.It
-Otherwise if any tags match the package will be included.
-.It
-A line without any tags matches all machines.
-.It
-An asterisk
-.Sq *
-matches any tag.
-.It
-If a tag starts with an
-.Sq /
-then it is checked for as a readable filename.
-.It
-Tags cannot contain a hyphen
-.Sq -
-or plus
-.Sq + .
-.It
-Tags separated by spaces are treated as
-.Dq or .
-.Dq taga tagb
-means if
-.Em taga
-or
-.Em tagb
-match the current machine.
-.It
-Tags separated by a plus are treated as
-.Dq and .
-.Dq taga+tagb
-means if
-.Em taga
-and
-.Em tagb
-match the current machine.
-.El
-.Pp
-The default set of tags used to determine which packages to match
-in
-.Pa pkgchk.conf
-are equivalent to the output of the following with
-any spaces converted to hyphens (-): hostname -s, hostname, uname
--srm, uname -sr, uname -sm, uname -s, uname -r, uname -m.
-If
-.Pa /usr/X11R6/lib/libX11.so
-or
-.Pa /usr/X11R6/lib/libX11.a
-is present,
-.Em x11
-is added to the list of tags.
-Tags should not contain the - or + characters.
-To see tags for the current machine, run
-.Nm
-with the
-.Fl v
-option.
-.Sh ENVIRONMENT
-.Nm
-uses the following environment variables.
-.Bl -tag -width xxxx
-.It Ev PKGSRCDIR
-Base of pkgsrc tree.
-If not set in environment then read from
-.Pa ${MAKECONF}
-or
-.Pa /etc/mk.conf .
-Defaults to
-.Pa /usr/pkgsrc
-.It Ev PKG_DBDIR
-pkgsrc database directory.
-If not set in environment then read from
-.Pa ${MAKECONF}
-or
-.Pa /etc/mk.conf .
-Defaults to
-.Pa /var/db/pkg
-.It Ev PACKAGES
-Location of binary packages.
-If not set in environment then read from
-.Pa /etc/mk.conf .
-Defaults to
-.Pa ${PKGSRCDIR}/packages .
-.Pp
-Unless in a completely homogeneous environment (every machine running
-exactly the same OS version and architecture) setting
-.Ev ${PACKAGES}
-in
-.Pa /etc/mk.conf
-to a value such as
-.Bd -literal
-${PKGSRCDIR}/packages/${LOWER_OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
-.Ed
-.Pp
-is strongly recommended.
-If
-.Em cpuflags
-(devel/cpuflags) is being used to optimally target individual CPU types,
-then
-.Ev ${CPU_DIR}
-should be appended to
-.Ev ${PACKAGES} .
-.It Ev PKGCHK_CONF
-Pathname to pkg_chk configuration file.
-If not set in environment then read from
-.Pa /etc/mk.conf .
-Defaults to
-.Pa ${PKGSRCDIR}/pkgchk.conf .
-.It Ev PKGCHK_UPDATE_CONF
-Pathname to temporary list of installed packages used when updating.
-If not set in environment then read from
-.Pa /etc/mk.conf .
-Defaults to
-.Pa ${PKGSRCDIR}/pkgchk_update-$(hostname).conf .
-Note, if pkgsrc is being
-shared across multiple machines which may be updating at the same time then
-it is important this file does not overlap between machines.
-.It Ev PKGCHK_TAGS
-Additional tags to add when parsing
-.Pa pkgchk.conf .
-.It Ev PKGCHK_NOTAGS
-Additional tags to unset when parsing
-.Pa pkgchk.conf .
-.El
-.Sh EXAMPLES
-Sample
-.Pa pkgchk.conf
-file:
-.Bd -literal
-
-mailserver = tll gta tycoon jeeves iris
-
-# Install before others
-devel/cpuflags
-pkgtools/pkg_chk
-
-# Mail related
-mail/exim *
-mail/spamassassin mailserver
-mail/cyrus-imapd mailserver
-mail/procmail mailserver bobhost
-
-shells/standalone-tcsh *
-wm/pwm /etc/X11/XF86Config
-misc/setiathome i386
-print/acroread /etc/X11/XF86Config+i386
-www/communicator x11+sparc x11+sparc64
-www/navigator x11+i386
-x11/xlockmore x11 -wopr
-
-.Ed
-.Sh AUTHORS
-.An David Brownlee
-.Aq abs@NetBSD.org ,
-plus much from Stoned Elipot.
-.Sh BUGS
-When used against binary packages,
-.Nm
-does not handle the directory containing multiple versions of the same package.
diff --git a/pkgtools/pkg_chk/files/pkg_chk.sh b/pkgtools/pkg_chk/files/pkg_chk.sh
deleted file mode 100755
index 4787f7d63fb..00000000000
--- a/pkgtools/pkg_chk/files/pkg_chk.sh
+++ /dev/null
@@ -1,858 +0,0 @@
-#!@SH@ -e
-#
-# $Id: pkg_chk.sh,v 1.44 2006/11/05 21:53:27 tron Exp $
-#
-# TODO: Make -g check dependencies and tsort
-# TODO: Variation of -g which only lists top level packages
-# TODO: List top level packages installed but not in config
-
-PATH=${PATH}:/usr/sbin:/usr/bin
-
-SUMMARY_FILE=pkg_summary.gz
-OLD_SUMMARY_FILE=pkg_chk-summary
-
-is_binary_available()
- {
- if [ -n "$PKGDB" ]; then
- for iba_pkg in $PKGDB; do
- case $iba_pkg in
- *:"$1")
- return 0;
- ;;
- esac
- done
- return 1;
- else
- if [ -f "$PACKAGES/$1$PKG_SUFX" ]; then
- return 0;
- else
- return 1;
- fi
- fi
- }
-
-check_packages_installed()
- {
- MISSING_TODO=
- MISMATCH_TODO=
-
- for pkgdir in $* ; do
-
- if [ -n "$opt_B" ];then
- extract_pkg_vars $pkgdir PKGNAME FILESDIR PKGDIR DISTINFO_FILE PATCHDIR
- else
- extract_pkg_vars $pkgdir PKGNAME
- fi
- if [ -z "$PKGNAME" ]; then
- MISS_DONE=$MISS_DONE" "$pkgdir
- continue
- fi
- if [ ! -d $PKG_DBDIR/$PKGNAME ];then
- msg_n "$pkgdir - "
- pkg=$(echo $PKGNAME | ${SED} 's/-[0-9].*//')
- pkginstalled=$(sh -c "${PKG_INFO} -e $pkg" || true)
- INSTALL=
- if [ -n "$pkginstalled" ];then
- msg_n "$pkginstalled < $PKGNAME"
- MISMATCH_TODO="$MISMATCH_TODO $pkginstalled"
- else
- msg_n "$PKGNAME missing"
- MISSING_TODO="$MISSING_TODO $PKGNAME $pkgdir"
- fi
- if is_binary_available $PKGNAME ;then
- msg_n " (binary package available)"
- fi
- msg
- else
- if [ -n "$opt_B" ];then
- # sort here temporarily to handle older +BUILD_VERSION
- current_build_ver=$(get_build_ver | ${SED} 's|.*\$NetBSD\: ||' | ${SORT} -u)
- installed_build_ver=$(${SED} 's|.*\$NetBSD\: ||' $PKG_DBDIR/$PKGNAME/+BUILD_VERSION | ${SORT} -u)
- if [ x"$current_build_ver" != x"$installed_build_ver" ];then
- msg "$pkgdir - $PKGNAME build_version mismatch"
- verbose "--current--"
- verbose "$current_build_ver"
- verbose "--installed--"
- verbose "$installed_build_ver"
- verbose "----"
- MISMATCH_TODO="$MISMATCH_TODO $PKGNAME"
- else
- verbose "$PKGNAME: OK"
- fi
- else
- verbose "$PKGNAME: OK"
- fi
- fi
- done
- }
-
-cleanup_and_exit()
- {
- rm -f $MY_TMPFILE
- rmdir $MY_TMPDIR
- exit "$@"
- }
-
-delete_pkgs()
- {
- for pkg in $* ; do
- if [ -d $PKG_DBDIR/$pkg ] ; then
- run_cmd "${PKG_DELETE} -r $pkg" 1
- fi
- done
- }
-
-extract_make_vars()
- {
- MAKEFILE=$1
- shift
- MAKEDATA=".PHONY: x\nx:\n";
- for var in $* ; do
- MAKEDATA=$MAKEDATA"\t@echo $var=\${$var}\n"
- done
- eval $(printf "$MAKEDATA" | ${MAKE} -f - -f $MAKEFILE x | \
- ${SED} -e 's/[^=]*=/&"/' -e 's/$/"/')
- for var in $* ; do
- verbose_var $var
- done
- }
-
-# $1 = name of variable
-# $2 = default value
-extract_mk_var()
- {
- if [ -z "`eval echo \\$$1`" ] ; then
- eval $(printf "BSD_PKG_MK=1\n.PHONY: x\nx:\n\t@echo $1="'$'"{$1}\n" | ${MAKE} -f - -f $MAKECONF x)
- if [ -z "`eval echo \\$$1`" ]; then
- eval "$1=$2"
- verbose_var $1 '(using default)'
- else
- verbose_var $1
- fi
- fi
- }
-
-extract_pkg_vars()
- {
- PKGDIR=$1
- PKGNAME=
- shift;
- if [ -n "$opt_b" -a -z "$opt_s" ] ; then
- for pkg in $PKGDB ; do
- case $pkg in
- "$PKGDIR:"*)
- PKGNAME=`echo $pkg| ${SED} 's/[^:]*://'`
- return;
- ;;
- esac
- done
- msg "WARNING: No binary package for $PKGDIR"
- else
- if [ ! -f $PKGSRCDIR/$pkgdir/Makefile ];then
- msg "WARNING: No $pkgdir/Makefile - package moved or obsolete?"
- return
- fi
- cd $PKGSRCDIR/$PKGDIR
- extract_make_vars Makefile "$@"
- if [ -z "$PKGNAME" ]; then
- fatal "Unable to extract PKGNAME for $pkgdir"
- fi
- fi
- }
-
-extract_variables()
- {
- extract_mk_var PKGSRCDIR /usr/pkgsrc
- if [ ! -d $PKGSRCDIR -a -z "$opt_b" ] ; then
- fatal "Unable to locate PKGSRCDIR ($PKGSRCDIR)"
- fi
-
- # Now we have PKGSRCDIR, use it to determine PACKAGES, and PKGCHK_CONF
- # as well as AWK, GREP, SED, PKGCHK_TAGS and PKGCHK_NOTAGS
- #
-
- if [ -z "$opt_b" -o -n "$opt_s" -o -d $PKGSRCDIR/pkgtools/pkg_chk ] ; then
- cd $PKGSRCDIR/pkgtools/pkg_chk
- extract_make_vars Makefile AWK GREP GZIP_CMD SED SORT TSORT PACKAGES \
- PKG_ADD PKG_DELETE PKG_INFO PKG_DBDIR PKGCHK_CONF \
- PKGCHK_UPDATE_CONF PKGCHK_TAGS PKGCHK_NOTAGS PKG_SUFX
- if [ -z "$PACKAGES" ];then
- PACKAGES=$PKGSRCDIR/packages
- fi
- elif [ $MAKECONF != /dev/null ] ; then
- extract_make_vars $MAKECONF PACKAGES PKGCHK_CONF PKGCHK_UPDATE_CONF \
- PKGCHK_TAGS PKGCHK_NOTAGS PKG_SUFX
- if [ -z "$PACKAGES" ] ; then
- PACKAGES=`pwd`
- fi
- fi
-
- # .tgz/.tbz to regexp
- PKG_SUFX_RE=`echo $PKG_SUFX | sed 's/[.]/[.]/'`
-
- if [ ! -d $PKG_DBDIR ] ; then
- fatal "Unable to access PKG_DBDIR ($PKG_DBDIR)"
- fi
-
- if [ -z "$PKGCHK_CONF" ];then
- PKGCHK_CONF=$PKGSRCDIR/pkgchk.conf
- fi
- if [ -z "$PKGCHK_UPDATE_CONF" ];then
- PKGCHK_UPDATE_CONF=$PKGSRCDIR/pkgchk_update-$(hostname).conf
- fi
- }
-
-fatal()
- {
- msg "*** $@" >&2
- cleanup_and_exit 1
- }
-
-fatal_later()
- {
- msg "*** $@" >&2
- fatal_later=1
- }
-
-fatal_later_check()
- {
- if [ "$fatal_later" = 1 ] ; then
- cleanup_and_exit 1
- fi
- }
-
-fatal_maybe()
- {
- if [ -z "$opt_k" ];then
- fatal "$@"
- else
- msg "$@"
- fi
- }
-
-generate_conf_from_installed()
- {
- FILE=$1
- if [ -r $FILE ]; then
- mv $FILE ${FILE}.old
- fi
- echo "# Generated automatically at $(date)" > $FILE
- echo $(pkgdirs_from_installed) | tr ' ' '\n' >> $FILE
- }
-
-get_build_ver()
- {
- if [ -n "$opt_b" -a -z "$opt_s" ] ; then
- ${PKG_INFO} -. -q -b $PACKAGES/$PKGNAME$PKG_SUFX | ${GREP} .
- return
- fi
- # Unfortunately pkgsrc always outputs to a file, but it does helpfully
- # allows # us to specify the name
- rm -f $MY_TMPFILE
- ${MAKE} _BUILD_VERSION_FILE=$MY_TMPFILE $MY_TMPFILE
- cat $MY_TMPFILE
- }
-
-list_packages()
- {
- # DEPCHECKLIST contains packages for which binary packages are known to
- # exist, but now need to be checked for packages on which they depend
- DEPCHECKLIST=' '
- for pkgdir in $* ; do
- extract_pkg_vars $pkgdir PKGNAME
- if [ -z "$PKGNAME" ]; then
- continue
- fi
- if is_binary_available $PKGNAME; then
- :
- else
- fatal_later "$PKGNAME - binary package missing"
- continue
- fi
- verbose "$PKGNAME$PKG_SUFX: found"
- DEPCHECKLIST="$DEPCHECKLIST$PKGNAME ";
- done
-
- PAIRLIST=
- PKGLIST=' '
- while [ "$DEPCHECKLIST" != ' ' ]; do
- NEXTCHECK=' '
- for pkg in $DEPCHECKLIST ; do
- DEPLIST="$(${PKG_INFO} -. -q -N $PACKAGES/$pkg$PKG_SUFX | ${GREP} .. || true)"
- if [ -z "$DEPLIST" ] ; then
- PAIRLIST="${PAIRLIST}$pkg$PKG_SUFX $pkg$PKG_SUFX\n"
- fi
- for dep in $DEPLIST ; do
- if is_binary_available $dep; then
- :
- else
- fatal_later "$dep$PKG_SUFX - dependency missing for $pkg"
- break
- fi
- PAIRLIST="${PAIRLIST}$dep$PKG_SUFX $pkg$PKG_SUFX\n"
- case "$PKGLIST$DEPCHECKLIST$NEXTCHECK" in
- *" $dep "*)
- verbose "$pkg: Duplicate depend $dep"
- ;;
- *)
- NEXTCHECK=" $dep$NEXTCHECK"
- verbose "$pkg: Add depend $dep"
- ;;
- esac
- done
- PKGLIST="$pkg $PKGLIST"
- done
- DEPCHECKLIST="$NEXTCHECK"
- done
- fatal_later_check
- printf "$PAIRLIST" | ${TSORT}
- }
-
-pkgdirs_from_conf()
- {
- CONF=$1; shift
- LIST="$*"
- if [ ! -r $CONF ];then
- fatal "Unable to read PKGCHK_CONF '$CONF'"
- fi
-
- # Determine list of tags
- #
- if [ $PKGSRCDIR = NONE ]; then
- OPSYS=$(uname -s)
- OS_VERSION=$(uname -r)
- MACHINE_ARCH=$(uname -p)
- else
- extract_make_vars Makefile OPSYS OS_VERSION MACHINE_ARCH
- fi
-
- TAGS="$(hostname | ${SED} -e 's,\..*,,'),$(hostname),$OPSYS-$OS_VERSION-$MACHINE_ARCH,$OPSYS-$OS_VERSION,$OPSYS-$MACHINE_ARCH,$OPSYS,$OS_VERSION,$MACHINE_ARCH"
- if [ -f /usr/X11R6/lib/libX11.so -o -f /usr/X11R6/lib/libX11.a ];then
- TAGS="$TAGS,x11"
- fi
- if [ -n "$PKGCHK_TAGS" ];then
- TAGS="$TAGS,$PKGCHK_TAGS"
- fi
- if [ -n "$PKGCHK_NOTAGS" ];then
- if [ -n "$opt_U" ];then
- opt_U="$opt_U,$PKGCHK_NOTAGS"
- else
- opt_U="$PKGCHK_NOTAGS"
- fi
- fi
-
- # If '-U' contains a '*' then we need to unset TAGS and PKGCHK_TAGS, but
- # still pick up -D, and even package specific -U options
- verbose "unset TAGS=$opt_U"
- case ",$opt_U," in
- *,\*,*)
- TAGS=''
- ;;
- esac
- if [ -n "$TAGS" ];then
- if [ -n "$opt_D" ];then
- opt_D="$opt_D,$TAGS"
- else
- opt_D="$TAGS"
- fi
- fi
- verbose "set TAGS=$opt_D"
-
- # Extract list of valid pkgdirs (skip any 'alreadyset' in $LIST)
- #
- LIST="$LIST "$(${AWK} -v alreadyset="$LIST" -v setlist="$opt_D" -v unsetlist="$opt_U" '
- BEGIN {
- split(alreadyset, tmp, " ");
- for (tag in tmp) { skip[tmp[tag]] = 1; }
-
- split(setlist, tmp, ",");
- for (tag in tmp) { taglist[tmp[tag]] = 1; }
-
- split(unsetlist, tmp, ",");
- for (tag in tmp) { skip[tmp[tag]] = 1; nofile[tmp[tag]] = 1 ;
- delete taglist[tmp[tag]] }
-
- taglist["*"] = "*"
- }
- function and_expr_with_dict(expr, dict, ary, i, r, d) {
- split(expr,ary,/\+/);
- r = 1;
- for (i in ary) {
- if (ary[i] ~ /^\// && ! nofile[ary[i]]) {
- if (getline d < ary[i] == -1)
- { r = 0; break ;}
- }
- else if (! (ary[i] in dict))
- { r = 0; break ;}
- }
- return r;
- }
- {
- sub("#.*", "");
- if (skip[$1])
- next;
- need = 0;
- if ($0 ~ /\=/) {
- split($0, tmp, "[ \t]*=");
- taggroup = tmp[1];
- sub("[ \t]*=", "=");
- }
- else
- {
- taggroup = ""
- if (NF == 1) # If only one arg, we want pkg
- need = 1;
- }
- for (f = 2 ; f<=NF ; ++f) { # For each word on the line
- if (sub("^-", "", $f)) { # If it begins with a '-'
- if (f == 2) # If first entry '-', assume '*'
- { need = 1; }
- if (and_expr_with_dict($f, taglist))
- next; # If it is true, discard
- } else {
- if (and_expr_with_dict($f, taglist))
- need = 1; # If it is true, note needed
- }
- }
- if (need)
- if (taggroup)
- taglist[taggroup] = 1
- else
- print $1;
- }
- ' < $CONF
- )
- echo $LIST
- }
-
-pkgdirs_from_installed()
- {
- ${PKG_INFO} -Bqa | ${AWK} -F= '/PKGPATH=/{print $2}' | ${SORT}
- }
-
-msg()
- {
- if [ -n "$opt_L" ] ; then
- echo "$@" >> "$opt_L"
- fi
- if [ -n "$opt_l" ] ; then
- echo "$@" >&2
- else
- echo "$@"
- fi
- }
-
-msg_progress()
- {
- if [ -z "$opt_q" ] ; then
- msg "[ $@ ]"
- fi
- }
-
-msg_n()
- {
- msg $ac_n "$*"$ac_c
- }
-
-pkg_fetch()
- {
- PKGNAME=$1
- PKGDIR=$2
-
- run_cmd "cd $PKGSRCDIR/$PKGDIR && ${MAKE} fetch-list | sh"
- if [ -n "$FAIL" ]; then
- FAIL_DONE=$FAIL_DONE" "$PKGNAME
- else
- FETCH_DONE=$FETCH_DONE" "$PKGNAME
- fi
- }
-
-pkg_fetchlist()
- {
- PKGLIST=$@
- msg_progress Fetch
- while [ $# != 0 ]; do
- pkg_fetch $1 $2
- shift ; shift;
- done
- }
-
-pkg_install()
- {
- PKGNAME=$1
- PKGDIR=$2
- INSTALL=$3
-
- if [ -d $PKG_DBDIR/$PKGNAME ];then
- msg "$PKGNAME installed in previous stage"
- elif [ -n "$opt_b" ] && is_binary_available $PKGNAME; then
- if [ -n "$saved_PKG_PATH" ] ; then
- export PKG_PATH=$saved_PKG_PATH
- fi
- run_cmd "${PKG_ADD} $PACKAGES/$PKGNAME$PKG_SUFX"
- if [ -n "$saved_PKG_PATH" ] ; then
- unset PKG_PATH
- fi
- elif [ -n "$opt_s" ]; then
- run_cmd "cd $PKGSRCDIR/$PKGDIR && ${MAKE} update CLEANDEPENDS=yes"
- fi
-
- if [ -z "$opt_n" -a -z "$opt_q" -a ! -d $PKG_DBDIR/$PKGNAME ];then
- FAIL=1
- fi
-
- if [ -n "$FAIL" ]; then
- FAIL_DONE=$FAIL_DONE" "$PKGNAME
- else
- INSTALL_DONE=$INSTALL_DONE" "$PKGNAME
- fi
- }
-
-pkg_installlist()
- {
- INSTALL=$1 ; shift
- msg_progress $INSTALL
- while [ $# != 0 ]; do
- pkg_install $1 $2 $INSTALL
- shift ; shift;
- done
- }
-
-run_cmd()
- {
- FAIL=
- if [ -n "$2" ]; then
- FAILOK=$2
- else
- FAILOK=$opt_k
- fi
- if [ -z "$opt_q" ];then
- msg $(date +%R) $1
- fi
- if [ -z "$opt_n" -a -z "$opt_q" ];then
- if [ -n "$opt_L" ] ; then
- sh -c "$1" >> "$opt_L" 2>&1 || FAIL=1
- else
- sh -c "$1" || FAIL=1
- fi
- if [ -n "$FAIL" ] ; then
- msg "** '$1' failed"
- if [ -n "$opt_L" ] ; then
- tail -100 "$opt_L" | egrep -v '^(\*\*\* Error code 1|Stop\.)' |\
- tail -40
- fi
- if [ "$FAILOK" != 1 ]; then
- fatal "** '$1' failed"
- fi
- fi
- fi
- }
-
-set_path()
- {
- arg=$1
- case $arg in
- http://*|ftp://*|/*)
- echo $arg ;;
- *) echo $basedir/$arg ;;
- esac
- }
-
-usage()
- {
- if [ -n "$1" ] ; then
- echo "$@"
- echo
- fi
- echo 'Usage: pkg_chk [opts]
- -a Add all missing packages (implies -c)
- -B Check the "Build version" of packages
- -b Use binary packages
- -C conf Use pkgchk.conf file 'conf'
- -D tags Comma separated list of additional pkgchk.conf tags to set
- -f Perform a 'make fetch' for all required packages
- -g Generate an initial pkgchk.conf file
- -h This help
- -k Continue with further packages if errors are encountered
- -L file Redirect output from commands run into file (should be fullpath)
- -l List binary packages including dependencies (implies -c)
- -N List installed packages for which a newer version is in TODO
- -n Display actions that would be taken, but do not perform them
- -p Display the list of pkgdirs that match the current tags
- -P dir Set PACKAGES dir (overrides any other setting)
- -q Do not display actions or take any action; only list packages
- -r Recursively remove mismatches (use with care) (implies -i)
- -s Use source for building packages
- -U tags Comma separated list of pkgchk.conf tags to unset ('*' for all)
- -u Update all mismatched packages (implies -i)
- -v Verbose
-
-pkg_chk verifies installed packages against pkgsrc.
-The most common usage is 'pkg_chk -u -q' to check all installed packages or
-'pkg_chk -u' to update all out of date packages.
-For more advanced usage, including defining a set of desired packages based
-on hostname and type, see pkg_chk(8).
-
-If neither -b nor -s is given, both are assumed with -b preferred.
-'
- exit 1
- }
-
-verbose()
- {
- if [ -n "$opt_v" ] ; then
- msg "$@" >&2
- fi
- }
-
-verbose_var()
- {
- if [ -n "$opt_v" ] ; then
- var=$1
- shift
- verbose Variable $var = $(eval echo \$$var) $@
- fi
- }
-
-args=$(getopt BC:D:L:P:U:abcfghiklNnpqrsSuv "$@")
-if [ $? != 0 ]; then
- opt_h=1
-fi
-set -o noglob # -U can be '*'
-set -- $args
-set +o noglob
-while [ $# != 0 ]; do
- case "$1" in
- -a ) opt_a=1 ;;
- -B ) opt_B=1 ;;
- -b ) opt_b=1 ;;
- -C ) opt_C="$2" ; shift ;;
- -c ) opt_a=1 ; opt_q=1 ; echo "-c is deprecated - use -a -q" ;;
- -D ) opt_D="$2" ; shift ;;
- -f ) opt_f=1 ;;
- -g ) opt_g=1 ;;
- -h ) opt_h=1 ;;
- -i ) opt_u=1 ; opt_q=1 ; echo "-i is deprecated - use -u -q" ;;
- -k ) opt_k=1 ;;
- -L ) opt_L="$2" ; shift ;;
- -l ) opt_l=1 ;;
- -N ) opt_N=1 ;;
- -n ) opt_n=1 ;;
- -p ) opt_p=1 ;;
- -P ) opt_P="$2" ; shift ;;
- -q ) opt_q=1 ;;
- -r ) opt_r=1 ;;
- -s ) opt_s=1 ;;
- -U ) opt_U="$2" ; shift ;;
- -u ) opt_u=1 ;;
- -v ) opt_v=1 ;;
- -- ) shift; break ;;
- esac
- shift
-done
-
-if [ -z "$opt_b" -a -z "$opt_s" ];then
- opt_b=1; opt_s=1;
-fi
-
-if [ -z "$opt_a$opt_g$opt_l$opt_p$opt_r$opt_u$opt_N" ];
-then
- usage "Must specify at least one of -a, -g, -l, -p, -r, -u or -N";
-fi
-
-if [ -n "$opt_h" ];then
- usage
-fi
-
-if [ $# != 0 ];then
- usage "Additional argument ($*) given"
-fi
-
-MY_TMPDIR=`mktemp -d ${TMPDIR-/tmp}/${0##*/}.XXXXXX`
-MY_TMPFILE=$MY_TMPDIR/tmp
-
-# Hide PKG_PATH to avoid breakage in 'make' calls
-saved_PKG_PATH=$PKG_PATH
-unset PKG_PATH || true
-
-test -n "$AWK" || AWK="@AWK@"
-test -n "$GREP" || GREP="@GREP@"
-test -n "$GZIP_CMD" || GZIP_CMD="@GZIP_CMD@"
-export GZIP_CMD
-test -n "$MAKE" || MAKE="@MAKE@"
-test -n "$MAKECONF" || MAKECONF="@MAKECONF@"
-test -n "$PKG_ADD" || PKG_ADD="@PKG_ADD@"
-test -n "$PKG_DELETE" || PKG_DELETE="@PKG_DELETE@"
-test -n "$PKG_INFO" || PKG_INFO="@PKG_INFO@"
-test -n "$SED" || SED="@SED@"
-test -n "$SORT" || SORT="@SORT@"
-test -n "$TSORT" || TSORT="@TSORT@"
-test -n "$PKG_DBDIR" || PKG_DBDIR="@PKG_DBDIR@"
-
-if [ ! -f $MAKECONF ] ; then
- if [ -f @PREFIX@/etc/mk.conf ] ; then
- MAKECONF=@PREFIX@/etc/mk.conf
- elif [ -f /etc/mk.conf ] ; then
- MAKECONF=/etc/mk.conf
- else
- MAKECONF=/dev/null
- fi
-fi
-verbose_var MAKECONF
-
-# grabbed from GNU configure
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | ${SED} s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-if [ -n "$opt_L" ] ; then
- rm -f $opt_L
-fi
-
-basedir=$(pwd)
-extract_variables
-if [ -n "$opt_C" ] ; then
- PKGCHK_CONF="$(set_path $opt_C)"
-fi
-if [ -n "$opt_P" ] ; then
- PACKAGES="$(set_path $opt_P)"
-fi
-if [ -d $PACKAGES/All ] ; then
- PACKAGES="$PACKAGES/All"
-fi
-
-if [ -n "$opt_N" ]; then
- ${PKG_INFO} | \
- ${SED} -e "s/[ ].*//" -e "s/-[^-]*$//" \
- -e "s/py[0-9][0-9]pth-/py-/" \
- -e "s/py[0-9][0-9]-/py-/" | \
- while read a
- do
- b=$(grep "o $a-[0-9]" $PKGSRCDIR/doc/TODO | \
- sed -e "s/[ ]*o //")
- if [ "$b" ]
- then
- echo $a: $b
- fi
- done
-fi
-
-AWK_PARSE_SUMMARY='$1=="PKGNAME"{pkgname=$2} $1=="PKGPATH"{pkgpath=$2} NF==0{if (pkgpath && pkgname) print pkgpath ":" pkgname; pkgpath=""; pkgname=""} END{if (pkgpath && pkgname) print pkgpath ":" pkgname}'
-
-if [ -n "$opt_b" -a -z "$opt_s" ] ; then
- case $PACKAGES in
- http://*|ftp://*)
- PKGDB=`ftp -o - $PACKAGES/$SUMMARY_FILE | ${GZIP_CMD} -cd \
- | ${AWK} -F= "$AWK_PARSE_SUMMARY"`
- if [ -z "$PKGDB" ]
- then
- PKGDB=`ftp -o - $PACKAGES/$OLD_SUMMARY_FILE`
- fi;;
- *)
- if [ -d "$PACKAGES" ] ; then
- msg_progress Scan $PACKAGES
- cd $PACKAGES
- for f in `ls -t | grep "$PKG_SUFX_RE"'$'` ; do # Sort by time to pick up newest first
- PKGDIR=`${PKG_INFO} -. -B $PACKAGES/$f|${AWK} -F= '$1=="PKGPATH"{print $2}'`
- PKGNAME=`echo $f | ${SED} "s/$PKG_SUFX"'$//'`
- PKGDB="${PKGDB} $PKGDIR:$PKGNAME"
- done
- PKGSRCDIR=NONE
- fi;;
- esac
-fi
-
-if [ -n "$opt_g" ]; then
- verbose "Write $PKGCHK_CONF based on installed packages"
- generate_conf_from_installed $PKGCHK_CONF
-fi
-
-if [ -n "$opt_r" -o -n "$opt_u" ];then
- verbose "Enumerate PKGDIRLIST from installed packages"
- PKGDIRLIST=$(pkgdirs_from_installed)
-fi
-
-if [ -n "$opt_p" ] ; then
- pkgdirs_from_conf $PKGCHK_CONF $PKGDIRLIST | tr ' ' '\n'
- exit
-fi
-
-if [ -n "$opt_a" -o -n "$opt_l" ];then # Append to PKGDIRLIST based on conf
- verbose "Append to PKGDIRLIST based on config $PKGCHK_CONF"
- PKGDIRLIST="$(pkgdirs_from_conf $PKGCHK_CONF $PKGDIRLIST)"
-fi
-
-if [ -n "$opt_l" ] ; then
- list_packages $PKGDIRLIST
-else
- check_packages_installed $PKGDIRLIST
-fi
-
-if [ -n "$MISMATCH_TODO" ]; then
- delete_and_recheck=1
-elif [ -n "$opt_u" -a -f $PKGCHK_UPDATE_CONF ] ; then
- delete_and_recheck=1
-fi
-
-if [ -n "$delete_and_recheck" ]; then
- if [ -n "$opt_u" ] ; then # Save current installed list
- if [ -f $PKGCHK_UPDATE_CONF ] ; then
- msg "Merging in previous $PKGCHK_UPDATE_CONF"
- if [ -z "$opt_n" -a -z "$opt_q" ] ; then
- tmp=$(cat $PKGCHK_UPDATE_CONF)
- echo $tmp $(pkgdirs_from_installed) | tr ' ' '\n' | ${SORT} -u \
- > $PKGCHK_UPDATE_CONF
- tmp=
- fi
- else
- if [ -z "$opt_n" -a -z "$opt_q" ] ; then
- echo $(pkgdirs_from_installed) | tr ' ' '\n' \
- > $PKGCHK_UPDATE_CONF
- fi
- fi
- fi
- if [ -n "$opt_r" -o -n "$opt_u" ] ; then
- if [ -n "$MISMATCH_TODO" ]; then
- delete_pkgs $MISMATCH_TODO
- msg_progress Rechecking packages after deletions
- fi
- if [ -n "$opt_u" ]; then
- PKGDIRLIST="$(pkgdirs_from_conf $PKGCHK_UPDATE_CONF $PKGDIRLIST)"
- fi
- if [ -n "$opt_a" -o -n "$opt_u" ]; then
- check_packages_installed $PKGDIRLIST # May need to add more
- fi
- fi
-fi
-
-if [ -n "$opt_f" ] ; then
- pkg_fetchlist $MISSING_TODO
-fi
-
-if [ -n "$MISSING_TODO" ] ; then
- if [ -n "$opt_a" -o -n "$opt_u" ] ; then
- pkg_installlist Install $MISSING_TODO
- fi
-fi
-
-if [ -n "$opt_u" -a -z "$FAIL_DONE" -a -f $PKGCHK_UPDATE_CONF ] ; then
- run_cmd "rm -f $PKGCHK_UPDATE_CONF"
-fi
-
-[ -n "$MISS_DONE" ] && msg "Missing:$MISS_DONE"
-[ -n "$INSTALL_DONE" ] && msg "Installed:$INSTALL_DONE"
-
-if [ -n "$FAIL_DONE" ] ; then
- msg "Failed:$FAIL_DONE"
- cleanup_and_exit 1
-fi
-
-cleanup_and_exit
diff --git a/pkgtools/pkg_comp/DESCR b/pkgtools/pkg_comp/DESCR
deleted file mode 100644
index 4f84886d3e9..00000000000
--- a/pkgtools/pkg_comp/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-pkg_comp is a small utility designed to build packages inside a
-clean chroot tree.
-
-Some ideas about what to use it for (taken from manpage):
-* Build packages for other system versions. For example, build
- packages for NetBSD 1.5 while you are running NetBSD current.
-* Build packages using different options than your current system
- like changing the threading library, COPTS, placement of
- configuration files, etc.
-* Debug the build process of a package, checking if buildlinks
- work properly.
-* Avoid autoconf's side effects by keeping a separate chroot for
- each project, like one for GNOME2 and another one for KDE3.
-* Schedule builds of package sets for several different machines.
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile
deleted file mode 100644
index e2304de4b23..00000000000
--- a/pkgtools/pkg_comp/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# $NetBSD: Makefile,v 1.38 2007/01/07 09:14:08 rillig Exp $
-
-DISTNAME= pkg_comp-1.29
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= jmmv@NetBSD.org
-COMMENT= Build packages inside a chroot jail
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-ONLY_FOR_PLATFORM= NetBSD-*-*
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= YES
-NO_CONFIGURE= YES
-NO_BUILD= YES
-
-INSTALLATION_DIRS= ${PKGMANDIR}/man8 sbin
-
-do-install:
- ${INSTALL_SCRIPT} ${FILESDIR}/pkg_comp.sh ${PREFIX}/sbin/pkg_comp
- ${INSTALL_MAN} ${FILESDIR}/pkg_comp.8 ${PREFIX}/${PKGMANDIR}/man8/pkg_comp.8
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_comp/PLIST b/pkgtools/pkg_comp/PLIST
deleted file mode 100644
index 339e766751d..00000000000
--- a/pkgtools/pkg_comp/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2002/09/07 00:08:35 rh Exp $
-sbin/pkg_comp
-man/man8/pkg_comp.8
diff --git a/pkgtools/pkg_comp/files/pkg_comp.8 b/pkgtools/pkg_comp/files/pkg_comp.8
deleted file mode 100644
index b4be783b0f0..00000000000
--- a/pkgtools/pkg_comp/files/pkg_comp.8
+++ /dev/null
@@ -1,518 +0,0 @@
-.\" $NetBSD: pkg_comp.8,v 1.30 2006/02/10 23:41:20 salo Exp $
-.\"
-.\" pkg_comp - Build packages inside a clean chroot environment
-.\" Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd February 10, 2006
-.Dt PKG_COMP 8
-.Os
-.Sh NAME
-.Nm pkg_comp
-.Nd build packages inside a sandbox
-.Sh SYNOPSIS
-.Nm
-.Oo Fl Po
-.Cm c Ns \&| Ns Cm C
-.Pc
-.Ar conf_file
-.Oc
-.Op Fl n
-.Ar target
-.Op Ar pkg_name ...
-.Sh DESCRIPTION
-.Nm ,
-or
-.Em Package Compiler
-in its full name,
-is a tool that makes easy the compilation of packages inside a clean
-sandbox.
-This allows an easy tracking of exact dependencies
-and the correct behavior of a package in a fresh system installation.
-.Pp
-The behavior of
-.Nm
-is controlled through a small configuration file and a target (keep
-reading to learn more).
-The configuration file tells
-.Nm
-how to configure the new chroot environment, and the target specifies
-which action to take.
-.Pp
-The following options are recognized:
-.Bl -tag -width XcXconf_file
-.It Fl C Ar conf_file
-Use
-.Ar conf_file
-as configuration file (full path expected).
-.It Fl c Ar conf_file
-Use
-.Ar conf_file
-as configuration file (only base name expected).
-.It Fl n
-Avoid installation of
-.Va INSTALL_PACKAGES
-and
-.Va BUILD_PACKAGES
-during the creation of the chroot.
-.El
-.Ss What to use it for?
-You can use
-.Nm
-to achieve many goals when building packages.
-Here are some ideas:
-.Bl -bullet
-.It
-Build packages for other system versions.
-For example, build packages for
-.Nx 1.5
-while you are running
-.Nx 1.6 .
-.It
-Build packages using different
-.Pa mk.conf
-options than your current system, like changing the threading library,
-.Sy COPTS ,
-placement of configuration files, etc.
-.It
-Debug the build process of a package, checking if buildlinks work
-properly.
-.It
-Avoid autoconf's side effects by keeping a separate chroot for each
-project, like one for GNOME2 and another one for KDE3.
-.It
-Schedule builds of package sets for several different machines.
-.El
-.Sh CONTROL DIRECTORY
-.Nm
-needs to store several pieces of information when it is running.
-Instead of using normal system trees, it uses a special directory inside the
-chroot to avoid polluting the system.
-It stores there scripts, object files, built packages, etc.
-This directory is
-.Pa $DESTDIR/pkg_comp ;
-the symbolic link
-.Pa $DESTDIR/p
-is automatically created to ease pathnames when working inside the chroot.
-.Sh CONFIGURATION
-With
-.Nm
-you can maintain several configuration files so you can work with
-different chroot jails easily.
-To make this easy, configuration files are stored inside
-.Pa $HOME/pkg_comp ,
-followed by the configuration file name and the .conf suffix.
-The default configuration file is
-.Pa $HOME/pkg_comp/default.conf ,
-and is always used if you do not specify another one.
-The configuration file name is specified by the argument of the
-.Fl c
-option.
-Alternatively you can specify any pathname as a configuration file
-with the argument of the
-.Fl C
-option.
-.Pp
-Configuration files are simple shell scripts that define
-variables.
-The default values shown here are those written in the template when
-issuing a maketemplate.
-.Bl -tag -width indent
-.It AUTO_PACKAGES
-A list of packages to automatically build during the
-.Sy auto
-target.
-A package is in the form section/name, like misc/colorls.
-Defaults to nothing.
-.It AUTO_TARGET
-The pkgsrc target to use when building packages in an automated fashion
-(using the
-.Ql auto
-target).
-Should be set to
-.Ql package
-or
-.Ql bin-install ,
-as other values are useless.
-Defaults to
-.Ql package .
-.It BUILD_PACKAGES
-A list of packages to automatically build after the
-.Sy makeroot
-target.
-A package is in the form section/name, like misc/colorls.
-Defaults to nothing.
-.It BUILD_TARGET
-The pkgsrc target to use when building packages.
-It can contain any target supported by the pkgsrc system, but
-reasonable values are:
-.Ql install ,
-.Ql package
-and
-.Ql bin-install .
-Defaults to
-.Ql package .
-.It COPYROOTCFG
-If set to
-.Ql yes ,
-all configuration files (not directories) that reside inside
-.Pa /root
-are copied to
-.Sy $DESTDIR/root .
-Defaults to
-.Ql no .
-.It DESTDIR
-The chroot jail directory.
-Defaults to
-.Pa /var/chroot/pkg_comp/default .
-.It DISTRIBDIR
-This is the directory which holds
-.Nb
-binary sets and X sets.
-Its structure is the same as official release
-distributions, that is, tgz files must reside inside
-.Pa $DISTRIBDIR/binary/sets .
-Defaults to
-.Pa /var/pub/NetBSD .
-.It EXTRAMK
-Specifies a whitespace-separated list of files that must be appended to
-.Pa $DESTDIR/etc/mk.conf .
-This is useful to add special items to this configuration file.
-Defaults to nothing.
-.It INSTALL_PACKAGES
-A list of packages to automatically install after the
-.Sy makeroot
-and before installing
-.Sy BUILD_PACKAGES .
-These are also installed within the sandbox created by the
-.Sy auto
-target, but before anything is built.
-Each name must be the full package name, including the tgz suffix.
-Packages are searched inside
-.Pa $REAL_PACKAGES/All .
-Defaults to nothing.
-.It LOCALBASE
-Where binary packages get installed.
-Defaults to
-.Pa /usr/pkg .
-.It MKCONF_VARS
-A list of variable names that will be appended to the generated
-.Pa /etc/mk.conf
-file, together with their values set in the configuration file.
-Its default value contains all variables listed here.
-.It NETBSD_RELEASE
-Specifies which version number of
-.Nx
-is installed inside the chroot.
-If set to
-.Ql no ,
-no special action is taken (this is useful if the system version inside
-the chroot matches the outside one).
-Otherwise, the package
-.Pa pkgtools/libkver
-will be installed inside the chroot, in a special purpose
-prefix whose value can be set in
-.Pa $DESTDIR/etc/mk.conf
-via the configuration file
-with the
-.Va LIBKVER_STANDALONE_PREFIX
-variable.
-The libkver library will be configured inside the chroot, with the symbolic link
-.Pa $DESTDIR/libkver_osrelease
-and
-.Va LD_PRELOAD
-in default shells environments,
-so that the NetBSD version specified in
-.Va NETBSD_RELEASE
-overrides the host system version. See
-.Xr kver 3
-for more information.
-Defaults to
-.Ql no .
-.It PKG_SYSCONFBASE
-Base directory of configuration files.
-Defaults to
-.Pa /usr/pkg/etc .
-.It PKGSRC_COMPILER
-List of values specifying the chain of compilers to invoke when building
-packages.
-Defaults to
-.Ql gcc .
-If you are defining
-.Va REAL_CCACHE ,
-remember to prepend
-.Ql ccache
-to this variable's value.
-.It PKGVULNDIR
-Directory where the
-.Pa vulnerabilities
-file will be installed (inside the chroot).
-Defaults to
-.Pa /usr/pkg/share .
-.It REAL_PKGVULNDIR
-Directory where the system-wide
-.Pa vulnerabilities
-file resides (outside the chroot).
-Defaults to
-.Pa /usr/pkgsrc/distfiles .
-.It ROOTSHELL
-The shell of the root user.
-Defaults to
-.Pa /bin/ksh .
-.It SETS
-A list of binary sets to be extracted inside
-.Sy DESTDIR .
-Defaults to
-.Ql base.tgz comp.tgz etc.tgz kern-GENERIC.tgz text.tgz .
-If no kernel is extracted by these sets, an empty
-.Pa /netbsd
-file is created inside the chroot.
-.It SETS_X11
-A list of binary sets of the X Window system.
-This has the same behavior
-as
-.Sy SETS .
-If this variable is set to
-.Ql no ,
-no X Window is configured inside the chroot
-jail and no other X variables take effect.
-Defaults to
-.Ql xbase.tgz xcomp.tgz xetc.tgz xfont.tgz xserver.tgz .
-.It SYNC_UMOUNT
-If set to
-.Ql yes ,
-run
-.Xr sync 8
-three times after all file systems have been unmounted.
-Defaults to
-.Ql no .
-.It USE_AUDIT_PACKAGES
-If set to
-.Ql yes ,
-let
-.Nm
-handle the
-.Pa vulnerabilities
-file automatically.
-This means that it will install the system-wide
-.Pa vulnerabilities
-file inside the chroot when needed, keeping both in sync.
-Defaults to
-.Ql yes .
-.It USE_GCC3
-If set to
-.Ql yes ,
-the GNU C Compiler version 3 will be installed inside the chroot
-environment and used to build all packages, using the
-.Pa lang/gcc3
-package.
-Defaults to
-.Ql no .
-.It USE_XPKGWEDGE
-If set to
-.Ql yes ,
-you want xpkgwedge to be compiled and installed automatically inside the
-chroot.
-This takes care of setting up
-.Pa /etc/profile
-and
-.Pa /etc/csh.login
-for xpkgwedge to work.
-Has no effect if X is unconfigured.
-Defaults to
-.Ql yes .
-.El
-.Ss Mounted file systems
-In order to avoid duplicating huge system trees,
-.Nm
-takes advantage of file system layers.
-By default, it uses
-.Xr mount_null 8 ,
-which duplicates a file system tree into another directory; although
-you may want to use
-.Xr mount_union 8 ,
-or even
-.Xr mount_overlay 8 .
-If the
-content of these variables is empty, that file system is not mounted.
-.Pp
-You can control which layer to use and which options you want with
-special configuration options, as explained below.
-.Pp
-These file systems are mounted before entering the chroot and unmounted
-after exiting.
-In order to know if file systems are mounted or not, the
-program uses a temporary file, called
-.Pa $DESTDIR/pkg_comp/tmp/mount.stat ,
-which controls the number of
-.Nm
-processes using the chroot environment.
-If some of them crashes unexpectedly and you notice it does not try
-to unmount the file systems, this status file may get out of sync.
-Be sure to check that NO file systems are mounted when issuing a
-.Sy removeroot .
-.Bl -tag -width indent
-.It REAL_CCACHE
-Specifies where a global ccache directory resides in the real system.
-Defaults to nothing, which disables the global cache.
-Keep in mind that this is specially useful to keep the cache across
-rebuilds of the sandbox, but be very careful if you plan to share a
-cache directory between different sandboxes, as this can lead to problems.
-.It REAL_DISTFILES
-Specifies where distfiles reside in the real system.
-Defaults to
-.Pa /usr/pkgsrc/distfiles .
-.It REAL_DISTFILES_OPTS
-Mount options.
-Defaults to
-.Sy -t null -o rw .
-.It REAL_PACKAGES
-Specifies where to build binary packages.
-This variable is specially useful.
-Defaults to
-.Pa /usr/pkgsrc/packages .
-.It REAL_PACKAGES_OPTS
-Mount options.
-Defaults to
-.Sy -t null -o rw .
-.It REAL_PKGSRC
-The pkgsrc tree.
-This can be useful if you want to use several pkgsrc trees independently.
-Defaults to
-.Pa /usr/pkgsrc .
-.It REAL_PKGSRC_OPTS
-Mount options.
-Defaults to
-.Sy -t null -o ro .
-.It REAL_SRC
-The src system tree.
-Usually useless, but may be needed by some packages, like sysutils/aperture.
-Defaults to
-.Pa /usr/src .
-.It REAL_SRC_OPTS
-Mount options.
-Defaults to
-.Sy -t null -o ro .
-.It MAKEROOT_HOOKS
-A whitespace separated list of functions or external scripts to be executed
-after the sandbox is created.
-Two arguments are given to each of them:
-.Ar $DESTDIR ,
-and the word
-.Ar makeroot .
-Defaults to nothing.
-.It MOUNT_HOOKS
-A whitespace separated list of functions or external scripts to be executed
-after file systems are mounted.
-Two arguments are given to each of them:
-.Ar $DESTDIR ,
-and the word
-.Ar mount .
-Defaults to nothing.
-.It UMOUNT_HOOKS
-A whitespace separated list of functions or external scripts to be executed
-before file systems are unmounted.
-Two arguments are given to each of them:
-.Ar $DESTDIR ,
-and the word
-.Ar umount .
-Defaults to nothing.
-.El
-.Sh TARGETS
-A target specifies what
-.Nm
-should do (as in make).
-The following list describes all supported targets,
-in the logical order you should call them.
-.Bl -tag -width indent
-.It maketemplate
-Create a sample
-.Ar conf_file .
-You should edit it after the creation as you will probably want to change
-the default configuration, specially paths.
-.It makeroot
-Create the chroot environment, based on the specs of the configuration file.
-This step is required before trying any other, except maketemplate.
-.It build
-Builds the specified packages inside the chroot.
-You need to pass their names as relative paths inside pkgsrc, like
-.Pa pkgtools/pkg_comp .
-.It install
-Install the specified binary packages into the chroot.
-You must specify the full name of the package and they must reside inside
-.Sy REAL_PACKAGES .
-.It chroot
-Enters the chroot environment.
-If no arguments are given,
-.Va ROOTSHELL
-is executed, otherwise whatever you typed.
-If the first argument begins with a word prefixed by
-.Li pkg_ ,
-then the
-.Ql chroot
-argument can be omitted (it is implied).
-.It removeroot
-Remove the entire chroot tree.
-You should do it with this target because it
-will take care to umount needed mount points.
-.It auto
-This executes several targets automatically, using
-.Sy AUTO_TARGET
-as
-.Sy BUILD_TARGET
-during the build.
-The order is: makeroot, build and removeroot.
-This is useful to create binary packages of several pkgsrc and their
-dependencies automatically.
-For this to be useful, you need to set
-.Sy REAL_PACKAGES
-and use
-.Sy AUTO_PACKAGES
-or pass package names through the command line.
-.Pp
-If the magic word
-.Ql resume
-is passed as the unique argument to this target,
-.Nm
-will attempt to resume a previous automatic build for the given configuration.
-.El
-.Sh NOTES
-This program uses nullfs to create virtual copies of real trees inside the
-chroot environment.
-.Pp
-You need to install the
-.Pa security/audit-packages
-package in the host system (and have an up to date vulnerabilities database)
-if you want security checks to work inside the
-chroot environment.
-.Sh SEE ALSO
-.Xr pkg_delete 1 ,
-.Xr packages 7 ,
-.Xr mount_null 8 ,
-.Xr sync 8 ,
-.Xr sysctl 8
-.Sh AUTHORS
-.An Julio M. Merino Vidal Aq jmmv@NetBSD.org
diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh
deleted file mode 100644
index 69034048bde..00000000000
--- a/pkgtools/pkg_comp/files/pkg_comp.sh
+++ /dev/null
@@ -1,1023 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: pkg_comp.sh,v 1.32 2006/06/17 12:18:24 seb Exp $
-#
-# pkg_comp - Build packages inside a clean chroot environment
-# Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-ProgName="`basename $0`"
-
-# ----------------------------------------------------------------------
-# Default environment values and functions
-# ----------------------------------------------------------------------
-
-# USE_GCC3, CFLAGS, CPPFLAGS and CXXFLAGS are ommited from _MKCONF_VARS
-# as they require special handling.
-_MKCONF_VARS="WRKDIR_BASENAME MKOBJDIRS BSDSRCDIR WRKOBJDIR DISTDIR PACKAGES \
- PKG_DEVELOPER CLEANDEPENDS LOCALBASE PKG_SYSCONFBASE \
- CFLAGS CPPFLAGS CXXFLAGS USE_AUDIT_PACKAGES PKGVULNDIR \
- USE_XPKGWEDGE PKGSRC_COMPILER \
- LIBKVER_STANDALONE_PREFIX"
-
-_TEMPLATE_VARS="DESTDIR ROOTSHELL COPYROOTCFG BUILD_TARGET DISTRIBDIR SETS \
- SETS_X11 REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \
- REAL_PKGSRC_OPTS REAL_DISTFILES REAL_DISTFILES_OPTS \
- REAL_PACKAGES REAL_PACKAGES_OPTS REAL_PKGVULNDIR \
- NETBSD_RELEASE MAKEROOT_HOOKS MOUNT_HOOKS UMOUNT_HOOKS \
- SYNC_UMOUNT AUTO_TARGET AUTO_PACKAGES BUILD_PACKAGES \
- REAL_CCACHE LIBKVER_STANDALONE_PREFIX"
-
-_BUILD_RESUME=
-
-# env_clean
-#
-# Sets all variables that may appear in the config file to the null
-# string, so that we know the environment is in a consistent state.
-#
-env_clean()
-{
- MKCONF_VARS=""
- TEMPLATE_VARS=""
- for var in ${_MKCONF_VARS} ${_TEMPLATE_VARS}; do
- eval $var=\"\"
- done
-}
-
-# env_setdefaults
-#
-# Sets several reasonable defaults for many variables we will use.
-# Also checks for deprecated variables and warns the user about them.
-# To be called after reading the configuration file.
-#
-env_setdefaults()
-{
- MKCONF_VARS="$MKCONF_VARS ${_MKCONF_VARS}"
- TEMPLATE_VARS="$TEMPLATE_VARS ${_TEMPLATE_VARS}"
-
- # Default values for variables that will be written to mk.conf.
- : ${WRKDIR_BASENAME:=default}
- : ${MKOBJDIRS:=yes}
- : ${BSDSRCDIR:=/usr/src}
- : ${WRKOBJDIR:=/pkg_comp/obj/pkgsrc}
- : ${DISTDIR:=/pkg_comp/distfiles}
- : ${PACKAGES:=/pkg_comp/packages}
- : ${PKG_DEVELOPER:=yes}
- : ${CLEANDEPENDS:=yes}
- : ${LOCALBASE:=/usr/pkg}
- : ${PKG_SYSCONFBASE:=/usr/pkg/etc}
- : ${CFLAGS:=}
- : ${CPPFLAGS:=}
- : ${CXXFLAGS:=}
- : ${USE_GCC3:=no}
- : ${USE_AUDIT_PACKAGES:=yes}
- : ${PKGVULNDIR:=/usr/pkg/share}
- : ${USE_XPKGWEDGE:=yes}
- : ${PKGSRC_COMPILER:=gcc}
-
- # Default values for global variables used in the script.
- : ${DESTDIR:=/var/chroot/pkg_comp/default}
- : ${ROOTSHELL:=/bin/ksh}
- : ${COPYROOTCFG:=no}
- : ${AUTO_TARGET:=package}
- : ${BUILD_TARGET:=package}
- : ${DISTRIBDIR:=/var/pub/NetBSD}
- : ${SETS:=base.tgz comp.tgz etc.tgz kern-GENERIC.tgz text.tgz}
- : ${SETS_X11:=xbase.tgz xcomp.tgz xetc.tgz xfont.tgz xserver.tgz}
- : ${REAL_SRC:=/usr/src}
- : ${REAL_SRC_OPTS:=-t null -o ro}
- : ${REAL_PKGSRC:=/usr/pkgsrc}
- : ${REAL_PKGSRC_OPTS:=-t null -o ro}
- : ${REAL_DISTFILES:=/usr/pkgsrc/distfiles}
- : ${REAL_DISTFILES_OPTS:=-t null -o rw}
- : ${REAL_PACKAGES:=/usr/pkgsrc/packages}
- : ${REAL_PACKAGES_OPTS:=-t null -o rw}
- : ${REAL_PKGVULNDIR:=/usr/pkgsrc/distfiles}
- : ${NETBSD_RELEASE:=no}
- : ${LIBKVER_STANDALONE_PREFIX:=/libkver}
- : ${MAKEROOT_HOOKS:=}
- : ${MOUNT_HOOKS:=}
- : ${UMOUNT_HOOKS:=}
- : ${SYNC_UMOUNT:=no}
- : ${REAL_CCACHE:=}
-
- if [ -n "${MAKE_PACKAGES}" ]; then
- warn "MAKE_PACKAGES is deprecated; use {AUTO,BUILD}_PACKAGES instead."
- : ${AUTO_PACKAGES:=${MAKE_PACKAGES}}
- : ${BUILD_PACKAGES:=${MAKE_PACKAGES}}
- fi
-
- if [ -n "${MOUNT_SCRIPT}" ]; then
- warn "MOUNT_SCRIPT is deprecated; use MOUNT_HOOKS instead."
- : ${MOUNT_HOOKS:=${MOUNT_SCRIPT}}
- fi
-
- if [ -n "${UMOUNT_SCRIPT}" ]; then
- warn "UMOUNT_SCRIPT is deprecated; use UMOUNT_HOOKS instead."
- : ${UMOUNT_HOOKS:=${UMOUNT_SCRIPT}}
- fi
-}
-
-# ----------------------------------------------------------------------
-# Misc functions
-# ----------------------------------------------------------------------
-
-# err msg
-#
-# Shows the given error message and exit.
-#
-err()
-{
- echo "$ProgName: $1" 1>&2
- exit 1
-}
-
-# warn msg
-#
-# Shows the given warning message.
-#
-warn()
-{
- echo "$ProgName: $1" 1>&2
-}
-
-# usage
-#
-# Shows an usage message and exits.
-#
-usage()
-{
- echo "usage: $ProgName [-(c|C) conf_file] [-n] target [pkg_names]" 1>&2
- exit 1
-}
-
-# copy_vulnerabilities
-#
-# If USE_AUDIT_PACKAGES is set to 'yes', this function copies the
-# system-wide pkg-vulnerabilities file inside the sandbox.
-#
-copy_vulnerabilities()
-{
- if [ "$USE_AUDIT_PACKAGES" = "yes" ]; then
- echo "PKG_COMP ==> Installing new \`pkg-vulnerabilities' file"
- if [ ! -f "$REAL_PKGVULNDIR/pkg-vulnerabilities" ]; then
- echo "$REAL_PKGVULNDIR/pkg-vulnerabilities not found."
- else
- mkdir -p $DESTDIR/$PKGVULNDIR
- cp $REAL_PKGVULNDIR/pkg-vulnerabilities $DESTDIR/$PKGVULNDIR
- fi
- fi
-}
-
-# init_script filename
-#
-# Create a script that will be used within the sandbox and write some
-# common content to it.
-#
-init_script()
-{
- rm -f $1
- cat >$1 <<EOF
-#!/bin/sh
-# Generated by pkg_comp on `date`
-
-if [ -f ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so ]; then
- LD_PRELOAD=${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so; export LD_PRELOAD
-fi
-
-EOF
-}
-
-# ----------------------------------------------------------------------
-# Filesystem functions
-# ----------------------------------------------------------------------
-
-# fsmount
-#
-# Mounts all sandboxed filesystems, if they are not mounted yet.
-#
-fsmount()
-{
- echo "PKG_COMP ==> Mounting sandboxed filesystems"
- if [ -f $fsstate ]; then
- count=`cat $fsstate`
- count=$(($count + 1))
- echo "$count" > $fsstate
- echo "Already mounted by another pkg_comp process."
- return
- else
- echo "1" > $fsstate
- fi
-
- if [ -n "$REAL_SRC" ]; then
- if [ ! -d "$REAL_SRC" ]; then
- echo " failed."
- fsumount
- err "REAL_SRC $REAL_SRC disappeared"
- fi
- mount $REAL_SRC_OPTS $REAL_SRC $DESTDIR/usr/src
- fi
-
- if [ -n "$REAL_PKGSRC" ]; then
- if [ ! -d "$REAL_PKGSRC" ]; then
- echo " failed."
- fsumount
- err "REAL_PKGSRC $REAL_PKGSRC disappeared"
- fi
- mount $REAL_PKGSRC_OPTS $REAL_PKGSRC $DESTDIR/usr/pkgsrc
- fi
-
- if [ -n "$REAL_DISTFILES" ]; then
- if [ ! -d "$REAL_DISTFILES" ]; then
- echo " failed."
- fsumount
- err "REAL_DISTFILES $REAL_DISTFILES disappeared"
- fi
- mount $REAL_DISTFILES_OPTS $REAL_DISTFILES $DESTDIR/pkg_comp/distfiles
- fi
-
- if [ -n "$REAL_PACKAGES" ]; then
- if [ ! -d "$REAL_PACKAGES" ]; then
- echo " failed."
- fsumount
- err "REAL_PACKAGES $REAL_PACKAGES disappeared"
- fi
- mount $REAL_PACKAGES_OPTS $REAL_PACKAGES $DESTDIR/pkg_comp/packages
- fi
-
- if [ -n "${REAL_CCACHE}" ]; then
- if [ ! -d "${REAL_CCACHE}" ]; then
- echo " failed."
- fsumount
- err "REAL_CCACHE ${REAL_CCACHE} disappeared"
- fi
- mount -t null -o rw ${REAL_CCACHE} ${DESTDIR}/pkg_comp/ccache
- fi
-
- touch $fsstate
-
- if [ -n "${MOUNT_HOOKS}" ]; then
- echo "Executing mount hooks."
- for h in ${MOUNT_HOOKS}; do
- ${h} ${DESTDIR} mount
- done
- fi
-}
-
-# fsumount
-#
-# Unmounts all sandboxed filesystems, if they are not in use any more.
-#
-fsumount()
-{
- echo "PKG_COMP ==> Unmounting sandboxed filesystems"
-
- if [ ! -f $fsstate ]; then
- echo "None mounted."
- return
- fi
-
- count=`cat $fsstate`
- if [ $count -gt 1 ]; then
- count=$(($count - 1))
- echo "$count" > $fsstate
- echo "Still in use by another pkg_comp process."
- return
- fi
-
- if [ -n "${UMOUNT_HOOKS}" ]; then
- echo "Executing umount hooks."
- for h in ${UMOUNT_HOOKS}; do
- ${h} ${DESTDIR} umount
- done
- fi
-
- fsfailed=no
-
- if [ -n "$REAL_SRC" -a -d "$REAL_SRC" ]; then
- umount $DESTDIR/usr/src || fsfailed=yes
- fi
-
- if [ -n "$REAL_PKGSRC" -a -d "$REAL_PKGSRC" ]; then
- umount $DESTDIR/usr/pkgsrc || fsfailed=yes
- fi
-
- if [ -n "$REAL_DISTFILES" -a -d "$REAL_DISTFILES" ]; then
- umount $DESTDIR/pkg_comp/distfiles || fsfailed=yes
- fi
-
- if [ -n "$REAL_PACKAGES" -a -d "$REAL_PACKAGES" ]; then
- umount $DESTDIR/pkg_comp/packages || fsfailed=yes
- fi
-
- if [ -n "${REAL_CCACHE}" -a -d "${REAL_CCACHE}" ]; then
- umount ${DESTDIR}/pkg_comp/ccache || fsfailed=yes
- fi
-
- if [ "$SYNC_UMOUNT" != "no" ]; then
- printf "Syncing: 1"
- sync ; sleep 1
- printf " 2"
- sync ; sleep 1
- printf " 3"
- sync ; sleep 1
- echo " done."
- fi
-
- if [ "$fsfailed" = "yes" ]; then
- err "FATAL: failed to umount all filesystems"
- else
- rm $fsstate
- fi
-}
-
-# ----------------------------------------------------------------------
-# maketemplate target
-# ----------------------------------------------------------------------
-
-# pkg_maketemplate
-#
-# Generates a sample configuration file based on the list of variables
-# given in TEMPLATE_VARS and MKCONF_VARS.
-#
-pkg_maketemplate()
-{
- if [ -f "$conffile" ]; then
- err "$conffile already exists"
- fi
-
- mkdir -p $confdir
- cat > $conffile <<EOF
-# -*- sh -*-
-#
-# pkg_comp - configuration file
-# See pkg_comp(8) for a detailed description of each variable.
-#
-
-EOF
-
- echo "# Variables used internally by pkg_comp." >> $conffile
- for var in `echo $TEMPLATE_VARS | tr ' ' '\n' | sort`; do
- eval val=\""\$$var"\"
- echo "$var=\"$val\"" >> $conffile
- done
-
- echo >> $conffile
- echo "# Default variables written to the generated mk.conf." >> $conffile
- for var in `echo $MKCONF_VARS | tr ' ' '\n' | sort`; do
- eval val=\""\$$var"\"
- echo "$var=\"$val\"" >> $conffile
- done
-
- echo "pkg_comp: $conffile created. Edit the file by hand now."
-}
-
-# ----------------------------------------------------------------------
-# makeroot target
-# ----------------------------------------------------------------------
-
-# pkg_makeroot
-#
-# The 'makeroot' target. This creates a new sandbox and then issues
-# some stuff to be called only when using this specific target.
-#
-pkg_makeroot()
-{
- makeroot
-
- [ "$nflag" = "no" -a -n "$INSTALL_PACKAGES" ] &&
- pkg_install $INSTALL_PACKAGES
-
- [ "$nflag" = "no" -a -n "$BUILD_PACKAGES" ] &&
- pkg_build $BUILD_PACKAGES
-}
-
-# makeroot
-#
-# Creates a new sandbox. This is independent from 'makeroot' and
-# 'auto' targets.
-#
-makeroot()
-{
- # Check for directories that will be null mounted.
- if [ -n "$REAL_SRC" -a ! -d "$REAL_SRC" ]; then
- err "REAL_SRC $REAL_SRC does not exist"
- fi
-
- if [ -n "$REAL_PKGSRC" -a ! -d "$REAL_PKGSRC" ]; then
- err "REAL_PKGSRC $REAL_PKGSRC does not exist"
- fi
-
- if [ -n "$REAL_DISTFILES" -a ! -d "$REAL_DISTFILES" ]; then
- err "REAL_DISTFILES $REAL_DISTFILES does not exist"
- fi
-
- if [ -n "$REAL_PACKAGES" -a ! -d "$REAL_PACKAGES" ]; then
- err "REAL_PACKAGES $REAL_PACKAGES does not exist"
- fi
-
- if echo ${PKGSRC_COMPILER} | grep ccache >/dev/null 2>&1 && \
- [ -z "${REAL_CCACHE}" ]; then
- warn "PKGSRC_COMPILER contains 'ccache' but REAL_CCACHE is unset"
- elif [ -n "${REAL_CCACHE}" -a ! -d "${REAL_CCACHE}" ]; then
- err "REAL_CCACHE ${REAL_CCACHE} does not exist"
- fi
-
- # Check for required directories.
- if [ ! -d $DISTRIBDIR ]; then
- err "DISTRIBDIR $DISTRIBDIR does not exist"
- fi
-
- if [ -d $DESTDIR ]; then
- err "DESTDIR $DESTDIR already exists"
- fi
-
- if [ "$SETS_X11" = "no" ]; then
- allsets="$SETS"
- else
- allsets="$SETS $SETS_X11"
- fi
-
- for s in $allsets; do
- if [ ! -f $DISTRIBDIR/binary/sets/$s ]; then
- err "$DISTRIBDIR/binary/sets/$s does not exist"
- fi
- done
-
- echo "PKG_COMP ==> Creating sandbox \`${DESTDIR}'"
-
- mkdir -p $DESTDIR
- cd $DESTDIR
-
- for s in $allsets; do
- echo "Extracting $s..."
- tar xzpf $DISTRIBDIR/binary/sets/$s
- done
-
- [ -f ${DESTDIR}/netbsd ] || touch ${DESTDIR}/netbsd
-
- echo "Making device nodes..."
- cd $DESTDIR/dev
- ./MAKEDEV all
- cd $DESTDIR
-
- echo "Setting root's environment..."
- chroot $DESTDIR chpass -s $ROOTSHELL
- if [ "$COPYROOTCFG" = "yes" ]; then
- cp /root/.* $DESTDIR/root >/dev/null 2>&1
- fi
- if [ -n "${REAL_CCACHE}" ]; then
- # This is a workaround for older versions of ccache.mk that do not
- # pass the CCACHE_DIR variable down to ccache.
- ( cd ${DESTDIR}/root && ln -fs ../pkg_comp/ccache .ccache )
- fi
-
- echo "Setting up initial configuration..."
-
- mkdir -p $DESTDIR/usr/src
- mkdir -p $DESTDIR/usr/pkgsrc
- mkdir -p $DESTDIR/pkg_comp/distfiles
- mkdir -p $DESTDIR/pkg_comp/packages
- mkdir -p $DESTDIR/pkg_comp/tmp
- mkdir -p $DESTDIR/pkg_comp/obj/pkgsrc
- [ -n "${REAL_CCACHE}" ] && mkdir -p ${DESTDIR}/pkg_comp/ccache
- ( cd $DESTDIR && ln -s pkg_comp p )
-
- # Set sh configuration
- echo "umask 022" >> $DESTDIR/etc/profile
- echo "ENV=/etc/shrc" >> $DESTDIR/etc/profile
- echo "export PS1=\"pkg_comp:`basename $conffile`# \"" >> $DESTDIR/etc/shrc
- echo "set -o emacs" >> $DESTDIR/etc/shrc
-
- # Set csh configuration
- echo "umask 022" >> $DESTDIR/etc/csh.login
- echo "set prompt=\"pkg_comp:`basename $conffile`# \"" >> $DESTDIR/etc/csh.login
- echo "set prompt=\"pkg_comp:`basename $conffile`# \"" >> $DESTDIR/etc/csh.cshrc
-
- cp /etc/resolv.conf $DESTDIR/etc/resolv.conf
-
- makeroot_mkconf
-
- # From now on, filesystems may be mounted, so we need to trap
- # signals to umount them.
- trap "echo \"*** Process aborted ***\" ; fsumount ; exit 1" INT QUIT
-
- makeroot_libkver
- makeroot_digest
-
- if [ "$USE_GCC3" = "yes" ]; then
- if [ -z "`echo $BUILD_PACKAGES $INSTALL_PACKAGES | grep gcc3`" ]; then
- AVOID_GCC3=yes pkg_build lang/gcc3
- fi
- fi
-
- makeroot_x11
-
- if [ -n "${MAKEROOT_HOOKS}" ]; then
- echo "Executing makeroot hooks."
- for h in ${MAKEROOT_HOOKS}; do
- ${h} ${DESTDIR} makeroot
- done
- fi
-}
-
-# makeroot_mkconf
-#
-# Generates a mk.conf file inside the sandbox, based on the content
-# of MKCONF_VARS and EXTRAMK. Also handles some special stuff.
-#
-makeroot_mkconf()
-{
- file="$DESTDIR/etc/mk.conf"
-
- cat >> $file <<EOF
-#
-# /etc/mk.conf
-# File automatically generated by pkg_comp on `date`
-#
-.ifdef BSD_PKG_MK
-
-EOF
-
- for var in $MKCONF_VARS; do
- eval val=\""\$$var"\"
- echo "$var ?= $val" >> $file
- done
-
- if [ -n "$EXTRAMK" ]; then
- for mkfile in $EXTRAMK; do
- if [ ! -f "$mkfile" ]; then
- err "Cannot find $mkfile"
- else
- cat $mkfile >> $file
- fi
- done
- fi
-
- if [ "$USE_AUDIT_PACKAGES" != "yes" ]; then
- echo "ALLOW_VULNERABLE_PACKAGES ?= YES" >> $file
- fi
-
- if [ "$USE_GCC3" = "yes" ]; then
- cat >>$file <<EOF
-.if !defined(AVOID_GCC3) && exists(/usr/pkg/share/examples/gcc-3.3/mk.conf)
-USE_GCC3 = yes
-CFLAGS += $CFLAGS
-CPPFLAGS += $CPPFLAGS
-CXXFLAGS += $CXXFLAGS
-.include "/usr/pkg/share/examples/gcc-3.3/mk.conf"
-.endif
-EOF
- else
- cat >>$file <<EOF
-CFLAGS += $CFLAGS
-CPPFLAGS += $CPPFLAGS
-CXXFLAGS += $CXXFLAGS
-
-.endif # BSD_PKG_MK
-EOF
- fi
-}
-
-# makeroot_digest
-#
-# Ensure digest is always installed, specially because PKGSRC_COMPILER
-# may contain 'ccache' or 'distcc'.
-#
-makeroot_digest()
-{
- ( PKGSRC_COMPILER=gcc; export PKGSRC_COMPILER; pkg_build pkgtools/digest )
-}
-
-# makeroot_libkver
-#
-# If NETBSD_RELEASE is set to a version string, installs libkver
-# inside the sandbox and configures it.
-#
-makeroot_libkver()
-{
- local prefix script statfile
-
- if [ "$NETBSD_RELEASE" != "no" ]; then
- _BUILD_TARGET="$BUILD_TARGET"
- BUILD_TARGET="standalone-install"
- pkg_build pkgtools/libkver
- BUILD_TARGET="$_BUILD_TARGET"
- echo "LD_PRELOAD=${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so; export LD_PRELOAD" >> $DESTDIR/etc/shrc
- echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.login
- echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.cshrc
- ln -s "$NETBSD_RELEASE" $DESTDIR/libkver_osrelease
- fi
-}
-
-# makeroot_x11
-#
-# If X11 is enabled, installs x11-links inside the sandbox.
-# If USE_XPKGWEDGE is yes, configures xpkgwedge too (but does not
-# install it; pkgsrc will take care of that when needed).
-#
-makeroot_x11()
-{
- if [ "$SETS_X11" != "no" ]; then
- if [ "$USE_XPKGWEDGE" = "yes" ]; then
- echo "export XAPPLRESDIR=${LOCALBASE}/lib/X11/app-defaults" >> $DESTDIR/etc/profile
- echo "setenv XAPPLRESDIR ${LOCALBASE}/lib/X11/app-defaults" >> $DESTDIR/etc/csh.login
- fi
- pkg_build pkgtools/x11-links
- fi
-}
-
-# ----------------------------------------------------------------------
-# auto target
-# ----------------------------------------------------------------------
-
-# pkg_auto pkgs
-#
-# The 'auto' target.
-#
-pkg_auto()
-{
- local pkgs rfile target
-
- pkgs="${*:-${AUTO_PACKAGES}}"
- rfile=${DESTDIR}/pkg_comp/tmp/auto.list
- target="${AUTO_TARGET}"
-
- [ -z "${REAL_PACKAGES}" ] && err "this is useless without REAL_PACKAGES"
- [ -z "${pkgs}" ] &&
- err "this is useless without AUTO_PACKAGES nor package names"
-
- if [ "$1" = resume ]; then
- [ -f ${rfile} ] || err "there is no auto build to resume"
- pkgs=`cat ${rfile}`
- elif [ -f ${rfile} ]; then
- err "there is an stopped auto build; removeroot first or resume it"
- else
- makeroot
-
- [ "$nflag" = "no" -a -n "$INSTALL_PACKAGES" ] &&
- pkg_install $INSTALL_PACKAGES
-
- echo ${pkgs} | tr ' ' '\n' > ${rfile}
- fi
-
- checkroot
- _BUILD_RESUME=${rfile} BUILD_TARGET=${target} pkg_build ${pkgs}
- pkg_removeroot
-}
-
-# ----------------------------------------------------------------------
-# build target
-# ----------------------------------------------------------------------
-
-# pkg_build pkgs
-#
-# The build target. Also used as a helper function within this script
-# to build several packages when needed.
-#
-pkg_build()
-{
- local failed invalid p pkgs script statfile
-
- pkgs="$*"
-
- # Check if all packages exist
- invalid=""
- for p in $pkgs; do
- if [ ! -d $REAL_PKGSRC/$p ]; then
- invalid="$invalid $p"
- fi
- done
- if [ -n "$invalid" ]; then
- err "invalid packages:$invalid"
- fi
-
- # Build them
- fsmount
- check_pkg_install # executes copy_vulnerabilities too
- failed=""
- for p in $pkgs; do
- echo "PKG_COMP ==> Building and installing $p"
- prefix=`mktemp $DESTDIR/pkg_comp/tmp/pkg_comp-XXXX`
- rm $prefix
- script="$prefix.sh"
- statfile="$prefix.stat"
- init_script $script
- cat >> $script <<EOF
-cd /usr/pkgsrc/$p
-make $BUILD_TARGET
-if [ \$? != 0 ]; then
- touch /pkg_comp/tmp/`basename $statfile`
-fi
-make clean
-EOF
- chmod +x $script
- chroot $DESTDIR /pkg_comp/tmp/`basename $script`
- rm $script
- if [ -f $statfile ]; then
- failed="$failed $p"
- rm $statfile
- elif [ -n "${_BUILD_RESUME}" ]; then
- grep -v "^${p}\$" < ${_BUILD_RESUME} > ${_BUILD_RESUME}.new
- mv ${_BUILD_RESUME}.new ${_BUILD_RESUME}
- fi
- done
- fsumount
- if [ -n "$failed" ]; then
- echo "PKG_COMP ==> Build error summary"
- echo "Build failed for:"
- for p in $failed; do
- echo " $p"
- done
- fi
-}
-
-# check_pkg_install
-#
-# Ensure that the version of pkg_install inside the sandbox is new
-# enough to work with pkgsrc. If not, rebuild it.
-#
-check_pkg_install()
-{
- local script
-
- copy_vulnerabilities
-
- # We assume filesystems are mounted!
-
- echo "PKG_COMP ==> Checking if pkg_install is up to date"
- script=`mktemp $DESTDIR/pkg_comp/tmp/pkg_comp-XXXX`.sh
- init_script $script
- cat >> $script <<EOF
-cd /usr/pkgsrc/pkgtools/pkg_comp
-fail=\$(make show-var VARNAME=PKG_FAIL_REASON)
-if echo \$fail | grep "package tools installed on this system are out of date" >/dev/null; then
- echo "PKG_COMP ==> pkg_install is out of date; rebuilding"
- cd /usr/pkgsrc/pkgtools/pkg_install
- make && make install && make clean
-fi
-EOF
- chmod +x $script
- chroot $DESTDIR /pkg_comp/tmp/`basename $script`
- rm $script
-}
-
-# ----------------------------------------------------------------------
-# install target
-# ----------------------------------------------------------------------
-
-# pkg_install pkgs
-#
-# The install target. Also used as a helper function within this
-# script to install several packages when needed.
-#
-pkg_install()
-{
- local failed pkgs stat
-
- pkgs="$*"
-
- [ -z "$REAL_PACKAGES" ] && err "REAL_PACKAGES is not set"
-
- copy_vulnerabilities
-
- fsmount
- failed=""
- for p in $pkgs; do
- if [ -f $DESTDIR/pkg_comp/packages/All/$p ]; then
- echo "PKG_COMP ==> Installing binary package: $p"
- stat=$DESTDIR/pkg_comp/tmp/install.sh
- init_script $stat
- cat >> $stat <<EOF
-cd /pkg_comp/packages/All
-pkg_add $p
-EOF
- chmod +x $stat
- chroot $DESTDIR /pkg_comp/tmp/install.sh
- rm $stat
- else
- failed="$failed $p"
- fi
- done
- fsumount
- [ -n "$failed" ] && echo "Installation failed for:$failed"
-}
-
-# ----------------------------------------------------------------------
-# chroot target
-# ----------------------------------------------------------------------
-
-# pkg_chroot cmd
-#
-# The 'chroot' target.
-#
-pkg_chroot()
-{
- local prefix script
-
- [ -d $DESTDIR ] || err "$DESTDIR does not exist"
-
- copy_vulnerabilities
-
- fsmount
- echo "PKG_COMP ==> Entering sandbox \`$DESTDIR'"
- prefix=`mktemp $DESTDIR/pkg_comp/tmp/pkg_comp-XXXX`
- rm $prefix
- script="$prefix.sh"
- init_script $script
- if [ $# -eq 0 ]; then
- cat >> $script <<EOF
-ENV=/etc/shrc $ROOTSHELL
-EOF
- else
- cat >> $script <<EOF
-$*
-EOF
- fi
- chmod +x $script
- ENV=/etc/shrc chroot $DESTDIR /pkg_comp/tmp/`basename $script`
- echo
- rm $script
- fsumount
-}
-
-# ----------------------------------------------------------------------
-# removeroot target
-# ----------------------------------------------------------------------
-
-# pkg_removeroot
-#
-# The 'removeroot' target.
-#
-pkg_removeroot()
-{
- [ -f $fsstate ] && err "filesystems may still be mounted; cannot remove"
- echo "PKG_COMP ==> Removing sandbox \`${DESTDIR}'"
- rm -rf $DESTDIR
-}
-
-# ----------------------------------------------------------------------
-# Main program
-# ----------------------------------------------------------------------
-
-confdir="$HOME/pkg_comp"
-
-# Parse options
-args=`getopt c:C:n $*`
-if [ $? != 0 ]; then
- usage
-fi
-set -- $args
-conffile=
-nflag=no
-while [ $# -gt 0 ]; do
- case "$1" in
- -c)
- [ -n "$conffile" ] && usage
- conffile="$confdir/$2.conf"
- shift
- ;;
- -C)
- [ -n "$conffile" ] && usage
- conffile="$2"
- shift
- ;;
- -n)
- nflag=yes
- ;;
- --)
- shift; break
- ;;
- esac
- shift
-done
-
-if [ $# -lt 1 ]; then
- usage
-fi
-
-if [ -z "$conffile" ]; then
- conffile="$confdir/default.conf"
-fi
-
-case "$1" in
- pkg_*)
- target=chroot
- ;;
- *)
- target="$1"
- shift
- ;;
-esac
-args="$*"
-
-# readconf
-#
-# Reads the configuration file and ensures that the environment is in
-# a consistent state.
-#
-readconf()
-{
- if [ -f $conffile ]; then
- [ `id -u` -ne 0 ] && err "must be run as root"
- env_clean
- . $conffile
- env_setdefaults
- else
- err "$conffile does not exist"
- fi
-
- fsstate="$DESTDIR/pkg_comp/tmp/mount.stat"
-}
-
-# checkroot
-#
-# Checks that the sandbox is initialized, that it's a valid directory
-# and configures a signal trap for SIGINT and SIGQUIT.
-#
-checkroot()
-{
- if [ ! -d "$DESTDIR" ]; then
- err "sandbox not initialized; use makeroot first."
- fi
- if [ "$DESTDIR" = "/" ]; then
- err "DESTDIR cannot be /"
- fi
-
- # From now on, filesystems may be mounted, so we need to trap
- # signals to umount them.
- trap "echo \"*** Process aborted ***\" ; fsumount ; exit 1" INT QUIT
-}
-
-case "$target" in
- maketemplate)
- env_clean
- env_setdefaults
- pkg_maketemplate
- exit 0
- ;;
- makeroot)
- readconf
- pkg_makeroot
- exit 0
- ;;
- build)
- readconf
- checkroot
- pkg_build $args
- exit 0
- ;;
- install)
- readconf
- checkroot
- pkg_install $args
- exit 0
- ;;
- chroot)
- readconf
- checkroot
- pkg_chroot $args
- exit 0
- ;;
- removeroot)
- readconf
- checkroot
- pkg_removeroot
- ;;
- auto)
- readconf
- pkg_auto $args
- ;;
- *)
- err "unknown target \`$target'"
- ;;
-esac
-
-exit 0
-
-# vim: expandtab:softtabstop=4:shiftwidth=4
diff --git a/pkgtools/pkg_filecheck/DESCR b/pkgtools/pkg_filecheck/DESCR
deleted file mode 100644
index d054ef1d3e2..00000000000
--- a/pkgtools/pkg_filecheck/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-pkg_filecheck compares the file system contents with the list of
-files recorded in the package database, and reports any files that
-are in the file system, but not in the database.
diff --git a/pkgtools/pkg_filecheck/Makefile b/pkgtools/pkg_filecheck/Makefile
deleted file mode 100644
index 9f769c499ca..00000000000
--- a/pkgtools/pkg_filecheck/Makefile
+++ /dev/null
@@ -1,67 +0,0 @@
-# $NetBSD: Makefile,v 1.25 2007/02/16 22:57:09 tonio Exp $
-#
-
-DISTNAME= pkg_filecheck-0.4
-CATEGORIES= pkgtools devel
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= dillo@NetBSD.org
-#HOMEPAGE= http://www.NetBSD.org/Documentation/netbsd/doc/pkgsrc.html
-COMMENT= Check for files not owned by any package
-
-WRKSRC= ${WRKDIR}
-USE_TOOLS+= perl:run
-
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-
-FILES_SUBST+= X11PREFIX=${X11PREFIX:Q}
-FILES_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q}
-CONF_FILES= ${PREFIX}/share/examples/pkg_filecheck/pkg_filecheck.conf \
- ${PKG_SYSCONFDIR}/pkg_filecheck.conf
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
-
-.include "../../mk/bdb.buildlink3.mk"
-
-SUBST_CLASSES+= paths
-SUBST_FILES.paths= builddb.pl builddb.1 pkg_filecheck.conf
-SUBST_FILES.paths+= pkg_filecheck.conf.5 pkg_filecheck.c pkg_filecheck.1
-SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+= -e 's,@PERL5@,${PERL5},g'
-SUBST_SED.paths+= -e 's,@X11PREFIX@,${X11PREFIX},g'
-SUBST_SED.paths+= -e 's,@PKG_DBDIR@,${PKG_DBDIR},g'
-SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
-SUBST_STAGE.paths= post-patch
-
-post-extract:
-.for f in builddb.pl builddb.1 pkg_filecheck.conf pkg_filecheck.conf.5 \
- pkg_filecheck.c pkg_filecheck.1
- ${CP} ${FILESDIR}/${f} ${WRKSRC}/${f}
-.endfor
-
-do-build:
- cd ${WRKSRC} \
- && ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} ${BDB_LIBS} \
- -o pkg_filecheck pkg_filecheck.c
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/builddb.pl ${PREFIX}/bin/builddb
- ${INSTALL_PROGRAM} ${WRKSRC}/pkg_filecheck ${PREFIX}/bin/pkg_filecheck
- ${INSTALL_MAN} ${WRKSRC}/builddb.1 ${PREFIX}/${PKGMANDIR}/man1
- ${INSTALL_MAN} ${WRKSRC}/pkg_filecheck.1 ${PREFIX}/${PKGMANDIR}/man1
- ${INSTALL_MAN} ${WRKSRC}/pkg_filecheck.conf.5 ${PREFIX}/${PKGMANDIR}/man5
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pkg_filecheck
- ${INSTALL_DATA} ${WRKSRC}/pkg_filecheck.conf \
- ${PREFIX}/share/examples/pkg_filecheck/pkg_filecheck.conf
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} != "NetBSD"
-CPPFLAGS+= -DUSE_LIBNBCOMPAT
-. include "../../pkgtools/libnbcompat/buildlink3.mk"
-.endif
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_filecheck/PLIST b/pkgtools/pkg_filecheck/PLIST
deleted file mode 100644
index 7c2575fa179..00000000000
--- a/pkgtools/pkg_filecheck/PLIST
+++ /dev/null
@@ -1,8 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2003/07/13 16:15:34 wiz Exp $
-bin/builddb
-bin/pkg_filecheck
-man/man1/builddb.1
-man/man1/pkg_filecheck.1
-man/man5/pkg_filecheck.conf.5
-share/examples/pkg_filecheck/pkg_filecheck.conf
-@dirrm share/examples/pkg_filecheck
diff --git a/pkgtools/pkg_filecheck/files/builddb.1 b/pkgtools/pkg_filecheck/files/builddb.1
deleted file mode 100644
index 518225d692b..00000000000
--- a/pkgtools/pkg_filecheck/files/builddb.1
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" $NetBSD: builddb.1,v 1.1.1.1 2003/07/13 16:15:34 wiz Exp $
-.\"
-.\" Copyright (c) 2003 Thomas Klausner
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR, THOMAS KLAUSNER,
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd July 13, 2003
-.Dt BUILDDB 1
-.Os
-.Sh NAME
-.Nm builddb
-.Nd create database from file system or tar file
-.Sh SYNOPSIS
-.Nm
-.Op Fl hv
-.Op Fl o Ar db-file
-.Ar tar-file | Ar directory
-.Op Ar ...
-.Sh DESCRIPTION
-.Nm
-reads the tar file
-.Ar tar-file
-or the contents of the directory hierarchy starting at
-.Ar directory
-and creates a database from it which can be used by
-.Nm pkg_filecheck .
-.Pp
-Supported options:
-.Bl -tag -width XoXdbXfileX -offset indent
-.It Fl h
-Display a short help message.
-.It Fl o Ar db-file
-Use
-.Ar db-file
-as database output file instead of the default
-.Pa /var/db/pkg/xdb.byfile.db .
-.It Fl v
-Verbose mode.
-Report each file found.
-.El
-.Sh SEE ALSO
-.Xr pkg_filecheck 1
-.Sh BUGS
-.Nm
-is written in Perl.
diff --git a/pkgtools/pkg_filecheck/files/builddb.pl b/pkgtools/pkg_filecheck/files/builddb.pl
deleted file mode 100644
index b7bc393f362..00000000000
--- a/pkgtools/pkg_filecheck/files/builddb.pl
+++ /dev/null
@@ -1,133 +0,0 @@
-#!@PERL5@
-
-# $NetBSD: builddb.pl,v 1.2 2006/01/06 17:10:58 joerg Exp $
-#
-# builddb -- build .byfile.db from tgz files or directory hierarchies.
-# Copyright (C) 2000, 2003 Dieter Baron
-#
-# This file is part of img2eps, an image to EPS file converter.
-# The author can be contacted at <dillo@giga.or.at>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior
-# written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY DIETER BARON ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-#
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL DIETER BARON BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-use strict;
-use Getopt::Std;
-use DB_File;
-
-my $prg;
-my $options = 'hvo:';
-my $usage = '[-hv] [-o db-file] tar-file|directory ...';
-my %opt;
-my ($verbose, $dbfile);
-my %db;
-my ($file, $pkg, $opkg);
-
-#
-# defaults
-#
-
-$verbose = 0;
-$dbfile = '/var/db/pkg/xdb.byfile.db';
-
-#
-# command line handling
-#
-
-($prg) = ($0 =~ /([^\/]+)$/);
-
-getopts($options, \%opt);
-
-if ($opt{h}) {
- print <<EOF;
-usage: $prg $usage
- -h display this help message
- -o DB-FILE output to DB-FILE
- -v verbose mode
-EOF
- exit 0;
-}
-
-if (@ARGV == 0) {
- print STDERR "usage: $prg $usage\n";
- exit 1;
-}
-
-$verbose = $opt{v} if ($opt{v});
-$dbfile = $opt{o} if ($opt{o});
-
-#
-# setup
-#
-
-tie %db, 'DB_File', $dbfile, O_RDWR|O_CREAT, 0666, $DB_BTREE
- or die "cannot open db `$dbfile': $!\n";
-
-#
-# process tar files
-#
-
-foreach $file (@ARGV) {
- if (-f $file) {
- unless (open LST, "tar -tzf $file |") {
- warn "cannot list `$file': $!\n";
- next;
- }
-
- ($pkg) = ($file =~ m/([^\/]+)\.tgz$/);
- }
- elsif (-d $file) {
- $pkg = $file;
-
- $file = "`pwd`/$file" unless ($file =~ m!^/!);
- unless (open LST, "find $file -type f |") {
- warn "cannot list `$file': $!\n";
- next;
- }
- }
- else {
- warn "no such file or directory: `$file'";
- next;
- }
-
- while (<LST>) {
- chomp;
- if (exists($db{"$_\0"})) {
- ($opkg = $db{"$_\0"}) =~ s/\0//;
- warn "overwriting `$_' (old: $opkg, new: $pkg)\n";
- }
- print "$pkg: $_\n" if ($verbose);
- $db{"$_\0"} = "$pkg\0";
- }
-
- close LST;
-}
-
-#
-# cleanup
-#
-
-untie %db;
diff --git a/pkgtools/pkg_filecheck/files/pkg_filecheck.1 b/pkgtools/pkg_filecheck/files/pkg_filecheck.1
deleted file mode 100644
index 27da94bf175..00000000000
--- a/pkgtools/pkg_filecheck/files/pkg_filecheck.1
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" $NetBSD: pkg_filecheck.1,v 1.1.1.1 2003/07/13 16:15:34 wiz Exp $
-.\"
-.\" Copyright (c) 2003 Thomas Klausner
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR, THOMAS KLAUSNER,
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd July 13, 2003
-.Dt PKG_FILECHECK 1
-.Os
-.Sh NAME
-.Nm pkg_filecheck
-.Nd compare file system contents with package database
-.Sh SYNOPSIS
-.Nm
-.Op Fl h
-.Op Fl c Ar config-file
-.Sh DESCRIPTION
-.Nm
-reads the package tools database and and compares it with the actual
-contents of the directory hierarchy starting at
-.Pa @PREFIX@ ,
-reporting any files that are on the file system, but not in the
-database.
-The database used and the hierarchy to be checked can be changed
-in the config file.
-.Pp
-Supported options:
-.Bl -tag -width XcXconfigXfileX -offset indent
-.It Fl c Ar config-file
-Use
-.Ar config-file
-as config file instead of the default
-.Pa @PKG_SYSCONFDIR@/pkg_filecheck.conf .
-.It Fl h
-Display a very short help message.
-.El
-.Sh SEE ALSO
-.Xr builddb 1
-.Sh BUGS
-.Nm
-does not report files that are in the database, but not in the file
-system.
-You can use
-.Dq Ic pkg_admin Ar check
-for that.
diff --git a/pkgtools/pkg_filecheck/files/pkg_filecheck.c b/pkgtools/pkg_filecheck/files/pkg_filecheck.c
deleted file mode 100644
index 6932e45008a..00000000000
--- a/pkgtools/pkg_filecheck/files/pkg_filecheck.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- $NetBSD: pkg_filecheck.c,v 1.5 2007/02/16 22:57:09 tonio Exp $
-
- pkg_filecheck.c -- check for files not owned by any package
- Copyright (C) 2001 Dieter Baron
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- 3. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior
- written permission.
-
- THIS SOFTWARE IS PROVIDED BY DIETER BARON ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL DIETER BARON BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#if defined(USE_LIBNBCOMPAT)
-#include <nbcompat.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <db_185.h>
-#include <errno.h>
-#include <fcntl.h>
-#if !defined(USE_LIBNBCOMPAT) || defined(HAVE_FTS_H)
-#include <fts.h>
-#endif
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-struct array {
- void **p;
- int len, alen;
-};
-
-char *prg;
-
-static int check(char **dir, DB **db, char **ignore);
-static int fts_sort(const FTSENT **e1, const FTSENT **e2);
-static void push(struct array *a, void *el);
-static int read_conf(char *fname, char ***dirp, DB ***dbp, char ***ignorep);
-
-
-
-int
-main(int argc, char *argv[])
-{
- DB **db;
- char **dir, **ignore;
-
- char *cfgfile;
- int c, i, err;
-
- prg = argv[0];
- opterr = 0;
-
- cfgfile = "@PKG_SYSCONFDIR@/pkg_filecheck.conf";
-
- while ((c=getopt(argc, argv, "c:h")) != -1) {
- switch (c) {
- case 'c':
- cfgfile = optarg;
- break;
-
- case 'h':
- printf("usage: %s [-h] [-c config-file]\n", prg);
- exit(0);
-
- default:
- fprintf(stderr, "usage: %s [-h] [-c config-file]\n", prg);
- exit(1);
- }
- }
-
- if (read_conf(cfgfile, &dir, &db, &ignore) < 0)
- exit(1);
-
- err = check(dir, db, ignore);
-
- for (i=0; db[i]; i++)
- db[i]->close(db[i]);
- free(dir);
- free(db);
- free(ignore);
-
- exit(err ? 1 : 0);
-}
-
-
-
-static int
-check(char **dir, DB **db, char **ignore)
-{
- FTS *fts;
- FTSENT *ent;
- DBT key, val;
- int i, found;
-
- if ((fts=fts_open(dir, FTS_PHYSICAL, fts_sort)) == NULL) {
- fprintf(stderr, "%s: cannot walk direcotry hierarchy: %s",
- prg, strerror(errno));
- return -1;
- }
-
- while ((ent=fts_read(fts))) {
- switch (ent->fts_info) {
- case FTS_F:
- key.data = ent->fts_path;
- key.size = ent->fts_pathlen+1;
-
- found = 0;
- for (i=0; db[i]; i++)
- if (db[i]->get(db[i], &key, &val, 0) == 0) {
- found = 1;
- break;
- }
-
- if (!found)
- printf("%s\n", ent->fts_path);
- break;
-
- case FTS_D:
- if (ignore)
- for (i=0; ignore[i]; i++)
- if (strcmp(ignore[i], ent->fts_path) == 0) {
- fts_set(fts, ent, FTS_SKIP);
- break;
- }
- break;
-
- case FTS_DNR:
- fprintf(stderr, "%s: cannot read directory `%s', skipped: %s\n",
- prg, ent->fts_path, strerror(ent->fts_errno));
- break;
-
- case FTS_NS:
- fprintf(stderr, "%s: cannot stat file `%s', skipped: %s\n",
- prg, ent->fts_path, strerror(ent->fts_errno));
- break;
-
- case FTS_ERR:
- fprintf(stderr, "%s: directory traversal error: %s\n",
- prg, strerror(ent->fts_errno));
- break;
-
- case FTS_DC:
- case FTS_DP:
- case FTS_SL:
- case FTS_SLNONE:
- case FTS_DEFAULT:
- /* ignore */
- break;
-
- default:
- fprintf(stderr, "%s: unknown FTSENT type %d ignored\n",
- prg, ent->fts_info);
- break;
- }
- }
-
- fts_close(fts);
- return 0;
-}
-
-
-
-static int
-fts_sort(const FTSENT **e1, const FTSENT **e2)
-{
- return strcmp((*e1)->fts_name, (*e2)->fts_name);
-}
-
-
-
-static int
-read_conf(char *fname, char ***dirp, DB ***dbp, char ***ignorep)
-{
- struct array dir, db, ignore;
- FILE *f;
- DB *cdb;
- char b[8192], *curd, *dbname, *cmd, *p;
- int lineno, err;
-
- dir.p = db.p = ignore.p = NULL;
- dir.len = db.len = ignore.len = 0;
- dir.alen = db.alen = ignore.alen = 0;
-
- if ((f=fopen(fname, "r")) == NULL) {
- fprintf(stderr, "%s: cannot open config file `%s': %s\n",
- prg, fname, strerror(errno));
- return -1;
- }
-
- curd = NULL;
-
- lineno = 0;
- while (fgets(b, 8192, f)) {
- lineno++;
- if (b[0] == '#')
- continue;
-
- cmd = b+strspn(b, " \t");
- p = cmd+strcspn(cmd, " \t\n");
- *(p++) = '\0';
- p += strspn(p, " \t");
- if (*p == '\n' || *p == '\0')
- continue;
-
- if (p[strlen(p)-1] == '\n')
- p[strlen(p)-1] = '\0';
-
- if (strcmp(cmd, "dir") == 0) {
- free(curd);
- curd = strdup(p);
- }
- else if (strcmp(cmd, "db") == 0) {
- if (curd) {
- dbname = malloc(strlen(curd) + strlen(p) + 2);
- sprintf(dbname, "%s/%s", curd, p);
- }
- else
- dbname = p;
- if ((cdb=dbopen(dbname, O_RDONLY, 0, DB_BTREE, NULL)) == NULL) {
- fprintf(stderr, "%s:%s:%d: cannot open data base `%s': %s\n",
- prg, fname, lineno, dbname, strerror(errno));
- free(dir.p);
- free(db.p);
- free(ignore.p);
- return -1;
- }
- else
- push(&db, cdb);
-
- if (curd)
- free(dbname);
- }
- else if (strcmp(cmd, "check") == 0)
- push(&dir, strdup(p));
- else if (strcmp(cmd, "ignore") == 0)
- push(&ignore, strdup(p));
- else {
- fprintf(stderr, "%s:%s:%d: unrecognized command `%s'\n",
- prg, fname, lineno, cmd);
- }
- }
-
- fclose(f);
-
- err = 0;
-
- if (dir.p == NULL) {
- fprintf(stderr, "%s: no directories to check\n",
- prg);
- err = 1;
- }
- if (db.p == NULL) {
- fprintf(stderr, "%s: no file data bases given\n",
- prg);
- err = 1;
- }
-
- if (err) {
- free(dir.p);
- free(db.p);
- free(ignore.p);
- return -1;
- }
-
- *dirp = (char **)dir.p;
- *dbp = (DB **)db.p;
- *ignorep = (char **)ignore.p;
-
- return 0;
-}
-
-
-
-static void
-push(struct array *a, void *el)
-{
- int alen;
- void *p;
-
- if (a->len + 2 > a->alen) {
- alen = (a->alen == 0) ? 8
- : (a->alen < 1024) ? (a->alen * 2)
- : (a->alen + 1024);
-
- if ((p=realloc(a->p, alen*sizeof(void *))) == NULL) {
- fprintf(stderr, "%s: malloc failure\n", prg);
- exit(1);
- }
-
- a->p = p;
- a->alen = alen;
- }
-
- a->p[a->len++] = el;
- a->p[a->len] = NULL;
-}
diff --git a/pkgtools/pkg_filecheck/files/pkg_filecheck.conf b/pkgtools/pkg_filecheck/files/pkg_filecheck.conf
deleted file mode 100644
index 07308a43c15..00000000000
--- a/pkgtools/pkg_filecheck/files/pkg_filecheck.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# $NetBSD: pkg_filecheck.conf,v 1.3 2006/07/02 10:32:09 rillig Exp $
-
-# location of package database
-dir @PKG_DBDIR@
-# name of package database
-db pkgdb.byfile.db
-# installation prefix for packages
-check @PREFIX@
-
-# If not using xpkgwedge:
-# xdb.byfile.db has to be created by running builddb
-#db xdb.byfile.db
-# installation prefix for X11-based packages
-#check @X11PREFIX@
-
-ignore @PREFIX@/etc
-ignore @PREFIX@/var/scrollkeeper
-ignore @PKG_DBDIR@
-ignore @PKG_DBDIR@.refcount
diff --git a/pkgtools/pkg_filecheck/files/pkg_filecheck.conf.5 b/pkgtools/pkg_filecheck/files/pkg_filecheck.conf.5
deleted file mode 100644
index 98ed173f7c9..00000000000
--- a/pkgtools/pkg_filecheck/files/pkg_filecheck.conf.5
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" $NetBSD: pkg_filecheck.conf.5,v 1.1.1.1 2003/07/13 16:15:34 wiz Exp $
-.\"
-.\" Copyright (c) 2003 Thomas Klausner
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR, THOMAS KLAUSNER,
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd July 13, 2003
-.Dt PKG_FILECHECK.CONF 5
-.Os
-.Sh NAME
-.Nm pkg_filecheck.conf
-.Nd
-.Xr pkg_filecheck 1
-configuration file
-.Sh DESCRIPTION
-.Nm
-configures the behaviour of
-.Xr pkg_filecheck 1 .
-.Pp
-Each line can contain one of the following keywords:
-.Bl -tag -width XdbXdbfileX -offset indent
-.It Sy check Ar dir
-Directory hierarchy to check.
-.It Sy db Ar dbfile
-Read database
-.Ar dbfile
-as input file.
-.Ar dbfile
-currently may not contain a path, just a filename.
-.It Sy dir Ar path
-Directory containing the database files.
-Affects the following
-.Sy db
-lines (until the next
-.Sy dir
-line or EOF).
-.It Sy ignore Ar dir
-Do not report files found in the directory
-.Ar dir
-(even if they are not in the databases).
-.El
-.Pp
-All keywords can be specified multiple times.
-.Pp
-Empty lines or lines starting with a hash sign
-.Pq Sq #
-are ignored.
-.Sh SEE ALSO
-.Xr pkg_filecheck 1
-.Sh BUGS
-.Nm
-only allows filenames, not paths, as
-.Sy db
-arguments.
-
diff --git a/pkgtools/pkg_install-info/DESCR b/pkgtools/pkg_install-info/DESCR
deleted file mode 100644
index 18e93000860..00000000000
--- a/pkgtools/pkg_install-info/DESCR
+++ /dev/null
@@ -1,6 +0,0 @@
-This package provides a standalone GNU install-info utility. It
-used by pkgsrc on systems that do not provide a native install-info
-utility.
-
-An install-info tool and documentation is also available in the
-devel/gtexinfo package.
diff --git a/pkgtools/pkg_install-info/Makefile b/pkgtools/pkg_install-info/Makefile
deleted file mode 100644
index aaa148bcfcb..00000000000
--- a/pkgtools/pkg_install-info/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-# $NetBSD: Makefile,v 1.15 2006/03/04 21:30:27 jlam Exp $
-#
-
-DISTNAME= pkg_install-info-${VERSION}
-PKGREVISION= 3
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.gnu.org/software/texinfo/texinfo.html
-COMMENT= Standalone GNU info file installation utility
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-GNU_CONFIGURE= yes
-
-NO_CHECKSUM= yes
-
-# Don't change this unless the sources are updated from GNU Texinfo.
-# Otherwise use PKGREVISION if you need to change this package version.
-VERSION= 4.5
-
-MAKE_ENV+= BINOWN=${BINOWN:Q} BINGRP=${BINGRP:Q}
-
-INSTALLATION_DIRS= bin
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_install-info/PLIST b/pkgtools/pkg_install-info/PLIST
deleted file mode 100644
index 7bc0799faca..00000000000
--- a/pkgtools/pkg_install-info/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2003/06/09 22:16:10 seb Exp $
-bin/pkg_install-info
diff --git a/pkgtools/pkg_install-info/files/Makefile.in b/pkgtools/pkg_install-info/files/Makefile.in
deleted file mode 100644
index 1b04a3b335f..00000000000
--- a/pkgtools/pkg_install-info/files/Makefile.in
+++ /dev/null
@@ -1,28 +0,0 @@
-# $NetBSD: Makefile.in,v 1.3 2006/03/10 06:10:44 epg Exp $
-
-.if defined(PREFIX)
-BINDIR?= ${PREFIX}/bin
-.else
-BINDIR?= /usr/bin
-.endif
-
-PROG= pkg_install-info
-SRCS= getopt.c getopt1.c install-info.c xexit.c xstrdup.c
-
-CPPFLAGS+= -DHAVE_CONFIG_H
-CPPFLAGS+= -I.
-CPPFLAGS+= -DENABLE_NLS=0
-CPPFLAGS+= -DLOCALEDIR=\"\"
-CPPFLAGS+= -DPACKAGE=PACKAGE_NAME
-CPPFLAGS+= -DVERSION=PACKAGE_VERSION
-LDADD+= @LIBOBJS@
-
-MAN=
-
-DISTCLEANFILES= Makefile config.h config.log config.status \
- configure.lineno stamp-*
-
-distclean: .NOTMAIN cleandir
- -rm -f ${DISTCLEANFILES}
-
-.include <bsd.prog.mk>
diff --git a/pkgtools/pkg_install-info/files/README b/pkgtools/pkg_install-info/files/README
deleted file mode 100644
index aea3f8e6200..00000000000
--- a/pkgtools/pkg_install-info/files/README
+++ /dev/null
@@ -1,14 +0,0 @@
-# $NetBSD: README,v 1.1.1.1 2003/06/09 22:16:25 seb Exp $
-
-The following files in this directory come unmodified from GNU texinfo-4.5:
-
-gettext.h
-install-info.c
-strcasecmp.c
-strdup.c
-strerror.c
-strncasecmp.c
-system.h
-xalloc.h
-xexit.c
-xstrdup.c
diff --git a/pkgtools/pkg_install-info/files/aclocal.m4 b/pkgtools/pkg_install-info/files/aclocal.m4
deleted file mode 100644
index 05c3bc0f347..00000000000
--- a/pkgtools/pkg_install-info/files/aclocal.m4
+++ /dev/null
@@ -1,826 +0,0 @@
-# generated automatically by aclocal 1.7.3 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# 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.
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# 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.
-
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 9
-
-# 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...
-
-
-AC_PREREQ([2.54])
-
-# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
-# the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-
-# 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_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-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
- 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)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-# 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([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
-])
-])
-
-
-# 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_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright 2002 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# 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.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.7.3])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright 2001, 2002 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# _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],
-[AC_FOREACH([_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.
-#
-
-# Copyright 1996, 1997, 2000, 2001 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# 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
-# 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)])
-
-# -*- Autoconf -*-
-
-
-# Copyright 1997, 1999, 2000, 2001 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# 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
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# 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
-])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright 2001 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# 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.
-
-# Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_AUX_DIR_EXPAND], [
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-
-# Copyright 2001 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# AM_PROG_INSTALL_STRIP
-
-# Copyright 2001 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# 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="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# -*- Autoconf -*-
-# Copyright (C) 2003 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
-
-# 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])])
-
-# serial 5 -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-
-# 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], 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
-
- 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
- for depmode in $am_compiler_list; do
- # 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.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
-
- case $depmode in
- 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
- ;;
- none) break ;;
- esac
- # 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.
- if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
- >/dev/null 2>conftest.err &&
- grep conftest.h 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
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' 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 builds
- --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])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright 1999, 2000, 2001, 2002 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-#serial 2
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; 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.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
- DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
- test -z "$DEPDIR" && continue
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n -e '/^U = / s///p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # 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 -e '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //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"])
-])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-doit:
- @echo done
-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
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST(am__include)
-AC_SUBST(am__quote)
-AC_MSG_RESULT($_am_result)
-rm -f confinc confmf
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright 1997, 2000, 2001 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 5
-
-AC_PREREQ(2.52)
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-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])])
-
diff --git a/pkgtools/pkg_install-info/files/config.h.in b/pkgtools/pkg_install-info/files/config.h.in
deleted file mode 100644
index 3f67fa726c7..00000000000
--- a/pkgtools/pkg_install-info/files/config.h.in
+++ /dev/null
@@ -1,88 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* 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 <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 <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_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/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* 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 version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-#undef STAT_MACROS_BROKEN
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
diff --git a/pkgtools/pkg_install-info/files/configure b/pkgtools/pkg_install-info/files/configure
deleted file mode 100755
index 2149b66bccd..00000000000
--- a/pkgtools/pkg_install-info/files/configure
+++ /dev/null
@@ -1,4735 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for texinfo 4.5.
-#
-# Copyright (C) 2003 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 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='texinfo'
-PACKAGE_TARNAME='texinfo'
-PACKAGE_VERSION='4.5'
-PACKAGE_STRING='texinfo 4.5'
-PACKAGE_BUGREPORT=''
-
-ac_unique_file="install-info.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#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"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# 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.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-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
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -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 | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$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 ;;
-
- -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 ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- 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 ;;
-
- -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=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 ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- 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'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-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
- 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
-
-
-# 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 its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- 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
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# 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 texinfo 4.5 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 \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-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]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --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]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of texinfo 4.5:";;
- esac
- cat <<\_ACEOF
-
-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>
- CPPFLAGS 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.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style 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
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-texinfo configure 4.5
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by texinfo $as_me 4.5, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-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`
-hostinfo = `(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=.
- echo "PATH: $as_dir"
-done
-
-} >&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_sep=
-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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$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
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >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
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- 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.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-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 `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-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
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`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.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-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_config_headers="$ac_config_headers config.h"
-
-
-# Checks for programs.
-
-# Checks for libraries.
-
-# Checks for header files.
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-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
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- 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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; 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 | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$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
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 -std1 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 -std1. */
-int osf4_cc_array ['\x00' == 0 ? 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
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-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
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
- echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-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
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.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))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in fcntl.h limits.h locale.h memory.h stdlib.h string.h strings.h sys/file.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ---------------------------------- ##
-## Report this to the texinfo lists. ##
-## ---------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# Checks for typedefs, structures, and compiler characteristics.
-echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
-echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
-if test "${ac_cv_header_stat_broken+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#if defined(S_ISBLK) && defined(S_IFDIR)
-# if S_ISBLK (S_IFDIR)
-You lose.
-# endif
-#endif
-
-#if defined(S_ISBLK) && defined(S_IFCHR)
-# if S_ISBLK (S_IFCHR)
-You lose.
-# endif
-#endif
-
-#if defined(S_ISLNK) && defined(S_IFREG)
-# if S_ISLNK (S_IFREG)
-You lose.
-# endif
-#endif
-
-#if defined(S_ISSOCK) && defined(S_IFREG)
-# if S_ISSOCK (S_IFREG)
-You lose.
-# endif
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "You lose" >/dev/null 2>&1; then
- ac_cv_header_stat_broken=yes
-else
- ac_cv_header_stat_broken=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
-echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
-if test $ac_cv_header_stat_broken = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STAT_MACROS_BROKEN 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* 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";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 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;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-
-# Checks for library functions.
-
-for ac_func in vprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-echo "$as_me:$LINENO: checking for _doprnt" >&5
-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
-if test "${ac_cv_func__doprnt+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define _doprnt innocuous__doprnt
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt (); 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 _doprnt
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char _doprnt ();
-/* 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__doprnt) || defined (__stub____doprnt)
-choke me
-#else
-char (*f) () = _doprnt;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != _doprnt;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func__doprnt=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__doprnt=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-if test $ac_cv_func__doprnt = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DOPRNT 1
-_ACEOF
-
-fi
-
-fi
-done
-
-
-
-for ac_func in setlocale
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
-for ac_func in strdup strerror strncasecmp
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
-
-fi
-done
-
-
-
-#
-if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <locale.h>
-int
-main ()
-{
-return LC_MESSAGES
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
-
- fi
-fi
-
-
-#
- ac_config_files="$ac_config_files 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, don't put newlines in cache variables' values.
-# 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.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *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 \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!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" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- 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}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $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}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by texinfo $as_me 4.5, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet 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
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-texinfo config.status 4.5
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-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=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- 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
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- 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
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # 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. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #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.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # 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. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $ac_file | $ac_file:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X$ac_file |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`/stamp-h$_am_stamp_count
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# 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 || { (exit 1); exit 1; }
-fi
-
diff --git a/pkgtools/pkg_install-info/files/configure.ac b/pkgtools/pkg_install-info/files/configure.ac
deleted file mode 100644
index 73b65ed6ab1..00000000000
--- a/pkgtools/pkg_install-info/files/configure.ac
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- Autoconf -*-
-# $NetBSD: configure.ac,v 1.3 2005/02/07 16:14:26 seb Exp $
-#
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.57)
-AC_INIT([texinfo], [4.5])
-AC_CONFIG_SRCDIR([install-info.c])
-AC_CONFIG_HEADER([config.h])
-
-# Checks for programs.
-
-# Checks for libraries.
-
-# Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h limits.h locale.h memory.h stdlib.h string.h strings.h sys/file.h unistd.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STAT
-AC_C_CONST
-AC_TYPE_SIZE_T
-
-# Checks for library functions.
-dnl AC_FUNC_ERROR_AT_LINE
-dnl AC_FUNC_MALLOC
-dnl AC_FUNC_REALLOC
-dnl AC_FUNC_STRCOLL
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([setlocale])
-AC_REPLACE_FUNCS([strdup strerror strncasecmp])
-
-#
-if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
-fi
-
-
-#
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/pkgtools/pkg_install-info/files/getopt.c b/pkgtools/pkg_install-info/files/getopt.c
deleted file mode 100644
index 3e7928a8385..00000000000
--- a/pkgtools/pkg_install-info/files/getopt.c
+++ /dev/null
@@ -1,1273 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to drepper@gnu.org
- before changing it!
- Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
- Ditto for AIX 3.2 and <stdlib.h>. */
-#ifndef _NO_PROTO
-# define _NO_PROTO
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-# ifndef const
-# define const
-# endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-# include <gnu-versions.h>
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
-# include <stdlib.h>
-# include <unistd.h>
-#endif /* GNU C library. */
-
-#ifdef VMS
-# include <unixlib.h>
-# if HAVE_STRING_H - 0
-# include <string.h>
-# endif
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-/* This is for other GNU distributions with internationalized messages. */
-# include "gettext.h"
-#endif
-#define _(msgid) gettext (msgid)
-
-#if defined _LIBC && defined USE_IN_LIBIO
-# include <wchar.h>
-#endif
-
-#ifndef attribute_hidden
-# define attribute_hidden
-#endif
-
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-
- As `getopt' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Setting the environment variable POSIXLY_CORRECT disables permutation.
- Then the behavior is completely standard.
-
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
-
-#include "getopt.h"
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* 1003.2 says this must be 1 before any call. */
-int optind = 1;
-
-/* Formerly, initialization of getopt depended on optind==0, which
- causes problems with re-calling getopt as programs generally don't
- know that. */
-
-int __getopt_initialized attribute_hidden;
-
-/* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
-
-static char *nextchar;
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';
-
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters.
-
- PERMUTE is the default. We permute the contents of ARGV as we scan,
- so that eventually all the non-options are at the end. This allows options
- to be given in any order, even with programs that were not written to
- expect this.
-
- RETURN_IN_ORDER is an option available to programs that were written
- to expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1.
- Using `-' as the first character of the list of option characters
- selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
-static enum
-{
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable. */
-static char *posixly_correct;
-
-#ifdef __GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
- because there are many ways it can cause trouble.
- On some systems, it contains special magic macros that don't work
- in GCC. */
-# include <string.h>
-# define my_index strchr
-#else
-
-# if HAVE_STRING_H
-# include <string.h>
-# else
-# include <strings.h>
-# endif
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-#ifndef getenv
-extern char *getenv ();
-#endif
-
-static char *
-my_index (str, chr)
- const char *str;
- int chr;
-{
- while (*str)
- {
- if (*str == chr)
- return (char *) str;
- str++;
- }
- return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
- If not using GCC, it is ok not to declare it. */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
- That was relevant to code that was here before. */
-# if (!defined __STDC__ || !__STDC__) && !defined strlen
-/* gcc with -traditional declares the built-in strlen to return int,
- and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
-# endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-
-/* Handle permutation of arguments. */
-
-/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first of them;
- `last_nonopt' is the index after the last of them. */
-
-static int first_nonopt;
-static int last_nonopt;
-
-#ifdef _LIBC
-/* Stored original parameters.
- XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
-extern int __libc_argc;
-extern char **__libc_argv;
-
-/* Bash 2.0 gives us an environment variable containing flags
- indicating ARGV elements that should not be considered arguments. */
-
-# ifdef USE_NONOPTION_FLAGS
-/* Defined in getopt_init.c */
-extern char *__getopt_nonoption_flags;
-
-static int nonoption_flags_max_len;
-static int nonoption_flags_len;
-# endif
-
-# ifdef USE_NONOPTION_FLAGS
-# define SWAP_FLAGS(ch1, ch2) \
- if (nonoption_flags_len > 0) \
- { \
- char __tmp = __getopt_nonoption_flags[ch1]; \
- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
- __getopt_nonoption_flags[ch2] = __tmp; \
- }
-# else
-# define SWAP_FLAGS(ch1, ch2)
-# endif
-#else /* !_LIBC */
-# define SWAP_FLAGS(ch1, ch2)
-#endif /* _LIBC */
-
-/* Exchange two adjacent subsequences of ARGV.
- One subsequence is elements [first_nonopt,last_nonopt)
- which contains all the non-options that have been skipped so far.
- The other is elements [last_nonopt,optind), which contains all
- the options processed since those non-options were skipped.
-
- `first_nonopt' and `last_nonopt' are relocated so that they describe
- the new indices of the non-options in ARGV after they are moved. */
-
-#if defined __STDC__ && __STDC__
-static void exchange (char **);
-#endif
-
-static void
-exchange (argv)
- char **argv;
-{
- int bottom = first_nonopt;
- int middle = last_nonopt;
- int top = optind;
- char *tem;
-
- /* Exchange the shorter segment with the far end of the longer segment.
- That puts the shorter segment into the right place.
- It leaves the longer segment in the right place overall,
- but it consists of two parts that need to be swapped next. */
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- /* First make sure the handling of the `__getopt_nonoption_flags'
- string can work normally. Our top argument must be in the range
- of the string. */
- if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
- {
- /* We must extend the array. The user plays games with us and
- presents new arguments. */
- char *new_str = malloc (top + 1);
- if (new_str == NULL)
- nonoption_flags_len = nonoption_flags_max_len = 0;
- else
- {
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
- '\0', top + 1 - nonoption_flags_max_len);
- nonoption_flags_max_len = top + 1;
- __getopt_nonoption_flags = new_str;
- }
- }
-#endif
-
- while (top > middle && middle > bottom)
- {
- if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
- else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- SWAP_FLAGS (bottom + i, middle + i);
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
- }
-
- /* Update records for the slots the non-options now occupy. */
-
- first_nonopt += (optind - last_nonopt);
- last_nonopt = optind;
-}
-
-/* Initialize the internal data when the first call is made. */
-
-#if defined __STDC__ && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
-#endif
-static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- /* Start processing options with ARGV-element 1 (since ARGV-element 0
- is the program name); the sequence of previously skipped
- non-option ARGV-elements is empty. */
-
- first_nonopt = last_nonopt = optind;
-
- nextchar = NULL;
-
- posixly_correct = getenv ("POSIXLY_CORRECT");
-
- /* Determine how to handle the ordering of options and nonoptions. */
-
- if (optstring[0] == '-')
- {
- ordering = RETURN_IN_ORDER;
- ++optstring;
- }
- else if (optstring[0] == '+')
- {
- ordering = REQUIRE_ORDER;
- ++optstring;
- }
- else if (posixly_correct != NULL)
- ordering = REQUIRE_ORDER;
- else
- ordering = PERMUTE;
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- if (posixly_correct == NULL
- && argc == __libc_argc && argv == __libc_argv)
- {
- if (nonoption_flags_max_len == 0)
- {
- if (__getopt_nonoption_flags == NULL
- || __getopt_nonoption_flags[0] == '\0')
- nonoption_flags_max_len = -1;
- else
- {
- const char *orig_str = __getopt_nonoption_flags;
- int len = nonoption_flags_max_len = strlen (orig_str);
- if (nonoption_flags_max_len < argc)
- nonoption_flags_max_len = argc;
- __getopt_nonoption_flags =
- (char *) malloc (nonoption_flags_max_len);
- if (__getopt_nonoption_flags == NULL)
- nonoption_flags_max_len = -1;
- else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', nonoption_flags_max_len - len);
- }
- }
- nonoption_flags_len = nonoption_flags_max_len;
- }
- else
- nonoption_flags_len = 0;
-#endif
-
- return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
- given in OPTSTRING.
-
- If an element of ARGV starts with '-', and is not exactly "-" or "--",
- then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
- is called repeatedly, it returns successively each of the option characters
- from each of the option elements.
-
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
- resume the scan with the following option character or ARGV-element.
-
- If there are no more option characters, `getopt' returns -1.
- Then `optind' is the index in ARGV of the first ARGV-element
- that is not an option. (The ARGV-elements have been permuted
- so that those that are not options now come last.)
-
- OPTSTRING is a string containing the legitimate option characters.
- If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
- zero, the error message is suppressed but we still return '?'.
-
- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
- wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
-
- If OPTSTRING starts with `-' or `+', it requests different methods of
- handling the non-option ARGV-elements.
- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
- Long-named options begin with `--' instead of `-'.
- Their names may be abbreviated as long as the abbreviation is unique
- or is an exact match for some defined option. If they have an
- argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
-
- The elements of ARGV aren't really const, because we permute them.
- But we pretend they're const in the prototype to be compatible
- with other systems.
-
- LONGOPTS is a vector of `struct option' terminated by an
- element containing a name which is zero.
-
- LONGIND returns the index in LONGOPT of the long-named option found.
- It is only valid when a long-named option has been found by the most
- recent call.
-
- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options. */
-
-int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
-{
- int print_errors = opterr;
- if (optstring[0] == ':')
- print_errors = 0;
-
- if (argc < 1)
- return -1;
-
- optarg = NULL;
-
- if (optind == 0 || !__getopt_initialized)
- {
- if (optind == 0)
- optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring);
- __getopt_initialized = 1;
- }
-
- /* Test whether ARGV[optind] points to a non-option argument.
- Either it does not have option syntax, or there is an environment flag
- from the shell indicating it is not an option. The later information
- is only used when the used in the GNU libc. */
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
- || (optind < nonoption_flags_len \
- && __getopt_nonoption_flags[optind] == '1'))
-#else
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
-#endif
-
- if (nextchar == NULL || *nextchar == '\0')
- {
- /* Advance to the next ARGV-element. */
-
- /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
- moved back by the user (who may also have changed the arguments). */
- if (last_nonopt > optind)
- last_nonopt = optind;
- if (first_nonopt > optind)
- first_nonopt = optind;
-
- if (ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (last_nonopt != optind)
- first_nonopt = optind;
-
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
-
- while (optind < argc && NONOPTION_P)
- optind++;
- last_nonopt = optind;
- }
-
- /* The special ARGV-element `--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
-
- if (optind != argc && !strcmp (argv[optind], "--"))
- {
- optind++;
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (first_nonopt == last_nonopt)
- first_nonopt = optind;
- last_nonopt = argc;
-
- optind = argc;
- }
-
- /* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
-
- if (optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (first_nonopt != last_nonopt)
- optind = first_nonopt;
- return -1;
- }
-
- /* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
-
- if (NONOPTION_P)
- {
- if (ordering == REQUIRE_ORDER)
- return -1;
- optarg = argv[optind++];
- return 1;
- }
-
- /* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- nextchar = (argv[optind] + 1
- + (longopts != NULL && argv[optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = -1;
- int option_index;
-
- for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar)
- == (unsigned int) strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else if (long_only
- || pfound->has_arg != p->has_arg
- || pfound->flag != p->flag
- || pfound->val != p->val)
- /* Second or later nonexact match found. */
- ambig = 1;
- }
-
- if (ambig && !exact)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]) >= 0)
- {
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]);
-#endif
- }
- nextchar += strlen (nextchar);
- optind++;
- optopt = 0;
- return '?';
- }
-
- if (pfound != NULL)
- {
- option_index = indfound;
- optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (argv[optind - 1][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("\
-%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0],
- pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#endif
- }
-
- nextchar += strlen (nextchar);
-
- optopt = pfound->val;
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]) >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
-#endif
- }
- nextchar += strlen (nextchar);
- optopt = pfound->val;
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[optind][1] == '-'
- || my_index (optstring, *nextchar) == NULL)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (argv[optind][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#endif
- }
- nextchar = (char *) "";
- optind++;
- optopt = 0;
- return '?';
- }
- }
-
- /* Look at and handle the next short option-character. */
-
- {
- char c = *nextchar++;
- char *temp = my_index (optstring, c);
-
- /* Increment `optind' when we start to process its last character. */
- if (*nextchar == '\0')
- ++optind;
-
- if (temp == NULL || c == ':')
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
- int n;
-#endif
-
- if (posixly_correct)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
-#endif
- }
- else
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (n >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#endif
- }
- optopt = c;
- return '?';
- }
- /* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = 0;
- int option_index;
-
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c) >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-#endif
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- return c;
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
-
- /* optarg is now the argument, see if it's in the
- table of longopts. */
-
- for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar) == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
- if (ambig && !exact)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]) >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]);
-#endif
- }
- nextchar += strlen (nextchar);
- optind++;
- return '?';
- }
- if (pfound != NULL)
- {
- option_index = indfound;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name) >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
-
- nextchar += strlen (nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]) >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
-#endif
- }
- nextchar += strlen (nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
- nextchar = NULL;
- return 'W'; /* Let the application handle it. */
- }
- if (temp[1] == ':')
- {
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- optind++;
- }
- else
- optarg = NULL;
- nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- if (__asprintf (&buf, _("\
-%s: option requires an argument -- %c\n"),
- argv[0], c) >= 0)
- {
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
- }
-#else
- fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-#endif
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
- nextchar = NULL;
- }
- }
- return c;
- }
-}
-
-int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0);
-}
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
-
- c = getopt (argc, argv, "abc:d:0123456789");
- if (c == -1)
- break;
-
- switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/pkgtools/pkg_install-info/files/getopt.h b/pkgtools/pkg_install-info/files/getopt.h
deleted file mode 100644
index 4d6adeea0d6..00000000000
--- a/pkgtools/pkg_install-info/files/getopt.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _GETOPT_H
-
-#ifndef __need_getopt
-# define _GETOPT_H 1
-#endif
-
-/* If __GNU_LIBRARY__ is not already defined, either we are being used
- standalone, or this is the first header included in the source file.
- If we are being used with glibc, we need to include <features.h>, but
- that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
- not defined, include <ctype.h>, which will pull in <features.h> for us
- if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
- doesn't flood the namespace with stuff the way some other headers do.) */
-#if !defined __GNU_LIBRARY__
-# include <ctype.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-#ifndef __need_getopt
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-# if (defined __STDC__ && __STDC__) || defined __cplusplus
- const char *name;
-# else
- char *name;
-# endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-# define no_argument 0
-# define required_argument 1
-# define optional_argument 2
-#endif /* need getopt */
-
-
-/* Get definitions and prototypes for functions to process the
- arguments in ARGV (ARGC of them, minus the program name) for
- options given in OPTS.
-
- Return the option character from OPTS just read. Return -1 when
- there are no more options. For unrecognized options, or options
- missing arguments, `optopt' is set to the option letter, and '?' is
- returned.
-
- The OPTS string is a list of characters which are recognized option
- letters, optionally followed by colons, specifying that that letter
- takes an argument, to be placed in `optarg'.
-
- If a letter in OPTS is followed by two colons, its argument is
- optional. This behavior is specific to the GNU `getopt'.
-
- The argument `--' causes premature termination of argument
- scanning, explicitly telling `getopt' that there are no more
- options.
-
- If OPTS begins with `--', then non-option arguments are treated as
- arguments to the option '\0'. This behavior is specific to the GNU
- `getopt'. */
-
-#if (defined __STDC__ && __STDC__) || defined __cplusplus
-# ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
-# else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-# endif /* __GNU_LIBRARY__ */
-
-# ifndef __need_getopt
-extern int getopt_long (int ___argc, char *const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind);
-extern int getopt_long_only (int ___argc, char *const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int ___argc, char *const *___argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only);
-# endif
-#else /* not __STDC__ */
-extern int getopt ();
-# ifndef __need_getopt
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-# endif
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Make sure we later can get all the definitions and declarations. */
-#undef __need_getopt
-
-#endif /* getopt.h */
diff --git a/pkgtools/pkg_install-info/files/getopt1.c b/pkgtools/pkg_install-info/files/getopt1.c
deleted file mode 100644
index d2759cefd80..00000000000
--- a/pkgtools/pkg_install-info/files/getopt1.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef _LIBC
-# include <getopt.h>
-#else
-# include "getopt.h"
-#endif
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
- If an option that starts with '-' (not '--') doesn't match a long option,
- but does match a short option, it is parsed as a short option
- instead. */
-
-int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
-}
-
-# ifdef _LIBC
-libc_hidden_def (getopt_long)
-libc_hidden_def (getopt_long_only)
-# endif
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
- int option_index = 0;
- static struct option long_options[] =
- {
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
- };
-
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/pkgtools/pkg_install-info/files/gettext.h b/pkgtools/pkg_install-info/files/gettext.h
deleted file mode 100644
index 8b262f4cfd7..00000000000
--- a/pkgtools/pkg_install-info/files/gettext.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifndef _LIBGETTEXT_H
-#define _LIBGETTEXT_H 1
-
-/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
-
-/* Get declarations of GNU message catalog functions. */
-# include <libintl.h>
-
-#else
-
-/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
- chokes if dcgettext is defined as a macro. So include it now, to make
- later inclusions of <locale.h> a NOP. We don't include <libintl.h>
- as well because people using "gettext.h" will not include <libintl.h>,
- and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
- is OK. */
-#if defined(__sun)
-# include <locale.h>
-#endif
-
-/* Disabled NLS.
- The casts to 'const char *' serve the purpose of producing warnings
- for invalid uses of the value returned from these functions.
- On pre-ANSI systems without 'const', the config.h file is supposed to
- contain "#define const". */
-# define gettext(Msgid) ((const char *) (Msgid))
-# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
-# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
-# define ngettext(Msgid1, Msgid2, N) \
- ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
- ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
- ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-# define textdomain(Domainname) ((const char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
-
-#endif
-
-/* A pseudo function call that serves as a marker for the automated
- extraction of messages, but does not call gettext(). The run-time
- translation is done at a different place in the code.
- The argument, String, should be a literal string. Concatenated strings
- and other string expressions won't work.
- The macro's expansion is not parenthesized, so that it is suitable as
- initializer for static 'char[]' or 'const char[]' variables. */
-#define gettext_noop(String) String
-
-#endif /* _LIBGETTEXT_H */
diff --git a/pkgtools/pkg_install-info/files/install-info.c b/pkgtools/pkg_install-info/files/install-info.c
deleted file mode 100644
index 39cc902d051..00000000000
--- a/pkgtools/pkg_install-info/files/install-info.c
+++ /dev/null
@@ -1,1643 +0,0 @@
-/* install-info -- create Info directory entry(ies) for an Info file.
- $Id: install-info.c,v 1.1.1.1 2003/06/09 22:16:15 seb Exp $
-
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 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 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.*/
-
-#include "system.h"
-#include <getopt.h>
-
-static char *progname = "install-info";
-
-struct line_data *findlines ();
-void insert_entry_here ();
-int compare_section_names (), compare_entries_text ();
-
-struct spec_entry;
-
-/* Data structures. */
-
-
-/* Record info about a single line from a file as read into core. */
-struct line_data
-{
- /* The start of the line. */
- char *start;
- /* The number of characters in the line,
- excluding the terminating newline. */
- int size;
- /* Vector containing pointers to the entries to add before this line.
- The vector is null-terminated. */
- struct spec_entry **add_entries_before;
- /* 1 means output any needed new sections before this line. */
- int add_sections_before;
- /* 1 means don't output this line. */
- int delete;
-};
-
-
-/* This is used for a list of the specified menu section names
- in which entries should be added. */
-struct spec_section
-{
- struct spec_section *next;
- char *name;
- /* 1 means we have not yet found an existing section with this name
- in the dir file--so we will need to add a new section. */
- int missing;
-};
-
-
-/* This is used for a list of the entries specified to be added. */
-struct spec_entry
-{
- struct spec_entry *next;
- char *text;
- int text_len;
- /* A pointer to the list of sections to which this entry should be
- added. */
- struct spec_section *entry_sections;
- /* A pointer to a section that is beyond the end of the chain whose
- head is pointed to by entry_sections. */
- struct spec_section *entry_sections_tail;
-};
-
-
-/* This is used for a list of nodes found by parsing the dir file. */
-struct node
-{
- struct node *next;
- /* The node name. */
- char *name;
- /* The line number of the line where the node starts.
- This is the line that contains control-underscore. */
- int start_line;
- /* The line number of the line where the node ends,
- which is the end of the file or where the next line starts. */
- int end_line;
- /* Start of first line in this node's menu
- (the line after the * Menu: line). */
- char *menu_start;
- /* The start of the chain of sections in this node's menu. */
- struct menu_section *sections;
- /* The last menu section in the chain. */
- struct menu_section *last_section;
-};
-
-
-/* This is used for a list of sections found in a node's menu.
- Each struct node has such a list in the sections field. */
-struct menu_section
-{
- struct menu_section *next;
- char *name;
- /* Line number of start of section. */
- int start_line;
- /* Line number of end of section. */
- int end_line;
-};
-
-/* This table defines all the long-named options, says whether they
- use an argument, and maps them into equivalent single-letter options. */
-
-struct option longopts[] =
-{
- { "delete", no_argument, NULL, 'r' },
- { "dir-file", required_argument, NULL, 'd' },
- { "entry", required_argument, NULL, 'e' },
- { "help", no_argument, NULL, 'h' },
- { "infodir", required_argument, NULL, 'D' },
- { "info-dir", required_argument, NULL, 'D' },
- { "info-file", required_argument, NULL, 'i' },
- { "item", required_argument, NULL, 'e' },
- { "quiet", no_argument, NULL, 'q' },
- { "remove", no_argument, NULL, 'r' },
- { "section", required_argument, NULL, 's' },
- { "version", no_argument, NULL, 'V' },
- { 0 }
-};
-
-/* Error message functions. */
-
-/* Print error message. S1 is printf control string, S2 and S3 args for it. */
-
-/* VARARGS1 */
-void
-error (s1, s2, s3)
- char *s1, *s2, *s3;
-{
- fprintf (stderr, "%s: ", progname);
- fprintf (stderr, s1, s2, s3);
- putc ('\n', stderr);
-}
-
-/* VARARGS1 */
-void
-warning (s1, s2, s3)
- char *s1, *s2, *s3;
-{
- fprintf (stderr, _("%s: warning: "), progname);
- fprintf (stderr, s1, s2, s3);
- putc ('\n', stderr);
-}
-
-/* Print error message and exit. */
-
-void
-fatal (s1, s2, s3)
- char *s1, *s2, *s3;
-{
- error (s1, s2, s3);
- xexit (1);
-}
-
-/* Memory allocation and string operations. */
-
-/* Like malloc but get fatal error if memory is exhausted. */
-void *
-xmalloc (size)
- unsigned int size;
-{
- extern void *malloc ();
- void *result = malloc (size);
- if (result == NULL)
- fatal (_("virtual memory exhausted"), 0, 0);
- return result;
-}
-
-/* Like realloc but get fatal error if memory is exhausted. */
-void *
-xrealloc (obj, size)
- void *obj;
- unsigned int size;
-{
- extern void *realloc ();
- void *result = realloc (obj, size);
- if (result == NULL)
- fatal (_("virtual memory exhausted"), 0, 0);
- return result;
-}
-
-/* Return a newly-allocated string
- whose contents concatenate those of S1, S2, S3. */
-char *
-concat (s1, s2, s3)
- char *s1, *s2, *s3;
-{
- int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
- char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
-
- strcpy (result, s1);
- strcpy (result + len1, s2);
- strcpy (result + len1 + len2, s3);
- *(result + len1 + len2 + len3) = 0;
-
- return result;
-}
-
-/* Return a string containing SIZE characters
- copied from starting at STRING. */
-
-char *
-copy_string (string, size)
- char *string;
- int size;
-{
- int i;
- char *copy = (char *) xmalloc (size + 1);
- for (i = 0; i < size; i++)
- copy[i] = string[i];
- copy[size] = 0;
- return copy;
-}
-
-/* Print fatal error message based on errno, with file name NAME. */
-
-void
-pfatal_with_name (name)
- char *name;
-{
- char *s = concat ("", strerror (errno), _(" for %s"));
- fatal (s, name, 0);
-}
-
-/* Given the full text of a menu entry, null terminated,
- return just the menu item name (copied). */
-
-char *
-extract_menu_item_name (item_text)
- char *item_text;
-{
- char *p;
-
- if (*item_text == '*')
- item_text++;
- while (*item_text == ' ')
- item_text++;
-
- p = item_text;
- while (*p && *p != ':') p++;
- return copy_string (item_text, p - item_text);
-}
-
-/* Given the full text of a menu entry, terminated by null or newline,
- return just the menu item file (copied). */
-
-char *
-extract_menu_file_name (item_text)
- char *item_text;
-{
- char *p = item_text;
-
- /* If we have text that looks like * ITEM: (FILE)NODE...,
- extract just FILE. Otherwise return "(none)". */
-
- if (*p == '*')
- p++;
- while (*p == ' ')
- p++;
-
- /* Skip to and past the colon. */
- while (*p && *p != '\n' && *p != ':') p++;
- if (*p == ':') p++;
-
- /* Skip past the open-paren. */
- while (1)
- {
- if (*p == '(')
- break;
- else if (*p == ' ' || *p == '\t')
- p++;
- else
- return "(none)";
- }
- p++;
-
- item_text = p;
-
- /* File name ends just before the close-paren. */
- while (*p && *p != '\n' && *p != ')') p++;
- if (*p != ')')
- return "(none)";
-
- return copy_string (item_text, p - item_text);
-}
-
-
-
-/* Return FNAME with any [.info][.gz] suffix removed. */
-
-static char *
-strip_info_suffix (fname)
- char *fname;
-{
- char *ret = xstrdup (fname);
- unsigned len = strlen (ret);
-
- if (len > 3 && FILENAME_CMP (ret + len - 3, ".gz") == 0)
- {
- len -= 3;
- ret[len] = 0;
- }
- else if (len > 4 && FILENAME_CMP (ret + len - 4, ".bz2") == 0)
- {
- len -= 4;
- ret[len] = 0;
- }
-
- if (len > 5 && FILENAME_CMP (ret + len - 5, ".info") == 0)
- {
- len -= 5;
- ret[len] = 0;
- }
- else if (len > 4 && FILENAME_CMP (ret + len - 4, ".inf") == 0)
- {
- len -= 4;
- ret[len] = 0;
- }
-#ifdef __MSDOS__
- else if (len > 4 && (FILENAME_CMP (ret + len - 4, ".inz") == 0
- || FILENAME_CMP (ret + len - 4, ".igz") == 0))
- {
- len -= 4;
- ret[len] = 0;
- }
-#endif /* __MSDOS__ */
-
- return ret;
-}
-
-
-/* Return true if ITEM matches NAME and is followed by TERM_CHAR. ITEM
- can also be followed by `.gz', `.info.gz', or `.info' (and then
- TERM_CHAR) and still match. */
-
-static int
-menu_item_equal (item, term_char, name)
- char *item;
- char term_char;
- char *name;
-{
- unsigned name_len = strlen (name);
- /* First, ITEM must actually match NAME (usually it won't). */
- int ret = strncasecmp (item, name, name_len) == 0;
- if (ret)
- {
- /* Then, `foobar' doesn't match `foo', so be sure we've got all of
- ITEM. The various suffixes should never actually appear in the
- dir file, but sometimes people put them in. */
- static char *suffixes[]
- = { "", ".info.gz", ".info", ".inf", ".gz",
-#ifdef __MSDOS__
- ".inz", ".igz",
-#endif
- NULL };
- unsigned i;
- ret = 0;
- for (i = 0; !ret && suffixes[i]; i++)
- {
- char *suffix = suffixes[i];
- unsigned suffix_len = strlen (suffix);
- ret = strncasecmp (item + name_len, suffix, suffix_len) == 0
- && item[name_len + suffix_len] == term_char;
- }
- }
-
- return ret;
-}
-
-
-
-void
-suggest_asking_for_help ()
-{
- fprintf (stderr, _("\tTry `%s --help' for a complete list of options.\n"),
- progname);
- xexit (1);
-}
-
-void
-print_help ()
-{
- printf (_("Usage: %s [OPTION]... [INFO-FILE [DIR-FILE]]\n\
-\n\
-Install or delete dir entries from INFO-FILE in the Info directory file\n\
-DIR-FILE.\n\
-\n\
-Options:\n\
- --delete delete existing entries for INFO-FILE from DIR-FILE;\n\
- don't insert any new entries.\n\
- --dir-file=NAME specify file name of Info directory file.\n\
- This is equivalent to using the DIR-FILE argument.\n\
- --entry=TEXT insert TEXT as an Info directory entry.\n\
- TEXT should have the form of an Info menu item line\n\
- plus zero or more extra lines starting with whitespace.\n\
- If you specify more than one entry, they are all added.\n\
- If you don't specify any entries, they are determined\n\
- from information in the Info file itself.\n\
- --help display this help and exit.\n\
- --info-file=FILE specify Info file to install in the directory.\n\
- This is equivalent to using the INFO-FILE argument.\n\
- --info-dir=DIR same as --dir-file=DIR/dir.\n\
- --item=TEXT same as --entry TEXT.\n\
- An Info directory entry is actually a menu item.\n\
- --quiet suppress warnings.\n\
- --remove same as --delete.\n\
- --section=SEC put this file's entries in section SEC of the directory.\n\
- If you specify more than one section, all the entries\n\
- are added in each of the sections.\n\
- If you don't specify any sections, they are determined\n\
- from information in the Info file itself.\n\
- --version display version information and exit.\n\
-"), progname);
-
- puts (_("\n\
-Email bug reports to bug-texinfo@gnu.org,\n\
-general questions and discussion to help-texinfo@gnu.org.\n\
-Texinfo home page: http://www.gnu.org/software/texinfo/"));
-}
-
-
-/* If DIRFILE does not exist, create a minimal one (or abort). If it
- already exists, do nothing. */
-
-void
-ensure_dirfile_exists (dirfile)
- char *dirfile;
-{
- int desc = open (dirfile, O_RDONLY);
- if (desc < 0 && errno == ENOENT)
- {
- FILE *f;
- char *readerr = strerror (errno);
- close (desc);
- f = fopen (dirfile, "w");
- if (f)
- {
- fprintf (f, _("This is the file .../info/dir, which contains the\n\
-topmost node of the Info hierarchy, called (dir)Top.\n\
-The first time you invoke Info you start off looking at this node.\n\
-\n\
-%s\tThis is the top of the INFO tree\n\
-\n\
- This (the Directory node) gives a menu of major topics.\n\
- Typing \"q\" exits, \"?\" lists all Info commands, \"d\" returns here,\n\
- \"h\" gives a primer for first-timers,\n\
- \"mEmacs<Return>\" visits the Emacs manual, etc.\n\
-\n\
- In Emacs, you can click mouse button 2 on a menu item or cross reference\n\
- to select it.\n\
-\n\
-%s\n\
-"), "File: dir,\tNode: Top", /* These keywords must not be translated. */
- "* Menu:"
-);
- if (fclose (f) < 0)
- pfatal_with_name (dirfile);
- }
- else
- {
- /* Didn't exist, but couldn't open for writing. */
- fprintf (stderr,
- _("%s: could not read (%s) and could not create (%s)\n"),
- dirfile, readerr, strerror (errno));
- xexit (1);
- }
- }
- else
- close (desc); /* It already existed, so fine. */
-}
-
-/* Open FILENAME and return the resulting stream pointer. If it doesn't
- exist, try FILENAME.gz. If that doesn't exist either, call
- CREATE_CALLBACK (with FILENAME as arg) to create it, if that is
- non-NULL. If still no luck, fatal error.
-
- If we do open it, return the actual name of the file opened in
- OPENED_FILENAME and the compress program to use to (de)compress it in
- COMPRESSION_PROGRAM. The compression program is determined by the
- magic number, not the filename. */
-
-FILE *
-open_possibly_compressed_file (filename, create_callback,
- opened_filename, compression_program, is_pipe)
- char *filename;
- void (*create_callback) ();
- char **opened_filename;
- char **compression_program;
- int *is_pipe;
-{
- char *local_opened_filename, *local_compression_program;
- int nread;
- char data[4];
- FILE *f;
-
- /* We let them pass NULL if they don't want this info, but it's easier
- to always determine it. */
- if (!opened_filename)
- opened_filename = &local_opened_filename;
-
- *opened_filename = filename;
- f = fopen (*opened_filename, FOPEN_RBIN);
- if (!f)
- {
- *opened_filename = concat (filename, ".gz", "");
- f = fopen (*opened_filename, FOPEN_RBIN);
- if (!f)
- {
- free (*opened_filename);
- *opened_filename = concat (filename, ".bz2", "");
- f = fopen (*opened_filename, FOPEN_RBIN);
- }
-
-#ifdef __MSDOS__
- if (!f)
- {
- free (*opened_filename);
- *opened_filename = concat (filename, ".igz", "");
- f = fopen (*opened_filename, FOPEN_RBIN);
- }
- if (!f)
- {
- free (*opened_filename);
- *opened_filename = concat (filename, ".inz", "");
- f = fopen (*opened_filename, FOPEN_RBIN);
- }
-#endif
- if (!f)
- {
- if (create_callback)
- { /* That didn't work either. Create the file if we can. */
- (*create_callback) (filename);
-
- /* And try opening it again. */
- free (*opened_filename);
- *opened_filename = filename;
- f = fopen (*opened_filename, FOPEN_RBIN);
- if (!f)
- pfatal_with_name (filename);
- }
- else
- pfatal_with_name (filename);
- }
- }
-
- /* Read first few bytes of file rather than relying on the filename.
- If the file is shorter than this it can't be usable anyway. */
- nread = fread (data, sizeof (data), 1, f);
- if (nread != 1)
- {
- /* Empty files don't set errno, so we get something like
- "install-info: No error for foo", which is confusing. */
- if (nread == 0)
- fatal (_("%s: empty file"), *opened_filename, 0);
- pfatal_with_name (*opened_filename);
- }
-
- if (!compression_program)
- compression_program = &local_compression_program;
-
- if (data[0] == '\x1f' && data[1] == '\x8b')
-#if STRIP_DOT_EXE
- /* An explicit .exe yields a better diagnostics from popen below
- if they don't have gzip installed. */
- *compression_program = "gzip.exe";
-#else
- *compression_program = "gzip";
-#endif
- else if(data[0] == 'B' && data[1] == 'Z' && data[2] == 'h')
-#ifndef STRIP_DOT_EXE
- *compression_program = "bzip2.exe";
-#else
- *compression_program = "bzip2";
-#endif
- else if(data[0] == 'B' && data[1] == 'Z' && data[2] == '0')
-#ifndef STRIP_DOT_EXE
- *compression_program = "bzip.exe";
-#else
- *compression_program = "bzip";
-#endif
- else
- *compression_program = NULL;
-
- if (*compression_program)
- { /* It's compressed, so fclose the file and then open a pipe. */
- char *command = concat (*compression_program," -cd <", *opened_filename);
- if (fclose (f) < 0)
- pfatal_with_name (*opened_filename);
- f = popen (command, "r");
- if (f)
- *is_pipe = 1;
- else
- pfatal_with_name (command);
- }
- else
- { /* It's a plain file, seek back over the magic bytes. */
- if (fseek (f, 0, 0) < 0)
- pfatal_with_name (*opened_filename);
-#if O_BINARY
- /* Since this is a text file, and we opened it in binary mode,
- switch back to text mode. */
- f = freopen (*opened_filename, "r", f);
-#endif
- *is_pipe = 0;
- }
-
- return f;
-}
-
-/* Read all of file FILENAME into memory and return the address of the
- data. Store the size of the data into SIZEP. If need be, uncompress
- (i.e., try FILENAME.gz et al. if FILENAME does not exist) and store
- the actual file name that was opened into OPENED_FILENAME (if it is
- non-NULL), and the companion compression program (if any, else NULL)
- into COMPRESSION_PROGRAM (if that is non-NULL). If trouble, do
- a fatal error. */
-
-char *
-readfile (filename, sizep, create_callback,
- opened_filename, compression_program)
- char *filename;
- int *sizep;
- void (*create_callback) ();
- char **opened_filename;
- char **compression_program;
-{
- char *real_name;
- FILE *f;
- int pipe_p;
- int filled = 0;
- int data_size = 8192;
- char *data = xmalloc (data_size);
-
- /* If they passed the space for the file name to return, use it. */
- f = open_possibly_compressed_file (filename, create_callback,
- opened_filename ? opened_filename
- : &real_name,
- compression_program, &pipe_p);
-
- for (;;)
- {
- int nread = fread (data + filled, 1, data_size - filled, f);
- if (nread < 0)
- pfatal_with_name (real_name);
- if (nread == 0)
- break;
-
- filled += nread;
- if (filled == data_size)
- {
- data_size += 65536;
- data = xrealloc (data, data_size);
- }
- }
-
- /* We'll end up wasting space if we're not passing the filename back
- and it is not just FILENAME, but so what. */
- /* We need to close the stream, since on some systems the pipe created
- by popen is simulated by a temporary file which only gets removed
- inside pclose. */
- if (pipe_p)
- pclose (f);
- else
- fclose (f);
-
- *sizep = filled;
- return data;
-}
-
-/* Output the old dir file, interpolating the new sections
- and/or new entries where appropriate. If COMPRESSION_PROGRAM is not
- null, pipe to it to create DIRFILE. Thus if we read dir.gz on input,
- we'll write dir.gz on output. */
-
-static void
-output_dirfile (dirfile, dir_nlines, dir_lines,
- n_entries_to_add, entries_to_add, input_sections,
- compression_program)
- char *dirfile;
- int dir_nlines;
- struct line_data *dir_lines;
- int n_entries_to_add;
- struct spec_entry *entries_to_add;
- struct spec_section *input_sections;
- char *compression_program;
-{
- int i;
- FILE *output;
-
- if (compression_program)
- {
- char *command = concat (compression_program, ">", dirfile);
- output = popen (command, "w");
- }
- else
- output = fopen (dirfile, "w");
-
- if (!output)
- {
- perror (dirfile);
- xexit (1);
- }
-
- for (i = 0; i <= dir_nlines; i++)
- {
- int j;
-
- /* If we decided to output some new entries before this line,
- output them now. */
- if (dir_lines[i].add_entries_before)
- for (j = 0; j < n_entries_to_add; j++)
- {
- struct spec_entry *this = dir_lines[i].add_entries_before[j];
- if (this == 0)
- break;
- fputs (this->text, output);
- }
- /* If we decided to add some sections here
- because there are no such sections in the file,
- output them now. */
- if (dir_lines[i].add_sections_before)
- {
- struct spec_section *spec;
- struct spec_section **sections;
- int n_sections = 0;
- struct spec_entry *entry;
- struct spec_entry **entries;
- int n_entries = 0;
-
- /* Count the sections and allocate a vector for all of them. */
- for (spec = input_sections; spec; spec = spec->next)
- n_sections++;
- sections = ((struct spec_section **)
- xmalloc (n_sections * sizeof (struct spec_section *)));
-
- /* Fill the vector SECTIONS with pointers to all the sections,
- and sort them. */
- j = 0;
- for (spec = input_sections; spec; spec = spec->next)
- sections[j++] = spec;
- qsort (sections, n_sections, sizeof (struct spec_section *),
- compare_section_names);
-
- /* Count the entries and allocate a vector for all of them. */
- for (entry = entries_to_add; entry; entry = entry->next)
- n_entries++;
- entries = ((struct spec_entry **)
- xmalloc (n_entries * sizeof (struct spec_entry *)));
-
- /* Fill the vector ENTRIES with pointers to all the sections,
- and sort them. */
- j = 0;
- for (entry = entries_to_add; entry; entry = entry->next)
- entries[j++] = entry;
- qsort (entries, n_entries, sizeof (struct spec_entry *),
- compare_entries_text);
-
- /* Generate the new sections in alphabetical order. In each
- new section, output all of the entries that belong to that
- section, in alphabetical order. */
- for (j = 0; j < n_sections; j++)
- {
- spec = sections[j];
- if (spec->missing)
- {
- int k;
-
- putc ('\n', output);
- fputs (spec->name, output);
- putc ('\n', output);
- for (k = 0; k < n_entries; k++)
- {
- struct spec_section *spec1;
- /* Did they at all want this entry to be put into
- this section? */
- entry = entries[k];
- for (spec1 = entry->entry_sections;
- spec1 && spec1 != entry->entry_sections_tail;
- spec1 = spec1->next)
- {
- if (!strcmp (spec1->name, spec->name))
- break;
- }
- if (spec1 && spec1 != entry->entry_sections_tail)
- fputs (entry->text, output);
- }
- }
- }
-
- free (entries);
- free (sections);
- }
-
- /* Output the original dir lines unless marked for deletion. */
- if (i < dir_nlines && !dir_lines[i].delete)
- {
- fwrite (dir_lines[i].start, 1, dir_lines[i].size, output);
- putc ('\n', output);
- }
- }
-
- /* Some systems, such as MS-DOS, simulate pipes with temporary files.
- On those systems, the compressor actually gets run inside pclose,
- so we must call pclose. */
- if (compression_program)
- pclose (output);
- else
- fclose (output);
-}
-
-/* Parse the input to find the section names and the entry names it
- specifies. Return the number of entries to add from this file. */
-int
-parse_input (lines, nlines, sections, entries)
- const struct line_data *lines;
- int nlines;
- struct spec_section **sections;
- struct spec_entry **entries;
-{
- int n_entries = 0;
- int prefix_length = strlen ("INFO-DIR-SECTION ");
- struct spec_section *head = *sections, *tail = NULL;
- int reset_tail = 0;
- char *start_of_this_entry = 0;
- int ignore_sections = *sections != 0;
- int ignore_entries = *entries != 0;
-
- int i;
-
- if (ignore_sections && ignore_entries)
- return 0;
-
- /* Loop here processing lines from the input file. Each
- INFO-DIR-SECTION entry is added to the SECTIONS linked list.
- Each START-INFO-DIR-ENTRY block is added to the ENTRIES linked
- list, and all its entries inherit the chain of SECTION entries
- defined by the last group of INFO-DIR-SECTION entries we have
- seen until that point. */
- for (i = 0; i < nlines; i++)
- {
- if (!ignore_sections
- && !strncmp ("INFO-DIR-SECTION ", lines[i].start, prefix_length))
- {
- struct spec_section *next
- = (struct spec_section *) xmalloc (sizeof (struct spec_section));
- next->name = copy_string (lines[i].start + prefix_length,
- lines[i].size - prefix_length);
- next->next = *sections;
- next->missing = 1;
- if (reset_tail)
- {
- tail = *sections;
- reset_tail = 0;
- }
- *sections = next;
- head = *sections;
- }
- /* If entries were specified explicitly with command options,
- ignore the entries in the input file. */
- else if (!ignore_entries)
- {
- if (!strncmp ("START-INFO-DIR-ENTRY", lines[i].start, lines[i].size)
- && sizeof ("START-INFO-DIR-ENTRY") - 1 == lines[i].size)
- {
- if (!*sections)
- {
- /* We found an entry, but didn't yet see any sections
- specified. Default to section "Miscellaneous". */
- *sections = (struct spec_section *)
- xmalloc (sizeof (struct spec_section));
- (*sections)->name = "Miscellaneous";
- (*sections)->next = 0;
- (*sections)->missing = 1;
- head = *sections;
- }
- /* Next time we see INFO-DIR-SECTION, we will reset the
- tail pointer. */
- reset_tail = 1;
-
- if (start_of_this_entry != 0)
- fatal (_("START-INFO-DIR-ENTRY without matching END-INFO-DIR-ENTRY"), 0, 0);
- start_of_this_entry = lines[i + 1].start;
- }
- else if (start_of_this_entry)
- {
- if ((!strncmp ("* ", lines[i].start, 2)
- && lines[i].start > start_of_this_entry)
- || (!strncmp ("END-INFO-DIR-ENTRY",
- lines[i].start, lines[i].size)
- && sizeof ("END-INFO-DIR-ENTRY") - 1 == lines[i].size))
- {
- /* We found an end of this entry. Allocate another
- entry, fill its data, and add it to the linked
- list. */
- struct spec_entry *next
- = (struct spec_entry *) xmalloc (sizeof (struct spec_entry));
- next->text
- = copy_string (start_of_this_entry,
- lines[i].start - start_of_this_entry);
- next->text_len = lines[i].start - start_of_this_entry;
- next->entry_sections = head;
- next->entry_sections_tail = tail;
- next->next = *entries;
- *entries = next;
- n_entries++;
- if (!strncmp ("END-INFO-DIR-ENTRY",
- lines[i].start, lines[i].size)
- && sizeof ("END-INFO-DIR-ENTRY") - 1 == lines[i].size)
- start_of_this_entry = 0;
- else
- start_of_this_entry = lines[i].start;
- }
- else if (!strncmp ("END-INFO-DIR-ENTRY",
- lines[i].start, lines[i].size)
- && sizeof ("END-INFO-DIR-ENTRY") - 1 == lines[i].size)
- fatal (_("END-INFO-DIR-ENTRY without matching START-INFO-DIR-ENTRY"), 0, 0);
- }
- }
- }
- if (start_of_this_entry != 0)
- fatal (_("START-INFO-DIR-ENTRY without matching END-INFO-DIR-ENTRY"),
- 0, 0);
-
- /* If we ignored the INFO-DIR-ENTRY directives, we need now go back
- and plug the names of all the sections we found into every
- element of the ENTRIES list. */
- if (ignore_entries && *entries)
- {
- struct spec_entry *entry;
-
- for (entry = *entries; entry; entry = entry->next)
- {
- entry->entry_sections = head;
- entry->entry_sections_tail = tail;
- }
- }
-
- return n_entries;
-}
-
-/* Parse the dir file whose basename is BASE_NAME. Find all the
- nodes, and their menus, and the sections of their menus. */
-int
-parse_dir_file (lines, nlines, nodes, base_name)
- struct line_data *lines;
- int nlines;
- struct node **nodes;
- const char *base_name;
-{
- int node_header_flag = 0;
- int something_deleted = 0;
- int i;
-
- *nodes = 0;
- for (i = 0; i < nlines; i++)
- {
- /* Parse node header lines. */
- if (node_header_flag)
- {
- int j, end;
- for (j = 0; j < lines[i].size; j++)
- /* Find the node name and store it in the `struct node'. */
- if (!strncmp ("Node:", lines[i].start + j, 5))
- {
- char *line = lines[i].start;
- /* Find the start of the node name. */
- j += 5;
- while (line[j] == ' ' || line[j] == '\t')
- j++;
- /* Find the end of the node name. */
- end = j;
- while (line[end] != 0 && line[end] != ',' && line[end] != '\n'
- && line[end] != '\t')
- end++;
- (*nodes)->name = copy_string (line + j, end - j);
- }
- node_header_flag = 0;
- }
-
- /* Notice the start of a node. */
- if (*lines[i].start == 037)
- {
- struct node *next = (struct node *) xmalloc (sizeof (struct node));
-
- next->next = *nodes;
- next->name = NULL;
- next->start_line = i;
- next->end_line = 0;
- next->menu_start = NULL;
- next->sections = NULL;
- next->last_section = NULL;
-
- if (*nodes != 0)
- (*nodes)->end_line = i;
- /* Fill in the end of the last menu section
- of the previous node. */
- if (*nodes != 0 && (*nodes)->last_section != 0)
- (*nodes)->last_section->end_line = i;
-
- *nodes = next;
-
- /* The following line is the header of this node;
- parse it. */
- node_header_flag = 1;
- }
-
- /* Notice the lines that start menus. */
- if (*nodes != 0 && !strncmp ("* Menu:", lines[i].start, 7))
- (*nodes)->menu_start = lines[i + 1].start;
-
- /* Notice sections in menus. */
- if (*nodes != 0
- && (*nodes)->menu_start != 0
- && *lines[i].start != '\n'
- && *lines[i].start != '*'
- && *lines[i].start != ' '
- && *lines[i].start != '\t')
- {
- /* Add this menu section to the node's list.
- This list grows in forward order. */
- struct menu_section *next
- = (struct menu_section *) xmalloc (sizeof (struct menu_section));
-
- next->start_line = i + 1;
- next->next = 0;
- next->end_line = 0;
- next->name = copy_string (lines[i].start, lines[i].size);
- if ((*nodes)->sections)
- {
- (*nodes)->last_section->next = next;
- (*nodes)->last_section->end_line = i;
- }
- else
- (*nodes)->sections = next;
- (*nodes)->last_section = next;
- }
-
- /* Check for an existing entry that should be deleted.
- Delete all entries which specify this file name. */
- if (*lines[i].start == '*')
- {
- char *q;
- char *p = lines[i].start;
-
- p++; /* skip * */
- while (*p == ' ') p++; /* ignore following spaces */
- q = p; /* remember this, it's the beginning of the menu item. */
-
- /* Read menu item. */
- while (*p != 0 && *p != ':')
- p++;
- p++; /* skip : */
-
- if (*p == ':')
- { /* XEmacs-style entry, as in * Mew::Messaging. */
- if (menu_item_equal (q, ':', base_name))
- {
- lines[i].delete = 1;
- something_deleted = 1;
- }
- }
- else
- { /* Emacs-style entry, as in * Emacs: (emacs). */
- while (*p == ' ') p++; /* skip spaces after : */
- if (*p == '(') /* if at parenthesized (FILENAME) */
- {
- p++;
- if (menu_item_equal (p, ')', base_name))
- {
- lines[i].delete = 1;
- something_deleted = 1;
- }
- }
- }
- }
-
- /* Treat lines that start with whitespace
- as continuations; if we are deleting an entry,
- delete all its continuations as well. */
- else if (i > 0 && (*lines[i].start == ' ' || *lines[i].start == '\t'))
- {
- lines[i].delete = lines[i - 1].delete;
- }
- }
-
- /* Finish the info about the end of the last node. */
- if (*nodes != 0)
- {
- (*nodes)->end_line = nlines;
- if ((*nodes)->last_section != 0)
- (*nodes)->last_section->end_line = nlines;
- }
-
- return something_deleted;
-}
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- char *opened_dirfilename;
- char *compression_program;
- char *infile_sans_info;
- char *infile = 0, *dirfile = 0;
- unsigned infilelen_sans_info;
-
- /* Record the text of the Info file, as a sequence of characters
- and as a sequence of lines. */
- char *input_data = NULL;
- int input_size = 0;
- struct line_data *input_lines = NULL;
- int input_nlines = 0;
-
- /* Record here the specified section names and directory entries. */
- struct spec_section *input_sections = NULL;
- struct spec_entry *entries_to_add = NULL;
- int n_entries_to_add = 0;
-
- /* Record the old text of the dir file, as plain characters,
- as lines, and as nodes. */
- char *dir_data;
- int dir_size;
- int dir_nlines;
- struct line_data *dir_lines;
- struct node *dir_nodes;
-
- /* Nonzero means --delete was specified (just delete existing entries). */
- int delete_flag = 0;
- int something_deleted = 0;
- /* Nonzero means -q was specified. */
- int quiet_flag = 0;
-
- int i;
-
-#ifdef HAVE_SETLOCALE
- /* Set locale via LC_ALL. */
- setlocale (LC_ALL, "");
-#endif
-
- /* Set the text message domain. */
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
-
- while (1)
- {
- int opt = getopt_long (argc, argv, "i:d:e:s:hHr", longopts, 0);
-
- if (opt == EOF)
- break;
-
- switch (opt)
- {
- case 0:
- /* If getopt returns 0, then it has already processed a
- long-named option. We should do nothing. */
- break;
-
- case 1:
- abort ();
-
- case 'd':
- if (dirfile)
- {
- fprintf (stderr, _("%s: Specify the Info directory only once.\n"),
- progname);
- suggest_asking_for_help ();
- }
- dirfile = optarg;
- break;
-
- case 'D':
- if (dirfile)
- {
- fprintf (stderr, _("%s: Specify the Info directory only once.\n"),
- progname);
- suggest_asking_for_help ();
- }
- dirfile = concat (optarg, "", "/dir");
- break;
-
- case 'e':
- {
- struct spec_entry *next
- = (struct spec_entry *) xmalloc (sizeof (struct spec_entry));
- int olen = strlen (optarg);
- if (! (*optarg != 0 && optarg[olen - 1] == '\n'))
- {
- optarg = concat (optarg, "\n", "");
- olen++;
- }
- next->text = optarg;
- next->text_len = olen;
- next->entry_sections = NULL;
- next->entry_sections_tail = NULL;
- next->next = entries_to_add;
- entries_to_add = next;
- n_entries_to_add++;
- }
- break;
-
- case 'h':
- case 'H':
- print_help ();
- xexit (0);
-
- case 'i':
- if (infile)
- {
- fprintf (stderr, _("%s: Specify the Info file only once.\n"),
- progname);
- suggest_asking_for_help ();
- }
- infile = optarg;
- break;
-
- case 'q':
- quiet_flag = 1;
- break;
-
- case 'r':
- delete_flag = 1;
- break;
-
- case 's':
- {
- struct spec_section *next
- = (struct spec_section *) xmalloc (sizeof (struct spec_section));
- next->name = optarg;
- next->next = input_sections;
- next->missing = 1;
- input_sections = next;
- }
- break;
-
- case 'V':
- printf ("install-info (GNU %s) %s\n", PACKAGE, VERSION);
- puts ("");
- printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
-There is NO warranty. You may redistribute this software\n\
-under the terms of the GNU General Public License.\n\
-For more information about these matters, see the files named COPYING.\n"),
- "2003");
- xexit (0);
-
- default:
- suggest_asking_for_help ();
- }
- }
-
- /* Interpret the non-option arguments as file names. */
- for (; optind < argc; ++optind)
- {
- if (infile == 0)
- infile = argv[optind];
- else if (dirfile == 0)
- dirfile = argv[optind];
- else
- error (_("excess command line argument `%s'"), argv[optind], 0);
- }
-
- if (!infile)
- fatal (_("No input file specified; try --help for more information."),
- 0, 0);
- if (!dirfile)
- fatal (_("No dir file specified; try --help for more information."), 0, 0);
-
- /* Read the Info file and parse it into lines, unless we're deleting. */
- if (!delete_flag)
- {
- input_data = readfile (infile, &input_size, NULL, NULL, NULL);
- input_lines = findlines (input_data, input_size, &input_nlines);
- }
-
- i = parse_input (input_lines, input_nlines,
- &input_sections, &entries_to_add);
- if (i > n_entries_to_add)
- n_entries_to_add = i;
-
- if (!delete_flag)
- {
- if (entries_to_add == 0)
- { /* No need to abort here, the original info file may not
- have the requisite Texinfo commands. This is not
- something an installer should have to correct (it's a
- problem for the maintainer), and there's no need to cause
- subsequent parts of `make install' to fail. */
- warning (_("no info dir entry in `%s'"), infile, 0);
- xexit (0);
- }
-
- /* If the entries came from the command-line arguments, their
- entry_sections pointers are not yet set. Walk the chain of
- the entries and for each entry update entry_sections to point
- to the head of the list of sections where this entry should
- be put. Note that all the entries specified on the command
- line get put into ALL the sections we've got, either from the
- Info file, or (under --section) from the command line,
- because in the loop below every entry inherits the entire
- chain of sections. */
- if (n_entries_to_add > 0 && entries_to_add->entry_sections == NULL)
- {
- struct spec_entry *ep;
-
- /* If we got no sections, default to "Miscellaneous". */
- if (input_sections == NULL)
- {
- input_sections = (struct spec_section *)
- xmalloc (sizeof (struct spec_section));
- input_sections->name = "Miscellaneous";
- input_sections->next = NULL;
- input_sections->missing = 1;
- }
- for (ep = entries_to_add; ep; ep = ep->next)
- ep->entry_sections = input_sections;
- }
- }
-
- /* Now read in the Info dir file. */
- dir_data = readfile (dirfile, &dir_size, ensure_dirfile_exists,
- &opened_dirfilename, &compression_program);
- dir_lines = findlines (dir_data, dir_size, &dir_nlines);
-
- /* We will be comparing the entries in the dir file against the
- current filename, so need to strip off any directory prefix and/or
- [.info][.gz] suffix. */
- {
- char *infile_basename = infile + strlen (infile);
-
- if (HAVE_DRIVE (infile))
- infile += 2; /* get past the drive spec X: */
-
- while (infile_basename > infile && !IS_SLASH (infile_basename[-1]))
- infile_basename--;
-
- infile_sans_info = strip_info_suffix (infile_basename);
- infilelen_sans_info = strlen (infile_sans_info);
- }
-
- something_deleted
- = parse_dir_file (dir_lines, dir_nlines, &dir_nodes, infile_sans_info);
-
- /* Decide where to add the new entries (unless --delete was used).
- Find the menu sections to add them in.
- In each section, find the proper alphabetical place to add
- each of the entries. */
-
- if (!delete_flag)
- {
- struct node *node;
- struct menu_section *section;
- struct spec_section *spec;
-
- for (node = dir_nodes; node; node = node->next)
- for (section = node->sections; section; section = section->next)
- {
- for (i = section->end_line; i > section->start_line; i--)
- if (dir_lines[i - 1].size != 0)
- break;
- section->end_line = i;
-
- for (spec = input_sections; spec; spec = spec->next)
- if (!strcmp (spec->name, section->name))
- break;
- if (spec)
- {
- int add_at_line = section->end_line;
- struct spec_entry *entry;
- /* Say we have found at least one section with this name,
- so we need not add such a section. */
- spec->missing = 0;
- /* For each entry, find the right place in this section
- to add it. */
- for (entry = entries_to_add; entry; entry = entry->next)
- {
- /* Did they at all want this entry to be put into
- this section? */
- for (spec = entry->entry_sections;
- spec && spec != entry->entry_sections_tail;
- spec = spec->next)
- {
- if (!strcmp (spec->name, section->name))
- break;
- }
- if (!spec || spec == entry->entry_sections_tail)
- continue;
-
- /* Subtract one because dir_lines is zero-based,
- but the `end_line' and `start_line' members are
- one-based. */
- for (i = section->end_line - 1;
- i >= section->start_line - 1; i--)
- {
- /* If an entry exists with the same name,
- and was not marked for deletion
- (which means it is for some other file),
- we are in trouble. */
- if (dir_lines[i].start[0] == '*'
- && menu_line_equal (entry->text, entry->text_len,
- dir_lines[i].start,
- dir_lines[i].size)
- && !dir_lines[i].delete)
- fatal (_("menu item `%s' already exists, for file `%s'"),
- extract_menu_item_name (entry->text),
- extract_menu_file_name (dir_lines[i].start));
- if (dir_lines[i].start[0] == '*'
- && menu_line_lessp (entry->text, entry->text_len,
- dir_lines[i].start,
- dir_lines[i].size))
- add_at_line = i;
- }
- insert_entry_here (entry, add_at_line,
- dir_lines, n_entries_to_add);
- }
- }
- }
-
- /* Mark the end of the Top node as the place to add any
- new sections that are needed. */
- for (node = dir_nodes; node; node = node->next)
- if (node->name && strcmp (node->name, "Top") == 0)
- dir_lines[node->end_line].add_sections_before = 1;
- }
-
- if (delete_flag && !something_deleted && !quiet_flag)
- warning (_("no entries found for `%s'; nothing deleted"), infile, 0);
-
- output_dirfile (opened_dirfilename, dir_nlines, dir_lines, n_entries_to_add,
- entries_to_add, input_sections, compression_program);
-
- xexit (0);
-}
-
-/* Divide the text at DATA (of SIZE bytes) into lines.
- Return a vector of struct line_data describing the lines.
- Store the length of that vector into *NLINESP. */
-
-struct line_data *
-findlines (data, size, nlinesp)
- char *data;
- int size;
- int *nlinesp;
-{
- int i;
- int lineflag = 1;
- int lines_allocated = 511;
- int filled = 0;
- struct line_data *lines
- = xmalloc ((lines_allocated + 1) * sizeof (struct line_data));
-
- for (i = 0; i < size; i++)
- {
- if (lineflag)
- {
- if (filled == lines_allocated)
- {
- /* try to keep things somewhat page-aligned */
- lines_allocated = ((lines_allocated + 1) * 2) - 1;
- lines = xrealloc (lines, (lines_allocated + 1)
- * sizeof (struct line_data));
- }
- lines[filled].start = &data[i];
- lines[filled].add_entries_before = 0;
- lines[filled].add_sections_before = 0;
- lines[filled].delete = 0;
- if (filled > 0)
- lines[filled - 1].size
- = lines[filled].start - lines[filled - 1].start - 1;
- filled++;
- }
- lineflag = (data[i] == '\n');
- }
- if (filled > 0)
- lines[filled - 1].size = &data[i] - lines[filled - 1].start - lineflag;
-
- /* Do not leave garbage in the last element. */
- lines[filled].start = NULL;
- lines[filled].add_entries_before = NULL;
- lines[filled].add_sections_before = 0;
- lines[filled].delete = 0;
- lines[filled].size = 0;
-
- *nlinesp = filled;
- return lines;
-}
-
-/* Compare the menu item names in LINE1 (line length LEN1)
- and LINE2 (line length LEN2). Return 1 if the item name
- in LINE1 is less, 0 otherwise. */
-
-int
-menu_line_lessp (line1, len1, line2, len2)
- char *line1;
- int len1;
- char *line2;
- int len2;
-{
- int minlen = (len1 < len2 ? len1 : len2);
- int i;
-
- for (i = 0; i < minlen; i++)
- {
- /* If one item name is a prefix of the other,
- the former one is less. */
- if (line1[i] == ':' && line2[i] != ':')
- return 1;
- if (line2[i] == ':' && line1[i] != ':')
- return 0;
- /* If they both continue and differ, one is less. */
- if (line1[i] < line2[i])
- return 1;
- if (line1[i] > line2[i])
- return 0;
- }
- /* With a properly formatted dir file,
- we can only get here if the item names are equal. */
- return 0;
-}
-
-/* Compare the menu item names in LINE1 (line length LEN1)
- and LINE2 (line length LEN2). Return 1 if the item names are equal,
- 0 otherwise. */
-
-int
-menu_line_equal (line1, len1, line2, len2)
- char *line1;
- int len1;
- char *line2;
- int len2;
-{
- int minlen = (len1 < len2 ? len1 : len2);
- int i;
-
- for (i = 0; i < minlen; i++)
- {
- /* If both item names end here, they are equal. */
- if (line1[i] == ':' && line2[i] == ':')
- return 1;
- /* If they both continue and differ, one is less. */
- if (line1[i] != line2[i])
- return 0;
- }
- /* With a properly formatted dir file,
- we can only get here if the item names are equal. */
- return 1;
-}
-
-/* This is the comparison function for qsort
- for a vector of pointers to struct spec_section.
- Compare the section names. */
-
-int
-compare_section_names (sec1, sec2)
- struct spec_section **sec1, **sec2;
-{
- char *name1 = (*sec1)->name;
- char *name2 = (*sec2)->name;
- return strcmp (name1, name2);
-}
-
-/* This is the comparison function for qsort
- for a vector of pointers to struct spec_entry.
- Compare the entries' text. */
-
-int
-compare_entries_text (entry1, entry2)
- struct spec_entry **entry1, **entry2;
-{
- char *text1 = (*entry1)->text;
- char *text2 = (*entry2)->text;
- char *colon1 = strchr (text1, ':');
- char *colon2 = strchr (text2, ':');
- int len1, len2;
-
- if (!colon1)
- len1 = strlen (text1);
- else
- len1 = colon1 - text1;
- if (!colon2)
- len2 = strlen (text2);
- else
- len2 = colon2 - text2;
- return strncmp (text1, text2, len1 <= len2 ? len1 : len2);
-}
-
-/* Insert ENTRY into the add_entries_before vector
- for line number LINE_NUMBER of the dir file.
- DIR_LINES and N_ENTRIES carry information from like-named variables
- in main. */
-
-void
-insert_entry_here (entry, line_number, dir_lines, n_entries)
- struct spec_entry *entry;
- int line_number;
- struct line_data *dir_lines;
- int n_entries;
-{
- int i, j;
-
- if (dir_lines[line_number].add_entries_before == 0)
- {
- dir_lines[line_number].add_entries_before
- = (struct spec_entry **) xmalloc (n_entries * sizeof (struct spec_entry *));
- for (i = 0; i < n_entries; i++)
- dir_lines[line_number].add_entries_before[i] = 0;
- }
-
- /* Find the place where this entry belongs. If there are already
- several entries to add before LINE_NUMBER, make sure they are in
- alphabetical order. */
- for (i = 0; i < n_entries; i++)
- if (dir_lines[line_number].add_entries_before[i] == 0
- || menu_line_lessp (entry->text, strlen (entry->text),
- dir_lines[line_number].add_entries_before[i]->text,
- strlen (dir_lines[line_number].add_entries_before[i]->text)))
- break;
-
- if (i == n_entries)
- abort ();
-
- /* If we need to plug ENTRY into the middle of the
- ADD_ENTRIES_BEFORE array, move the entries which should be output
- after this one down one notch, before adding a new one. */
- if (dir_lines[line_number].add_entries_before[i] != 0)
- for (j = n_entries - 1; j > i; j--)
- dir_lines[line_number].add_entries_before[j]
- = dir_lines[line_number].add_entries_before[j - 1];
-
- dir_lines[line_number].add_entries_before[i] = entry;
-}
diff --git a/pkgtools/pkg_install-info/files/strcasecmp.c b/pkgtools/pkg_install-info/files/strcasecmp.c
deleted file mode 100644
index ae7601de0fc..00000000000
--- a/pkgtools/pkg_install-info/files/strcasecmp.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* strcasecmp.c -- case insensitive string comparator
- Copyright (C) 1998, 1999 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef LENGTH_LIMIT
-# define STRXCASECMP_FUNCTION strncasecmp
-# define STRXCASECMP_DECLARE_N , size_t n
-# define LENGTH_LIMIT_EXPR(Expr) Expr
-#else
-# define STRXCASECMP_FUNCTION strcasecmp
-# define STRXCASECMP_DECLARE_N /* empty */
-# define LENGTH_LIMIT_EXPR(Expr) 0
-#endif
-
-#include <sys/types.h>
-#include <ctype.h>
-
-#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
-
-/* Compare {{no more than N characters of }}strings S1 and S2,
- ignoring case, returning less than, equal to or
- greater than zero if S1 is lexicographically less
- than, equal to or greater than S2. */
-
-int
-STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
-{
- register const unsigned char *p1 = (const unsigned char *) s1;
- register const unsigned char *p2 = (const unsigned char *) s2;
- unsigned char c1, c2;
-
- if (p1 == p2 || LENGTH_LIMIT_EXPR (n == 0))
- return 0;
-
- do
- {
- c1 = TOLOWER (*p1);
- c2 = TOLOWER (*p2);
-
- if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
- break;
-
- ++p1;
- ++p2;
- }
- while (c1 == c2);
-
- return c1 - c2;
-}
diff --git a/pkgtools/pkg_install-info/files/strdup.c b/pkgtools/pkg_install-info/files/strdup.c
deleted file mode 100644
index 5aa09a652c3..00000000000
--- a/pkgtools/pkg_install-info/files/strdup.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 1991, 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined _LIBC || defined STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-char *malloc ();
-char *memcpy ();
-#endif
-
-#undef __strdup
-#undef strdup
-
-#ifndef weak_alias
-# define __strdup strdup
-#endif
-
-/* Duplicate S, returning an identical malloc'd string. */
-char *
-__strdup (const char *s)
-{
- size_t len = strlen (s) + 1;
- void *new = malloc (len);
-
- if (new == NULL)
- return NULL;
-
- return (char *) memcpy (new, s, len);
-}
-#ifdef libc_hidden_def
-libc_hidden_def (__strdup)
-#endif
-#ifdef weak_alias
-weak_alias (__strdup, strdup)
-#endif
diff --git a/pkgtools/pkg_install-info/files/strerror.c b/pkgtools/pkg_install-info/files/strerror.c
deleted file mode 100644
index 5dba4d97537..00000000000
--- a/pkgtools/pkg_install-info/files/strerror.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* strerror.c --- ANSI C compatible system error routine
-
- Copyright (C) 1986, 1988, 1989, 1991, 2002 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if 0
-# include <stdio.h>
-#endif
-
-extern int sys_nerr;
-extern char *sys_errlist[];
-
-char *
-strerror(n)
-int n;
-{
- static char mesg[30];
-
- if (n < 0 || n >= sys_nerr) {
- sprintf(mesg, "Unknown error (%d)", n);
- return mesg;
- } else
- return sys_errlist[n];
-}
diff --git a/pkgtools/pkg_install-info/files/strncasecmp.c b/pkgtools/pkg_install-info/files/strncasecmp.c
deleted file mode 100644
index 68d95aacc0f..00000000000
--- a/pkgtools/pkg_install-info/files/strncasecmp.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LENGTH_LIMIT
-#include "strcasecmp.c"
diff --git a/pkgtools/pkg_install-info/files/system.h b/pkgtools/pkg_install-info/files/system.h
deleted file mode 100644
index 71f70534fd5..00000000000
--- a/pkgtools/pkg_install-info/files/system.h
+++ /dev/null
@@ -1,261 +0,0 @@
-/* system.h: system-dependent declarations; include this first.
- $Id: system.h,v 1.1.1.1 2003/06/09 22:16:11 seb Exp $
-
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef TEXINFO_SYSTEM_H
-#define TEXINFO_SYSTEM_H
-
-#define _GNU_SOURCE
-
-#include <config.h>
-
-#ifdef MIKTEX
-#include <gnu-miktex.h>
-#define S_ISDIR(x) ((x)&_S_IFDIR)
-#else
-/* MiKTeX defines substring() in a separate DLL, where it has its
- own __declspec declaration. We don't want to try to duplicate
- this Microsoft-ism here. */
-extern char *substring ();
-#endif
-
-/* <unistd.h> should be included before any preprocessor test
- of _POSIX_VERSION. */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <ctype.h>
-
-/* All systems nowadays probably have these functions, but ... */
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
-#endif
-#ifndef HAVE_SETLOCALE
-#define setlocale(category,locale) /* empty */
-#endif
-
-/* For gettext (NLS). */
-#define const
-#include "gettext.h"
-#undef const
-
-#define _(String) gettext (String)
-#define N_(String) (String)
-
-#ifndef HAVE_LC_MESSAGES
-#define LC_MESSAGES (-1)
-#endif
-
-#ifdef STDC_HEADERS
-#define getopt system_getopt
-#include <stdlib.h>
-#undef getopt
-#else
-extern char *getenv ();
-#endif
-
-/* Don't use bcopy! Use memmove if source and destination may overlap,
- memcpy otherwise. */
-#ifdef HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#else
-# include <strings.h>
-char *memchr ();
-#endif
-
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-#ifdef VMS
-#include <perror.h>
-#endif
-
-#ifndef HAVE_DECL_STRERROR
-extern char *strerror ();
-#endif
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifndef PATH_MAX
-#ifndef _POSIX_PATH_MAX
-# define _POSIX_PATH_MAX 255
-#endif
-#define PATH_MAX _POSIX_PATH_MAX
-#endif
-
-#ifndef HAVE_DECL_STRCASECMP
-extern int strcasecmp ();
-#endif
-
-#ifndef HAVE_DECL_STRNCASECMP
-extern int strncasecmp ();
-#endif
-
-#ifndef HAVE_DECL_STRCOLL
-extern int strcoll ();
-#endif
-
-#include <sys/stat.h>
-#if STAT_MACROS_BROKEN
-# undef S_ISDIR
-#endif
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
-#endif
-
-#ifdef HAVE_SYS_FILE_H
-#include <sys/file.h>
-#endif /* HAVE_SYS_FILE_H */
-
-#ifndef O_RDONLY
-/* Since <fcntl.h> is POSIX, prefer that to <sys/fcntl.h>.
- This also avoids some useless warnings on (at least) Linux. */
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#else /* not HAVE_FCNTL_H */
-#ifdef HAVE_SYS_FCNTL_H
-#include <sys/fcntl.h>
-#endif /* not HAVE_SYS_FCNTL_H */
-#endif /* not HAVE_FCNTL_H */
-#endif /* not O_RDONLY */
-
-/* MS-DOS and similar non-Posix systems have some peculiarities:
- - they distinguish between binary and text files;
- - they use both `/' and `\\' as directory separator in file names;
- - they can have a drive letter X: prepended to a file name;
- - they have a separate root directory on each drive;
- - their filesystems are case-insensitive;
- - directories in environment variables (like INFOPATH) are separated
- by `;' rather than `:';
- - text files can have their lines ended either with \n or with \r\n pairs;
- These are all parameterized here except the last, which is
- handled by the source code as appropriate (mostly, in info/). */
-#ifndef O_BINARY
-# ifdef _O_BINARY
-# define O_BINARY _O_BINARY
-# else
-# define O_BINARY 0
-# endif
-#endif /* O_BINARY */
-
-/* We'd like to take advantage of _doprnt if it's around, a la error.c,
- but then we'd have no VA_SPRINTF. */
-#if HAVE_VPRINTF
-# if __STDC__
-# include <stdarg.h>
-# define VA_START(args, lastarg) va_start(args, lastarg)
-# else
-# include <varargs.h>
-# define VA_START(args, lastarg) va_start(args)
-# endif
-# define VA_FPRINTF(file, fmt, ap) vfprintf (file, fmt, ap)
-# define VA_SPRINTF(str, fmt, ap) vsprintf (str, fmt, ap)
-#else /* not HAVE_VPRINTF */
-# define VA_START(args, lastarg)
-# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
-# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
-# define va_end(args)
-#endif
-
-#if O_BINARY
-# ifdef HAVE_IO_H
-# include <io.h>
-# endif
-# ifdef __MSDOS__
-# include <limits.h>
-# ifdef __DJGPP__
-# define HAVE_LONG_FILENAMES(dir) (pathconf (dir, _PC_NAME_MAX) > 12)
-# define NULL_DEVICE "/dev/null"
-# define DEFAULT_INFOPATH "c:/djgpp/info;/usr/local/info;/usr/info;."
-# else /* !__DJGPP__ */
-# define HAVE_LONG_FILENAMES(dir) (0)
-# define NULL_DEVICE "NUL"
-# endif /* !__DJGPP__ */
-# define SET_SCREEN_SIZE_HELPER terminal_prep_terminal()
-# define DEFAULT_INFO_PRINT_COMMAND ">PRN"
-# else /* !__MSDOS__ */
-# define setmode(f,m) _setmode(f,m)
-# define HAVE_LONG_FILENAMES(dir) (1)
-# define NULL_DEVICE "NUL"
-# endif /* !__MSDOS__ */
-# define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0)
-# define FOPEN_RBIN "rb"
-# define FOPEN_WBIN "wb"
-# define IS_SLASH(c) ((c) == '/' || (c) == '\\')
-# define HAVE_DRIVE(n) ((n)[0] && (n)[1] == ':')
-# define IS_ABSOLUTE(n) (IS_SLASH((n)[0]) || ((n)[0] && (n)[1] == ':'))
-# define FILENAME_CMP strcasecmp
-# define FILENAME_CMPN strncasecmp
-# define PATH_SEP ";"
-# define STRIP_DOT_EXE 1
-# define DEFAULT_TMPDIR "c:/"
-# define PIPE_USE_FORK 0
-#else /* not O_BINARY */
-# define SET_BINARY(f) (void)0
-# define FOPEN_RBIN "r"
-# define FOPEN_WBIN "w"
-# define IS_SLASH(c) ((c) == '/')
-# define HAVE_DRIVE(n) (0)
-# define IS_ABSOLUTE(n) ((n)[0] == '/')
-# define FILENAME_CMP strcmp
-# define FILENAME_CMPN strncmp
-# define HAVE_LONG_FILENAMES(dir) (1)
-# define PATH_SEP ":"
-# define STRIP_DOT_EXE 0
-# ifdef VMS
-# define DEFAULT_TMPDIR "sys$scratch:"
-# else
-# define DEFAULT_TMPDIR "/tmp/"
-# endif
-# define NULL_DEVICE "/dev/null"
-# define PIPE_USE_FORK 1
-#endif /* not O_BINARY */
-
-/* DJGPP supports /dev/null, which is okay for Unix aficionados,
- shell scripts and Makefiles, but interactive DOS die-hards
- would probably want to have NUL as well. */
-#ifdef __DJGPP__
-# define ALSO_NULL_DEVICE "NUL"
-#else
-# define ALSO_NULL_DEVICE ""
-#endif
-
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-/* Some systems don't declare this function in pwd.h. */
-struct passwd *getpwnam ();
-
-/* Our library routines not included in any system library. */
-extern void *xmalloc (), *xrealloc ();
-extern char *xstrdup ();
-extern void xexit ();
-
-/* For convenience. */
-#define STREQ(s1,s2) (strcmp (s1, s2) == 0)
-
-#endif /* TEXINFO_SYSTEM_H */
diff --git a/pkgtools/pkg_install-info/files/xalloc.h b/pkgtools/pkg_install-info/files/xalloc.h
deleted file mode 100644
index 098a6c2e073..00000000000
--- a/pkgtools/pkg_install-info/files/xalloc.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-1998, 1999, 2000 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef XALLOC_H_
-# define XALLOC_H_
-
-# ifndef PARAMS
-# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
-# endif
-# endif
-
-# ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
-# define __attribute__(x)
-# endif
-# endif
-
-# ifndef ATTRIBUTE_NORETURN
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-# endif
-
-/* Exit value when the requested amount of memory is not available.
- It is initialized to EXIT_FAILURE, but the caller may set it to
- some other value. */
-extern int xalloc_exit_failure;
-
-/* If this pointer is non-zero, run the specified function upon each
- allocation failure. It is initialized to zero. */
-extern void (*xalloc_fail_func) PARAMS ((void));
-
-/* If XALLOC_FAIL_FUNC is undefined or a function that returns, this
- message is output. It is translated via gettext.
- Its value is "memory exhausted". */
-extern char const xalloc_msg_memory_exhausted[];
-
-/* This function is always triggered when memory is exhausted. It is
- in charge of honoring the three previous items. This is the
- function to call when one wants the program to die because of a
- memory allocation failure. */
-extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN;
-
-void *xmalloc PARAMS ((size_t n));
-void *xcalloc PARAMS ((size_t n, size_t s));
-void *xrealloc PARAMS ((void *p, size_t n));
-char *xstrdup PARAMS ((const char *str));
-
-# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
-# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
-# define XREALLOC(Ptr, Type, N_items) \
- ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
-
-/* Declare and alloc memory for VAR of type TYPE. */
-# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
-
-/* Free VAR only if non NULL. */
-# define XFREE(Var) \
- do { \
- if (Var) \
- free (Var); \
- } while (0)
-
-/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
-# define CCLONE(Src, Num) \
- (memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
-
-/* Return a malloc'ed copy of SRC. */
-# define CLONE(Src) CCLONE (Src, 1)
-
-
-#endif /* !XALLOC_H_ */
diff --git a/pkgtools/pkg_install-info/files/xexit.c b/pkgtools/pkg_install-info/files/xexit.c
deleted file mode 100644
index 515e40b9a1a..00000000000
--- a/pkgtools/pkg_install-info/files/xexit.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* xexit.c -- exit with attention to return values and closing stdout.
- $Id: xexit.c,v 1.1.1.1 2003/06/09 22:16:11 seb Exp $
-
- Copyright (C) 1999 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, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "system.h"
-
-/* SunOS 4.1.1 gets STDC_HEADERS defined, but it doesn't provide
- EXIT_FAILURE. So far no system has defined one of EXIT_FAILURE and
- EXIT_SUCCESS without the other. */
-#ifdef EXIT_SUCCESS
- /* The following test is to work around the gross typo in
- systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE
- is defined to 0, not 1. */
-# if !EXIT_FAILURE
-# undef EXIT_FAILURE
-# define EXIT_FAILURE 1
-# endif
-#else /* not EXIT_SUCCESS */
-# ifdef VMS /* these values suppress some messages; from gnuplot */
-# define EXIT_SUCCESS 1
-# define EXIT_FAILURE 0x10000002
-# else /* not VMS */
-# define EXIT_SUCCESS 0
-# define EXIT_FAILURE 1
-# endif /* not VMS */
-#endif /* not EXIT_SUCCESS */
-
-
-/* Flush stdout first, exit if failure. Otherwise, if EXIT_STATUS is
- zero, exit successfully, else unsuccessfully. */
-
-void
-xexit (exit_status)
- int exit_status;
-{
- if (ferror (stdout))
- {
- fprintf (stderr, "ferror on stdout");
- exit_status = 1;
- }
- else if (fflush (stdout) != 0)
- {
- fprintf (stderr, "fflush error on stdout");
- exit_status = 1;
- }
-
- exit_status = exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
-
- exit (exit_status);
-}
-
-
-/* Why do we care about stdout you may ask? Here's why, from Jim
- Meyering in the lib/closeout.c file. */
-
-/* If a program writes *anything* to stdout, that program should close
- stdout and make sure that the close succeeds. Otherwise, suppose that
- you go to the extreme of checking the return status of every function
- that does an explicit write to stdout. The last printf can succeed in
- writing to the internal stream buffer, and yet the fclose(stdout) could
- still fail (due e.g., to a disk full error) when it tries to write
- out that buffered data. Thus, you would be left with an incomplete
- output file and the offending program would exit successfully.
-
- Besides, it's wasteful to check the return value from every call
- that writes to stdout -- just let the internal stream state record
- the failure. That's what the ferror test is checking below.
-
- It's important to detect such failures and exit nonzero because many
- tools (most notably `make' and other build-management systems) depend
- on being able to detect failure in other tools via their exit status. */
diff --git a/pkgtools/pkg_install-info/files/xstrdup.c b/pkgtools/pkg_install-info/files/xstrdup.c
deleted file mode 100644
index cb1efa8c20c..00000000000
--- a/pkgtools/pkg_install-info/files/xstrdup.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* xstrdup.c -- copy a string with out of memory checking
- Copyright (C) 1990, 1996, 1998, 2001 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, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
-#include <sys/types.h>
-
-#include "xalloc.h"
-
-/* Return a newly allocated copy of STRING. */
-
-char *
-xstrdup (const char *string)
-{
- return strcpy (xmalloc (strlen (string) + 1), string);
-}
diff --git a/pkgtools/pkg_install-info/hacks.mk b/pkgtools/pkg_install-info/hacks.mk
deleted file mode 100644
index 06ecf465ffd..00000000000
--- a/pkgtools/pkg_install-info/hacks.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# $NetBSD: hacks.mk,v 1.1 2006/12/24 14:07:55 schwarz Exp $
-
-.if !defined(PKG_INSTALL-INFO_HACKS_MK)
-PKG_INSTALL-INFO_HACKS_MK= #defined
-
-### [Sat Dec 23 16:09:15 CET 2006: schwarz]
-### work around gcc optimization issue (gcc bug report c/14675)
-### see http://gcc.gnu.org/ml/gcc-bugs/2004-03/msg02604.html
-###
-. if !empty(PKGSRC_COMPILER:Mgcc*) && !empty(CFLAGS:M-O3)
-PKG_HACKS+= suppress-Werror
-BUILDLINK_TRANSFORM+= rm:-Werror
-. endif
-
-.endif
diff --git a/pkgtools/pkg_install/DESCR b/pkgtools/pkg_install/DESCR
deleted file mode 100644
index 263d7535e5d..00000000000
--- a/pkgtools/pkg_install/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-pkg_install contains the core package management and administration
-utilities for pkgsrc, a multi-platform source and binary package
-system developed and maintained by The NetBSD Project and volunteers
-from around the globe.
-
-The following tools are included:
-
-pkg_add install and upgrade binary packages
-pkg_admin perform various pkgsrc administrative tasks
-pkg_create create software package distributions
-pkg_delete delete installed packages
-pkg_info display information about installed or binary packages
-pkg_view manage package views
-linkfarm manage symbolic links for package views
diff --git a/pkgtools/pkg_install/INSTALL b/pkgtools/pkg_install/INSTALL
deleted file mode 100644
index 13dccce1803..00000000000
--- a/pkgtools/pkg_install/INSTALL
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.2 2005/11/07 06:52:24 jlam Exp $
-
-PKGNAME="$1"
-STAGE="$2"
-
-PKG_DBDIR="@PKG_DBDIR@"
-PKG_TOOLS_BIN="@PKG_TOOLS_BIN@"
-MKDIR="@MKDIR@"
-
-case ${STAGE} in
-PRE-INSTALL)
- [ -d ${PKG_DBDIR} ] || ${MKDIR} ${PKG_DBDIR}
- ;;
-
-POST-INSTALL)
- [ -f ${PKG_DBDIR}/pkgdb.byfile.db ] || ${PKG_TOOLS_BIN}/pkg_admin rebuild
- ;;
-esac
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
deleted file mode 100644
index a14ec5a5d03..00000000000
--- a/pkgtools/pkg_install/Makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-# $NetBSD: Makefile,v 1.130 2007/03/11 22:05:03 joerg Exp $
-
-# Notes to package maintainers:
-#
-# To update this package, import from src/usr.sbin/pkg_install.
-#
-# Updating this package does not automatically necessitate bumping
-# PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical
-# change in the pkg_* tools that pkgsrc relies on for proper operation.
-
-DISTNAME= pkg_install-${VERSION}
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.pkgsrc.org/
-COMMENT= Package management and administration tools for pkgsrc
-
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-pkgdbdir=${PKG_DBDIR:Q}
-CONFIGURE_ARGS+= --with-ftp="\"${FETCH_CMD}"\"
-CONFIGURE_ARGS+= --with-mtree="\"${MTREE}"\"
-CONFIGURE_ARGS+= --with-pax="\"${PAX}"\"
-CONFIGURE_ARGS+= --with-tar="\"${TAR}"\"
-USE_TOOLS+= mtree pax tar
-
-# The following tools are needed by pkg_view and linkfarm.
-USE_TOOLS+= chmod cmp cp env find grep ln mkdir rm rmdir \
- sed sort touch
-
-SKIP_AUDIT_PACKAGES= yes
-NO_PKGTOOLS_REQD_CHECK= yes
-NO_CHECKSUM= yes
-NO_MTREE= yes
-PKG_PRESERVE= yes
-
-# These are needed to solve a chicken-and-egg problem where pkgsrc uses
-# newer features of pkg_install, but older NetBSD installations won't
-# support them. In this case, we explicitly use the native GCC
-# compiler to avoid problems with depending on pkgsrc GCC for building
-# pkg_install.
-#
-# We also use the newly built pkg_delete since upgrading from an older
-# pkg_install might required features of the new program.
-#
-USE_NATIVE_GCC= yes
-PKG_DELETE= ${WRKSRC}/delete/pkg_delete
-
-CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
-
-MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q}
-MAKE_ENV+= OPSYS=${OPSYS:Q}
-
-PKG_DBDIR?= /var/db/pkg
-PKG_INFO= PKG_DBDIR=${PKG_DBDIR:Q} ${PKG_INFO_CMD}
-PKG_ADMIN= PKG_DBDIR=${PKG_DBDIR:Q} ${PKG_ADMIN_CMD}
-
-PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q}
-
-DEINSTALL_SRC= # empty
-INSTALL_SRC= ${PKGDIR}/INSTALL
-FILES_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q} \
- PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \
- MKDIR=${MKDIR:Q}
-
-.include "../../mk/bsd.prefs.mk"
-
-PKG_TOOLS_PREFIX= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
-VERSION!= ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
- ${FILESDIR}/lib/version.h
-
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR= share/man
-.endif
-
-# If ${PKG_TOOLS_PREFIX} doesn't match ${LOCALBASE}, then don't run
-# check-files since it's likely ${PKG_TOOLS_PREFIX} contains directories
-# that shouldn't be checked.
-#
-.if ${PKG_TOOLS_PREFIX} != ${LOCALBASE}
-CHECK_FILES_SUPPORTED= no
-.endif
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-# XXX Reverse the order that update does things since
-# XXX we need pkg_delete built before we can deinstall.
-# XXX This should probably be the default order for all packages.
-update:
- ${MAKE}
- ${MAKE} deinstall _UPDATE_RUNNING=YES
- ${MAKE} ${UPDATE_TARGET}
- ${MAKE} clean
-
-.include "../../pkgtools/libnbcompat/inplace.mk"
-.include "../../mk/bsd.pkg.mk"
-
-PREFIX:= ${PKG_TOOLS_PREFIX}
diff --git a/pkgtools/pkg_install/PLIST b/pkgtools/pkg_install/PLIST
deleted file mode 100644
index ed567251ddd..00000000000
--- a/pkgtools/pkg_install/PLIST
+++ /dev/null
@@ -1,24 +0,0 @@
-@comment $NetBSD: PLIST,v 1.8 2006/04/24 13:52:04 dillo Exp $
-man/cat1/linkfarm.0
-man/cat1/pkg_add.0
-man/cat1/pkg_admin.0
-man/cat1/pkg_create.0
-man/cat1/pkg_delete.0
-man/cat1/pkg_info.0
-man/cat1/pkg_view.0
-man/cat5/pkg_summary.0
-man/man1/linkfarm.1
-man/man1/pkg_add.1
-man/man1/pkg_admin.1
-man/man1/pkg_create.1
-man/man1/pkg_delete.1
-man/man1/pkg_info.1
-man/man1/pkg_view.1
-man/man5/pkg_summary.5
-sbin/linkfarm
-sbin/pkg_add
-sbin/pkg_admin
-sbin/pkg_create
-sbin/pkg_delete
-sbin/pkg_info
-sbin/pkg_view
diff --git a/pkgtools/pkg_install/files/Makefile.in b/pkgtools/pkg_install/files/Makefile.in
deleted file mode 100644
index 76d65266f0c..00000000000
--- a/pkgtools/pkg_install/files/Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
-# $NetBSD: Makefile.in,v 1.6 2004/08/31 17:40:41 jlam Exp $
-
-SUBDIRS= lib add admin create delete info view
-
-all:
- @for dir in $(SUBDIRS); do \
- ( cd $$dir && $(MAKE) $@ ) || exit 1; \
- done
-
-install clean:
- @for dir in $(SUBDIRS); do \
- ( cd $$dir && $(MAKE) $@ ) || exit 1; \
- done
-
-distclean: clean
- rm -f config.log config.status configure.lineno
- rm -f Makefile */Makefile
- rm -f lib/config.h
- rm -f view/linkfarm.sh
- rm -f view/pkg_view.sh
diff --git a/pkgtools/pkg_install/files/README b/pkgtools/pkg_install/files/README
deleted file mode 100644
index ef70fdf33f3..00000000000
--- a/pkgtools/pkg_install/files/README
+++ /dev/null
@@ -1,21 +0,0 @@
-# $NetBSD: README,v 1.7 2005/05/30 13:23:31 wiz Exp $
-# Original from FreeBSD, no rcs id.
-
-This is the pkg_install suite of tools for doing maintainance of
-software "packages". More documentation is available in the man pages
-for each individual command.
-
-This code was written by Jordan Hubbard for FreeBSD, snatched and
-mildly reshaped by John Kohl in NetBSD and the changes taken back into
-FreeBSD again by Jordan, who then proceeded to add another couple
-of dozen features on top. Whee! :-)
-
-In another round of enhancements, NetBSD changes were added by
-Alistair Crooks, Hubert Feyrer, Thorsten Frueauf, Rene Hexel,
-Christian E. Hopps, Thomas Klausner, Johnny Lam, and Matthias Scheler.
-
-When making snapshots, please modify PKGTOOLS_VERSION in lib/version.h
-to that day's date.
-
-src/usr.sbin/pkg_install is the canonical location for these sources.
-Any changes should be made here first, then merged over to pkgsrc.
diff --git a/pkgtools/pkg_install/files/add/Makefile.in b/pkgtools/pkg_install/files/add/Makefile.in
deleted file mode 100644
index 20ebe3dbf67..00000000000
--- a/pkgtools/pkg_install/files/add/Makefile.in
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile.in,v 1.13 2005/11/22 15:44:59 ben Exp $
-
-srcdir= @srcdir@
-
-prefix= @prefix@
-exec_prefix= @exec_prefix@
-sbindir= @sbindir@
-mandir= @mandir@
-
-man1dir= $(mandir)/man1
-cat1dir= $(mandir)/cat1
-
-CC= @CC@
-CCLD= $(CC)
-LIBS= -linstall @LIBS@
-CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS= @DEFS@ -DOPSYS_NAME=\"$(OPSYS)\" -DMACHINE_ARCH=\"$(MACHINE_ARCH)\" -DBINDIR=\"$(sbindir)\" -DMTREE_CMD=\"@mtree@\" -DTAR_CMD=\"@tar@\" -DPAX_CMD=\"@pax@\"
-CFLAGS= @CFLAGS@
-LDFLAGS= @LDFLAGS@ -L../lib
-
-INSTALL= @INSTALL@
-
-PROG= pkg_add
-
-OBJS= main.o perform.o futil.o extract.o verify.o
-
-all: $(PROG)
-
-.c.o:
- $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(PROG): $(OBJS)
- $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) $(PROG)
-
-install:
- $(INSTALL) -m 755 -d $(sbindir)
- $(INSTALL) -m 755 -d $(man1dir)
- $(INSTALL) -m 755 -d $(cat1dir)
- $(INSTALL) $(PROG) $(sbindir)
- $(INSTALL) -m 444 $(PROG).1 $(man1dir)/$(PROG).1
- $(INSTALL) -m 444 $(PROG).cat1 $(cat1dir)/$(PROG).0
diff --git a/pkgtools/pkg_install/files/add/add.h b/pkgtools/pkg_install/files/add/add.h
deleted file mode 100644
index 5cef817ca5c..00000000000
--- a/pkgtools/pkg_install/files/add/add.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $NetBSD: add.h,v 1.6 2005/11/22 15:44:59 ben Exp $ */
-
-/* from FreeBSD Id: add.h,v 1.8 1997/02/22 16:09:15 peter Exp */
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Include and define various things wanted by the add command.
- *
- */
-
-#ifndef _INST_ADD_H_INCLUDE
-#define _INST_ADD_H_INCLUDE
-
-typedef enum {
- NORMAL, MASTER, SLAVE
-} add_mode_t;
-
-extern char *Prefix;
-extern char *View;
-extern char *Viewbase;
-extern Boolean NoView;
-extern Boolean NoInstall;
-extern Boolean NoRecord;
-extern Boolean Force;
-extern Boolean Automatic;
-extern int Replace;
-extern char *Mode;
-extern char *Owner;
-extern char *Group;
-extern char *Directory;
-extern char *PkgName;
-extern char FirstPen[];
-extern add_mode_t AddMode;
-
-int make_hierarchy(char *);
-int extract_plist(char *, package_t *);
-void apply_perms(char *, char **, int);
-
-#endif /* _INST_ADD_H_INCLUDE */
diff --git a/pkgtools/pkg_install/files/add/extract.c b/pkgtools/pkg_install/files/add/extract.c
deleted file mode 100644
index 79c7e960b21..00000000000
--- a/pkgtools/pkg_install/files/add/extract.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/* $NetBSD: extract.c,v 1.14 2006/11/03 09:35:14 joerg Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "FreeBSD - Id: extract.c,v 1.17 1997/10/08 07:45:35 charnier Exp";
-#else
-__RCSID("$NetBSD: extract.c,v 1.14 2006/11/03 09:35:14 joerg Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the package extraction code for the add module.
- *
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#include "lib.h"
-#include "add.h"
-
-lfile_head_t files;
-lfile_head_t perms;
-
-/*
- * Copy files from staging area to todir.
- * This is only used when the files cannot be directory rename()ed.
- */
-static void
-pushout(char *todir)
-{
- pipe_to_system_t *pipe_to;
- char *file_args[4];
- char **perm_argv;
- int perm_argc = 1;
- lfile_t *lfp;
- int count;
-
- /* set up arguments to run "pax -r -w -p e" */
- file_args[0] = strrchr(PAX_CMD, '/');
- if (file_args[0] == NULL)
- file_args[0] = PAX_CMD;
- else
- file_args[0]++;
- file_args[1] = "-rwpe";
- file_args[2] = todir;
- file_args[3] = NULL;
-
- /* count entries for files */
- count = 0;
- TAILQ_FOREACH(lfp, &files, lf_link)
- count++;
-
- if (count > 0) {
- /* open pipe, feed it files, close pipe */
- pipe_to = pipe_to_system_begin(PAX_CMD, file_args, NULL);
- while ((lfp = TAILQ_FIRST(&files)) != NULL) {
- fprintf(pipe_to->fp, "%s\n", lfp->lf_name);
- TAILQ_REMOVE(&files, lfp, lf_link);
- free(lfp);
- }
- pipe_to_system_end(pipe_to);
- }
-
- /* count entries for permissions */
- count = 0;
- TAILQ_FOREACH(lfp, &perms, lf_link)
- count++;
-
- if (count > 0) {
- perm_argv = malloc((count + 1) * sizeof(char *));
- perm_argc = 0;
- TAILQ_FOREACH(lfp, &perms, lf_link)
- perm_argv[perm_argc++] = lfp->lf_name;
- perm_argv[perm_argc] = NULL;
- apply_perms(todir, perm_argv, perm_argc);
-
- /* empty the perm list */
- while ((lfp = TAILQ_FIRST(&perms)) != NULL) {
- TAILQ_REMOVE(&perms, lfp, lf_link);
- free(lfp);
- }
- free(perm_argv);
- }
-}
-
-static void
-rollback(char *name, char *home, plist_t *start, plist_t *stop)
-{
- plist_t *q;
- char try[MaxPathSize], bup[MaxPathSize], *dir;
-
- dir = home;
- for (q = start; q != stop; q = q->next) {
- if (q->type == PLIST_FILE) {
- (void) snprintf(try, sizeof(try), "%s/%s", dir, q->name);
- if (make_preserve_name(bup, sizeof(bup), name, try) && fexists(bup)) {
-#if HAVE_CHFLAGS
- (void) chflags(try, 0);
-#endif
- (void) unlink(try);
- if (rename(bup, try))
- warnx("rollback: unable to rename %s back to %s", bup, try);
- }
- } else if (q->type == PLIST_CWD) {
- if (strcmp(q->name, "."))
- dir = q->name;
- else
- dir = home;
- }
- }
-}
-
-
-/*
- * Return 0 on error, 1 for success.
- */
-int
-extract_plist(char *home, package_t *pkg)
-{
- plist_t *p = pkg->head;
- char *last_file;
- char *last_chdir;
- Boolean preserve;
- lfile_t *lfp;
-
- TAILQ_INIT(&files);
- TAILQ_INIT(&perms);
-
- last_chdir = 0;
- preserve = find_plist_option(pkg, "preserve") ? TRUE : FALSE;
-
- /* Reset the world */
- Owner = NULL;
- Group = NULL;
- Mode = NULL;
- last_file = NULL;
- Directory = home;
-
- if (!NoRecord) {
- /* Open Package Database for writing */
- if (!pkgdb_open(ReadWrite)) {
- cleanup(0);
- err(EXIT_FAILURE, "can't open pkgdb");
- }
- }
- /* Do it */
- while (p) {
- char cmd[MaxPathSize];
-
- switch (p->type) {
- case PLIST_NAME:
- PkgName = p->name;
- if (Verbose)
- printf("extract: Package name is %s\n", p->name);
- break;
-
- case PLIST_FILE:
- last_file = p->name;
- if (Verbose)
- printf("extract: %s/%s\n", Directory, p->name);
- if (!Fake) {
- char try[MaxPathSize];
-
- if (strrchr(p->name, '\'')) {
- cleanup(0);
- errx(2, "Bogus filename \"%s\"", p->name);
- }
-
- /* first try to rename it into place */
- (void) snprintf(try, sizeof(try), "%s/%s", Directory, p->name);
- if (fexists(try)) {
-#if HAVE_CHFLAGS
- (void) chflags(try, 0); /* XXX hack - if truly immutable, rename fails */
-#endif
- if (preserve && PkgName) {
- char pf[MaxPathSize];
-
- if (make_preserve_name(pf, sizeof(pf), PkgName, try)) {
- if (rename(try, pf)) {
- warnx(
- "unable to back up %s to %s, aborting pkg_add",
- try, pf);
- rollback(PkgName, home, pkg->head, p);
- return 0;
- }
- }
- }
- }
- if (rename(p->name, try) == 0) {
- if (!NoRecord) {
- /* note in pkgdb */
- char *s, t[MaxPathSize];
- int rc;
-
- (void) snprintf(t, sizeof(t), "%s/%s", Directory, p->name);
-
- s = pkgdb_retrieve(t);
-#ifdef PKGDB_DEBUG
- printf("pkgdb_retrieve(\"%s\")=\"%s\"\n", t, s); /* pkgdb-debug - HF */
-#endif
- if (s)
- warnx("Overwriting %s - pkg %s bogus/conflicting?", t, s);
- else {
- rc = pkgdb_store(t, PkgName);
-#ifdef PKGDB_DEBUG
- printf("pkgdb_store(\"%s\", \"%s\") = %d\n", t, PkgName, rc); /* pkgdb-debug - HF */
-#endif
-
- }
- }
-
- /* try to add to list of perms to be changed and run in bulk. */
- if (p->name[0] == '/')
- pushout(Directory);
-
- LFILE_ADD(&perms, lfp, p->name);
- } else {
- /* rename failed, try copying with a big tar command */
- if (last_chdir != Directory) {
- if (last_chdir != NULL)
- pushout(last_chdir);
- last_chdir = Directory;
- } else if (p->name[0] == '/') {
- pushout(Directory);
- }
-
- if (!NoRecord) {
- /* note in pkgdb */
- /* XXX would be better to store in PUSHOUT, but
- * that would probably affect too much code I prefer
- * not to touch - HF */
-
- char *s, t[MaxPathSize], *u;
- int rc;
-
- LFILE_ADD(&files, lfp, p->name);
- LFILE_ADD(&perms, lfp, p->name);
- if (p->name[0] == '/')
- u = p->name;
- else {
- (void) snprintf(t, sizeof(t), "%s/%s", Directory, p->name);
- u = t;
- }
-
- s = pkgdb_retrieve(t);
-#ifdef PKGDB_DEBUG
- printf("pkgdb_retrieve(\"%s\")=\"%s\"\n", t, s); /* pkgdb-debug - HF */
-#endif
- if (s)
- warnx("Overwriting %s - pkg %s bogus/conflicting?", t, s);
- else {
- rc = pkgdb_store(t, PkgName);
-#ifdef PKGDB_DEBUG
- printf("pkgdb_store(\"%s\", \"%s\") = %d\n", t, PkgName, rc); /* pkgdb-debug - HF */
-#endif
- }
- }
- }
- }
- break;
-
- case PLIST_CWD:
- if (Verbose)
- printf("extract: CWD to %s\n", p->name);
- pushout(Directory);
- if (strcmp(p->name, ".")) {
- if (!Fake && make_hierarchy(p->name) == FAIL) {
- cleanup(0);
- errx(2, "unable to make directory '%s'", p->name);
- }
- Directory = p->name;
- } else
- Directory = home;
- break;
-
- case PLIST_CMD:
- format_cmd(cmd, sizeof(cmd), p->name, Directory, last_file);
- pushout(Directory);
- printf("Executing '%s'\n", cmd);
- if (!Fake && system(cmd))
- warnx("command '%s' failed", cmd);
- break;
-
- case PLIST_CHMOD:
- pushout(Directory);
- Mode = p->name;
- break;
-
- case PLIST_CHOWN:
- pushout(Directory);
- Owner = p->name;
- break;
-
- case PLIST_CHGRP:
- pushout(Directory);
- Group = p->name;
- break;
-
- case PLIST_COMMENT:
- break;
-
- case PLIST_IGNORE:
- p = p->next;
- break;
-
- default:
- break;
- }
- p = p->next;
- }
- pushout(Directory);
- if (!NoRecord)
- pkgdb_close();
- return 1;
-}
diff --git a/pkgtools/pkg_install/files/add/futil.c b/pkgtools/pkg_install/files/add/futil.c
deleted file mode 100644
index c314842b789..00000000000
--- a/pkgtools/pkg_install/files/add/futil.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* $NetBSD: futil.c,v 1.9 2005/12/06 01:08:09 ben Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: futil.c,v 1.7 1997/10/08 07:45:39 charnier Exp";
-#else
-__RCSID("$NetBSD: futil.c,v 1.9 2005/12/06 01:08:09 ben Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Miscellaneous file access utilities.
- *
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#include "lib.h"
-#include "add.h"
-
-/*
- * Assuming dir is a desired directory name, make it and all intervening
- * directories necessary.
- */
-int
-make_hierarchy(char *dir)
-{
- char *cp1, *cp2;
- char *argv[2];
-
- argv[0] = dir;
- argv[1] = NULL;
-
- if (dir[0] == '/')
- cp1 = cp2 = dir + 1;
- else
- cp1 = cp2 = dir;
- while (cp2) {
- if ((cp2 = strchr(cp1, '/')) != NULL)
- *cp2 = '\0';
- if (fexists(dir)) {
- if (!(isdir(dir) || islinktodir(dir)))
- return FAIL;
- } else {
- if (fexec("mkdir", dir, NULL))
- return FAIL;
- apply_perms(NULL, argv, 1);
- }
- /* Put it back */
- if (cp2) {
- *cp2 = '/';
- cp1 = cp2 + 1;
- }
- }
- return SUCCESS;
-}
-
-/*
- * Using permission defaults, apply them as necessary
- */
-void
-apply_perms(char *dir, char **args, int nargs)
-{
- char *cd_to;
- char owner_group[128];
- const char **argv;
- int i;
-
- argv = malloc((nargs + 4) * sizeof(char *));
- /*
- * elements 0..2 are set later depending on Mode.
- * args is a NULL terminated list of file names.
- * by appending them to argv, argv becomes NULL terminated also.
- */
- for (i = 0; i <= nargs; i++)
- argv[i + 3] = args[i];
-
- if (!dir || args[0][0] == '/') /* absolute path? */
- cd_to = "/";
- else
- cd_to = dir;
-
- if (Mode) {
- argv[0] = CHMOD_CMD;
- argv[1] = "-R";
- argv[2] = Mode;
- if (pfcexec(cd_to, argv[0], argv))
- warnx("couldn't change modes of '%s' ... to '%s'",
- args[0], Mode);
- }
- if (Owner != NULL && Group != NULL) {
- if (snprintf(owner_group, sizeof(owner_group),
- "%s:%s", Owner, Group) > sizeof(owner_group)) {
- warnx("'%s:%s' is too long (%lu max)",
- Owner, Group, (unsigned long) sizeof(owner_group));
- free(argv);
- return;
- }
- argv[0] = CHOWN_CMD;
- argv[1] = "-R";
- argv[2] = owner_group;
- if (pfcexec(cd_to, argv[0], argv))
- warnx("couldn't change owner/group of '%s' ... to '%s:%s'",
- args[0], Owner, Group);
- free(argv);
- return;
- }
- if (Owner != NULL) {
- argv[0] = CHOWN_CMD;
- argv[1] = "-R";
- argv[2] = Owner;
- if (pfcexec(cd_to, argv[0], argv))
- warnx("couldn't change owner of '%s' ... to '%s'",
- args[0], Owner);
- free(argv);
-
- return;
- }
- if (Group != NULL) {
- argv[0] = CHGRP_CMD;
- argv[1] = "-R";
- argv[2] = Group;
- if (pfcexec(cd_to, argv[0], argv))
- warnx("couldn't change group of '%s' ... to '%s'",
- args[0], Group);
- }
- free(argv);
-}
diff --git a/pkgtools/pkg_install/files/add/main.c b/pkgtools/pkg_install/files/add/main.c
deleted file mode 100644
index b1d782497cd..00000000000
--- a/pkgtools/pkg_install/files/add/main.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* $NetBSD: main.c,v 1.10 2006/06/27 23:36:13 hubertf Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static char *rcsid = "from FreeBSD Id: main.c,v 1.16 1997/10/08 07:45:43 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.10 2006/06/27 23:36:13 hubertf Exp $");
-#endif
-#endif
-
-/*
- *
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the add module.
- *
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-#include "lib.h"
-#include "add.h"
-#include "verify.h"
-
-static char Options[] = "AIK:LMRSVW:fhnp:s:t:uvw:";
-
-char *Prefix = NULL;
-char *View = NULL;
-char *Viewbase = NULL;
-Boolean NoView = FALSE;
-Boolean NoInstall = FALSE;
-Boolean NoRecord = FALSE;
-Boolean Automatic = FALSE;
-
-char *Mode = NULL;
-char *Owner = NULL;
-char *Group = NULL;
-char *PkgName = NULL;
-char *Directory = NULL;
-char FirstPen[MaxPathSize];
-add_mode_t AddMode = NORMAL;
-int Replace = 0;
-
-static void
-usage(void)
-{
- (void) fprintf(stderr, "%s\n%s\n%s\n",
- "usage: pkg_add [-AfhILMnRSuVv] [-K pkg_dbdir] [-p prefix]",
- " [-s verification-type] [-t template] [-W viewbase] [-w view]",
- " [[ftp|http]://[user[:password]@]host[:port]][/path/]pkg-name ...");
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- int ch, error=0;
- lpkg_head_t pkgs;
- struct rlimit rlim;
- int rc;
-
- setprogname(argv[0]);
- while ((ch = getopt(argc, argv, Options)) != -1) {
- switch (ch) {
- case 'A':
- Automatic = TRUE;
- break;
-
- case 'f':
- Force = TRUE;
- break;
-
- case 'I':
- NoInstall = TRUE;
- break;
-
- case 'K':
- _pkgdb_setPKGDB_DIR(optarg);
- break;
-
- case 'L':
- NoView = TRUE;
- break;
-
- case 'M':
- AddMode = MASTER;
- break;
-
- case 'R':
- NoRecord = TRUE;
- break;
-
- case 'n':
- Fake = TRUE;
- Verbose = TRUE;
- break;
-
- case 'p':
- Prefix = optarg;
- break;
-
- case 'S':
- AddMode = SLAVE;
- break;
-
- case 's':
- set_verification(optarg);
- break;
-
- case 't':
- strlcpy(FirstPen, optarg, sizeof(FirstPen));
- break;
-
- case 'u':
- Replace++;
- break;
-
- case 'V':
- show_version();
- /* NOTREACHED */
-
- case 'v':
- Verbose = TRUE;
- break;
-
- case 'W':
- Viewbase = optarg;
- break;
-
- case 'w':
- View = optarg;
- break;
-
- case 'h':
- case '?':
- default:
- usage();
- break;
- }
- }
- argc -= optind;
- argv += optind;
-
- path_create(getenv("PKG_PATH"));
- TAILQ_INIT(&pkgs);
-
- if (AddMode != SLAVE) {
- /* Get all the remaining package names, if any */
- for (ch = 0; *argv; ch++, argv++) {
- lpkg_t *lpp;
-
- if (IS_STDIN(*argv))
- lpp = alloc_lpkg("-");
- else
- lpp = alloc_lpkg(*argv);
-
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
- }
-
- if (!ch)
- /* If no packages, yelp */
- warnx("missing package name(s)"), usage();
- else if (ch > 1 && AddMode == MASTER)
- warnx("only one package name may be specified with master mode"),
- usage();
- }
-
- /* Increase # of max. open file descriptors as high as possible */
- rc = getrlimit(RLIMIT_NOFILE, &rlim);
- if (rc == -1) {
- warn("cannot retrieve max. number of open files resource limit");
- } else {
- rlim.rlim_cur = rlim.rlim_max;
- rc = setrlimit(RLIMIT_NOFILE, &rlim);
- if (rc == -1) {
- warn("cannot increase max. number of open files resource limit, try 'ulimit'");
- } else {
- if (Verbose)
- printf("increasing RLIMIT_NOFILE to max. %ld open files\n", (long)rlim.rlim_cur);
- }
- }
-
- error += pkg_perform(&pkgs);
- if (error != 0) {
- warnx("%d package addition%s failed", error, error == 1 ? "" : "s");
- exit(1);
- }
- exit(0);
-}
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
deleted file mode 100644
index 0ab5f8e16d4..00000000000
--- a/pkgtools/pkg_install/files/add/perform.c
+++ /dev/null
@@ -1,1097 +0,0 @@
-/* $NetBSD: perform.c,v 1.44 2007/03/11 22:05:03 joerg Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
-#else
-__RCSID("$NetBSD: perform.c,v 1.44 2007/03/11 22:05:03 joerg Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the main body of the add module.
- *
- */
-
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include "defs.h"
-#include "lib.h"
-#include "add.h"
-#include "verify.h"
-
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_SYS_UTSNAME_H
-#include <sys/utsname.h>
-#endif
-
-static char LogDir[MaxPathSize];
-static int zapLogDir; /* Should we delete LogDir? */
-
-static package_t Plist;
-static char *Home;
-
-static lfile_head_t files;
-
-/* used in build information */
-enum {
- Good,
- Missing,
- Warning,
- Fatal
-};
-
-static void
-normalise_platform(struct utsname *host_name)
-{
-#ifdef NUMERIC_VERSION_ONLY
- size_t span;
-
- span = strspn(host_name->release, "0123456789.");
- host_name->release[span] = '\0';
-#endif
-}
-
-/* Read package build information */
-static int
-read_buildinfo(char **buildinfo)
-{
- char *key;
- char *line;
- size_t len;
- FILE *fp;
-
- if ((fp = fopen(BUILD_INFO_FNAME, "r")) == NULL) {
- warnx("unable to open %s file.", BUILD_INFO_FNAME);
- return 0;
- }
-
- while ((line = fgetln(fp, &len)) != NULL) {
- if (line[len - 1] == '\n')
- line[len - 1] = '\0';
-
- if ((key = strsep(&line, "=")) == NULL)
- continue;
-
- /*
- * pkgsrc used to create the BUILDINFO file using
- * "key= value", so skip the space if it's there.
- */
- if (line == NULL)
- continue;
- if (line[0] == ' ')
- line += sizeof(char);
-
- /*
- * we only care about opsys, arch, version, and
- * dependency recommendations
- */
- if (line[0] != '\0') {
- if (strcmp(key, "OPSYS") == 0)
- buildinfo[BI_OPSYS] = strdup(line);
- else if (strcmp(key, "OS_VERSION") == 0)
- buildinfo[BI_OS_VERSION] = strdup(line);
- else if (strcmp(key, "MACHINE_ARCH") == 0)
- buildinfo[BI_MACHINE_ARCH] = strdup(line);
- else if (strcmp(key, "IGNORE_RECOMMENDED") == 0)
- buildinfo[BI_IGNORE_RECOMMENDED] = strdup(line);
- else if (strcmp(key, "USE_ABI_DEPENDS") == 0)
- buildinfo[BI_USE_ABI_DEPENDS] = strdup(line);
- }
- }
- (void) fclose(fp);
- if (buildinfo[BI_OPSYS] == NULL ||
- buildinfo[BI_OS_VERSION] == NULL ||
- buildinfo[BI_MACHINE_ARCH] == NULL) {
- warnx("couldn't extract build information from package.");
- return 0;
- }
- return 1;
-}
-
-static int
-sanity_check(const char *pkg)
-{
- int errc = 0;
-
- if (!fexists(CONTENTS_FNAME)) {
- warnx("package %s has no CONTENTS file!", pkg);
- errc = 1;
- } else if (!fexists(COMMENT_FNAME)) {
- warnx("package %s has no COMMENT file!", pkg);
- errc = 1;
- } else if (!fexists(DESC_FNAME)) {
- warnx("package %s has no DESC file!", pkg);
- errc = 1;
- }
- return errc;
-}
-
-/* install a pre-requisite package. Returns 1 if it installed it */
-static int
-installprereq(const char *name, int *errc, int doupdate)
-{
- int ret;
- ret = 0;
-
- if (Verbose)
- printf("Loading it from %s.\n", name);
- path_setenv("PKG_PATH");
-
- if (fexec_skipempty(BINDIR "/pkg_add", "-K", _pkgdb_getPKGDB_DIR(),
- "-s", get_verification(),
- doupdate > 1 ? "-uu" : (doupdate ? "-u" : ""),
- Fake ? "-n" : "",
- NoView ? "-L" : "",
- View ? "-w" : "", View ? View : "",
- Viewbase ? "-W" : "", Viewbase ? Viewbase : "",
- Force ? "-f" : "",
- Prefix ? "-p" : "", Prefix ? Prefix : "",
- Verbose ? "-v" : "",
- "-A", name, NULL)) {
- warnx("autoload of dependency `%s' failed%s",
- name, Force ? " (proceeding anyway)" : "!");
- if (!Force)
- ++(*errc);
- } else {
- ret = 1;
- }
-
- return ret;
-}
-
-/*
- * Install a single package
- * Returns 0 if everything is ok, >0 else
- */
-static int
-pkg_do(const char *pkg, lpkg_head_t *pkgs)
-{
- char playpen[MaxPathSize];
- char replace_from[MaxPathSize];
- char replace_via[MaxPathSize];
- char replace_to[MaxPathSize];
- char *buildinfo[BI_ENUM_COUNT];
- int replacing = 0;
- char *where_to;
- char dbdir[MaxPathSize];
- const char *exact;
- FILE *cfile;
- int errc, err_prescan;
- plist_t *p;
- struct stat sb;
- struct utsname host_uname;
- int inPlace;
- int rc;
- uint64_t needed;
- Boolean is_depoted_pkg = FALSE;
- lfile_t *lfp;
- int result;
-
- errc = 0;
- zapLogDir = 0;
- LogDir[0] = '\0';
- strlcpy(playpen, FirstPen, sizeof(playpen));
- memset(buildinfo, '\0', sizeof(buildinfo));
- inPlace = 0;
-
- umask(DEF_UMASK);
-
- /* Are we coming in for a second pass, everything already extracted?
- * (Slave mode) */
- if (!pkg) {
- fgets(playpen, MaxPathSize, stdin);
- playpen[strlen(playpen) - 1] = '\0'; /* remove newline! */
- if (chdir(playpen) == FAIL) {
- warnx("add in SLAVE mode can't chdir to %s", playpen);
- return 1;
- }
- read_plist(&Plist, stdin);
- where_to = playpen;
- }
- /* Nope - do it now */
- else {
- const char *tmppkg;
-
- tmppkg = fileFindByPath(pkg);
- if (tmppkg == NULL) {
- warnx("no pkg found for '%s', sorry.", pkg);
- return 1;
- }
-
- pkg = tmppkg;
-
- if (IS_URL(pkg)) {
- Home = fileGetURL(pkg);
- if (Home == NULL) {
- warnx("unable to fetch `%s' by URL", pkg);
- }
- where_to = Home;
-
- /* make sure the pkg is verified */
- if (!verify(pkg)) {
- warnx("Package %s will not be extracted", pkg);
- goto bomb;
- }
- } else { /* local */
- if (!IS_STDIN(pkg)) {
- /* not stdin */
- if (!ispkgpattern(pkg)) {
- if (stat(pkg, &sb) == FAIL) {
- warnx("can't stat package file '%s'", pkg);
- goto bomb;
- }
- /* make sure the pkg is verified */
- if (!verify(pkg)) {
- warnx("Package %s will not be extracted", pkg);
- goto bomb;
- }
- }
- LFILE_ADD(&files, lfp, CONTENTS_FNAME);
- } else {
- /* some values for stdin */
- sb.st_size = 100000; /* Make up a plausible average size */
- }
- Home = make_playpen(playpen, sizeof(playpen), sb.st_size * 4);
- if (!Home)
- warnx("unable to make playpen for %ld bytes",
- (long) (sb.st_size * 4));
- where_to = Home;
- result = unpack(pkg, &files);
- while ((lfp = TAILQ_FIRST(&files)) != NULL) {
- TAILQ_REMOVE(&files, lfp, lf_link);
- free(lfp);
- }
- if (result) {
- warnx("unable to extract table of contents file from `%s' - not a package?",
- pkg);
- goto bomb;
- }
- }
-
- cfile = fopen(CONTENTS_FNAME, "r");
- if (!cfile) {
- warnx("unable to open table of contents file `%s' - not a package?",
- CONTENTS_FNAME);
- goto bomb;
- }
- read_plist(&Plist, cfile);
- fclose(cfile);
-
- if (!IS_URL(pkg)) {
- /* Extract directly rather than moving? Oh goodie! */
- if (find_plist_option(&Plist, "extract-in-place")) {
- if (Verbose)
- printf("Doing in-place extraction for %s\n", pkg);
- p = find_plist(&Plist, PLIST_CWD);
- if (p) {
- if (!(isdir(p->name) || islinktodir(p->name)) && !Fake) {
- if (Verbose)
- printf("Desired prefix of %s does not exist, creating.\n", p->name);
- (void) fexec("mkdir", "-p", p->name, NULL);
- }
- if (chdir(p->name) == -1) {
- warn("unable to change directory to `%s'", p->name);
- goto bomb;
- }
- where_to = p->name;
- inPlace = 1;
- } else {
- warnx(
- "no prefix specified in `%s' - this is a bad package!",
- pkg);
- goto bomb;
- }
- }
-
- /*
- * Apply a crude heuristic to see how much space the package will
- * take up once it's unpacked. I've noticed that most packages
- * compress an average of 75%, so multiply by 4 for good measure.
- */
-
- needed = 4 * (uint64_t) sb.st_size;
- if (!inPlace && min_free(playpen) < needed) {
- warnx("projected size of %" PRIu64 " bytes exceeds available free space\n"
- "in %s. Please set your PKG_TMPDIR variable to point\n"
- "to a location with more free space and try again.",
- needed, playpen);
- goto bomb;
- }
-
- /* If this is a direct extract and we didn't want it, stop now */
- if (inPlace && Fake)
- goto success;
-
- /* Finally unpack the whole mess */
- if (unpack(pkg, NULL)) {
- warnx("unable to extract `%s'!", pkg);
- goto bomb;
- }
- }
-
- /* Check for sanity */
- if (sanity_check(pkg))
- goto bomb;
-
- /* If we're running in MASTER mode, just output the plist and return */
- if (AddMode == MASTER) {
- printf("%s\n", where_playpen());
- write_plist(&Plist, stdout, NULL);
- return 0;
- }
- }
-
- /* Read the OS, version and architecture from BUILD_INFO file */
- if (!read_buildinfo(buildinfo)) {
- warn("can't read build information from %s", BUILD_INFO_FNAME);
- if (!Force) {
- warnx("aborting.");
- goto bomb;
- }
- }
-
- if (uname(&host_uname) < 0) {
- warnx("uname() failed.");
- if (!Force) {
- warnx("aborting.");
- goto bomb;
- }
- } else {
- int status = Good;
-
- normalise_platform(&host_uname);
-
- /* check that we have read some values from buildinfo */
- if (buildinfo[BI_OPSYS] == NULL) {
- warnx("Missing operating system value from build information");
- status = Missing;
- }
- if (buildinfo[BI_MACHINE_ARCH] == NULL) {
- warnx("Missing machine architecture value from build information");
- status = Missing;
- }
- if (buildinfo[BI_OS_VERSION] == NULL) {
- warnx("Missing operating system version value from build information");
- status = Missing;
- }
-
- if (status == Good) {
- /* If either the OS or arch are different, bomb */
- if (strcmp(OPSYS_NAME, buildinfo[BI_OPSYS]) != 0 ||
- strcmp(MACHINE_ARCH, buildinfo[BI_MACHINE_ARCH]) != 0) {
- status = Fatal;
- }
-
- /* If OS and arch are the same, warn if version differs */
- if (strcmp(OPSYS_NAME, buildinfo[BI_OPSYS]) == 0 &&
- strcmp(MACHINE_ARCH, buildinfo[BI_MACHINE_ARCH]) == 0) {
- if (strcmp(host_uname.release, buildinfo[BI_OS_VERSION]) != 0) {
- status = Warning;
- }
- } else {
- status = Fatal;
- }
-
- if (status != Good) {
- warnx("Warning: package `%s' was built for a different version of the OS:", pkg);
- warnx("%s/%s %s (pkg) vs. %s/%s %s (this host)",
- buildinfo[BI_OPSYS],
- buildinfo[BI_MACHINE_ARCH],
- buildinfo[BI_OS_VERSION],
- OPSYS_NAME,
- MACHINE_ARCH,
- host_uname.release);
- }
- }
-
- if (!Force && status == Fatal) {
- warnx("aborting.");
- goto bomb;
- }
- }
-
- /* Check if USE_ABI_DEPENDS or IGNORE_RECOMMENDED was set
- * when this package was built. IGNORE_RECOMMENDED is historical. */
-
- if ((buildinfo[BI_USE_ABI_DEPENDS] != NULL &&
- strcasecmp(buildinfo[BI_USE_ABI_DEPENDS], "YES") != 0) ||
- (buildinfo[BI_IGNORE_RECOMMENDED] != NULL &&
- strcasecmp(buildinfo[BI_IGNORE_RECOMMENDED], "NO") != 0)) {
- warnx("%s was built", pkg);
- warnx("\tto ignore recommended ABI dependencies, this may cause problems!\n");
- }
-
- /*
- * If we have a prefix, delete the first one we see and add this
- * one in place of it.
- */
- if (Prefix) {
- delete_plist(&Plist, FALSE, PLIST_CWD, NULL);
- add_plist_top(&Plist, PLIST_CWD, Prefix);
- }
-
- /* Protect against old packages with bogus @name fields */
- PkgName = (p = find_plist(&Plist, PLIST_NAME)) ? p->name : "anonymous";
-
- if (fexists(VIEWS_FNAME))
- is_depoted_pkg = TRUE;
-
- /*
- * Depoted packages' dbdir is the same as DEPOTBASE. Non-depoted
- * packages' dbdir comes from the command-line or the environment.
- */
- if (is_depoted_pkg) {
- p = find_plist(&Plist, PLIST_CWD);
- if (p == NULL) {
- warn("no @cwd in +CONTENTS file?! aborting.");
- goto bomb;
- }
- (void) strlcpy(dbdir, dirname_of(p->name), sizeof(dbdir));
- (void) strlcpy(LogDir, p->name, sizeof(LogDir));
- } else {
- (void) strlcpy(dbdir, _pkgdb_getPKGDB_DIR(), sizeof(dbdir));
- (void) snprintf(LogDir, sizeof(LogDir), "%s/%s", dbdir, PkgName);
- }
-
- /* Set environment variables expected by the +INSTALL script. */
- setenv(PKG_PREFIX_VNAME, (p = find_plist(&Plist, PLIST_CWD)) ? p->name : ".", 1);
- setenv(PKG_METADATA_DIR_VNAME, LogDir, 1);
- setenv(PKG_REFCOUNT_DBDIR_VNAME, pkgdb_refcount_dir(), 1);
-
- /* make sure dbdir actually exists! */
- if (!(isdir(dbdir) || islinktodir(dbdir))) {
- if (fexec("mkdir", "-p", dbdir, NULL)) {
- errx(EXIT_FAILURE,
- "Database-dir %s cannot be generated, aborting.",
- dbdir);
- }
- }
-
- /* See if this package (exact version) is already registered */
- if ((isdir(LogDir) || islinktodir(LogDir)) && !Force) {
- if (!Automatic && is_automatic_installed(LogDir)) {
- if (mark_as_automatic_installed(LogDir, 0) == 0)
- warnx("package `%s' was already installed as "
- "dependency, now marked as installed "
- "manually", PkgName);
- } else {
- warnx("package `%s' already recorded as installed",
- PkgName);
- }
- goto success; /* close enough for government work */
- }
-
- /* See if some other version of us is already installed */
- {
- char *s;
-
- if ((s = strrchr(PkgName, '-')) != NULL) {
- char buf[MaxPathSize];
- char installed[MaxPathSize];
-
- /*
- * See if the pkg is already installed. If so, we might
- * want to upgrade/replace it.
- */
- (void) snprintf(buf, sizeof(buf), "%.*s[0-9]*",
- (int)(s - PkgName) + 1, PkgName);
- if (findmatchingname(dbdir, buf, note_whats_installed, installed) > 0) {
- if (Replace && !Fake) {
- /* XXX Should list the steps in Fake mode */
- snprintf(replace_from, sizeof(replace_from), "%s/%s/" REQUIRED_BY_FNAME,
- dbdir, installed);
- snprintf(replace_via, sizeof(replace_via), "%s/.%s." REQUIRED_BY_FNAME,
- dbdir, installed);
- snprintf(replace_to, sizeof(replace_to), "%s/%s/" REQUIRED_BY_FNAME,
- dbdir, PkgName);
-
- if (Verbose)
- printf("Upgrading %s to %s.\n", installed, PkgName);
-
- if (fexists(replace_from)) { /* Are there any dependencies? */
- /*
- * Upgrade step 1/4: Check if the new version is ok with all pkgs
- * (from +REQUIRED_BY) that require this pkg
- */
- FILE *rb; /* +REQUIRED_BY file */
- char pkg2chk[MaxPathSize];
-
- rb = fopen(replace_from, "r");
- if (! rb) {
- warnx("Cannot open '%s' for reading%s", replace_from,
- Force ? " (proceeding anyways)" : "");
- if (Force)
- goto ignore_replace_depends_check;
- else
- goto bomb;
- }
- while (fgets(pkg2chk, sizeof(pkg2chk), rb)) {
- package_t depPlist;
- FILE *depf;
- plist_t *depp;
- char depC[MaxPathSize];
-
- depPlist.head = depPlist.tail = NULL;
-
- s = strrchr(pkg2chk, '\n');
- if (s)
- *s = '\0'; /* strip trailing '\n' */
-
- /*
- * step into pkg2chk, read it's +CONTENTS file and see if
- * all @pkgdep lines agree with PkgName (using pmatch())
- */
- snprintf(depC, sizeof(depC), "%s/%s/%s", dbdir, pkg2chk, CONTENTS_FNAME);
- depf = fopen(depC , "r");
- if (depf == NULL) {
- warnx("Cannot check depends in '%s'%s", depC,
- Force ? " (proceeding anyways)" : "!" );
- if (Force)
- goto ignore_replace_depends_check;
- else
- goto bomb;
- }
- read_plist(&depPlist, depf);
- fclose(depf);
-
- for (depp = depPlist.head; depp; depp = depp->next) {
- char base_new[MaxPathSize];
- char base_exist[MaxPathSize];
- char *s2;
-
- if (depp->type != PLIST_PKGDEP)
- continue;
-
- /* Prepare basename (no versions) of both pkgs,
- * to see if we want to compare against that
- * one at all.
- */
- strlcpy(base_new, PkgName, sizeof(base_new));
- s2 = strpbrk(base_new, "<>[]?*{"); /* } */
- if (s2)
- *s2 = '\0';
- else {
- s2 = strrchr(base_new, '-');
- if (s2)
- *s2 = '\0';
- }
- strlcpy(base_exist, depp->name, sizeof(base_exist));
- s2 = strpbrk(base_exist, "<>[]?*{"); /* } */
- if (s2)
- *s2 = '\0';
- else {
- s2 = strrchr(base_exist, '-');
- if (s2)
- *s2 = '\0';
- }
- if (strcmp(base_new, base_exist) == 0) {
- /* Same pkg, so do the interesting compare */
- if (pmatch(depp->name, PkgName)) {
- if (Verbose)
- printf("@pkgdep check: %s is ok for %s (in %s pkg)\n",
- PkgName, depp->name, pkg2chk);
- } else {
- printf("Package %s requires %s, \n\tCannot replace with %s%s\n",
- pkg2chk, depp->name, PkgName,
- Force? " (proceeding anyways)" : "!");
- if (! Force)
- goto bomb;
- }
- }
- }
- }
- fclose(rb);
-
-ignore_replace_depends_check:
- /*
- * Upgrade step 2/4: Do the actual update by moving aside
- * the +REQUIRED_BY file, deinstalling the old pkg, adding
- * the new one and moving the +REQUIRED_BY file back
- * into place (finished in step 3/4)
- */
- if (Verbose)
- printf("mv %s %s\n", replace_from, replace_via);
- rc = rename(replace_from, replace_via);
- assert(rc == 0);
-
- replacing = 1;
- }
-
- if (Verbose) {
- printf("%s/pkg_delete -K %s '%s'\n",
- BINDIR,
- dbdir,
- installed);
- }
- fexec(BINDIR "/pkg_delete", "-K", dbdir, installed, NULL);
- } else if (!is_depoted_pkg) {
- warnx("other version '%s' already installed", installed);
-
- errc = 1;
- goto success; /* close enough for government work */
- }
- }
- }
- }
-
- /* See if there are conflicting packages installed */
- for (p = Plist.head; p; p = p->next) {
- char installed[MaxPathSize];
-
- if (p->type != PLIST_PKGCFL)
- continue;
- if (Verbose)
- printf("Package `%s' conflicts with `%s'.\n", PkgName, p->name);
- if (findmatchingname(dbdir, p->name, note_whats_installed, installed) > 0) {
- warnx("Conflicting package `%s'installed, please use\n"
- "\t\"pkg_delete %s\" first to remove it!", installed, installed);
- ++errc;
- }
- }
-
- /* Quick pre-check if any conflicting dependencies are installed
- * (e.g. version X is installed, but version Y is required)
- */
- err_prescan=0;
- for (p = Plist.head; p; p = p->next) {
- char installed[MaxPathSize];
-
- if (p->type != PLIST_PKGDEP)
- continue;
- if (Verbose)
- printf("Depends pre-scan: `%s' required.\n", p->name);
- if (findmatchingname(dbdir, p->name, note_whats_installed, installed) <= 0) {
- /*
- * required pkg not found. look if it's available with a more liberal
- * pattern. If so, this will lead to problems later (check on "some
- * other version of us is already installed" will fail, see above),
- * and we better stop right now.
- */
- char *s;
- int skip = -1;
-
- /* doing this right required to parse the full version(s),
- * do a 99% solution here for now */
- if (strchr(p->name, '{'))
- continue; /* would remove trailing '}' else */
-
- if ((s = strpbrk(p->name, "<>")) != NULL) {
- skip = 0;
- } else if (((s = strstr(p->name, "-[0-9]*")) != NULL) &&
- (*(s + sizeof("-[0-9]*") - 1) == '\0')) {
- /* -[0-9]* already present so no need to */
- /* add it a second time */
- skip = -1;
- } else if ((s = strrchr(p->name, '-')) != NULL) {
- skip = 1;
- }
-
- if (skip >= 0) {
- char buf[MaxPathSize];
-
- (void) snprintf(buf, sizeof(buf),
- skip ? "%.*s[0-9]*" : "%.*s-[0-9]*",
- (int)(s - p->name) + skip, p->name);
- if (findmatchingname(dbdir, buf, note_whats_installed, installed) > 0)
- {
- int done = 0;
-
- if (Replace > 1)
- {
- int errc0 = 0;
- char tmp[MaxPathSize];
-
- warnx("Attempting to update `%s' using binary package\n", p->name);
- /* Yes, append .tgz after the version so the */
- /* pattern can match a filename. */
- snprintf(tmp, sizeof(tmp), "%s.tgz", p->name);
- done = installprereq(tmp, &errc0, 2);
- }
- else if (Replace)
- {
- warnx("To perform necessary upgrades on required packages specify -u twice.\n");
- }
-
- if (!done)
- {
- warnx("pkg `%s' required, but `%s' found installed.",
- p->name, installed);
- if (Force) {
- warnx("Proceeding anyway.");
- } else {
- err_prescan++;
- }
- }
- }
- }
- }
- }
- if (err_prescan > 0) {
- warnx("Please resolve this conflict!");
- errc += err_prescan;
- goto success; /* close enough */
- }
-
-
- /* Now check the packing list for dependencies */
- for (exact = NULL, p = Plist.head; p; p = p->next) {
- char installed[MaxPathSize];
-
- if (p->type == PLIST_BLDDEP) {
- exact = p->name;
- continue;
- }
- if (p->type != PLIST_PKGDEP) {
- exact = NULL;
- continue;
- }
- if (Verbose)
- printf("Package `%s' depends on `%s'.\n", PkgName, p->name);
-
- if (findmatchingname(dbdir, p->name, note_whats_installed, installed) != 1) {
- /* required pkg not found - need to pull in */
-
- if (Fake) {
- /* fake install (???) */
- if (Verbose)
- printf("Package dependency %s for %s not installed%s\n", p->name, pkg,
- Force ? " (proceeding anyway)" : "!");
- } else {
- int done = 0;
- int errc0 = 0;
-
- if (exact != NULL) {
- /* first try the exact name, from the @blddep */
- done = installprereq(exact, &errc0, (Replace > 1) ? 2 : 0);
- }
- if (!done) {
- done = installprereq(p->name, &errc0, (Replace > 1) ? 2 : 0);
- }
- if (!done && !Force) {
- errc += errc0;
- }
- }
- } else if (Verbose) {
- printf(" - %s already installed.\n", installed);
- }
- }
-
- if (errc != 0)
- goto bomb;
-
- /* Look for the requirements file */
- if (fexists(REQUIRE_FNAME)) {
- warnx("package %s uses obsoleted require scripts", PkgName);
- (void) fexec(CHMOD_CMD, "+x", REQUIRE_FNAME, NULL); /* be sure */
- if (Verbose)
- printf("Running requirements file first for %s.\n", PkgName);
- if (!Fake && fexec("./" REQUIRE_FNAME, PkgName, "INSTALL", NULL)) {
- warnx("package %s fails requirements %s", pkg,
- Force ? "installing anyway" : "- not installed");
- if (!Force) {
- errc = 1;
- goto success; /* close enough for government work */
- }
- }
- }
-
- /* If we're really installing, and have an installation file, run it */
- if (!NoInstall && fexists(INSTALL_FNAME)) {
- (void) fexec(CHMOD_CMD, "+x", INSTALL_FNAME, NULL); /* make sure */
- if (Verbose)
- printf("Running install with PRE-INSTALL for %s.\n", PkgName);
- if (!Fake && fexec("./" INSTALL_FNAME, PkgName, "PRE-INSTALL", NULL)) {
- warnx("install script returned error status");
- errc = 1;
- goto success; /* nothing to uninstall yet */
- }
- }
-
- /*
- * Now finally extract the entire show if we're not going direct.
- * We need to reset the package dbdir so that extract_plist()
- * updates the correct pkgdb.byfile.db database.
- */
- if (!inPlace && !Fake) {
- _pkgdb_setPKGDB_DIR(dbdir);
- if (!extract_plist(".", &Plist)) {
- errc = 1;
- goto fail;
- }
- }
-
- if (!Fake && fexists(MTREE_FNAME)) {
- if (Verbose)
- printf("Running mtree for %s.\n", PkgName);
- p = find_plist(&Plist, PLIST_CWD);
- if (Verbose)
- printf("mtree -U -f %s -d -e -p %s\n", MTREE_FNAME, p ? p->name : "/");
- if (!Fake) {
- if (fexec(MTREE_CMD, "-U", "-f", MTREE_FNAME, "-d", "-e", "-p",
- p ? p->name : "/", NULL))
- warnx("mtree returned a non-zero status - continuing");
- }
- unlink(MTREE_FNAME); /* remove this line to tar up pkg later - HF */
- }
-
- /* Run the installation script one last time? */
- if (!NoInstall && fexists(INSTALL_FNAME)) {
- if (Verbose)
- printf("Running install with POST-INSTALL for %s.\n", PkgName);
- if (!Fake && fexec("./" INSTALL_FNAME, PkgName, "POST-INSTALL", NULL)) {
- warnx("install script returned error status");
- errc = 1;
- goto fail;
- }
- }
-
- /* Time to record the deed? */
- if (!NoRecord && !Fake) {
- char contents[MaxPathSize];
-
-#ifndef __INTERIX
- if (getuid() != 0)
- warnx("not running as root - trying to record install anyway");
-#endif
- if (!PkgName) {
- warnx("no package name! can't record package, sorry");
- errc = 1;
- goto success; /* well, partial anyway */
- }
- (void) snprintf(LogDir, sizeof(LogDir), "%s/%s", dbdir, PkgName);
- zapLogDir = 1; /* LogDir contains something valid now */
- if (Verbose)
- printf("Attempting to record package into %s.\n", LogDir);
- if (make_hierarchy(LogDir)) {
- warnx("can't record package into '%s', you're on your own!",
- LogDir);
- memset(LogDir, 0, sizeof(LogDir));
- errc = 1;
- goto success; /* close enough for government work */
- }
- /* Make sure pkg_info can read the entry */
- (void) fexec(CHMOD_CMD, "a+rx", LogDir, NULL);
-
- /* Move all of the +-files into place */
- move_files(".", "+*", LogDir);
-
- /* Generate the +CONTENTS file in-place from the Plist */
- (void) snprintf(contents, sizeof(contents), "%s/%s", LogDir, CONTENTS_FNAME);
- cfile = fopen(contents, "w");
- if (!cfile) {
- warnx("can't open new contents file '%s'! can't register pkg",
- contents);
- goto success; /* can't log, but still keep pkg */
- }
- write_plist(&Plist, cfile, NULL);
- fclose(cfile);
-
- /* register dependencies */
- /* we could save some cycles here if we remembered what we
- * installed above (in case we got a wildcard dependency) */
- /* XXX remembering in p->name would NOT be good! */
- for (p = Plist.head; p; p = p->next) {
- if (p->type != PLIST_PKGDEP)
- continue;
- if (Verbose)
- printf("Attempting to record dependency on package `%s'\n", p->name);
- (void) snprintf(contents, sizeof(contents), "%s/%s", dbdir,
- basename_of(p->name));
- if (ispkgpattern(p->name)) {
- char *s;
- s = findbestmatchingname(dirname_of(contents),
- basename_of(contents));
- if (s != NULL) {
- char *t;
- t = strrchr(contents, '/');
- strcpy(t + 1, s);
- free(s);
- } else {
- errx(EXIT_FAILURE, "Where did our dependency go?!");
- /* this shouldn't happen... X-) */
- }
- }
- strlcat(contents, "/", sizeof(contents));
- strlcat(contents, REQUIRED_BY_FNAME, sizeof(contents));
-
- cfile = fopen(contents, "a");
- if (!cfile)
- warnx("can't open dependency file '%s'!\n"
- "dependency registration is incomplete", contents);
- else {
- fprintf(cfile, "%s\n", PkgName);
- if (fclose(cfile) == EOF)
- warnx("cannot properly close file %s", contents);
- }
- }
- if (Automatic)
- mark_as_automatic_installed(LogDir, 1);
- if (Verbose)
- printf("Package %s registered in %s\n", PkgName, LogDir);
- }
-
- if ((p = find_plist(&Plist, PLIST_DISPLAY)) != NULL) {
- FILE *fp;
- char buf[BUFSIZ];
-
- (void) snprintf(buf, sizeof(buf), "%s/%s", LogDir, p->name);
- fp = fopen(buf, "r");
- if (fp) {
- putc('\n', stdout);
- while (fgets(buf, sizeof(buf), fp))
- fputs(buf, stdout);
- putc('\n', stdout);
- (void) fclose(fp);
- } else
- warnx("cannot open %s as display file", buf);
- }
-
- /* Add the package to a default view. */
- if (!Fake && !NoView && is_depoted_pkg) {
- if (Verbose) {
- printf("%s/pkg_view -d %s %s%s %s%s %sadd %s\n",
- BINDIR, dbdir,
- View ? "-w " : "", View ? View : "",
- Viewbase ? "-W " : "", Viewbase ? Viewbase : "",
- Verbose ? "-v " : "", PkgName);
- }
-
- fexec_skipempty(BINDIR "/pkg_view", "-d", dbdir,
- View ? "-w " : "", View ? View : "",
- Viewbase ? "-W " : "", Viewbase ? Viewbase : "",
- Verbose ? "-v " : "", "add", PkgName, NULL);
- }
-
- goto success;
-
-bomb:
- errc = 1;
- goto success;
-
-fail:
- /* Nuke the whole (installed) show, XXX but don't clean directories */
- if (!Fake)
- delete_package(FALSE, FALSE, &Plist, FALSE);
-
-success:
- /* delete the packing list contents */
- free_plist(&Plist);
- leave_playpen(Home);
-
- if (replacing) {
- /*
- * Upgrade step 3/4: move back +REQUIRED_BY file
- * (see also step 2/4)
- */
- rc = rename(replace_via, replace_to);
- assert(rc == 0);
-
- /*
- * Upgrade step 4/4: Fix pkgs that depend on us to
- * depend on the new version instead of the old
- * one by fixing @pkgdep lines in +CONTENTS files.
- */
- /* TODO */
- }
-
- return errc;
-}
-
-void
-cleanup(int signo)
-{
- static int alreadyCleaning;
- void (*oldint) (int);
- void (*oldhup) (int);
- int saved_errno;
-
- saved_errno = errno;
- oldint = signal(SIGINT, SIG_IGN);
- oldhup = signal(SIGHUP, SIG_IGN);
-
- if (!alreadyCleaning) {
- alreadyCleaning = 1;
- if (signo)
- printf("Signal %d received, cleaning up.\n", signo);
- if (!Fake && zapLogDir && LogDir[0])
- (void) fexec(REMOVE_CMD, "-fr", LogDir, NULL);
- leave_playpen(Home);
- if (signo)
- exit(1);
- }
- signal(SIGINT, oldint);
- signal(SIGHUP, oldhup);
- errno = saved_errno;
-}
-
-int
-pkg_perform(lpkg_head_t *pkgs)
-{
- int err_cnt = 0;
- lpkg_t *lpp;
-
- signal(SIGINT, cleanup);
- signal(SIGHUP, cleanup);
-
- TAILQ_INIT(&files);
-
- if (AddMode == SLAVE)
- err_cnt = pkg_do(NULL, NULL);
- else {
- while ((lpp = TAILQ_FIRST(pkgs)) != NULL) {
- path_prepend_from_pkgname(lpp->lp_name);
- err_cnt += pkg_do(lpp->lp_name, pkgs);
- path_prepend_clear();
- TAILQ_REMOVE(pkgs, lpp, lp_link);
- free_lpkg(lpp);
- }
- }
-
- ftp_stop();
-
- return err_cnt;
-}
diff --git a/pkgtools/pkg_install/files/add/pkg_add.1 b/pkgtools/pkg_install/files/add/pkg_add.1
deleted file mode 100644
index ba9e0d88678..00000000000
--- a/pkgtools/pkg_install/files/add/pkg_add.1
+++ /dev/null
@@ -1,670 +0,0 @@
-.\" $NetBSD: pkg_add.1,v 1.18 2006/04/08 23:06:21 wiz Exp $
-.\"
-.\" FreeBSD install - a package for the installation and maintenance
-.\" of non-core utilities.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" Jordan K. Hubbard
-.\"
-.\"
-.\" @(#)pkg_add.1
-.\"
-.Dd April 3, 2006
-.Dt PKG_ADD 1
-.Os
-.Sh NAME
-.Nm pkg_add
-.Nd a utility for installing and upgrading software package distributions
-.Sh SYNOPSIS
-.Nm
-.Op Fl AfILMnRSuVv
-.Op Fl K Ar pkg_dbdir
-.Op Fl p Ar prefix
-.Op Fl s Ar verification-type
-.Op Fl t Ar template
-.Op Fl W Ar viewbase
-.Op Fl w Ar view
-.Ar \fR[[ftp|http]://[\fIuser\fR[:\fIpassword]\fR@]\fIhost\fR[:\fIport\fR]][/\fIpath/\fR]pkg-name ...
-.Sh DESCRIPTION
-The
-.Nm
-command is used to extract and upgrade packages that have been
-previously created with the
-.Xr pkg_create 1
-command.
-Packages are prepared collections of pre-built binaries, documentation,
-configurations, installation instructions and/or other files.
-.Nm
-can recursively install other packages that the current package
-depends on or requires from both local disk and via FTP or HTTP.
-.Sh WARNING
-.Bf -emphasis
-Since the
-.Nm
-command may execute scripts or programs contained within a package file,
-your system may be susceptible to
-.Dq Trojan horses
-or other subtle
-attacks from miscreants who create dangerous package files.
-.Pp
-You are advised to verify the competence and identity of those who
-provide installable package files.
-For extra protection, use the digital signatures provided where possible
-(see the
-.Fl s
-option), or, failing that, use the
-.Fl M
-flag to extract the package file, and inspect its contents and scripts
-to ensure it poses no danger to your system's integrity.
-Pay particular attention to any
-.Pa +INSTALL ,
-.Pa +DEINSTALL ,
-.Pa +REQUIRE ,
-or
-.Pa +MTREE_DIRS
-files, and inspect the
-.Pa +CONTENTS
-file for
-.Cm @cwd ,
-.Cm @mode
-(check for setuid),
-.Cm @dirrm ,
-.Cm @exec ,
-and
-.Cm @unexec
-directives, and/or use the
-.Xr pkg_info 1
-command to examine the package file.
-.Ef
-.Sh OPTIONS
-The following command line arguments are supported:
-.Bl -tag -width indent
-.It Ar pkg-name [ ... ]
-The named packages are installed.
-.Ar pkg-name
-may be either a URL or a local pathname,
-a package name of "-" will cause
-.Nm
-to read from stdin.
-If the packages are not found in the current
-working directory,
-.Nm
-will search them in each directory named by the
-.Ev PKG_PATH
-environment variable.
-Any dependencies required by the installed package will be searched
-in the same location that the original package was installed from.
-.It Fl A
-Mark package as installed automatically, as dependency of another
-package.
-You can use
-.Dl Ic pkg_admin set automatic=YES
-to mark packages this way after installation, and
-.Dl Ic pkg_admin unset automatic
-to remove the mark.
-If you
-.Nm
-a package without specifying
-.Fl A
-after it had already been automatically installed, the mark is
-removed.
-.It Fl f
-Force installation to proceed even if prerequisite packages are not
-installed or the requirements script fails.
-Although
-.Nm
-will still try to find and auto-install missing prerequisite packages,
-a failure to find one will not be fatal.
-This flag also overrides the fatal error when the operating system or
-architecture the package was built on differ from that of the host.
-.It Fl I
-If an installation script exists for a given package, do not execute it.
-.It Fl K Ar pkg_dbdir
-Set
-.Ar pkg_dbdir
-as the package database directory.
-If this option isn't specified, then the package database directory is
-taken from the value of the environment variable
-.Ev PKG_DBDIR
-if it's set, otherwise it defaults to
-.Pa /var/db/pkg .
-.It Fl L
-Don't add the package to any views after installation.
-.It Fl M
-Run in
-.Cm MASTER
-mode.
-This is a very specialized mode for running
-.Nm
-and is meant to be run in conjunction with
-.Cm SLAVE
-mode.
-When run in this mode,
-.Nm
-does no work beyond extracting the package into a temporary staging
-area (see the
-.Fl t
-option), reading in the packing list, and then dumping it (prefaced by
-the current staging area) to stdout where it may be filtered by a
-program such as
-.Xr sed 1 .
-When used in conjunction with
-.Cm SLAVE
-mode, it allows you to make radical changes to the package structure
-before acting on its contents.
-.It Fl n
-Don't actually install a package, just report the steps that
-would be taken if it was.
-.It Fl p Ar prefix
-Set
-.Ar prefix
-as the directory in which to extract files from a package.
-If a package has set its default directory, it will be overridden
-by this flag.
-Note that only the first
-.Cm @cwd
-directive will be replaced, since
-.Nm
-has no way of knowing which directory settings are relative and
-which are absolute.
-It is rare in any case to see more than one directory transition made,
-but when such does happen and you wish to have control over *all* directory
-transitions, then you may then wish to look into the use of
-.Cm MASTER
-and
-.Cm SLAVE
-modes (see the
-.Fl M
-and
-.Fl S
-options).
-.It Fl R
-Do not record the installation of a package.
-This means that you cannot deinstall it later, so only use this option if
-you know what you are doing!
-.It Fl S
-Run in
-.Cm SLAVE
-mode.
-This is a very specialized mode for running
-.Nm
-and is meant to be run in conjunction with
-.Cm MASTER
-mode.
-When run in this mode,
-.Nm
-expects the release contents to be already extracted and waiting
-in the staging area, the location of which is read as a string
-from stdin.
-The complete packing list is also read from stdin,
-and the contents then acted on as normal.
-.It Fl s Ar verification-type
-Use a callout to an external program to verify the binary package
-being installed against an existing detached signature file.
-The signature file must reside in the same directory
-as the binary package.
-At the present time, the following verification types
-are defined: none, gpg and pgp5.
-The signature will be verified at install time, and the results
-will be displayed.
-If the signature type is anything other than none, the user will be asked if
-.Nm
-should proceed to install the binary package.
-The user must then take the decision whether to proceed or not, depending
-upon the amount of trust that is placed in the signatory of the binary
-package.
-Please note that, at the current time, it is not possible to use
-the verification feature when using
-.Nm
-to add a binary package via a URL - the package, and the related
-detached signature file, must be local
-for the verification to work.
-.It Fl t Ar template
-Use
-.Ar template
-as the input to
-.Xr mktemp 3
-when creating a
-.Dq staging area .
-By default, this is the string
-.Pa /var/tmp/instmp.XXXXXX ,
-but it may be necessary to override it in the situation where
-space in your
-.Pa /var/tmp
-directory is limited.
-Be sure to leave some number of
-.Sq X
-characters for
-.Xr mktemp 3
-to fill in with a unique ID.
-.Pp
-You can get a performance boost by setting the staging area
-.Ar template
-to reside on the same disk partition as target directories for package
-file installation; often this is
-.Pa /usr .
-.It Fl u
-If the package that's being installed is already installed, either
-in the same or a different version, an update is performed.
-If this is specified twice, then any dependant packages that are
-too old will also be updated to fulfill the dependency.
-See below for a more detailed description of the process.
-.It Fl V
-Print version number and exit.
-.It Fl v
-Turn on verbose output.
-.It Fl W Ar viewbase
-Set
-.Ar viewbase
-as the base directory for the managed views.
-The default
-.Ar viewbase
-directory is set by
-.Xr pkg_view 1 .
-This value also may be set from the
-.Ev LOCALBASE
-environment variable.
-.It Fl w Ar view
-Set the
-.Ar view
-to which packages should be added after installation.
-The default
-.Ar view
-is set by
-.Xr pkg_view 1 .
-This value also may be set from the
-.Ev PKG_VIEW
-environment variable.
-.El
-.Pp
-One or more
-.Ar pkg-name
-arguments may be specified, each being either a file containing the
-package (these usually ending with the
-.Dq .tgz
-suffix) or a
-URL pointing at a file available on an ftp or web site.
-Thus you may extract files directly from their anonymous ftp or WWW
-locations (e.g.,
-.Nm
-ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/shells/bash-3.0nb1.tgz
-or
-.Nm
-http://www.example.org/packages/screen-4.0.tbz).
-Note: For ftp transfers, if you wish to use
-.Bf -emphasis
-passive mode
-.Ef
-ftp in such transfers, set the variable
-.Bf -emphasis
-FTP_PASSIVE_MODE
-.Ef
-to some value in your environment.
-Otherwise, the more standard ACTIVE mode may be used.
-If
-.Nm
-consistently fails to fetch a package from a site known to work,
-it may be because you have a firewall that demands the usage of
-.Bf -emphasis
-passive mode
-.Ef
-ftp.
-.Sh TECHNICAL DETAILS
-.Nm
-extracts each package's
-.Dq packing list
-into a special staging directory in /var/tmp (or $PKG_TMPDIR if set)
-and then runs through the following sequence to fully extract the contents
-of the package:
-.Bl -enum -offset indent
-.It
-A check is made to determine if the package or another version of it
-is already recorded as installed.
-If it is,
-installation is terminated if the
-.Fl u
-option is not given.
-.Pp
-If the
-.Fl u
-option is given, it's assumed the package should be replaced by the
-new version instead.
-Before doing so, all packages that depend on the
-pkg being upgraded are checked if they also work with the new version.
-If that test is successful, replacing is prepared by moving an existing
-.Pa +REQUIRED_BY
-file aside (if it exists), and running
-.Xr pkg_delete 1
-on the installed package.
-Installation then proceeds as if the package
-was not installed, and restores the
-.Pa +REQUIRED_BY
-file afterwards.
-.It
-A check is made to determine if the package conflicts (from
-.Cm @pkgcfl
-directives, see
-.Xr pkg_create 1 )
-with an already recorded as installed package.
-If it is, installation is terminated.
-.It
-All package dependencies (from
-.Cm @pkgdep
-directives, see
-.Xr pkg_create 1 )
-are read from the packing list.
-If any of these required packages are not currently installed,
-an attempt is made to find and install it;
-if the missing package cannot be found or installed,
-the installation is terminated.
-If the
-.Fl u
-option was specified twice, any required packages that are installed,
-but which have a version number that is considered to be too old,
-are also updated.
-The dependant packages are found according to the normal
-.Ev PKG_PATH
-rules.
-.It
-A search is made for any
-.Cm @option
-directives which control how the package is added to the system.
-The only currently implemented option is
-.Cm @option extract-in-place ,
-which causes the package to be extracted directly into its
-prefix directory rather than moving it through a staging area in
-.Pa /var/tmp .
-.It
-If
-.Cm @option extract-in-place
-is enabled, the package is now extracted directly into its
-final location, otherwise it is extracted into the staging area.
-.It
-The package build information is extracted from the
-.Pa +BUILD_INFO
-file and compared against the result of
-.Xr uname 3 .
-If the operating system or architecture of the package differ from
-that of the host, installation is aborted.
-This behavior is overridable with the
-.Fl f
-flag.
-.It
-The package build information from
-.Pa +BUILD_INFO
-is then checked for
-.Ev USE_ABI_DEPENDS=NO
-(or
-.Ev IGNORE_RECOMMENDED ) .
-If the package was built with ABI dependency recommendations ignored,
-a warning will be issued.
-.It
-If the package contains a
-.Ar require
-script (see
-.Xr pkg_create 1 ) ,
-it is executed with the following arguments:
-.Bl -tag -width indentindent
-.It Ar pkg-name
-The name of the package being installed
-.It Cm INSTALL
-Keyword denoting to the script that it is to run an installation requirements
-check.
-(The keyword is useful only to scripts which serve multiple functions).
-.El
-.Pp
-If the
-.Ar require
-script exits with a non-zero status code, the installation is terminated.
-.It
-If the package contains an
-.Ar install
-script, it is executed with the following arguments:
-.Bl -tag -width indentindent
-.It Ar pkg-name
-The name of the package being installed.
-.It Cm PRE-INSTALL
-Keyword denoting that the script is to perform any actions needed before
-the package is installed.
-.El
-.Pp
-If the
-.Ar install
-script exits with a non-zero status code, the installation is terminated.
-.It
-If
-.Cm @option extract-in-place
-is not present in the packing list,
-then it is used as a guide for moving (or copying, as necessary) files from
-the staging area into their final locations.
-.It
-If the package contains an
-.Ar mtreefile
-file (see
-.Xr pkg_create 1 ) ,
-then mtree is invoked as:
-.Bd -filled -offset indent -compact
-.Cm mtree
-.Fl u
-.Fl f
-.Ar mtreefile
-.Fl d
-.Fl e
-.Fl p
-.Pa prefix
-.Ed
-where
-.Pa prefix
-is either the prefix specified with the
-.Fl p
-flag or, if no
-.Fl p
-flag was specified, the name of the first directory named by a
-.Cm @cwd
-directive within this package.
-.It
-If an
-.Ar install
-script exists for the package, it is executed with the following arguments:
-.Bl -tag -width indentindent
-.It Ar pkg_name
-The name of the package being installed.
-.It Cm POST-INSTALL
-Keyword denoting that the script is to perform any actions needed
-after the package has been installed.
-.El
-.It
-After installation is complete, a copy of the packing list,
-.Ar deinstall
-script, description, and display files are copied into
-.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt]
-for subsequent possible use by
-.Xr pkg_delete 1 .
-Any package dependencies are recorded in the other packages'
-.Pa /var/db/pkg/\*[Lt]other-pkg\*[Gt]/+REQUIRED_BY
-file
-(if an alternate package database directory is specified, then it
-overrides the
-.Pa /var/db/pkg
-path shown above).
-.It
-If the package is a depoted package, then add it to the default view.
-.It
-The staging area is deleted and the program terminates.
-.It
-Finally, if we were upgrading a package, any
-.Pa +REQUIRED_BY
-file that was moved aside before upgrading was started is now moved
-back into place.
-.El
-.Pp
-The
-.Ar install
-and
-.Ar require
-scripts are called with the environment variable
-.Ev PKG_PREFIX
-set to the installation prefix (see the
-.Fl p
-option above).
-This allows a package author to write a script
-that reliably performs some action on the directory where the package
-is installed, even if the user might change it with the
-.Fl p
-flag to
-.Cm pkg_add .
-The scripts are also called with the
-.Ev PKG_METADATA_DIR
-environment variable set to the location of the
-.Pa +*
-meta-data files, and with the
-.Ev PKG_REFCOUNT_DBDIR
-environment variable set to the location of the package reference counts
-database directory.
-.Sh ENVIRONMENT
-.Bl -tag -width PKG_TMPDIR
-.It Ev LOCALBASE
-This is the location of the
-.Ar viewbase
-directory in which all the views are managed.
-The default
-.Ar viewbase
-directory is
-.Pa /usr/pkg .
-.It Ev PKG_DBDIR
-If the
-.Fl K
-flag isn't given, then
-.Ev PKG_DBDIR
-is the location of the package database directory.
-The default package database directory is
-.Pa /var/db/pkg .
-.It Ev PKG_PATH
-The value of the
-.Ev PKG_PATH
-is used if a given package can't be found, it's usually set to
-.Pa /usr/pkgsrc/packages/All .
-The environment variable
-should be a series of entries separated by semicolons.
-Each entry consists of a directory name or URL.
-The current directory may be indicated implicitly by an empty directory
-name, or explicitly by a single period.
-FTP URLs may not end with a slash.
-.It Ev PKG_REFCOUNT_DBDIR
-Location of the package reference counts database directory.
-The default location is the path to the package database directory with
-.Dq .refcount
-appended to the path, e.g.
-.Pa /var/db/pkg.refcount .
-.It Ev PKG_TMPDIR
-Staging directory for installing packages, defaults to /var/tmp.
-Set to directory with lots of free disk if you run out of
-space when installing a binary package.
-.It Ev PKG_VIEW
-The default view can be specified in the
-.Ev PKG_VIEW
-environment variable.
-.El
-.Sh EXAMPLES
-In all cases,
-.Nm
-will try to install binary packages listed in dependencies list.
-.Pp
-You can specify a compiled binary package explicitly on the command line.
-.Bd -literal
-# pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz
-.Ed
-.Pp
-If you omit the version number,
-.Nm
-will install the latest version available.
-With
-.Fl v ,
-.Nm
-emits more messages to terminal.
-.Bd -literal
-# pkg_add -v /usr/pkgsrc/packages/All/unzip
-.Ed
-.Pp
-You can grab a compiled binary package from remote location by specifying
-a URL.
-The URL can be put into an environment variable,
-.Ev PKG_PATH .
-.Bd -literal
-# pkg_add -v ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/All/firefox-1.0.3.tgz
-
-# export PKG_PATH=ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/All
-# pkg_add -v firefox
-.Ed
-.Pp
-Over time, as problems are found in packages, they will be moved
-from the
-.Pa All
-subdirectory into the
-.Pa vulnerable
-subdirectory.
-If you want to accept vulnerable packages by default
-(and know what you are doing),
-you can add the
-.Pa vulnerable
-directory to your
-.Ev PKG_PATH
-like this:
-.Bd -literal
-# export PKG_PATH="ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/All;ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/vulnerable"
-.Ed
-.Pp
-(The quotes are needed because semicolon
-.Pq Sq \&;
-is a shell meta-character.)
-If you do this, consider installing and using the
-.Pa security/audit-packages
-package and running it after every
-.Nm .
-.Sh SEE ALSO
-.Xr pkg_admin 1 ,
-.Xr pkg_create 1 ,
-.Xr pkg_delete 1 ,
-.Xr pkg_info 1 ,
-.Xr mktemp 3 ,
-.Xr sysconf 3 ,
-.Xr packages 7 ,
-.Xr mtree 8
-.Sh AUTHORS
-.Bl -tag -width indent -compact
-.It "Jordan Hubbard"
-Initial work and ongoing development.
-.It "John Kohl"
-.Nx
-refinements.
-.It "Hubert Feyrer"
-.Nx
-wildcard dependency processing, pkgdb, upgrading, etc.
-.It Thomas Klausner
-HTTP support.
-.El
-.Sh BUGS
-Hard links between files in a distribution are only preserved if either
-(1) the staging area is on the same file system as the target directory of
-all the links to the file, or (2) all the links to the file are bracketed by
-.Cm @cwd
-directives in the contents file,
-.Em and
-and the link names are extracted with a single
-.Cm tar
-command (not split between
-invocations due to exec argument-space limitations--this depends on the
-value returned by
-.Fn sysconf _SC_ARG_MAX ) .
-.Pp
-Package upgrading needs a lot more work to be really universal.
-.Pp
-Sure to be others.
diff --git a/pkgtools/pkg_install/files/add/pkg_add.cat1 b/pkgtools/pkg_install/files/add/pkg_add.cat1
deleted file mode 100644
index e6c7282b70c..00000000000
--- a/pkgtools/pkg_install/files/add/pkg_add.cat1
+++ /dev/null
@@ -1,391 +0,0 @@
-PKG_ADD(1) General Commands Manual PKG_ADD(1)
-
-NNAAMMEE
- ppkkgg__aadddd -- a utility for installing and upgrading software package dis-
- tributions
-
-SSYYNNOOPPSSIISS
- ppkkgg__aadddd [--AAffIILLMMnnRRSSuuVVvv] [--KK _p_k_g___d_b_d_i_r] [--pp _p_r_e_f_i_x] [--ss _v_e_r_i_f_i_c_a_t_i_o_n_-_t_y_p_e]
- [--tt _t_e_m_p_l_a_t_e] [--WW _v_i_e_w_b_a_s_e] [--ww _v_i_e_w]
- [[ftp|http]://[_u_s_e_r[:_p_a_s_s_w_o_r_d_]@]_h_o_s_t[:_p_o_r_t]][/_p_a_t_h_/]pkg-name ...
-
-DDEESSCCRRIIPPTTIIOONN
- The ppkkgg__aadddd command is used to extract and upgrade packages that have
- been previously created with the pkg_create(1) command. Packages are
- prepared collections of pre-built binaries, documentation, configura-
- tions, installation instructions and/or other files. ppkkgg__aadddd can recur-
- sively install other packages that the current package depends on or
- requires from both local disk and via FTP or HTTP.
-
-WWAARRNNIINNGG
- _S_i_n_c_e _t_h_e ppkkgg__aadddd _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _c_o_n_t_a_i_n_e_d
- _w_i_t_h_i_n _a _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n
- _h_o_r_s_e_s_'_' _o_r _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s
- _p_a_c_k_a_g_e _f_i_l_e_s_.
-
- _Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_-
- _v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _u_s_e _t_h_e _d_i_g_i_t_a_l
- _s_i_g_n_a_t_u_r_e_s _p_r_o_v_i_d_e_d _w_h_e_r_e _p_o_s_s_i_b_l_e _(_s_e_e _t_h_e --ss _o_p_t_i_o_n_)_, _o_r_, _f_a_i_l_i_n_g _t_h_a_t_,
- _u_s_e _t_h_e --MM _f_l_a_g _t_o _e_x_t_r_a_c_t _t_h_e _p_a_c_k_a_g_e _f_i_l_e_, _a_n_d _i_n_s_p_e_c_t _i_t_s _c_o_n_t_e_n_t_s _a_n_d
- _s_c_r_i_p_t_s _t_o _e_n_s_u_r_e _i_t _p_o_s_e_s _n_o _d_a_n_g_e_r _t_o _y_o_u_r _s_y_s_t_e_m_'_s _i_n_t_e_g_r_i_t_y_. _P_a_y
- _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L_, _+_D_E_I_N_S_T_A_L_L_, _+_R_E_Q_U_I_R_E_, _o_r
- _+_M_T_R_E_E___D_I_R_S _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@ccwwdd_, @@mmooddee _(_c_h_e_c_k
- _f_o_r _s_e_t_u_i_d_)_, @@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e
- pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _p_a_c_k_a_g_e _f_i_l_e_.
-
-OOPPTTIIOONNSS
- The following command line arguments are supported:
-
- _p_k_g_-_n_a_m_e [_._._.]
- The named packages are installed. _p_k_g_-_n_a_m_e may be either a URL
- or a local pathname, a package name of "-" will cause ppkkgg__aadddd to
- read from stdin. If the packages are not found in the current
- working directory, ppkkgg__aadddd will search them in each directory
- named by the PKG_PATH environment variable. Any dependencies
- required by the installed package will be searched in the same
- location that the original package was installed from.
-
- --AA Mark package as installed automatically, as dependency of another
- package. You can use
- ppkkgg__aaddmmiinn sseett aauuttoommaattiicc==YYEESS
- to mark packages this way after installation, and
- ppkkgg__aaddmmiinn uunnsseett aauuttoommaattiicc
- to remove the mark. If you ppkkgg__aadddd a package without specifying
- --AA after it had already been automatically installed, the mark is
- removed.
-
- --ff Force installation to proceed even if prerequisite packages are
- not installed or the requirements script fails. Although ppkkgg__aadddd
- will still try to find and auto-install missing prerequisite
- packages, a failure to find one will not be fatal. This flag
- also overrides the fatal error when the operating system or
- architecture the package was built on differ from that of the
- host.
-
- --II If an installation script exists for a given package, do not exe-
- cute it.
-
- --KK _p_k_g___d_b_d_i_r
- Set _p_k_g___d_b_d_i_r as the package database directory. If this option
- isn't specified, then the package database directory is taken
- from the value of the environment variable PKG_DBDIR if it's set,
- otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
-
- --LL Don't add the package to any views after installation.
-
- --MM Run in MMAASSTTEERR mode. This is a very specialized mode for running
- ppkkgg__aadddd and is meant to be run in conjunction with SSLLAAVVEE mode.
- When run in this mode, ppkkgg__aadddd does no work beyond extracting the
- package into a temporary staging area (see the --tt option), read-
- ing in the packing list, and then dumping it (prefaced by the
- current staging area) to stdout where it may be filtered by a
- program such as sed(1). When used in conjunction with SSLLAAVVEE
- mode, it allows you to make radical changes to the package struc-
- ture before acting on its contents.
-
- --nn Don't actually install a package, just report the steps that
- would be taken if it was.
-
- --pp _p_r_e_f_i_x
- Set _p_r_e_f_i_x as the directory in which to extract files from a
- package. If a package has set its default directory, it will be
- overridden by this flag. Note that only the first @@ccwwdd directive
- will be replaced, since ppkkgg__aadddd has no way of knowing which
- directory settings are relative and which are absolute. It is
- rare in any case to see more than one directory transition made,
- but when such does happen and you wish to have control over *all*
- directory transitions, then you may then wish to look into the
- use of MMAASSTTEERR and SSLLAAVVEE modes (see the --MM and --SS options).
-
- --RR Do not record the installation of a package. This means that you
- cannot deinstall it later, so only use this option if you know
- what you are doing!
-
- --SS Run in SSLLAAVVEE mode. This is a very specialized mode for running
- ppkkgg__aadddd and is meant to be run in conjunction with MMAASSTTEERR mode.
- When run in this mode, ppkkgg__aadddd expects the release contents to be
- already extracted and waiting in the staging area, the location
- of which is read as a string from stdin. The complete packing
- list is also read from stdin, and the contents then acted on as
- normal.
-
- --ss _v_e_r_i_f_i_c_a_t_i_o_n_-_t_y_p_e
- Use a callout to an external program to verify the binary package
- being installed against an existing detached signature file. The
- signature file must reside in the same directory as the binary
- package. At the present time, the following verification types
- are defined: none, gpg and pgp5. The signature will be verified
- at install time, and the results will be displayed. If the sig-
- nature type is anything other than none, the user will be asked
- if ppkkgg__aadddd should proceed to install the binary package. The
- user must then take the decision whether to proceed or not,
- depending upon the amount of trust that is placed in the signa-
- tory of the binary package. Please note that, at the current
- time, it is not possible to use the verification feature when
- using ppkkgg__aadddd to add a binary package via a URL - the package,
- and the related detached signature file, must be local for the
- verification to work.
-
- --tt _t_e_m_p_l_a_t_e
- Use _t_e_m_p_l_a_t_e as the input to mktemp(3) when creating a ``staging
- area''. By default, this is the string _/_v_a_r_/_t_m_p_/_i_n_s_t_m_p_._X_X_X_X_X_X,
- but it may be necessary to override it in the situation where
- space in your _/_v_a_r_/_t_m_p directory is limited. Be sure to leave
- some number of `X' characters for mktemp(3) to fill in with a
- unique ID.
-
- You can get a performance boost by setting the staging area
- _t_e_m_p_l_a_t_e to reside on the same disk partition as target directo-
- ries for package file installation; often this is _/_u_s_r.
-
- --uu If the package that's being installed is already installed,
- either in the same or a different version, an update is per-
- formed. If this is specified twice, then any dependant packages
- that are too old will also be updated to fulfill the dependency.
- See below for a more detailed description of the process.
-
- --VV Print version number and exit.
-
- --vv Turn on verbose output.
-
- --WW _v_i_e_w_b_a_s_e
- Set _v_i_e_w_b_a_s_e as the base directory for the managed views. The
- default _v_i_e_w_b_a_s_e directory is set by pkg_view(1). This value
- also may be set from the LOCALBASE environment variable.
-
- --ww _v_i_e_w
- Set the _v_i_e_w to which packages should be added after installa-
- tion. The default _v_i_e_w is set by pkg_view(1). This value also
- may be set from the PKG_VIEW environment variable.
-
- One or more _p_k_g_-_n_a_m_e arguments may be specified, each being either a file
- containing the package (these usually ending with the ``.tgz'' suffix) or
- a URL pointing at a file available on an ftp or web site. Thus you may
- extract files directly from their anonymous ftp or WWW locations (e.g.,
- ppkkgg__aadddd ftp://ftp.NetBSD.org/pub/NetBSD/pack-
- ages/2.0/i386/shells/bash-3.0nb1.tgz or ppkkgg__aadddd http://www.exam-
- ple.org/packages/screen-4.0.tbz). Note: For ftp transfers, if you wish
- to use _p_a_s_s_i_v_e _m_o_d_e ftp in such transfers, set the variable _F_T_P___P_A_S_-
- _S_I_V_E___M_O_D_E to some value in your environment. Otherwise, the more stan-
- dard ACTIVE mode may be used. If ppkkgg__aadddd consistently fails to fetch a
- package from a site known to work, it may be because you have a firewall
- that demands the usage of _p_a_s_s_i_v_e _m_o_d_e ftp.
-
-TTEECCHHNNIICCAALL DDEETTAAIILLSS
- ppkkgg__aadddd extracts each package's ``packing list'' into a special staging
- directory in /var/tmp (or $PKG_TMPDIR if set) and then runs through the
- following sequence to fully extract the contents of the package:
-
- 1. A check is made to determine if the package or another version
- of it is already recorded as installed. If it is, installa-
- tion is terminated if the --uu option is not given.
-
- If the --uu option is given, it's assumed the package should be
- replaced by the new version instead. Before doing so, all
- packages that depend on the pkg being upgraded are checked if
- they also work with the new version. If that test is success-
- ful, replacing is prepared by moving an existing _+_R_E_Q_U_I_R_E_D___B_Y
- file aside (if it exists), and running pkg_delete(1) on the
- installed package. Installation then proceeds as if the pack-
- age was not installed, and restores the _+_R_E_Q_U_I_R_E_D___B_Y file
- afterwards.
-
- 2. A check is made to determine if the package conflicts (from
- @@ppkkggccffll directives, see pkg_create(1)) with an already
- recorded as installed package. If it is, installation is ter-
- minated.
-
- 3. All package dependencies (from @@ppkkggddeepp directives, see
- pkg_create(1)) are read from the packing list. If any of
- these required packages are not currently installed, an
- attempt is made to find and install it; if the missing package
- cannot be found or installed, the installation is terminated.
- If the --uu option was specified twice, any required packages
- that are installed, but which have a version number that is
- considered to be too old, are also updated. The dependant
- packages are found according to the normal PKG_PATH rules.
-
- 4. A search is made for any @@ooppttiioonn directives which control how
- the package is added to the system. The only currently imple-
- mented option is @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee, which causes the
- package to be extracted directly into its prefix directory
- rather than moving it through a staging area in _/_v_a_r_/_t_m_p.
-
- 5. If @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee is enabled, the package is now
- extracted directly into its final location, otherwise it is
- extracted into the staging area.
-
- 6. The package build information is extracted from the
- _+_B_U_I_L_D___I_N_F_O file and compared against the result of uname(3).
- If the operating system or architecture of the package differ
- from that of the host, installation is aborted. This behavior
- is overridable with the --ff flag.
-
- 7. The package build information from _+_B_U_I_L_D___I_N_F_O is then checked
- for USE_ABI_DEPENDS=NO (or IGNORE_RECOMMENDED). If the package
- was built with ABI dependency recommendations ignored, a warn-
- ing will be issued.
-
- 8. If the package contains a _r_e_q_u_i_r_e script (see pkg_create(1)),
- it is executed with the following arguments:
-
- _p_k_g_-_n_a_m_e The name of the package being installed
-
- IINNSSTTAALLLL Keyword denoting to the script that it is to run
- an installation requirements check. (The key-
- word is useful only to scripts which serve mul-
- tiple functions).
-
- If the _r_e_q_u_i_r_e script exits with a non-zero status code, the
- installation is terminated.
-
- 9. If the package contains an _i_n_s_t_a_l_l script, it is executed with
- the following arguments:
-
- _p_k_g_-_n_a_m_e The name of the package being installed.
-
- PPRREE--IINNSSTTAALLLL Keyword denoting that the script is to perform
- any actions needed before the package is
- installed.
-
- If the _i_n_s_t_a_l_l script exits with a non-zero status code, the
- installation is terminated.
-
- 10. If @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee is not present in the packing
- list, then it is used as a guide for moving (or copying, as
- necessary) files from the staging area into their final loca-
- tions.
-
- 11. If the package contains an _m_t_r_e_e_f_i_l_e file (see pkg_create(1)),
- then mtree is invoked as:
- mmttrreeee --uu --ff _m_t_r_e_e_f_i_l_e --dd --ee --pp _p_r_e_f_i_x
- where _p_r_e_f_i_x is either the prefix specified with the --pp flag
- or, if no --pp flag was specified, the name of the first direc-
- tory named by a @@ccwwdd directive within this package.
-
- 12. If an _i_n_s_t_a_l_l script exists for the package, it is executed
- with the following arguments:
-
- _p_k_g___n_a_m_e The name of the package being installed.
-
- PPOOSSTT--IINNSSTTAALLLL Keyword denoting that the script is to perform
- any actions needed after the package has been
- installed.
-
- 13. After installation is complete, a copy of the packing list,
- _d_e_i_n_s_t_a_l_l script, description, and display files are copied
- into _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_> for subsequent possible use by
- pkg_delete(1). Any package dependencies are recorded in the
- other packages' _/_v_a_r_/_d_b_/_p_k_g_/_<_o_t_h_e_r_-_p_k_g_>_/_+_R_E_Q_U_I_R_E_D___B_Y file (if
- an alternate package database directory is specified, then it
- overrides the _/_v_a_r_/_d_b_/_p_k_g path shown above).
-
- 14. If the package is a depoted package, then add it to the
- default view.
-
- 15. The staging area is deleted and the program terminates.
-
- 16. Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file
- that was moved aside before upgrading was started is now moved
- back into place.
-
- The _i_n_s_t_a_l_l and _r_e_q_u_i_r_e scripts are called with the environment variable
- PKG_PREFIX set to the installation prefix (see the --pp option above).
- This allows a package author to write a script that reliably performs
- some action on the directory where the package is installed, even if the
- user might change it with the --pp flag to ppkkgg__aadddd. The scripts are also
- called with the PKG_METADATA_DIR environment variable set to the location
- of the _+_* meta-data files, and with the PKG_REFCOUNT_DBDIR environment
- variable set to the location of the package reference counts database
- directory.
-
-EENNVVIIRROONNMMEENNTT
- LOCALBASE This is the location of the _v_i_e_w_b_a_s_e directory in which all
- the views are managed. The default _v_i_e_w_b_a_s_e directory is
- _/_u_s_r_/_p_k_g.
-
- PKG_DBDIR If the --KK flag isn't given, then PKG_DBDIR is the location of
- the package database directory. The default package database
- directory is _/_v_a_r_/_d_b_/_p_k_g.
-
- PKG_PATH The value of the PKG_PATH is used if a given package can't be
- found, it's usually set to _/_u_s_r_/_p_k_g_s_r_c_/_p_a_c_k_a_g_e_s_/_A_l_l. The
- environment variable should be a series of entries separated
- by semicolons. Each entry consists of a directory name or
- URL. The current directory may be indicated implicitly by an
- empty directory name, or explicitly by a single period. FTP
- URLs may not end with a slash.
-
- PKG_REFCOUNT_DBDIR
- Location of the package reference counts database directory.
- The default location is the path to the package database
- directory with ``.refcount'' appended to the path, e.g.
- _/_v_a_r_/_d_b_/_p_k_g_._r_e_f_c_o_u_n_t.
-
- PKG_TMPDIR Staging directory for installing packages, defaults to
- /var/tmp. Set to directory with lots of free disk if you run
- out of space when installing a binary package.
-
- PKG_VIEW The default view can be specified in the PKG_VIEW environment
- variable.
-
-EEXXAAMMPPLLEESS
- In all cases, ppkkgg__aadddd will try to install binary packages listed in
- dependencies list.
-
- You can specify a compiled binary package explicitly on the command line.
-
- # pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz
-
- If you omit the version number, ppkkgg__aadddd will install the latest version
- available. With --vv, ppkkgg__aadddd emits more messages to terminal.
-
- # pkg_add -v /usr/pkgsrc/packages/All/unzip
-
- You can grab a compiled binary package from remote location by specifying
- a URL. The URL can be put into an environment variable, PKG_PATH.
-
- # pkg_add -v ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/All/firefox-1.0.3.tgz
-
- # export PKG_PATH=ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/All
- # pkg_add -v firefox
-
- Over time, as problems are found in packages, they will be moved from the
- _A_l_l subdirectory into the _v_u_l_n_e_r_a_b_l_e subdirectory. If you want to accept
- vulnerable packages by default (and know what you are doing), you can add
- the _v_u_l_n_e_r_a_b_l_e directory to your PKG_PATH like this:
-
- # export PKG_PATH="ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/All;ftp://ftp.NetBSD.org/pub/NetBSD/packages/2.0/i386/vulnerable"
-
- (The quotes are needed because semicolon (`;') is a shell meta-charac-
- ter.) If you do this, consider installing and using the
- _s_e_c_u_r_i_t_y_/_a_u_d_i_t_-_p_a_c_k_a_g_e_s package and running it after every ppkkgg__aadddd.
-
-SSEEEE AALLSSOO
- pkg_admin(1), pkg_create(1), pkg_delete(1), pkg_info(1), mktemp(3),
- sysconf(3), packages(7), mtree(8)
-
-AAUUTTHHOORRSS
- Jordan Hubbard
- Initial work and ongoing development.
- John Kohl
- NetBSD refinements.
- Hubert Feyrer
- NetBSD wildcard dependency processing, pkgdb, upgrading, etc.
- Thomas Klausner
- HTTP support.
-
-BBUUGGSS
- Hard links between files in a distribution are only preserved if either
- (1) the staging area is on the same file system as the target directory
- of all the links to the file, or (2) all the links to the file are brack-
- eted by @@ccwwdd directives in the contents file, _a_n_d and the link names are
- extracted with a single ttaarr command (not split between invocations due to
- exec argument-space limitations--this depends on the value returned by
- ssyyssccoonnff(___S_C___A_R_G___M_A_X)).
-
- Package upgrading needs a lot more work to be really universal.
-
- Sure to be others.
-
-pkgsrc April 3, 2006 pkgsrc
diff --git a/pkgtools/pkg_install/files/add/verify.c b/pkgtools/pkg_install/files/add/verify.c
deleted file mode 100644
index 00fb8f2770c..00000000000
--- a/pkgtools/pkg_install/files/add/verify.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* $NetBSD: verify.c,v 1.7 2004/12/29 12:16:56 agc Exp $ */
-
-/*
- * Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Alistair G. Crooks.
- * 4. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1999 \
- The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: verify.c,v 1.7 2004/12/29 12:16:56 agc Exp $");
-#endif
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "verify.h"
-#include "lib.h"
-
-enum {
- MaxExtensions = 10
-};
-
-/* this struct defines a verification type */
-typedef struct ver_t {
- const char *name; /* name of type */
- const char *command1; /* command to execute to verify */
- const char *command2; /* command to execute to verify */
- const char *extensions[MaxExtensions]; /* signature file extensions */
-} ver_t;
-
-static char *verification_type; /* the verification type which has been selected */
-
-/* called when gpg verification type is selected */
-static int
-do_verify(const char *pkgname, const char *cmd1, const char *cmd2, const char *const *extensions)
-{
- struct stat st;
- const char *const *ep;
- char buf[BUFSIZ];
- char f[MaxPathSize];
- int ret;
- int i;
-
- if (cmd1 == NULL) {
- return 1;
- }
- for (i = 0, ep = extensions ; i < MaxExtensions && *ep ; ep++, i++) {
- (void) snprintf(f, sizeof(f), "%s%s", pkgname, *ep);
- if (stat(f, &st) == 0) {
- (void) fprintf(stderr, "pkg_add: Using signature file: %s\n", f);
- ret = (cmd2 == NULL) ? fexec(cmd1, f, NULL) : fexec(cmd1, cmd2, f, NULL);
- if (ret != 0) {
- (void) fprintf(stderr, "*** WARNING ***: `%s' has a bad signature\n", f);
- return 0;
- }
- (void) fprintf(stderr, "Proceed with addition of %s: [y/n]? ", pkgname);
- if (fgets(buf, sizeof(buf), stdin) == NULL) {
- (void) fprintf(stderr, "Exiting now...");
- exit(EXIT_FAILURE);
- }
- switch(buf[0]) {
- case 'Y':
- case 'y':
- case '1':
- return 1;
- }
- (void) fprintf(stderr, "Package `%s' will not be added\n", pkgname);
- return 0;
- }
- }
- (void) fprintf(stderr, "No valid signature file found for `%s'\n", pkgname);
- return 0;
-}
-
-/* table holding possible verifications which can be made */
-static const ver_t vertab[] = {
- { "none", NULL, NULL, { NULL } },
- { "gpg", "gpg", "--verify", { ".sig", ".asc", NULL } },
- { "pgp5", "pgpv", NULL, { ".sig", ".asc", ".pgp", NULL } },
- { NULL }
-};
-
-/* set the verification type - usually called during command line processing */
-void
-set_verification(const char *type)
-{
- if (verification_type) {
- (void) free(verification_type);
- }
- verification_type = strdup(type);
-}
-
-/* return the type of verification that is being used */
-char *
-get_verification(void)
-{
- const ver_t *vp;
-
- if (verification_type != NULL) {
- for (vp = vertab ; vp->name ; vp++) {
- if (strcasecmp(verification_type, vp->name) == 0) {
- return verification_type;
- }
- }
- }
- return "none";
-}
-
-/* verify the digital signature (if any) on a package */
-int
-verify(const char *pkg)
-{
- const ver_t *vp;
-
- if (verification_type == NULL) {
- return do_verify(pkg, NULL, NULL, NULL);
- }
- for (vp = vertab ; vp->name ; vp++) {
- if (strcasecmp(verification_type, vp->name) == 0) {
- return do_verify(pkg, vp->command1, vp->command2, vp->extensions);
- }
- }
- (void) fprintf(stderr, "Can't find `%s' verification details\n", verification_type);
- return 0;
-}
diff --git a/pkgtools/pkg_install/files/add/verify.h b/pkgtools/pkg_install/files/add/verify.h
deleted file mode 100644
index 52a4c07d81d..00000000000
--- a/pkgtools/pkg_install/files/add/verify.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $NetBSD: verify.h,v 1.3 2003/09/23 07:13:47 grant Exp $ */
-
-/*
- * Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Alistair G. Crooks.
- * 4. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef VERIFY_H_
-#define VERIFY_H_
-
-void set_verification(const char *);
-char *get_verification(void);
-int verify(const char *);
-
-#endif /* VERIFY_H_ */
diff --git a/pkgtools/pkg_install/files/admin/Makefile.in b/pkgtools/pkg_install/files/admin/Makefile.in
deleted file mode 100644
index 5117335ef93..00000000000
--- a/pkgtools/pkg_install/files/admin/Makefile.in
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile.in,v 1.10 2004/08/21 06:33:40 jlam Exp $
-
-srcdir= @srcdir@
-
-prefix= @prefix@
-exec_prefix= @exec_prefix@
-sbindir= @sbindir@
-mandir= @mandir@
-
-man1dir= $(mandir)/man1
-cat1dir= $(mandir)/cat1
-
-CC= @CC@
-CCLD= $(CC)
-LIBS= -linstall @LIBS@
-CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS= @DEFS@
-CFLAGS= @CFLAGS@
-LDFLAGS= @LDFLAGS@ -L../lib
-
-INSTALL= @INSTALL@
-
-PROG= pkg_admin
-
-OBJS= main.o
-
-all: $(PROG)
-
-.c.o:
- $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(PROG): $(OBJS)
- $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) $(PROG)
-
-install:
- $(INSTALL) -m 755 -d $(sbindir)
- $(INSTALL) -m 755 -d $(man1dir)
- $(INSTALL) -m 755 -d $(cat1dir)
- $(INSTALL) $(PROG) $(sbindir)
- $(INSTALL) -m 444 $(PROG).1 $(man1dir)/$(PROG).1
- $(INSTALL) -m 444 $(PROG).cat1 $(cat1dir)/$(PROG).0
diff --git a/pkgtools/pkg_install/files/admin/README b/pkgtools/pkg_install/files/admin/README
deleted file mode 100644
index 74c13e0f1ed..00000000000
--- a/pkgtools/pkg_install/files/admin/README
+++ /dev/null
@@ -1,9 +0,0 @@
-Some of the options of this utility (add, delete) are *not* intended for
-public release. Any work regarding the consistancy of the pkgdb should
-be put into pkg_add/pkg_delete, instead of a brute-force "rebuild".
-
-The "rebuild" should be only needed wen upgrading from non-pkgdb-
-pkg_* tools to pkgdb-pkg_* tools.
-
-
- - hubertf
diff --git a/pkgtools/pkg_install/files/admin/main.c b/pkgtools/pkg_install/files/admin/main.c
deleted file mode 100644
index 696070f64cf..00000000000
--- a/pkgtools/pkg_install/files/admin/main.c
+++ /dev/null
@@ -1,854 +0,0 @@
-/* $NetBSD: main.c,v 1.20 2006/04/04 06:25:59 wiz Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.20 2006/04/04 06:25:59 wiz Exp $");
-#endif
-
-/*
- * Copyright (c) 1999 Hubert Feyrer. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Hubert Feyrer for
- * the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#if HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#if HAVE_MD5_H
-#include <md5.h>
-#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include "lib.h"
-
-#define DEFAULT_SFX ".t[bg]z" /* default suffix for ls{all,best} */
-
-static const char Options[] = "K:SVbd:qs:";
-
-int filecnt;
-int pkgcnt;
-
-static int quiet;
-
-static int checkpattern_fn(const char *, void *);
-static void set_unset_variable(char **, Boolean);
-
-/* print usage message and exit */
-static void
-usage(void)
-{
- (void) fprintf(stderr, "usage: %s [-bqSV] [-d lsdir] [-K pkg_dbdir] [-s sfx] command args ...\n"
- "Where 'commands' and 'args' are:\n"
- " rebuild - rebuild pkgdb from +CONTENTS files\n"
- " check [pkg ...] - check md5 checksum of installed files\n"
- " add pkg ... - add pkg files to database\n"
- " delete pkg ... - delete file entries for pkg in database\n"
- " set variable=value pkg ... - set installation variable for package\n"
- " unset variable pkg ... - unset installation variable for package\n"
-#ifdef PKGDB_DEBUG
- " addkey key value - add key and value\n"
- " delkey key - delete reference to key\n"
-#endif
- " lsall /path/to/pkgpattern - list all pkgs matching the pattern\n"
- " lsbest /path/to/pkgpattern - list pkgs matching the pattern best\n"
- " dump - dump database\n"
- " pmatch pattern pkg - returns true if pkg matches pattern, otherwise false\n",
- getprogname());
- exit(EXIT_FAILURE);
-}
-
-/*
- * Assumes CWD is in /var/db/pkg/<pkg>!
- */
-static void
-check1pkg(const char *pkgdir)
-{
- FILE *f;
- plist_t *p;
- package_t Plist;
- char *PkgName, *dirp = NULL, *md5file;
- char file[MaxPathSize];
- char dir[MaxPathSize];
-
- f = fopen(CONTENTS_FNAME, "r");
- if (f == NULL)
- err(EXIT_FAILURE, "can't open %s/%s/%s", _pkgdb_getPKGDB_DIR(), pkgdir, CONTENTS_FNAME);
-
- Plist.head = Plist.tail = NULL;
- read_plist(&Plist, f);
- p = find_plist(&Plist, PLIST_NAME);
- if (p == NULL)
- errx(EXIT_FAILURE, "Package %s has no @name, aborting.",
- pkgdir);
- PkgName = p->name;
- for (p = Plist.head; p; p = p->next) {
- switch (p->type) {
- case PLIST_FILE:
- if (dirp == NULL) {
- warnx("dirp not initialized, please send-pr!");
- abort();
- }
-
- (void) snprintf(file, sizeof(file), "%s/%s", dirp, p->name);
-
- if (isfile(file) || islinktodir(file)) {
- if (p->next && p->next->type == PLIST_COMMENT) {
- if (strncmp(p->next->name, CHECKSUM_HEADER, ChecksumHeaderLen) == 0) {
- if ((md5file = MD5File(file, NULL)) != NULL) {
- /* Mismatch? */
-#ifdef PKGDB_DEBUG
- printf("%s: md5 should=<%s>, is=<%s>\n",
- file, p->next->name + ChecksumHeaderLen, md5file);
-#endif
- if (strcmp(md5file, p->next->name + ChecksumHeaderLen) != 0)
- printf("%s fails MD5 checksum\n", file);
-
- free(md5file);
- }
- } else if (strncmp(p->next->name, SYMLINK_HEADER, SymlinkHeaderLen) == 0) {
- char buf[MaxPathSize + SymlinkHeaderLen];
- int cc;
-
- (void) strlcpy(buf, SYMLINK_HEADER, sizeof(buf));
- if ((cc = readlink(file, &buf[SymlinkHeaderLen],
- sizeof(buf) - SymlinkHeaderLen - 1)) < 0) {
- warnx("can't readlink `%s'", file);
- } else {
- buf[SymlinkHeaderLen + cc] = 0x0;
- if (strcmp(buf, p->next->name) != 0) {
- printf("symlink (%s) is not same as recorded value, %s: %s\n",
- file, buf, p->next->name);
- }
- }
- }
- }
-
- filecnt++;
- } else {
- warnx("%s: File %s is in %s but not on filesystem!", PkgName, file, CONTENTS_FNAME);
- }
- break;
- case PLIST_CWD:
- if (strcmp(p->name, ".") != 0)
- dirp = p->name;
- else {
- (void) snprintf(dir, sizeof(dir), "%s/%s", _pkgdb_getPKGDB_DIR(), pkgdir);
- dirp = dir;
- }
- break;
- case PLIST_IGNORE:
- p = p->next;
- break;
- case PLIST_SHOW_ALL:
- case PLIST_SRC:
- case PLIST_CMD:
- case PLIST_CHMOD:
- case PLIST_CHOWN:
- case PLIST_CHGRP:
- case PLIST_COMMENT:
- case PLIST_NAME:
- case PLIST_UNEXEC:
- case PLIST_DISPLAY:
- case PLIST_PKGDEP:
- case PLIST_MTREE:
- case PLIST_DIR_RM:
- case PLIST_IGNORE_INST:
- case PLIST_OPTION:
- case PLIST_PKGCFL:
- case PLIST_BLDDEP:
- break;
- }
- }
- free_plist(&Plist);
- fclose(f);
- pkgcnt++;
-}
-
-/*
- * add1pkg(<pkg>)
- * adds the files listed in the +CONTENTS of <pkg> into the
- * pkgdb.byfile.db database file in the current package dbdir. It
- * returns the number of files added to the database file.
- */
-static int
-add1pkg(const char *pkgdir)
-{
- FILE *f;
- plist_t *p;
- package_t Plist;
- char contents[MaxPathSize];
- char *PkgDBDir, *PkgName, *dirp;
- char file[MaxPathSize];
- char dir[MaxPathSize];
- int cnt = 0;
-
- if (!pkgdb_open(ReadWrite))
- err(EXIT_FAILURE, "cannot open pkgdb");
-
- PkgDBDir = _pkgdb_getPKGDB_DIR();
- (void) snprintf(contents, sizeof(contents), "%s/%s", PkgDBDir, pkgdir);
- if (!(isdir(contents) || islinktodir(contents)))
- errx(EXIT_FAILURE, "`%s' does not exist.", contents);
-
- (void) strlcat(contents, "/", sizeof(contents));
- (void) strlcat(contents, CONTENTS_FNAME, sizeof(contents));
- if ((f = fopen(contents, "r")) == NULL)
- errx(EXIT_FAILURE, "%s: can't open `%s'", pkgdir, CONTENTS_FNAME);
-
- Plist.head = Plist.tail = NULL;
- read_plist(&Plist, f);
- if ((p = find_plist(&Plist, PLIST_NAME)) == NULL) {
- errx(EXIT_FAILURE, "Package `%s' has no @name, aborting.", pkgdir);
- }
-
- PkgName = p->name;
- dirp = NULL;
- for (p = Plist.head; p; p = p->next) {
- switch(p->type) {
- case PLIST_FILE:
- if (dirp == NULL) {
- errx(EXIT_FAILURE, "@cwd not yet found, please send-pr!");
- }
- (void) snprintf(file, sizeof(file), "%s/%s", dirp, p->name);
- if (!(isfile(file) || islinktodir(file))) {
- warnx("%s: File `%s' is in %s but not on filesystem!",
- PkgName, file, CONTENTS_FNAME);
- } else {
- pkgdb_store(file, PkgName);
- cnt++;
- }
- break;
- case PLIST_CWD:
- if (strcmp(p->name, ".") != 0) {
- dirp = p->name;
- } else {
- (void) snprintf(dir, sizeof(dir), "%s/%s", PkgDBDir, pkgdir);
- dirp = dir;
- }
- break;
- case PLIST_IGNORE:
- p = p->next;
- break;
- case PLIST_SHOW_ALL:
- case PLIST_SRC:
- case PLIST_CMD:
- case PLIST_CHMOD:
- case PLIST_CHOWN:
- case PLIST_CHGRP:
- case PLIST_COMMENT:
- case PLIST_NAME:
- case PLIST_UNEXEC:
- case PLIST_DISPLAY:
- case PLIST_PKGDEP:
- case PLIST_MTREE:
- case PLIST_DIR_RM:
- case PLIST_IGNORE_INST:
- case PLIST_OPTION:
- case PLIST_PKGCFL:
- case PLIST_BLDDEP:
- break;
- }
- }
- free_plist(&Plist);
- fclose(f);
- pkgdb_close();
-
- return cnt;
-}
-
-static void
-delete1pkg(const char *pkgdir)
-{
- if (!pkgdb_open(ReadWrite))
- err(EXIT_FAILURE, "cannot open pkgdb");
- (void) pkgdb_remove_pkg(pkgdir);
- pkgdb_close();
-}
-
-static void
-rebuild(void)
-{
- DIR *dp;
- struct dirent *de;
- char *PkgDBDir;
- char cachename[MaxPathSize];
-
- pkgcnt = 0;
- filecnt = 0;
-
- (void) _pkgdb_getPKGDB_FILE(cachename, sizeof(cachename));
- if (unlink(cachename) != 0 && errno != ENOENT)
- err(EXIT_FAILURE, "unlink %s", cachename);
-
- setbuf(stdout, NULL);
- PkgDBDir = _pkgdb_getPKGDB_DIR();
- chdir(PkgDBDir);
-#ifdef PKGDB_DEBUG
- printf("PkgDBDir='%s'\n", PkgDBDir);
-#endif
- dp = opendir(".");
- if (dp == NULL)
- err(EXIT_FAILURE, "opendir failed");
- while ((de = readdir(dp))) {
- if (!(isdir(de->d_name) || islinktodir(de->d_name)))
- continue;
-
- if (strcmp(de->d_name, ".") == 0 ||
- strcmp(de->d_name, "..") == 0)
- continue;
-
-#ifdef PKGDB_DEBUG
- printf("%s\n", de->d_name);
-#else
- if (!quiet) {
- printf(".");
- }
-#endif
-
- filecnt += add1pkg(de->d_name);
- pkgcnt++;
- }
- chdir("..");
- closedir(dp);
-
- printf("\n");
- printf("Stored %d file%s from %d package%s in %s.\n",
- filecnt, filecnt == 1 ? "" : "s",
- pkgcnt, pkgcnt == 1 ? "" : "s",
- cachename);
-}
-
-static void
-checkall(void)
-{
- DIR *dp;
- struct dirent *de;
-
- pkgcnt = 0;
- filecnt = 0;
-
- setbuf(stdout, NULL);
- chdir(_pkgdb_getPKGDB_DIR());
-
- dp = opendir(".");
- if (dp == NULL)
- err(EXIT_FAILURE, "opendir failed");
- while ((de = readdir(dp))) {
- if (!(isdir(de->d_name) || islinktodir(de->d_name)))
- continue;
-
- if (strcmp(de->d_name, ".") == 0 ||
- strcmp(de->d_name, "..") == 0)
- continue;
-
- chdir(de->d_name);
-
- check1pkg(de->d_name);
- if (!quiet) {
- printf(".");
- }
-
- chdir("..");
- }
- closedir(dp);
- pkgdb_close();
-
-
- printf("\n");
- printf("Checked %d file%s from %d package%s.\n",
- filecnt, (filecnt == 1) ? "" : "s",
- pkgcnt, (pkgcnt == 1) ? "" : "s");
-}
-
-static int
-checkpattern_fn(const char *pkg, void *vp)
-{
- int rc;
-
- rc = chdir(pkg);
- if (rc == -1)
- err(EXIT_FAILURE, "Cannot chdir to %s/%s", _pkgdb_getPKGDB_DIR(), pkg);
-
- check1pkg(pkg);
- if (!quiet) {
- printf(".");
- }
-
- chdir("..");
-
- return 0;
-}
-
-static int
-lspattern_fn(const char *pkg, void *vp)
-{
- char *data = vp;
- printf("%s/%s\n", data, pkg);
- return 0;
-}
-
-static int
-lsbasepattern_fn(const char *pkg, void *vp)
-{
- printf("%s\n", pkg);
- return 0;
-}
-
-int
-main(int argc, char *argv[])
-{
- Boolean use_default_sfx = TRUE;
- Boolean show_basename_only = FALSE;
- char lsdir[MaxPathSize];
- char sfx[MaxPathSize];
- char *lsdirp = NULL;
- int ch;
-
- setprogname(argv[0]);
-
- if (argc < 2)
- usage();
-
- while ((ch = getopt(argc, argv, Options)) != -1)
- switch (ch) {
- case 'K':
- _pkgdb_setPKGDB_DIR(optarg);
- break;
-
- case 'S':
- sfx[0] = 0x0;
- use_default_sfx = FALSE;
- break;
-
- case 'V':
- show_version();
- /* NOTREACHED */
-
- case 'b':
- show_basename_only = TRUE;
- break;
-
- case 'd':
- (void) strlcpy(lsdir, optarg, sizeof(lsdir));
- lsdirp = lsdir;
- break;
-
- case 'q':
- quiet = 1;
- break;
-
- case 's':
- (void) strlcpy(sfx, optarg, sizeof(sfx));
- use_default_sfx = FALSE;
- break;
-
- default:
- usage();
- /* NOTREACHED */
- }
-
- argc -= optind;
- argv += optind;
-
- if (argc <= 0) {
- usage();
- }
-
- if (use_default_sfx)
- (void) snprintf(sfx, sizeof(sfx), "%s", DEFAULT_SFX);
-
- if (strcasecmp(argv[0], "pmatch") == 0) {
-
- char *pattern, *pkg;
-
- argv++; /* "pmatch" */
-
- if (argv[0] == NULL || argv[1] == NULL) {
- usage();
- }
-
- pattern = argv[0];
- pkg = argv[1];
-
- if (pmatch(pattern, pkg)){
- return 0;
- } else {
- return 1;
- }
-
- } else if (strcasecmp(argv[0], "rebuild") == 0) {
-
- rebuild();
- printf("Done.\n");
-
- } else if (strcasecmp(argv[0], "check") == 0) {
-
- argv++; /* "check" */
-
- if (*argv != NULL) {
- /* args specified */
- int rc;
-
- filecnt = 0;
-
- setbuf(stdout, NULL);
-
- rc = chdir(_pkgdb_getPKGDB_DIR());
- if (rc == -1)
- err(EXIT_FAILURE, "Cannot chdir to %s", _pkgdb_getPKGDB_DIR());
-
- while (*argv != NULL) {
- if (ispkgpattern(*argv)) {
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), *argv, checkpattern_fn, NULL) <= 0)
- errx(EXIT_FAILURE, "No matching pkg for %s.", *argv);
- } else {
- rc = chdir(*argv);
- if (rc == -1) {
- /* found nothing - try 'pkg-[0-9]*' */
- char try[MaxPathSize];
-
- snprintf(try, sizeof(try), "%s-[0-9]*", *argv);
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), try,
- checkpattern_fn, NULL) <= 0) {
-
- errx(EXIT_FAILURE, "cannot find package %s", *argv);
- } else {
- /* nothing to do - all the work is/was
- * done in checkpattern_fn() */
- }
- } else {
- check1pkg(*argv);
- if (!quiet) {
- printf(".");
- }
-
- chdir("..");
- }
- }
-
- argv++;
- }
-
- printf("\n");
- printf("Checked %d file%s from %d package%s.\n",
- filecnt, (filecnt == 1) ? "" : "s",
- pkgcnt, (pkgcnt == 1) ? "" : "s");
- } else {
- checkall();
- }
- if (!quiet) {
- printf("Done.\n");
- }
-
- } else if (strcasecmp(argv[0], "lsall") == 0) {
- int saved_wd;
-
- argv++; /* "lsall" */
-
- /* preserve cwd */
- saved_wd=open(".", O_RDONLY);
- if (saved_wd == -1)
- err(EXIT_FAILURE, "Cannot save working dir");
-
- while (*argv != NULL) {
- /* args specified */
- int rc;
- const char *basep, *dir;
- char cwd[MaxPathSize];
- char base[MaxPathSize];
-
- dir = lsdirp ? lsdirp : dirname_of(*argv);
- basep = basename_of(*argv);
- snprintf(base, sizeof(base), "%s%s", basep, sfx);
-
- fchdir(saved_wd);
- rc = chdir(dir);
- if (rc == -1)
- err(EXIT_FAILURE, "Cannot chdir to %s", dir);
-
- if (getcwd(cwd, sizeof(cwd)) == NULL)
- err(EXIT_FAILURE, "getcwd");
-
- if (show_basename_only)
- rc = findmatchingname(cwd, base, lsbasepattern_fn, cwd);
- else
- rc = findmatchingname(cwd, base, lspattern_fn, cwd);
- if (rc == -1)
- errx(EXIT_FAILURE, "Error in findmatchingname(\"%s\", \"%s\", ...)",
- cwd, base);
-
- argv++;
- }
-
- close(saved_wd);
-
- } else if (strcasecmp(argv[0], "lsbest") == 0) {
- int saved_wd;
-
- argv++; /* "lsbest" */
-
- /* preserve cwd */
- saved_wd=open(".", O_RDONLY);
- if (saved_wd == -1)
- err(EXIT_FAILURE, "Cannot save working dir");
-
- while (*argv != NULL) {
- /* args specified */
- int rc;
- const char *basep, *dir;
- char cwd[MaxPathSize];
- char base[MaxPathSize];
- char *p;
-
- dir = lsdirp ? lsdirp : dirname_of(*argv);
- basep = basename_of(*argv);
- snprintf(base, sizeof(base), "%s%s", basep, sfx);
-
- fchdir(saved_wd);
- rc = chdir(dir);
- if (rc == -1)
- err(EXIT_FAILURE, "Cannot chdir to %s", dir);
-
- if (getcwd(cwd, sizeof(cwd)) == NULL)
- err(EXIT_FAILURE, "getcwd");
- p = findbestmatchingname(cwd, base);
- if (p) {
- if (show_basename_only)
- printf("%s\n", p);
- else
- printf("%s/%s\n", cwd, p);
- free(p);
- }
-
- argv++;
- }
-
- close(saved_wd);
-
- } else if (strcasecmp(argv[0], "list") == 0 ||
- strcasecmp(argv[0], "dump") == 0) {
-
- pkgdb_dump();
-
- } else if (strcasecmp(argv[0], "add") == 0) {
- argv++; /* "add" */
- while (*argv != NULL) {
- add1pkg(*argv);
- argv++;
- }
- } else if (strcasecmp(argv[0], "delete") == 0) {
- argv++; /* "delete" */
- while (*argv != NULL) {
- delete1pkg(*argv);
- argv++;
- }
- } else if (strcasecmp(argv[0], "set") == 0) {
- argv++; /* "set" */
- set_unset_variable(argv, FALSE);
- } else if (strcasecmp(argv[0], "unset") == 0) {
- argv++; /* "unset" */
- set_unset_variable(argv, TRUE);
- }
-#ifdef PKGDB_DEBUG
- else if (strcasecmp(argv[0], "delkey") == 0) {
- int rc;
-
- if (!pkgdb_open(ReadWrite))
- err(EXIT_FAILURE, "cannot open pkgdb");
-
- rc = pkgdb_remove(argv[2]);
- if (rc) {
- if (errno)
- perror("pkgdb_remove");
- else
- printf("Key not present in pkgdb.\n");
- }
-
- pkgdb_close();
-
- } else if (strcasecmp(argv[0], "addkey") == 0) {
-
- int rc;
-
- if (!pkgdb_open(ReadWrite)) {
- err(EXIT_FAILURE, "cannot open pkgdb");
- }
-
- rc = pkgdb_store(argv[2], argv[3]);
- switch (rc) {
- case -1:
- perror("pkgdb_store");
- break;
- case 1:
- printf("Key already present.\n");
- break;
- default:
- /* 0: everything ok */
- break;
- }
-
- pkgdb_close();
-
- }
-#endif
- else {
- usage();
- }
-
- return 0;
-}
-
-struct varval {
- char *variable;
- char *value;
-};
-
-static int
-set_installed_info_var(const char *name, void *ud)
-{
- char filename[BUFSIZ];
- struct varval *varval;
-
- varval = ud;
-
- (void)snprintf(filename, sizeof(filename), "%s/%s", name,
- INSTALLED_INFO_FNAME);
-
- return var_set(filename, varval->variable, varval->value);
-}
-
-static void
-set_unset_variable(char **argv, Boolean unset)
-{
- struct varval varval;
- int ret = 0;
- char *eq;
- char *variable;
-
- if (argv[0] == NULL || argv[1] == NULL)
- usage();
-
- variable = NULL;
-
- if (unset) {
- varval.variable = argv[0];
- varval.value = NULL;
- } else {
- eq = NULL;
- if ((eq=strchr(argv[0], '=')) == NULL)
- usage();
-
- variable = malloc(eq-argv[0]+1);
- strlcpy(variable, argv[0], eq-argv[0]+1);
-
- varval.variable = variable;
- varval.value = eq+1;
-
- if (strcmp(variable, AUTOMATIC_VARNAME) == 0 &&
- strcasecmp(varval.value, "yes") != 0 &&
- strcasecmp(varval.value, "no") != 0) {
- errx(EXIT_FAILURE,
- "unknown value `%s' for " AUTOMATIC_VARNAME,
- varval.value);
- }
- }
- if (strcspn(varval.variable, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- != strlen(varval.variable)) {
- free(variable);
- errx(EXIT_FAILURE,
- "variable name must not contain uppercase letters");
- }
-
- chdir(_pkgdb_getPKGDB_DIR());
- argv++;
- while (*argv != NULL) {
- if (ispkgpattern(*argv)) {
- if (findmatchingname(_pkgdb_getPKGDB_DIR(),
- *argv, set_installed_info_var,
- &varval) <= 0) {
- warnx("no matching pkg for `%s'", *argv);
- ret++;
- }
- } else if (isdir(*argv) || islinktodir(*argv))
- set_installed_info_var(*argv, &varval);
- else {
- /* try 'pkg-[0-9]*' */
- char try[MaxPathSize];
-
- snprintf(try, sizeof(try), "%s-[0-9]*", *argv);
- if (findmatchingname(_pkgdb_getPKGDB_DIR(),
- try, set_installed_info_var,
- &varval) <= 0) {
- warnx("cannot find package %s", *argv);
- ret++;
- }
- }
-
- argv++;
- }
-
- if (ret > 0)
- exit(EXIT_FAILURE);
-
- free(variable);
-
- return;
-}
-
-void
-cleanup(int signo)
-{
-}
diff --git a/pkgtools/pkg_install/files/admin/pkg_admin.1 b/pkgtools/pkg_install/files/admin/pkg_admin.1
deleted file mode 100644
index d553cea1eaa..00000000000
--- a/pkgtools/pkg_install/files/admin/pkg_admin.1
+++ /dev/null
@@ -1,241 +0,0 @@
-.\" $NetBSD: pkg_admin.1,v 1.11 2005/11/05 13:20:09 wiz Exp $
-.\"
-.\" Copyright (c) 1999-2002 Hubert Feyrer. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Hubert Feyrer for
-.\" the NetBSD Project.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd November 1, 2005
-.Dt PKG_ADMIN 1
-.Os
-.Sh NAME
-.Nm pkg_admin
-.Nd perform various administrative tasks to the pkg system
-.Sh SYNOPSIS
-.Nm
-.Op Fl bqSV
-.Op Fl d Ar lsdir
-.Op Fl K Ar pkg_dbdir
-.Op Fl s Ar sfx_pattern
-.Ar command Op args ...
-.Sh DESCRIPTION
-This command performs various administrative tasks around the
-.Nx
-Packages System.
-.Sh OPTIONS
-The following command-line options are supported:
-.Bl -tag -width indent
-.It Fl b
-Print only the basenames when matching package names for
-.Cm lsall
-and
-.Cm lsbest .
-.It Fl d Ar lsdir
-Set
-.Ar lsdir
-as the path to the directory in which to find matching package names for
-.Cm lsall
-and
-.Cm lsbest .
-.It Fl K Ar pkg_dbdir
-Set
-.Ar pkg_dbdir
-as the package database directory.
-If this option isn't specified, then the package database directory is
-taken from the value of the environment variable
-.Ev PKG_DBDIR
-if it's set, otherwise it defaults to
-.Pa /var/db/pkg .
-.It Fl q
-Perform checks in a quiet manner.
-In normal operation,
-.Nm
-prints a
-.Sq \&.
-to standard output to indicate progress.
-This option suppresses this progress indicator.
-.It Fl S
-Set the shell glob pattern for package suffixes when matching package
-names for
-.Cm lsall
-and
-.Cm lsbest
-to be the null suffix.
-.It Fl s Ar sfx_pattern
-Set the shell glob pattern for package suffixes when matching package
-names for
-.Cm lsall
-and
-.Cm lsbest .
-The default pattern is ".t[bg]z".
-.It Fl V
-Print version number and exit.
-.El
-.Pp
-The following commands are supported:
-.Bl -tag -width indent
-.It Cm add Ar pkg ...
-For each listed package, write the absolute pathnames of the files listed in
-its
-.Pa +CONTENTS
-file together with the package they belong to into the package database.
-This should be used only by
-.Xr pkg_view 1 .
-.It Cm check Op Ar pkg ...
-Use this command to check the files belonging to some or all of the
-packages installed on the local machine against the checksum
-which was recorded in the
-.Pa +CONTENTS
-files at package installation time.
-Symbolic links also have their integrity checked against the recorded
-value at package installation time.
-If no additional argument is given, the files of all installed packages
-are checked, else only the named packages will be checked (wildcards can
-be used here, see
-.Xr pkg_info 1 ) .
-.Pp
-The packages'
-.Pa +CONTENTS
-files will be parsed and the
-checksum will be checked for every file found.
-A warning message is printed if the expected checksum differs from the
-checksum of the file on disk.
-Symbolic links are also checked, ensuring that the targets on disk are
-the same as the contents recorded at package installation time.
-.It Cm delete Ar pkg ...
-For each listed package, remove all file entries in the package database that
-belong to the package.
-This should be used only by
-.Xr pkg_view 1 .
-.It Cm dump
-Dump the contents of the package database, similar to
-.Cm pkg_info -F .
-Columns are printed for the keyfield used in the pkgdb - the filename -,
-and the data field - the package the file belongs to.
-.It Cm lsall Ar /dir/pkgpattern
-.It Cm lsbest Ar /dir/pkgpattern
-List all/best package matching pattern in the given directory
-.Pa /dir .
-If the
-.Fl d
-flag is given, then that directory path overrides
-.Pa /dir .
-Can be used to work around limitations of /bin/sh and other
-filename globbing mechanisms.
-This option implements matching of
-pkg-wildcards against arbitrary files and directories, useful mainly in
-the build system itself.
-See
-.Xr pkg_info 1
-for a description of the pattern.
-.Pp
-Example:
-.Bd -literal
-yui# cd /usr/pkgsrc/packages/i386ELF/All/
-yui# ls unzip*
-unzip-5.40.tgz unzip-5.41.tgz
-yui# pkg_admin lsall 'unzip*'
-/usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
-/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
-yui# pkg_admin lsall 'unzip\*[Ge]5.40'
-/usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
-/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
-yui# pkg_admin lsall 'unzip\*[Ge]5.41'
-/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
-yui# pkg_admin lsbest 'unzip\*[Ge]5.40'
-/usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
-yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*'
-/usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz
-/usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz
-.Ed
-.It Cm pmatch Ar pattern Ar pkg
-Returns true if
-.Ar pkg
-matches
-.Ar pattern ,
-otherwise returns false.
-.It Cm rebuild
-Rebuild the package database mapping from scratch, scanning
-subdirectories in
-.Pa /var/db/pkg
-for
-.Pa +CONTENTS
-files, parsing them and writing the resulting absolute pathnames
-together with the package they belong to into the package database.
-.Pp
-This option is intended to be used for upgrading from non-pkgdb-pkg_*
-tools to pkgdb-pkg_* tools, further manipulation of the pkgdb will be
-done by
-.Xr pkg_add 1 ,
-.Xr pkg_delete 1 ,
-and
-.Xr pkg_create 1 .
-.Pp
-Needs to be run as root.
-.It Cm set Ar variable=value pkg ...
-Set variable with information about the installed package.
-Use
-.Cm unset
-to remove a variable.
-.Pp
-Packages that are not installed directly by the user but pulled in as
-dependencies are marked by setting
-.Dq automatic=YES .
-.It Cm unset Ar variable pkg ...
-Remove an installation variable.
-.El
-.Sh ENVIRONMENT
-.Bl -tag -width indent -compact
-.It Ev PKG_DBDIR
-If the
-.Fl K
-flag isn't given, then
-.Ev PKG_DBDIR
-is the location of the package database directory.
-The default package database directory is
-.Pa /var/db/pkg .
-.El
-.Sh FILES
-.Bl -tag -width /var/db/pkg/pkgdb.byfile.db -compact
-.It Pa /var/db/pkg/pkgdb.byfile.db
-.It Pa /var/db/pkg/\*[Lt]pkg\*[Gt]/+CONTENTS
-.El
-.Sh SEE ALSO
-.Xr pkg_add 1 ,
-.Xr pkg_create 1 ,
-.Xr pkg_delete 1 ,
-.Xr pkg_info 1 ,
-.Xr pkg_view 1 ,
-.Xr packages 7
-.Sh HISTORY
-The
-.Nm
-command first appeared in
-.Nx 1.4 .
-.Sh AUTHORS
-The
-.Nm
-command was written by Hubert Feyrer.
diff --git a/pkgtools/pkg_install/files/admin/pkg_admin.cat1 b/pkgtools/pkg_install/files/admin/pkg_admin.cat1
deleted file mode 100644
index 913b5ca31a9..00000000000
--- a/pkgtools/pkg_install/files/admin/pkg_admin.cat1
+++ /dev/null
@@ -1,154 +0,0 @@
-PKG_ADMIN(1) NetBSD General Commands Manual PKG_ADMIN(1)
-
-NNAAMMEE
- ppkkgg__aaddmmiinn -- perform various administrative tasks to the pkg system
-
-SSYYNNOOPPSSIISS
- ppkkgg__aaddmmiinn [--bbqqSSVV] [--dd _l_s_d_i_r] [--KK _p_k_g___d_b_d_i_r] [--ss _s_f_x___p_a_t_t_e_r_n] _c_o_m_m_a_n_d
- [args ...]
-
-DDEESSCCRRIIPPTTIIOONN
- This command performs various administrative tasks around the NetBSD
- Packages System.
-
-OOPPTTIIOONNSS
- The following command-line options are supported:
-
- --bb Print only the basenames when matching package names for llssaallll
- and llssbbeesstt.
-
- --dd _l_s_d_i_r
- Set _l_s_d_i_r as the path to the directory in which to find matching
- package names for llssaallll and llssbbeesstt.
-
- --KK _p_k_g___d_b_d_i_r
- Set _p_k_g___d_b_d_i_r as the package database directory. If this option
- isn't specified, then the package database directory is taken
- from the value of the environment variable PKG_DBDIR if it's set,
- otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
-
- --qq Perform checks in a quiet manner. In normal operation, ppkkgg__aaddmmiinn
- prints a `.' to standard output to indicate progress. This
- option suppresses this progress indicator.
-
- --SS Set the shell glob pattern for package suffixes when matching
- package names for llssaallll and llssbbeesstt to be the null suffix.
-
- --ss _s_f_x___p_a_t_t_e_r_n
- Set the shell glob pattern for package suffixes when matching
- package names for llssaallll and llssbbeesstt. The default pattern is
- ".t[bg]z".
-
- --VV Print version number and exit.
-
- The following commands are supported:
-
- aadddd _p_k_g _._._.
- For each listed package, write the absolute pathnames of the
- files listed in its _+_C_O_N_T_E_N_T_S file together with the package they
- belong to into the package database. This should be used only by
- pkg_view(1).
-
- cchheecckk [_p_k_g _._._.]
- Use this command to check the files belonging to some or all of
- the packages installed on the local machine against the checksum
- which was recorded in the _+_C_O_N_T_E_N_T_S files at package installation
- time. Symbolic links also have their integrity checked against
- the recorded value at package installation time. If no addi-
- tional argument is given, the files of all installed packages are
- checked, else only the named packages will be checked (wildcards
- can be used here, see pkg_info(1)).
-
- The packages' _+_C_O_N_T_E_N_T_S files will be parsed and the checksum
- will be checked for every file found. A warning message is
- printed if the expected checksum differs from the checksum of the
- file on disk. Symbolic links are also checked, ensuring that the
- targets on disk are the same as the contents recorded at package
- installation time.
-
- ddeelleettee _p_k_g _._._.
- For each listed package, remove all file entries in the package
- database that belong to the package. This should be used only by
- pkg_view(1).
-
- dduummpp Dump the contents of the package database, similar to ppkkgg__iinnffoo
- --FF. Columns are printed for the keyfield used in the pkgdb - the
- filename -, and the data field - the package the file belongs to.
-
- llssaallll _/_d_i_r_/_p_k_g_p_a_t_t_e_r_n
-
- llssbbeesstt _/_d_i_r_/_p_k_g_p_a_t_t_e_r_n
- List all/best package matching pattern in the given directory
- _/_d_i_r. If the --dd flag is given, then that directory path over-
- rides _/_d_i_r. Can be used to work around limitations of /bin/sh
- and other filename globbing mechanisms. This option implements
- matching of pkg-wildcards against arbitrary files and directo-
- ries, useful mainly in the build system itself. See pkg_info(1)
- for a description of the pattern.
-
- Example:
-
- yui# cd /usr/pkgsrc/packages/i386ELF/All/
- yui# ls unzip*
- unzip-5.40.tgz unzip-5.41.tgz
- yui# pkg_admin lsall 'unzip*'
- /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
- /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
- yui# pkg_admin lsall 'unzip>=5.40'
- /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz
- /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
- yui# pkg_admin lsall 'unzip>=5.41'
- /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
- yui# pkg_admin lsbest 'unzip>=5.40'
- /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz
- yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*'
- /usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz
- /usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz
-
- ppmmaattcchh _p_a_t_t_e_r_n _p_k_g
- Returns true if _p_k_g matches _p_a_t_t_e_r_n, otherwise returns false.
-
- rreebbuuiilldd
- Rebuild the package database mapping from scratch, scanning sub-
- directories in _/_v_a_r_/_d_b_/_p_k_g for _+_C_O_N_T_E_N_T_S files, parsing them and
- writing the resulting absolute pathnames together with the pack-
- age they belong to into the package database.
-
- This option is intended to be used for upgrading from non-pkgdb-
- pkg_* tools to pkgdb-pkg_* tools, further manipulation of the
- pkgdb will be done by pkg_add(1), pkg_delete(1), and
- pkg_create(1).
-
- Needs to be run as root.
-
- sseett _v_a_r_i_a_b_l_e_=_v_a_l_u_e _p_k_g _._._.
- Set variable with information about the installed package. Use
- uunnsseett to remove a variable.
-
- Packages that are not installed directly by the user but pulled
- in as dependencies are marked by setting ``automatic=YES''.
-
- uunnsseett _v_a_r_i_a_b_l_e _p_k_g _._._.
- Remove an installation variable.
-
-EENNVVIIRROONNMMEENNTT
- PKG_DBDIR
- If the --KK flag isn't given, then PKG_DBDIR is the location of the
- package database directory. The default package database direc-
- tory is _/_v_a_r_/_d_b_/_p_k_g.
-
-FFIILLEESS
- /var/db/pkg/pkgdb.byfile.db
- /var/db/pkg/<pkg>/+CONTENTS
-
-SSEEEE AALLSSOO
- pkg_add(1), pkg_create(1), pkg_delete(1), pkg_info(1), pkg_view(1),
- packages(7)
-
-HHIISSTTOORRYY
- The ppkkgg__aaddmmiinn command first appeared in NetBSD 1.4.
-
-AAUUTTHHOORRSS
- The ppkkgg__aaddmmiinn command was written by Hubert Feyrer.
-
-NetBSD 3.0 November 1, 2005 NetBSD 3.0
diff --git a/pkgtools/pkg_install/files/bpm/bpm.1 b/pkgtools/pkg_install/files/bpm/bpm.1
deleted file mode 100644
index 8da4ee2f623..00000000000
--- a/pkgtools/pkg_install/files/bpm/bpm.1
+++ /dev/null
@@ -1,117 +0,0 @@
-.\" $NetBSD: bpm.1,v 1.2 2004/03/30 15:28:08 tv Exp $ */
-.\"
-.\"
-.\" Copyright (c) 2003 Alistair G. Crooks. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Alistair G. Crooks.
-.\" 4. The name of the author may not be used to endorse or promote
-.\" products derived from this software without specific prior written
-.\" permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd December 21, 2003
-.Dt BPM 1
-.Os
-.Sh NAME
-.Nm bpm
-.Nd menu-based binary package manager
-.Sh SYNOPSIS
-.Nm
-.Op Fl hnVv
-.Op Fl b Ar baseURL
-.Op Fl m Ar machine
-.Op Fl r Ar release
-.Op Fl w Ar seconds
-.Sh DESCRIPTION
-The
-.Nm
-command is used to locate and install binary packages from any
-reachable URL.
-.Pp
-The following command-line options are supported:
-.Bl -tag -width indent
-.It Fl b Ar baseURL
-Specify a base URL from which to download binary packages.
-The default URL is
-.Pa ftp://ftp.NetBSD.org/pub/NetBSD/packages .
-.It Fl h
-Print a help message and then exit.
-.It Fl m Ar machine
-Use
-.Ar machine
-as the machine architecture to be used, instead of that returned by
-.Xr uname 1 .
-.It Fl n
-Don't actually execute the commands to add the package.
-.It Fl r Ar release
-Use
-.Ar release
-as the operating system release to be used, instead of that returned by
-.Xr uname 1 .
-.It Fl V
-Print version number and exit.
-.It Fl v
-Turn on verbose output.
-.It Fl w Ar seconds
-The number of
-.Ar seconds
-to wait after displaying an error message and returning to
-normal menu operations.
-.El
-.Pp
-.Nm
-provides a menu-based binary package manager for
-.Nx .
-.Nm
-first connects to the URL using
-.Xr ftp 1 ,
-and displays a list of categories for which binary packages exist.
-If no categories are displayed, it could
-be that the machine architecture or operating system release string
-have been wrongly interpreted, and that it will be necessary to override
-this values by means of the command line options.
-Within a category, a list of packages will be displayed, and by selecting
-one using the number assigned to it, the package will be downloaded
-automatically, and installed, using the
-.Xr pkg_add 1
-utility.
-It is also possible to change the category currently being examined,
-and to quit from the utility, simply by selecting the appropriate choices
-on the menu.
-.Sh ENVIRONMENT
-The environment variables which govern the behaviour of
-.Xr ftp 1
-and
-.Xr pkg_add 1
-are valid for
-.Nm .
-.Sh SEE ALSO
-.Xr ftp 1 ,
-.Xr pkg_add 1 ,
-.Xr uname 1
-.Sh AUTHORS
-The
-.Nm
-utility was written by
-.An Alistair Crooks Aq agc@NetBSD.org .
diff --git a/pkgtools/pkg_install/files/bpm/bpm.cat1 b/pkgtools/pkg_install/files/bpm/bpm.cat1
deleted file mode 100644
index bdc82d4d24d..00000000000
--- a/pkgtools/pkg_install/files/bpm/bpm.cat1
+++ /dev/null
@@ -1,61 +0,0 @@
-BPM(1) NetBSD General Commands Manual BPM(1)
-
-NNAAMMEE
- bbppmm - menu-based binary package manager
-
-SSYYNNOOPPSSIISS
- bbppmm [--hhnnVVvv] [--bb _b_a_s_e_U_R_L] [--mm _m_a_c_h_i_n_e] [--rr _r_e_l_e_a_s_e] [--ww _s_e_c_o_n_d_s]
-
-DDEESSCCRRIIPPTTIIOONN
- The bbppmm command is used to locate and install binary packages from any
- reachable URL.
-
- The following command-line options are supported:
-
- --bb _b_a_s_e_U_R_L
- Specify a base URL from which to download binary packages. The
- default URL is _f_t_p_:_/_/_f_t_p_._N_e_t_B_S_D_._o_r_g_/_p_u_b_/_N_e_t_B_S_D_/_p_a_c_k_a_g_e_s.
-
- --hh Print a help message and then exit.
-
- --mm _m_a_c_h_i_n_e
- Use _m_a_c_h_i_n_e as the machine architecture to be used, instead of
- that returned by uname(1).
-
- --nn Don't actually execute the commands to add the package.
-
- --rr _r_e_l_e_a_s_e
- Use _r_e_l_e_a_s_e as the operating system release to be used, instead
- of that returned by uname(1).
-
- --VV Print version number and exit.
-
- --vv Turn on verbose output.
-
- --ww _s_e_c_o_n_d_s
- The number of _s_e_c_o_n_d_s to wait after displaying an error message
- and returning to normal menu operations.
-
- bbppmm provides a menu-based binary package manager for NetBSD. bbppmm first
- connects to the URL using ftp(1), and displays a list of categories for
- which binary packages exist. If no categories are displayed, it could be
- that the machine architecture or operating system release string have
- been wrongly interpreted, and that it will be necessary to override this
- values by means of the command line options. Within a category, a list
- of packages will be displayed, and by selecting one using the number
- assigned to it, the package will be downloaded automatically, and
- installed, using the pkg_add(1) utility. It is also possible to change
- the category currently being examined, and to quit from the utility, sim-
- ply by selecting the appropriate choices on the menu.
-
-EENNVVIIRROONNMMEENNTT
- The environment variables which govern the behaviour of ftp(1) and
- pkg_add(1) are valid for bbppmm.
-
-SSEEEE AALLSSOO
- ftp(1), pkg_add(1), uname(1)
-
-AAUUTTHHOORRSS
- The bbppmm utility was written by Alistair Crooks <agc@NetBSD.org>.
-
-NetBSD 2.0 December 21, 2003 NetBSD 2.0
diff --git a/pkgtools/pkg_install/files/bpm/bpm.sh.in b/pkgtools/pkg_install/files/bpm/bpm.sh.in
deleted file mode 100644
index 9c62823c1e5..00000000000
--- a/pkgtools/pkg_install/files/bpm/bpm.sh.in
+++ /dev/null
@@ -1,222 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: bpm.sh.in,v 1.3 2005/11/05 13:20:09 wiz Exp $
-#
-# Copyright (c) 2003 Alistair G. Crooks. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Alistair G. Crooks.
-# 4. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-die()
-{
- echo >&2 "$@"
- exit 1
-}
-
-check_prog()
-{
- _var="$1"; _name="$2"
-
- eval _tmp=\"\$$_var\"
- if [ "x$_tmp" != "x" ]; then
- # Variable is already set (by the user, for example)
- return 0
- fi
-
- for _d in `echo $PATH | tr ':' ' '`; do
- if [ -x "$_d/$_name" ]; then
- # Program found
- eval $_var=\""$_d/$_name"\"
- return 1
- fi
- done
-
- die "$_name not found in path."
-}
-
-check_prog awkprog awk
-check_prog echoprog echo
-check_prog ftpprog ftp
-check_prog idprog id
-check_prog moreprog more
-check_prog pkg_addprog pkg_add
-check_prog rmprog rm
-check_prog sedprog sed
-check_prog suprog su
-check_prog unameprog uname
-
-# print version and exit
-version() {
- $pkg_addprog -V
- exit 0
-}
-
-# temporary files
-tmpcategories=/tmp/categories.$$
-tmppackages=/tmp/packages.$$
-
-# some base parameters
-base=ftp://ftp.NetBSD.org/pub/NetBSD/packages
-release=`${unameprog} -r | ${sedprog} -e 's/_STABLE//'`
-machine=`${unameprog} -m`
-
-sleepsecs=1
-
-doit=""
-
-while [ $# -gt 0 ]; do
- case $1 in
- -V) version ;;
- -b) base=$2; shift ;;
- -h) ${echoprog} "$0 [-b BaseURL] [-h] [-m machine] [-n] [-r release] [-v] [-w secs]"; exit 0;;
- -m) machine=$2; shift ;;
- -n) doit=":" ;;
- -r) release=$2; shift ;;
- -v) set -x ;;
- -w) sleepsecs=$2; shift ;;
- *) break ;;
- esac
- shift
-done
-
-category=""
-
-while true; do
- # if we don't have a packages file, then we need to choose a category
- case "$category" in
- "") # get possible categories
- if [ ! -f $tmpcategories ]; then
- ${echoprog} "Downloading package categories from ${base}..."
- ${echoprog} "** QUIT" > $tmpcategories
- ${echoprog} ls | ${ftpprog} ${base}/${release}/${machine}/ 2>/dev/null | \
- ${awkprog} 'NF == 9 { if ($9 != "All") print $9 }' >> $tmpcategories
- fi
-
- # check for bad release numbering
- # - it usually shows with 0 categories being displayed
- ${awkprog} 'END { if (NR == 1) { print "\n\n\n*** No categories found - is the OS release set properly? ***\n\n\n" } }' < $tmpcategories
-
- # display possible categories
- ${awkprog} '{ print NR ". " $0 }' < $tmpcategories | ${moreprog}
-
- # read a category number from the user
- ${echoprog} -n "Please type the category number: "
- read choice
-
- # validate user's choice
- case "$choice" in
- 0|1) ${rmprog} -f $tmpcategories $tmppackages; exit 0 ;;
- [2-9]|[0-9]*) category=`${awkprog} 'NR == '$choice' { print }' < $tmpcategories` ;;
- *) category="" ;;
- esac
- case "$category" in
- "") ${echoprog} "No such category \"$choice\""
- sleep $sleepsecs
- continue
- ;;
- esac
-
- # get possible packages
- ${echoprog} ""
- ${echoprog} "Downloading package names from ${base}/${category}..."
- ${echoprog} "** QUIT" > $tmppackages
- ${echoprog} "** Change category" >> $tmppackages
- ${echoprog} ls | ${ftpprog} ${base}/${release}/${machine}/${category}/ 2>/dev/null \
- | ${awkprog} 'NF == 11 { print $9 }' >> $tmppackages
- ;;
- esac
-
- # display possible packages
- ${awkprog} '{ print NR ". " $0 }' < $tmppackages | ${moreprog}
-
- # read a package number from the user
- ${echoprog} -n "Please type the package number: "
- read choice
-
- # validate user's choice
- case "$choice" in
- 1) ${rmprog} -f $tmppackages $tmpcategories; exit 0 ;;
- 2) category=""; continue ;; # no package to install - choose new category
- [3-9]|[0-9]*) package=`${awkprog} 'NR == '$choice' { print }' < $tmppackages` ;;
- *) package="" ;;
- esac
- case "$package" in
- "") ${echoprog} "No such package \"$choice\""
- sleep $sleepsecs
- continue
- ;;
- esac
-
- # check it's not already installed
- pkgbase=`${echoprog} ${package} | ${sedprog} -e 's|-[0-9].*||'`
- installed=`pkg_info -e $pkgbase`
- case "$installed" in
- "") ;;
- *) ${echoprog} "$package selected, but $installed already installed"
- sleep $sleepsecs
- continue
- ;;
- esac
-
- # Tell people what we're doing
- ${echoprog} ""
- ${echoprog} "Adding package ${base}/${release}/${machine}/${category}/${package}"
-
- cmd="env PKG_PATH=${base}/${release}/${machine}/All ${pkg_addprog} ${package}"
-
- # check if we need to become root for this
- if [ `${idprog} -u` != 0 ]; then
- ${echoprog} "Becoming root@`/bin/hostname` to add a binary package"
- ${echoprog} -n "`${echoprog} ${suprog} | $awkprog '{ print $1 }'` "
- $doit ${suprog} root -c "$cmd"
- success=$?
- else
- $doit $cmd
- success=$?
- fi
-
- # give feedback after adding the package
- case $success in
- 0) ${echoprog} "$package successfully installed" ;;
- *) ${echoprog} "Problems when installing $package - please try again" ;;
- esac
-
- ${echoprog} ""
- ${echoprog} -n "[Q]uit, [C]hange category, [I]nstall another package: "
- read choice
-
- case "$choice" in
- [Qq]) break ;;
- [Cc]) category="" ;;
- [Ii]) ;;
- esac
-done
-
-${rmprog} -f $tmpcategories $tmppackages
-
-exit 0
diff --git a/pkgtools/pkg_install/files/config.guess b/pkgtools/pkg_install/files/config.guess
deleted file mode 100755
index 0f0fe712ae6..00000000000
--- a/pkgtools/pkg_install/files/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /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 Free Software Foundation,
-# Inc.
-
-timestamp='2007-03-06'
-
-# 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted 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.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-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
-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' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# 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" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { 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 __ELF__ >/dev/null
- 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 ;;
- 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:SunOS:5.*:*)
- echo i386-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:*:[45])
- 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 __LP64__ >/dev/null
- 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*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-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 ;;
- 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 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- 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 ;;
- 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:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- 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 ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-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 ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*)
- 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 i386.
- echo i386-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; } ;;
- 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.0*:*)
- 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 ;;
- 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
- 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 ;;
- 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 ;;
-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://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-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/pkgtools/pkg_install/files/config.sub b/pkgtools/pkg_install/files/config.sub
deleted file mode 100755
index 5defff65a6e..00000000000
--- a/pkgtools/pkg_install/files/config.sub
+++ /dev/null
@@ -1,1622 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-01-18'
-
-# 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 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.
-
-# 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
-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-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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)
- os=
- basic_machine=$1
- ;;
- -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 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | 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 | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # 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-* | c54x-* | c55x-* | c6x-* \
- | 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-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | 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-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | 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-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # 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
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- 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
- ;;
- cr16c)
- basic_machine=cr16c-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
- ;;
- 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
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- 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
- ;;
- 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[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.
- -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* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -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* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -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*)
- # 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
- ;;
- -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
- ;;
- # 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
- ;;
- -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/pkgtools/pkg_install/files/configure b/pkgtools/pkg_install/files/configure
deleted file mode 100755
index f5eeb61c53d..00000000000
--- a/pkgtools/pkg_install/files/configure
+++ /dev/null
@@ -1,7169 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for pkg_install 20050607.
-#
-# Report bugs to <grant@NetBSD.org>.
-#
-# Copyright (C) 2003 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 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='pkg_install'
-PACKAGE_TARNAME='pkg_install'
-PACKAGE_VERSION='20050607'
-PACKAGE_STRING='pkg_install 20050607'
-PACKAGE_BUGREPORT='grant@NetBSD.org'
-
-ac_unique_file="lib/plist.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#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"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CANONICAL_HOST INCLUDES SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB AR CHMOD CMP CP ENV FIND GREP LN MKDIR RMDIR RM SED SORT TOUCH AUTOCONF AUTOHEADER pkgdbdir ftp tar pax mtree CPP EGREP LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# 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.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-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
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -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 | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$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 ;;
-
- -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 ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- 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 ;;
-
- -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=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 ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- 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'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-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
- 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
-
-
-# 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 its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- 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
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# 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 pkg_install 20050607 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 \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-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]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --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]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of pkg_install 20050607:";;
- esac
- cat <<\_ACEOF
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pkgdbdir=DIR Where to put the pkg database (/var/db/pkg)
- --with-ftp=path Path to tnftp (PREFIX/bin/ftp)
- --with-tar=path Path to pax-as-tar (PREFIX/bin/tar)
- --with-pax=path Path to pax (PREFIX/bin/pax)
- --with-mtree=path Path to mtree (PREFIX/sbin/mtree)
-
-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>
- CPPFLAGS 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 <grant@NetBSD.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style 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
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-pkg_install configure 20050607
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by pkg_install $as_me 20050607, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-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`
-hostinfo = `(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=.
- echo "PATH: $as_dir"
-done
-
-} >&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_sep=
-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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$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
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >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
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- 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.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-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 `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-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
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`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.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-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_config_headers="$ac_config_headers lib/config.h"
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-CANONICAL_HOST=$host
-
-
-
-# Checks for programs.
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-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
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- 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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; 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 | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$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
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 -std1 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 -std1. */
-int osf4_cc_array ['\x00' == 0 ? 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
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-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
-
-# 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.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- 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
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-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. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$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'
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-# Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-# Extract the first word of "chmod", so it can be a program name with args.
-set dummy chmod; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_CHMOD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $CHMOD in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-CHMOD=$ac_cv_path_CHMOD
-
-if test -n "$CHMOD"; then
- echo "$as_me:$LINENO: result: $CHMOD" >&5
-echo "${ECHO_T}$CHMOD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "cmp", so it can be a program name with args.
-set dummy cmp; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_CMP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $CMP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-CMP=$ac_cv_path_CMP
-
-if test -n "$CMP"; then
- echo "$as_me:$LINENO: result: $CMP" >&5
-echo "${ECHO_T}$CMP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "cp", so it can be a program name with args.
-set dummy cp; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_CP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $CP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CP="$CP" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-CP=$ac_cv_path_CP
-
-if test -n "$CP"; then
- echo "$as_me:$LINENO: result: $CP" >&5
-echo "${ECHO_T}$CP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "env", so it can be a program name with args.
-set dummy env; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_ENV+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $ENV in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ENV="$ENV" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ENV="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-ENV=$ac_cv_path_ENV
-
-if test -n "$ENV"; then
- echo "$as_me:$LINENO: result: $ENV" >&5
-echo "${ECHO_T}$ENV" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "find", so it can be a program name with args.
-set dummy find; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_FIND+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $FIND in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-FIND=$ac_cv_path_FIND
-
-if test -n "$FIND"; then
- echo "$as_me:$LINENO: result: $FIND" >&5
-echo "${ECHO_T}$FIND" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "grep", so it can be a program name with args.
-set dummy grep; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GREP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-GREP=$ac_cv_path_GREP
-
-if test -n "$GREP"; then
- echo "$as_me:$LINENO: result: $GREP" >&5
-echo "${ECHO_T}$GREP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "ln", so it can be a program name with args.
-set dummy ln; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_LN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $LN in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_LN="$LN" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-LN=$ac_cv_path_LN
-
-if test -n "$LN"; then
- echo "$as_me:$LINENO: result: $LN" >&5
-echo "${ECHO_T}$LN" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "mkdir", so it can be a program name with args.
-set dummy mkdir; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MKDIR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MKDIR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-MKDIR=$ac_cv_path_MKDIR
-
-if test -n "$MKDIR"; then
- echo "$as_me:$LINENO: result: $MKDIR" >&5
-echo "${ECHO_T}$MKDIR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "rmdir", so it can be a program name with args.
-set dummy rmdir; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_RMDIR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $RMDIR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-RMDIR=$ac_cv_path_RMDIR
-
-if test -n "$RMDIR"; then
- echo "$as_me:$LINENO: result: $RMDIR" >&5
-echo "${ECHO_T}$RMDIR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "rm", so it can be a program name with args.
-set dummy rm; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_RM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $RM in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_RM="$RM" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-RM=$ac_cv_path_RM
-
-if test -n "$RM"; then
- echo "$as_me:$LINENO: result: $RM" >&5
-echo "${ECHO_T}$RM" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "sed", so it can be a program name with args.
-set dummy sed; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $SED in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_SED="$SED" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-SED=$ac_cv_path_SED
-
-if test -n "$SED"; then
- echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "sort", so it can be a program name with args.
-set dummy sort; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_SORT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $SORT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-SORT=$ac_cv_path_SORT
-
-if test -n "$SORT"; then
- echo "$as_me:$LINENO: result: $SORT" >&5
-echo "${ECHO_T}$SORT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "touch", so it can be a program name with args.
-set dummy touch; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_TOUCH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $TOUCH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
- ;;
- *)
- 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-TOUCH=$ac_cv_path_TOUCH
-
-if test -n "$TOUCH"; then
- echo "$as_me:$LINENO: result: $TOUCH" >&5
-echo "${ECHO_T}$TOUCH" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-
-
-
-# Check whether --with-pkgdbdir or --without-pkgdbdir was given.
-if test "${with_pkgdbdir+set}" = set; then
- withval="$with_pkgdbdir"
- pkgdbdir="$with_pkgdbdir"
-else
- pkgdbdir="/var/db/pkg"
-fi;
-
-
-
-# Check whether --with-ftp or --without-ftp was given.
-if test "${with_ftp+set}" = set; then
- withval="$with_ftp"
- ftp="$with_ftp"
-else
- ftp='$(prefix)/bin/ftp'
-fi;
-
-
-
-# Check whether --with-tar or --without-tar was given.
-if test "${with_tar+set}" = set; then
- withval="$with_tar"
- tar="$with_tar"
-else
- tar='$(prefix)/bin/tar'
-fi;
-
-
-
-# Check whether --with-pax or --without-pax was given.
-if test "${with_pax+set}" = set; then
- withval="$with_pax"
- pax="$with_pax"
-else
- pax='$(prefix)/bin/pax'
-fi;
-
-
-
-# Check whether --with-mtree or --without-mtree was given.
-if test "${with_mtree+set}" = set; then
- withval="$with_mtree"
- mtree="$with_mtree"
-else
- mtree='$(sbindir)/mtree'
-fi;
-
-
-
-echo "$as_me:$LINENO: checking for __db185_open in -ldb" >&5
-echo $ECHO_N "checking for __db185_open in -ldb... $ECHO_C" >&6
-if test "${ac_cv_lib_db___db185_open+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldb $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char __db185_open ();
-int
-main ()
-{
-__db185_open ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_db___db185_open=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_db___db185_open=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_db___db185_open" >&5
-echo "${ECHO_T}$ac_cv_lib_db___db185_open" >&6
-if test $ac_cv_lib_db___db185_open = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDB 1
-_ACEOF
-
- LIBS="-ldb $LIBS"
-
-else
- echo "$as_me:$LINENO: checking for library containing dbopen" >&5
-echo $ECHO_N "checking for library containing dbopen... $ECHO_C" >&6
-if test "${ac_cv_search_dbopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_dbopen=no
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dbopen ();
-int
-main ()
-{
-dbopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_dbopen="none required"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_dbopen" = no; then
- for ac_lib in db db1; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dbopen ();
-int
-main ()
-{
-dbopen ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_dbopen="-l$ac_lib"
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_dbopen" >&5
-echo "${ECHO_T}$ac_cv_search_dbopen" >&6
-if test "$ac_cv_search_dbopen" != no; then
- test "$ac_cv_search_dbopen" = "none required" || LIBS="$ac_cv_search_dbopen $LIBS"
-
-fi
-
-fi
-
-echo "$as_me:$LINENO: checking for library containing tgetent" >&5
-echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
-if test "${ac_cv_search_tgetent+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_tgetent=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent ();
-int
-main ()
-{
-tgetent ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_tgetent="none required"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_tgetent" = no; then
- for ac_lib in termcap termlib curses ncurses; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char tgetent ();
-int
-main ()
-{
-tgetent ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_tgetent="-l$ac_lib"
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
-echo "${ECHO_T}$ac_cv_search_tgetent" >&6
-if test "$ac_cv_search_tgetent" != no; then
- test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
-
-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
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
- echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-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
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.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))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in assert.h ctype.h dirent.h err.h errno.h fnctl.h fnmatch.h \
- glob.h inttypes.h limits.h md5.h netdb.h pwd.h regex.h signal.h stdarg.h \
- stdio.h stdlib.h string.h termcap.h termios.h time.h unistd.h vis.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-for ac_header in db1/db.h db_185.h db.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in sys/cdefs.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h \
- sys/poll.h sys/queue.h sys/resource.h sys/signal.h sys/stat.h \
- sys/statvfs.h sys/time.h sys/types.h sys/utsname.h sys/vfs.h \
- sys/wait.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to grant@NetBSD.org ##
-## ------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# Checks for library functions.
-
-
-
-
-
-for ac_func in chflags dbopen __db185_open tgetent vfork
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-for ac_func in getrlimit setrlimit
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); 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 $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* 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_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-need_priu64=no
-echo "$as_me:$LINENO: checking for a working PRIu64" >&5
-echo $ECHO_N "checking for a working PRIu64... $ECHO_C" >&6
-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 "$cross_compiling" = yes; then
-
- # we are cross compiling
- echo "$as_me:$LINENO: result: unable to check when crosscompiling" >&5
-echo "${ECHO_T}unable to check when crosscompiling" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_PRI_MACRO 1
-_ACEOF
-
- need_priu64=yes
-
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <stdio.h>
- #ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
- #endif
-
-int
-main ()
-{
-
- char *x;
- #if !defined(PRIu64)
- return -1;
- #else
- x = PRIu64;
- if( x[0] == '%' ) {
- return -1;
- } else {
- return 0;
- }
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
- # program worked correctly
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
- # program failed
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_PRI_MACRO 1
-_ACEOF
-
- need_priu64=yes
-
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-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
-
-echo "$as_me:$LINENO: checking for int" >&5
-echo $ECHO_N "checking for int... $ECHO_C" >&6
-if test "${ac_cv_type_int+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((int *) 0)
- return 0;
-if (sizeof (int))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_int=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
-echo "${ECHO_T}$ac_cv_type_int" >&6
-
-echo "$as_me:$LINENO: checking size of int" >&5
-echo $ECHO_N "checking size of int... $ECHO_C" >&6
-if test "${ac_cv_sizeof_int+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_int" = yes; then
- # The cast to unsigned long 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.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_int=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-long longval () { return (long) (sizeof (int)); }
-unsigned long ulongval () { return (long) (sizeof (int)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (int))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (int))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (int))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_int=`cat conftest.val`
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_int=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_int" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking for long" >&5
-echo $ECHO_N "checking for long... $ECHO_C" >&6
-if test "${ac_cv_type_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((long *) 0)
- return 0;
-if (sizeof (long))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_long=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
-echo "${ECHO_T}$ac_cv_type_long" >&6
-
-echo "$as_me:$LINENO: checking size of long" >&5
-echo $ECHO_N "checking size of long... $ECHO_C" >&6
-if test "${ac_cv_sizeof_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_long" = yes; then
- # The cast to unsigned long 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.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-long longval () { return (long) (sizeof (long)); }
-unsigned long ulongval () { return (long) (sizeof (long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (long))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_long=`cat conftest.val`
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_long=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking for long long" >&5
-echo $ECHO_N "checking for long long... $ECHO_C" >&6
-if test "${ac_cv_type_long_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((long long *) 0)
- return 0;
-if (sizeof (long long))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_long_long=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long_long=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
-echo "${ECHO_T}$ac_cv_type_long_long" >&6
-
-echo "$as_me:$LINENO: checking size of long long" >&5
-echo $ECHO_N "checking size of long long... $ECHO_C" >&6
-if test "${ac_cv_sizeof_long_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_long_long" = yes; then
- # The cast to unsigned long 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.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-long longval () { return (long) (sizeof (long long)); }
-unsigned long ulongval () { return (long) (sizeof (long long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (long long))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (long long))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (long long))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_long_long=`cat conftest.val`
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long long), 77
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_long_long=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
-
-
-
-case $host in
-*-*-dragonfly*)
-
-cat >>confdefs.h <<\_ACEOF
-#define NUMERIC_VERSION_ONLY 1
-_ACEOF
-
- ;;
-esac
-
-
-
-
- ac_config_files="$ac_config_files Makefile add/Makefile admin/Makefile bpm/bpm.sh create/Makefile delete/Makefile info/Makefile lib/Makefile view/Makefile view/linkfarm.sh view/pkg_view.sh"
-
-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, don't put newlines in cache variables' values.
-# 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.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *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 \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!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" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- 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}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $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}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by pkg_install $as_me 20050607, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet 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
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-pkg_install config.status 20050607
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-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=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- 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
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "add/Makefile" ) CONFIG_FILES="$CONFIG_FILES add/Makefile" ;;
- "admin/Makefile" ) CONFIG_FILES="$CONFIG_FILES admin/Makefile" ;;
- "bpm/bpm.sh" ) CONFIG_FILES="$CONFIG_FILES bpm/bpm.sh" ;;
- "create/Makefile" ) CONFIG_FILES="$CONFIG_FILES create/Makefile" ;;
- "delete/Makefile" ) CONFIG_FILES="$CONFIG_FILES delete/Makefile" ;;
- "info/Makefile" ) CONFIG_FILES="$CONFIG_FILES info/Makefile" ;;
- "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
- "view/Makefile" ) CONFIG_FILES="$CONFIG_FILES view/Makefile" ;;
- "view/linkfarm.sh" ) CONFIG_FILES="$CONFIG_FILES view/linkfarm.sh" ;;
- "view/pkg_view.sh" ) CONFIG_FILES="$CONFIG_FILES view/pkg_view.sh" ;;
- "lib/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- 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
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@CANONICAL_HOST@,$CANONICAL_HOST,;t t
-s,@INCLUDES@,$INCLUDES,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@LN_S@,$LN_S,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@AR@,$AR,;t t
-s,@CHMOD@,$CHMOD,;t t
-s,@CMP@,$CMP,;t t
-s,@CP@,$CP,;t t
-s,@ENV@,$ENV,;t t
-s,@FIND@,$FIND,;t t
-s,@GREP@,$GREP,;t t
-s,@LN@,$LN,;t t
-s,@MKDIR@,$MKDIR,;t t
-s,@RMDIR@,$RMDIR,;t t
-s,@RM@,$RM,;t t
-s,@SED@,$SED,;t t
-s,@SORT@,$SORT,;t t
-s,@TOUCH@,$TOUCH,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@pkgdbdir@,$pkgdbdir,;t t
-s,@ftp@,$ftp,;t t
-s,@tar@,$tar,;t t
-s,@pax@,$pax,;t t
-s,@mtree@,$mtree,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # 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. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #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.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # 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. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# 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 || { (exit 1); exit 1; }
-fi
-
diff --git a/pkgtools/pkg_install/files/configure.ac b/pkgtools/pkg_install/files/configure.ac
deleted file mode 100644
index a20d1c98f01..00000000000
--- a/pkgtools/pkg_install/files/configure.ac
+++ /dev/null
@@ -1,148 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.52)
-AC_INIT([pkg_install], [20050607], [grant@NetBSD.org])
-AC_CONFIG_SRCDIR([lib/plist.c])
-AC_CONFIG_HEADER(lib/config.h)
-
-AC_CANONICAL_HOST
-CANONICAL_HOST=$host
-AC_SUBST(CANONICAL_HOST)
-AC_SUBST(INCLUDES)
-
-# Checks for programs.
-AC_PROG_MAKE_SET
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_RANLIB
-AC_CHECK_PROG(AR, ar, ar)
-
-AC_PATH_PROG(CHMOD, chmod)
-AC_PATH_PROG(CMP, cmp)
-AC_PATH_PROG(CP, cp)
-AC_PATH_PROG(ENV, env)
-AC_PATH_PROG(FIND, find)
-AC_PATH_PROG(GREP, grep)
-AC_PATH_PROG(LN, ln)
-AC_PATH_PROG(MKDIR, mkdir)
-AC_PATH_PROG(RMDIR, rmdir)
-AC_PATH_PROG(RM, rm)
-AC_PATH_PROG(SED, sed)
-AC_PATH_PROG(SORT, sort)
-AC_PATH_PROG(TOUCH, touch)
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-AC_SUBST(AUTOCONF)
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-AC_SUBST(AUTOHEADER)
-
-dnl Set the default pkg dbdir
-AC_ARG_WITH(pkgdbdir,
-[ --with-pkgdbdir=DIR Where to put the pkg database (/var/db/pkg)],
-[ pkgdbdir="$with_pkgdbdir" ],
-[ pkgdbdir="/var/db/pkg" ])
-AC_SUBST(pkgdbdir)
-
-AC_ARG_WITH(ftp,
-[ --with-ftp=path Path to tnftp (PREFIX/bin/ftp)],
-[ ftp="$with_ftp" ],
-[ ftp='$(prefix)/bin/ftp' ])
-AC_SUBST(ftp)
-
-AC_ARG_WITH(tar,
-[ --with-tar=path Path to pax-as-tar (PREFIX/bin/tar)],
-[ tar="$with_tar" ],
-[ tar='$(prefix)/bin/tar' ])
-AC_SUBST(tar)
-
-AC_ARG_WITH(pax,
-[ --with-pax=path Path to pax (PREFIX/bin/pax)],
-[ pax="$with_pax" ],
-[ pax='$(prefix)/bin/pax' ])
-AC_SUBST(pax)
-
-AC_ARG_WITH(mtree,
-[ --with-mtree=path Path to mtree (PREFIX/sbin/mtree)],
-[ mtree="$with_mtree" ],
-[ mtree='$(sbindir)/mtree' ])
-AC_SUBST(mtree)
-
-dnl Checks for libraries.
-AC_CHECK_LIB(db, __db185_open, , AC_SEARCH_LIBS(dbopen, [db db1]))
-AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses])
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([assert.h ctype.h dirent.h err.h errno.h fnctl.h fnmatch.h \
- glob.h inttypes.h limits.h md5.h netdb.h pwd.h regex.h signal.h stdarg.h \
- stdio.h stdlib.h string.h termcap.h termios.h time.h unistd.h vis.h])
-AC_CHECK_HEADERS([db1/db.h db_185.h db.h])
-AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h \
- sys/poll.h sys/queue.h sys/resource.h sys/signal.h sys/stat.h \
- sys/statvfs.h sys/time.h sys/types.h sys/utsname.h sys/vfs.h \
- sys/wait.h])
-
-# Checks for library functions.
-AC_CHECK_FUNCS([chflags dbopen __db185_open tgetent vfork])
-AC_CHECK_FUNCS([getrlimit setrlimit])
-
-need_priu64=no
-AC_MSG_CHECKING([for a working PRIu64])
-AC_LANG_PUSH([C])
-AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([[
- #include <stdio.h>
- #ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
- #endif
- ]],
- [[
- char *x;
- #if !defined(PRIu64)
- return -1;
- #else
- x = PRIu64;
- if( x[0] == '%' ) {
- return -1;
- } else {
- return 0;
- }
- #endif
- ]])],
- [
- # program worked correctly
- AC_MSG_RESULT([yes])
- ],
- [
- # program failed
- AC_MSG_RESULT([no])
- AC_DEFINE([NEED_PRI_MACRO], [1], [Defined when PRIu64 is missing or broken])
- need_priu64=yes
- ],
- [
- # we are cross compiling
- AC_MSG_RESULT([unable to check when crosscompiling])
- AC_DEFINE([NEED_PRI_MACRO], [1], [Defined when PRIu64 is missing or broken])
- need_priu64=yes
- ])
-AC_LANG_POP([C])
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(long long)
-
-case $host in
-*-*-dragonfly*)
- AC_DEFINE([NUMERIC_VERSION_ONLY], [1], [Defined when to retain only the numeric OS version])
- ;;
-esac
-
-AH_BOTTOM(
-#if !HAVE_VFORK
-# define vfork fork
-#endif
-)
-
-AC_CONFIG_FILES([Makefile add/Makefile admin/Makefile bpm/bpm.sh \
- create/Makefile delete/Makefile info/Makefile lib/Makefile \
- view/Makefile view/linkfarm.sh view/pkg_view.sh])
-AC_OUTPUT
diff --git a/pkgtools/pkg_install/files/create/Makefile.in b/pkgtools/pkg_install/files/create/Makefile.in
deleted file mode 100644
index 80948a65bff..00000000000
--- a/pkgtools/pkg_install/files/create/Makefile.in
+++ /dev/null
@@ -1,47 +0,0 @@
-# $NetBSD: Makefile.in,v 1.12 2005/11/22 15:44:59 ben Exp $
-
-srcdir= @srcdir@
-
-prefix= @prefix@
-exec_prefix= @exec_prefix@
-sbindir= @sbindir@
-mandir= @mandir@
-
-man1dir= $(mandir)/man1
-cat1dir= $(mandir)/cat1
-
-tar= @tar@
-pax= @pax@
-
-CC= @CC@
-CCLD= $(CC)
-LIBS= -linstall @LIBS@
-CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS= @DEFS@ -DTAR_CMD=\"$(tar)\" -DPAX_CMD=\"$(pax)\"
-CFLAGS= @CFLAGS@
-LDFLAGS= @LDFLAGS@ -L../lib
-
-INSTALL= @INSTALL@
-
-PROG= pkg_create
-
-OBJS= main.o perform.o pl.o
-
-all: $(PROG)
-
-.c.o:
- $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(PROG): $(OBJS)
- $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) $(PROG)
-
-install:
- $(INSTALL) -m 755 -d $(sbindir)
- $(INSTALL) -m 755 -d $(man1dir)
- $(INSTALL) -m 755 -d $(cat1dir)
- $(INSTALL) $(PROG) $(sbindir)
- $(INSTALL) -m 444 $(PROG).1 $(man1dir)/$(PROG).1
- $(INSTALL) -m 444 $(PROG).cat1 $(cat1dir)/$(PROG).0
diff --git a/pkgtools/pkg_install/files/create/create.h b/pkgtools/pkg_install/files/create/create.h
deleted file mode 100644
index 12fdde5ef10..00000000000
--- a/pkgtools/pkg_install/files/create/create.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: create.h,v 1.5 2007/03/11 22:05:03 joerg Exp $ */
-
-/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Include and define various things wanted by the create command.
- *
- */
-
-#ifndef _INST_CREATE_H_INCLUDE
-#define _INST_CREATE_H_INCLUDE
-
-extern char *Prefix;
-extern char *Comment;
-extern char *Desc;
-extern char *Display;
-extern char *Install;
-extern char *DeInstall;
-extern char *Contents;
-extern char *Mtree;
-extern char *Pkgdeps;
-extern char *BuildPkgdeps;
-extern char *Pkgcfl;
-extern char *BuildVersion;
-extern char *BuildInfo;
-extern char *SizePkg;
-extern char *SizeAll;
-extern char *Preserve;
-extern char *SrcDir;
-extern char *realprefix;
-extern char PlayPen[];
-extern size_t PlayPenSize;
-extern int PlistOnly;
-extern int RelativeLinks;
-extern int ReorderDirs;
-extern int update_pkgdb;
-extern int create_views;
-
-void check_list(char *, package_t *, const char *);
-void copy_plist(char *, package_t *);
-
-#endif /* _INST_CREATE_H_INCLUDE */
diff --git a/pkgtools/pkg_install/files/create/main.c b/pkgtools/pkg_install/files/create/main.c
deleted file mode 100644
index 96f2580c34c..00000000000
--- a/pkgtools/pkg_install/files/create/main.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* $NetBSD: main.c,v 1.8 2007/03/11 22:05:03 joerg Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: main.c,v 1.17 1997/10/08 07:46:23 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.8 2007/03/11 22:05:03 joerg Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the create module.
- *
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#include "lib.h"
-#include "create.h"
-
-static const char Options[] = "B:C:D:EFI:K:L:OP:RS:T:UVb:c:d:f:i:k:lm:n:p:r:s:t:v";
-
-char *Prefix = NULL;
-char *Comment = NULL;
-char *Desc = NULL;
-char *Display = NULL;
-char *Install = NULL;
-char *DeInstall = NULL;
-char *Contents = NULL;
-char *Mtree = NULL;
-char *Pkgdeps = NULL;
-char *BuildPkgdeps = NULL;
-char *Pkgcfl = NULL;
-char *BuildVersion = NULL;
-char *BuildInfo = NULL;
-char *SizePkg = NULL;
-char *SizeAll = NULL;
-char *Preserve = NULL;
-char *SrcDir = NULL;
-char *realprefix = NULL;
-char PlayPen[MaxPathSize];
-size_t PlayPenSize = sizeof(PlayPen);
-int update_pkgdb = 1;
-int create_views = 0;
-int PlistOnly = 0;
-int RelativeLinks = 0;
-int ReorderDirs = 0;
-Boolean File2Pkg = FALSE;
-
-static void
-usage(void)
-{
- fprintf(stderr,
- "usage: pkg_create [-ElORUVv] [-B build-info-file] [-b build-version-file]\n"
- " [-C cpkgs] [-D displayfile] [-I realprefix] [-i iscript]\n"
- " [-K pkg_dbdir] [-k dscript] [-L SrcDir] [-m mtreefile]\n"
- " [-n preserve-file] [-P dpkgs] [-p prefix] [-r rscript]\n"
- " [-S size-all-file] [-s size-pkg-file] [-t template]\n"
- " [-T buildpkgs] -c comment -d description -f packlist\n"
- " pkg-name\n");
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- int ch;
- lpkg_head_t pkgs;
- lpkg_t *lpp;
-
- setprogname(argv[0]);
- while ((ch = getopt(argc, argv, Options)) != -1)
- switch (ch) {
- case 'v':
- Verbose = TRUE;
- break;
-
- case 'E':
- create_views = 1;
- break;
-
- case 'I':
- realprefix = optarg;
- break;
-
- case 'O':
- PlistOnly = 1;
- break;
-
- case 'R':
- ReorderDirs = 1;
- break;
-
- case 'U':
- update_pkgdb = 0;
- break;
-
- case 'p':
- Prefix = optarg;
- break;
-
- case 's':
- SizePkg = optarg;
- break;
-
- case 'S':
- SizeAll = optarg;
- break;
-
- case 'f':
- Contents = optarg;
- break;
-
- case 'c':
- Comment = optarg;
- break;
-
- case 'd':
- Desc = optarg;
- break;
-
- case 'i':
- Install = optarg;
- break;
-
- case 'K':
- _pkgdb_setPKGDB_DIR(optarg);
- break;
-
- case 'k':
- DeInstall = optarg;
- break;
-
- case 'l':
- RelativeLinks = 1;
- break;
-
- case 'L':
- SrcDir = optarg;
- break;
-
- case 't':
- strlcpy(PlayPen, optarg, sizeof(PlayPen));
- break;
-
- case 'D':
- Display = optarg;
- break;
-
- case 'm':
- Mtree = optarg;
- break;
-
- case 'n':
- Preserve = optarg;
- break;
-
- case 'P':
- Pkgdeps = optarg;
- break;
-
- case 'T':
- BuildPkgdeps = optarg;
- break;
-
- case 'C':
- Pkgcfl = optarg;
- break;
-
- case 'b':
- BuildVersion = optarg;
- break;
-
- case 'B':
- BuildInfo = optarg;
- break;
-
- case 'V':
- show_version();
- /* NOTREACHED */
-
- case '?':
- default:
- usage();
- break;
- }
-
- argc -= optind;
- argv += optind;
-
- TAILQ_INIT(&pkgs);
-
- /* Get all the remaining package names, if any */
- while (*argv) {
- lpp = alloc_lpkg(*argv);
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
- argv++;
- }
-
- /* If no packages, yelp */
- lpp = TAILQ_FIRST(&pkgs);
- if (lpp == NULL)
- warnx("missing package name"), usage();
- lpp = TAILQ_NEXT(lpp, lp_link);
- if (lpp != NULL)
- warnx("only one package name allowed ('%s' extraneous)",
- lpp->lp_name),
- usage();
- if (!pkg_perform(&pkgs)) {
- if (Verbose)
- warnx("package creation failed");
- return 1;
- } else
- return 0;
-}
diff --git a/pkgtools/pkg_install/files/create/perform.c b/pkgtools/pkg_install/files/create/perform.c
deleted file mode 100644
index f6b4265967c..00000000000
--- a/pkgtools/pkg_install/files/create/perform.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/* $NetBSD: perform.c,v 1.11 2007/03/11 22:05:03 joerg Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp";
-#else
-__RCSID("$NetBSD: perform.c,v 1.11 2007/03/11 22:05:03 joerg Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the main body of the create module.
- *
- */
-
-#include "lib.h"
-#include "create.h"
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-static char *Home;
-void cleanup_callback(void);
-
-static void
-make_dist(const char *home, const char *pkg, const char *suffix, const package_t *plist)
-{
- char tball[MaxPathSize];
- const plist_t *p;
- int ret;
- char *args[50]; /* Much more than enough. */
- int nargs = 1;
- FILE *totar;
- pipe_to_system_t *to_pipe;
-
- if ((args[0] = strrchr(TAR_CMD, '/')) == NULL)
- args[0] = TAR_CMD;
- else
- args[0]++;
-
- if (*pkg == '/')
- (void) snprintf(tball, sizeof(tball), "%s.%s", pkg, suffix);
- else
- (void) snprintf(tball, sizeof(tball), "%s/%s.%s", home, pkg, suffix);
-
- args[nargs++] = "-c";
- args[nargs++] = "-f";
- args[nargs++] = tball;
- if (strstr(suffix, "bz")) {
- args[nargs++] = "--use-compress-program";
- args[nargs++] = "bzip2";
- } else if (strchr(suffix, 'z'))/* Compress/gzip? */
- args[nargs++] = "-z";
- args[nargs++] = "-T"; /* Take filenames from file instead of args. */
- args[nargs++] = "-"; /* Use stdin for the file. */
- args[nargs] = NULL;
-
- to_pipe = pipe_to_system_begin(TAR_CMD, args, cleanup_callback);
- totar = to_pipe->fp;
-
- fprintf(totar, "%s\n", CONTENTS_FNAME);
- fprintf(totar, "%s\n", COMMENT_FNAME);
- fprintf(totar, "%s\n", DESC_FNAME);
-
- if (Install) {
- fprintf(totar, "%s\n", INSTALL_FNAME);
- }
- if (DeInstall) {
- fprintf(totar, "%s\n", DEINSTALL_FNAME);
- }
- if (Display) {
- fprintf(totar, "%s\n", DISPLAY_FNAME);
- }
- if (Mtree) {
- fprintf(totar, "%s\n", MTREE_FNAME);
- }
- if (BuildVersion) {
- (void) fprintf(totar, "%s\n", BUILD_VERSION_FNAME);
- }
- if (BuildInfo) {
- (void) fprintf(totar, "%s\n", BUILD_INFO_FNAME);
- }
- if (SizePkg) {
- (void) fprintf(totar, "%s\n", SIZE_PKG_FNAME);
- }
- if (SizeAll) {
- (void) fprintf(totar, "%s\n", SIZE_ALL_FNAME);
- }
- if (Preserve) {
- (void) fprintf(totar, "%s\n", PRESERVE_FNAME);
- }
- if (create_views) {
- (void) fprintf(totar, "%s\n", VIEWS_FNAME);
- }
-
- for (p = plist->head; p; p = p->next) {
- if (p->type == PLIST_FILE) {
- fprintf(totar, "%s\n", p->name);
- } else if (p->type == PLIST_CWD || p->type == PLIST_SRC) {
-
- /* XXX let PLIST_SRC override PLIST_CWD */
- if (p->type == PLIST_CWD && p->next != NULL &&
- p->next->type == PLIST_SRC) {
- continue;
- }
-
- fprintf(totar, "-C\n%s\n", p->name);
- } else if (p->type == PLIST_IGNORE) {
- p = p->next;
- }
- }
-
- ret = pipe_to_system_end(to_pipe);
- /* assume either signal or bad exit is enough for us */
- if (ret) {
- cleanup(0);
- errx(2, "%s command failed with code %d", TAR_CMD, ret);
- }
-}
-
-static void
-sanity_check(void)
-{
- if (!Comment) {
- cleanup(0);
- errx(2, "required package comment string is missing (-c comment)");
- }
- if (!Desc) {
- cleanup(0);
- errx(2, "required package description string is missing (-d desc)");
- }
- if (!Contents) {
- cleanup(0);
- errx(2, "required package contents list is missing (-f [-]file)");
- }
-}
-
-/*
- * Clean up callback for pipe_to_system()
- */
-void
-cleanup_callback(void)
-{
- cleanup(0);
-}
-
-/*
- * Clean up those things that would otherwise hang around
- */
-void
-cleanup(int sig)
-{
- static int alreadyCleaning;
- void (*oldint) (int);
- void (*oldhup) (int);
- oldint = signal(SIGINT, SIG_IGN);
- oldhup = signal(SIGHUP, SIG_IGN);
-
- if (!alreadyCleaning) {
- alreadyCleaning = 1;
- if (sig)
- printf("Signal %d received, cleaning up.\n", sig);
- leave_playpen(Home);
- if (sig)
- exit(1);
- }
- signal(SIGINT, oldint);
- signal(SIGHUP, oldhup);
-}
-
-int
-pkg_perform(lpkg_head_t *pkgs)
-{
- const char *pkg;
- char *cp;
- FILE *pkg_in, *fp;
- package_t plist;
- char *suffix; /* What we tack on to the end of the finished package */
- lpkg_t *lpp;
- char installed[MaxPathSize];
-
- lpp = TAILQ_FIRST(pkgs);
- pkg = lpp->lp_name; /* Only one arg to create */
-
- /* Preliminary setup */
- sanity_check();
- if (Verbose && !PlistOnly)
- printf("Creating package %s\n", pkg);
- get_dash_string(&Comment);
- get_dash_string(&Desc);
- if (IS_STDIN(Contents))
- pkg_in = stdin;
- else {
- pkg_in = fopen(Contents, "r");
- if (!pkg_in) {
- cleanup(0);
- errx(2, "unable to open contents file '%s' for input", Contents);
- }
- }
- plist.head = plist.tail = NULL;
-
- /* Break the package name into base and desired suffix (if any) */
- if ((cp = strrchr(pkg, '.')) != NULL) {
- suffix = cp + 1;
- *cp = '\0';
- } else
- suffix = "tgz";
-
- /* If a SrcDir override is set, add it now */
- if (SrcDir) {
- if (Verbose && !PlistOnly)
- printf("Using SrcDir value of %s\n", (realprefix) ? realprefix : SrcDir);
- add_plist(&plist, PLIST_SRC, SrcDir);
- }
-
- /* Stick the dependencies, if any, at the top */
- if (Pkgdeps) {
- if (Verbose && !PlistOnly)
- printf("Registering depends:");
- while (Pkgdeps) {
- cp = strsep(&Pkgdeps, " \t\n");
- if (*cp) {
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), cp, note_whats_installed, installed) > 0) {
- add_plist(&plist, PLIST_BLDDEP, installed);
- }
- add_plist(&plist, PLIST_PKGDEP, cp);
- if (Verbose && !PlistOnly)
- printf(" %s", cp);
- }
- }
- if (Verbose && !PlistOnly)
- printf(".\n");
- }
-
- /*
- * Put the build dependencies after the dependencies.
- * This works due to the evaluation order in pkg_add.
- */
- if (BuildPkgdeps) {
- if (Verbose && !PlistOnly)
- printf("Registering build depends:");
- while (BuildPkgdeps) {
- cp = strsep(&BuildPkgdeps, " \t\n");
- if (*cp) {
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), cp, note_whats_installed, installed) > 0) {
- add_plist(&plist, PLIST_BLDDEP, installed);
- if (Verbose && !PlistOnly)
- printf(" %s", cp);
- }
- }
- }
- if (Verbose && !PlistOnly)
- printf(".\n");
- }
-
- /* Put the conflicts directly after the dependencies, if any */
- if (Pkgcfl) {
- if (Verbose && !PlistOnly)
- printf("Registering conflicts:");
- while (Pkgcfl) {
- cp = strsep(&Pkgcfl, " \t\n");
- if (*cp) {
- add_plist(&plist, PLIST_PKGCFL, cp);
- if (Verbose && !PlistOnly)
- printf(" %s", cp);
- }
- }
- if (Verbose && !PlistOnly)
- printf(".\n");
- }
-
- /* Slurp in the packing list */
- read_plist(&plist, pkg_in);
-
- if (pkg_in != stdin)
- fclose(pkg_in);
-
- /* Prefix should override the packing list */
- if (Prefix) {
- delete_plist(&plist, FALSE, PLIST_CWD, NULL);
- add_plist_top(&plist, PLIST_CWD, Prefix);
- }
- /*
- * Run down the list and see if we've named it, if not stick in a name
- * at the top.
- */
- if (find_plist(&plist, PLIST_NAME) == NULL) {
- add_plist_top(&plist, PLIST_NAME, basename_of(pkg));
- }
-
- /*
- * We're just here for to dump out a revised plist for the FreeBSD ports
- * hack. It's not a real create in progress.
- */
- if (PlistOnly) {
- check_list(Home, &plist, basename_of(pkg));
- write_plist(&plist, stdout, realprefix);
- exit(0);
- }
-
- /* Make a directory to stomp around in */
- Home = make_playpen(PlayPen, PlayPenSize, 0);
- signal(SIGINT, cleanup);
- signal(SIGHUP, cleanup);
-
- /* Make first "real contents" pass over it */
- check_list(Home, &plist, basename_of(pkg));
- (void) umask(DEF_UMASK);/* make sure gen'ed directories, files
- * don't have group or other write bits. */
-
- /* Now put the release specific items in */
- add_plist(&plist, PLIST_CWD, ".");
- write_file(COMMENT_FNAME, Comment);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, COMMENT_FNAME);
- write_file(DESC_FNAME, Desc);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, DESC_FNAME);
-
- if (Install) {
- copy_file(Home, Install, INSTALL_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, INSTALL_FNAME);
- }
- if (DeInstall) {
- copy_file(Home, DeInstall, DEINSTALL_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, DEINSTALL_FNAME);
- }
- if (Display) {
- copy_file(Home, Display, DISPLAY_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, DISPLAY_FNAME);
- add_plist(&plist, PLIST_DISPLAY, DISPLAY_FNAME);
- }
- if (Mtree) {
- copy_file(Home, Mtree, MTREE_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, MTREE_FNAME);
- add_plist(&plist, PLIST_MTREE, MTREE_FNAME);
- }
- if (BuildVersion) {
- copy_file(Home, BuildVersion, BUILD_VERSION_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, BUILD_VERSION_FNAME);
- }
- if (BuildInfo) {
- copy_file(Home, BuildInfo, BUILD_INFO_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, BUILD_INFO_FNAME);
- }
- if (SizePkg) {
- copy_file(Home, SizePkg, SIZE_PKG_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, SIZE_PKG_FNAME);
- }
- if (SizeAll) {
- copy_file(Home, SizeAll, SIZE_ALL_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, SIZE_ALL_FNAME);
- }
- if (Preserve) {
- copy_file(Home, Preserve, PRESERVE_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, PRESERVE_FNAME);
- }
- if (create_views) {
- write_file(VIEWS_FNAME, "");
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, VIEWS_FNAME);
- }
-
- /* Finally, write out the packing list */
- fp = fopen(CONTENTS_FNAME, "w");
- if (!fp) {
- cleanup(0);
- errx(2, "can't open file %s for writing", CONTENTS_FNAME);
- }
- write_plist(&plist, fp, realprefix);
- if (fclose(fp)) {
- cleanup(0);
- errx(2, "error while closing %s", CONTENTS_FNAME);
- }
-
- /* And stick it into a tar ball */
- make_dist(Home, pkg, suffix, &plist);
-
- /* Cleanup */
- free(Comment);
- free(Desc);
- free_plist(&plist);
- leave_playpen(Home);
-
- return TRUE; /* Success */
-}
diff --git a/pkgtools/pkg_install/files/create/pkg_create.1 b/pkgtools/pkg_install/files/create/pkg_create.1
deleted file mode 100644
index 2d389219d89..00000000000
--- a/pkgtools/pkg_install/files/create/pkg_create.1
+++ /dev/null
@@ -1,547 +0,0 @@
-.\" $NetBSD: pkg_create.1,v 1.8 2007/03/11 22:05:03 joerg Exp $
-.\"
-.\" FreeBSD install - a package for the installation and maintenance
-.\" of non-core utilities.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" Jordan K. Hubbard
-.\"
-.\"
-.\" @(#)pkg_create.1
-.\" from FreeBSD Id: pkg_create.1,v 1.19 1997/05/02 22:00:05 max Exp
-.\"
-.\" hacked up by John Kohl for NetBSD--fixed a few bugs, extended keywords,
-.\" added dependency tracking, etc.
-.\"
-.\" [jkh] Took John's changes back and made some additional extensions for
-.\" better integration with FreeBSD's new ports collection.
-.\"
-.Dd March 8, 2007
-.Dt PKG_CREATE 1
-.Os
-.Sh NAME
-.Nm pkg_create
-.Nd a utility for creating software package distributions
-.Sh SYNOPSIS
-.Nm
-.Op Fl ElORUVv
-.Bk -words
-.Op Fl B Ar build-info-file
-.Ek
-.Bk -words
-.Op Fl b Ar build-version-file
-.Ek
-.Bk -words
-.Op Fl C Ar cpkgs
-.Ek
-.Bk -words
-.Op Fl D Ar displayfile
-.Ek
-.Bk -words
-.Op Fl I Ar realprefix
-.Ek
-.Bk -words
-.Op Fl i Ar iscript
-.Ek
-.Bk -words
-.Op Fl K Ar pkg_dbdir
-.Ek
-.Bk -words
-.Op Fl k Ar dscript
-.Ek
-.Bk -words
-.Op Fl L Ar SrcDir
-.Ek
-.Bk -words
-.Op Fl m Ar mtreefile
-.Ek
-.Bk -words
-.Op Fl n Ar preserve-file
-.Ek
-.Bk -words
-.Op Fl P Ar dpkgs
-.Ek
-.Bk -words
-.Op Fl T Ar buildpkgs
-.Ek
-.Bk -words
-.Op Fl p Ar prefix
-.Ek
-.Bk -words
-.Op Fl S Ar size-all-file
-.Ek
-.Bk -words
-.Op Fl s Ar size-pkg-file
-.Ek
-.Bk -words
-.Op Fl t Ar template
-.Ek
-.Bk -words
-.Fl c Ar comment
-.Ek
-.Bk -words
-.Fl d Ar description
-.Ek
-.Bk -words
-.Fl f Ar packlist
-.Ek
-.Ar pkg-name
-.Sh DESCRIPTION
-The
-.Nm
-command is used to create packages that will subsequently be fed to
-one of the package extraction/info utilities.
-The input description and command line arguments for the creation of a
-package are not really meant to be human-generated, though it is easy
-enough to do so.
-It is more expected that you will use a front-end tool for
-the job rather than muddling through it yourself.
-Nonetheless, a short description of the input syntax is included in this
-document.
-.Sh OPTIONS
-The following command line options are supported:
-.Bl -tag -width indent
-.It Fl B Ar build-info-file
-Install the file
-.Ar build-info-file
-so that users of binary packages can see what
-.Xr make 1
-definitions
-were used to control the build when creating the
-binary package.
-This allows various build definitions to be retained in a binary package
-and viewed wherever it is installed, using
-.Xr pkg_info 1 .
-.It Fl b Ar build-version-file
-Install the file
-.Ar build-version-file
-so that users of binary packages can see what versions of
-the files used to control the build were used when creating the
-binary package.
-This allows some fine-grained version control information to be retained
-in a binary package and viewed wherever it is installed, using
-.Xr pkg_info 1 .
-.It Fl C Ar cpkgs
-Set the initial package conflict list to
-.Ar cpkgs .
-This is assumed to be a whitespace separated list of package names
-and is meant as a convenient shorthand for specifying multiple
-.Cm @pkgcfl
-directives in the packing list (see PACKING LIST DETAILS section below).
-.It Fl c Ar [-]desc
-Fetch package
-.Pq one line description
-from file
-.Ar desc
-or, if preceded by
-.Cm - ,
-the argument itself.
-This string should also give some idea of which version of the product
-(if any) the package represents.
-.It Fl D Ar displayfile
-Display the file after installing the package.
-Useful for things like legal notices on almost-free software, etc.
-.It Fl d Ar [-]desc
-Fetch long description for package from file
-.Ar desc
-or, if preceded by
-.Cm - ,
-the argument itself.
-.It Fl E
-Add an empty views file to the package.
-.It Fl f Ar packlist
-Fetch
-.Pq packing list
-for package from the file
-.Ar packlist
-or
-.Cm stdin
-if
-.Ar packlist
-is a
-.Cm -
-(dash).
-.It Fl I Ar realprefix
-Provide the real prefix, as opposed to the staging prefix, for use in
-staged installations of packages.
-.It Fl i Ar iscript
-Set
-.Ar iscript
-to be the install procedure for the package.
-This can be any executable program (or shell script).
-It will be invoked automatically when the package is later installed.
-.It Fl K Ar pkg_dbdir
-Set
-.Ar pkg_dbdir
-as the package database directory.
-If this option isn't specified, then the package database directory is
-taken from the value of the environment variable
-.Ev PKG_DBDIR
-if it's set, otherwise it defaults to
-.Pa /var/db/pkg .
-.It Fl k Ar dscript
-Set
-.Ar dscript
-to be the de-install procedure for the package.
-This can be any executable program (or shell script).
-It will be invoked automatically
-when the package is later (if ever) de-installed.
-.It Fl L Ar SrcDir
-This sets the package's @src directive; see below for a description
-of what this does.
-.It Fl l
-Check that any symbolic links which are to be placed in the package are
-relative to the current prefix.
-This means using
-.Xr unlink 2
-and
-.Xr symlink 2
-to remove and re-link
-any symbolic links which are targeted at full path names.
-.It Fl m Ar mtreefile
-Run
-.Xr mtree 8
-with input from mtreefile before the package is installed.
-Mtree is invoked as
-.Cm mtree
-.Fl u
-.Fl f
-.Ar mtreefile
-.Fl d
-.Fl e
-.Fl p
-.Pa prefix ,
-where
-.Pa prefix
-is the name of the first directory named by a
-.Cm @cwd
-directive.
-.It Fl n Ar preserve-file
-The file is used to denote that the package should not be deleted.
-This is intended for use where the deletion of packages may present
-a bootstrap problem.
-.It Fl O
-Go into a
-.Pq packing list only
-mode.
-This is used to do
-.Pq fake pkg_add
-operations when a package is installed.
-In such cases, it is necessary to know what the final, adjusted packing
-list will look like.
-.It Fl P Ar dpkgs
-Set the initial package dependency list to
-.Ar dpkgs .
-This is assumed to be a whitespace separated list of package names
-and is meant as a convenient shorthand for specifying multiple
-.Cm @pkgdep
-directives in the packing list (see PACKING LIST DETAILS section below).
-In addition, the exact versions of the packages referred to in the
-.Ar dpkgs
-list will be added to the packing list in the form of
-.Cm @blddep
-directives.
-.It Fl T Ar buildpkgs
-This is assumed to be a whitespace separated list of package names.
-The exact versions of the packages referred to in the
-.Ar buildpkgs
-list will be added to the packing list in the form of
-.Cm @blddep
-directives.
-This directives are stored after those created by the
-.Fl P
-option.
-.It Fl p Ar prefix
-Set
-.Ar prefix
-as the initial directory
-.Pq base
-to start from in selecting files for
-the package.
-.It Fl R
-Re-order any directories in the pkg/PLIST file into reverse alphabetic
-order, so that child directories will automatically be removed before
-parent directories.
-.It Fl S Ar size-all-file
-Store the given file for later querying with the
-.Xr pkg_info 1
-.Fl S
-flag.
-The file is expected to contain the size (in bytes) of all files of
-this package plus any required packages added up and stored as a
-ASCII string, terminated by a newline.
-.It Fl s Ar size-pkg-file
-Store the given file for later querying with the
-.Xr pkg_info 1
-.Fl s
-flag.
-The file is expected to contain the size (in bytes) of all files of
-this package added up and stored as a ASCII string, terminated by a newline.
-.It Fl t Ar template
-Use
-.Ar template
-as the input to
-.Xr mktemp 3 .
-By default, this is the string
-.Pa /tmp/instmp.XXXXXX ,
-but it may be necessary to override it in the situation where
-space in your
-.Pa /tmp
-directory is limited.
-Be sure to leave some number of
-.Sq X
-characters for
-.Xr mktemp 3
-to fill in with a unique ID.
-.It Fl U
-Do not update the package file database with any file information.
-.It Fl V
-Print version number and exit.
-.It Fl v
-Turn on verbose output.
-.El
-.Sh PACKING LIST DETAILS
-The
-.Pq packing list
-format (see
-.Fl f )
-is fairly simple, being
-nothing more than a single column of filenames to include in the
-package.
-However, since absolute pathnames are generally a bad idea
-for a package that could be installed potentially anywhere, there is
-another method of specifying where things are supposed to go
-and, optionally, what ownership and mode information they should be
-installed with.
-This is done by embedding specialized command sequences
-in the packing list.
-Briefly described, these sequences are:
-.Bl -tag -width indent -compact
-.It Cm @cwd Ar directory
-Set the internal directory pointer to point to
-.Ar directory .
-All subsequent filenames will be assumed relative to this directory.
-Note:
-.Cm @cd
-is also an alias for this command.
-.It Cm @src Ar directory
-Set the internal directory pointer for _creation only_ to
-.Ar directory .
-That is to say that it overrides
-.Cm @cwd
-for package creation but not extraction.
-.It Cm @exec Ar command
-Execute
-.Ar command
-as part of the unpacking process.
-If
-.Ar command
-contains any of the following sequences somewhere in it, they will
-be expanded inline.
-For the following examples, assume that
-.Cm @cwd
-is set to
-.Pa /usr/local
-and the last extracted file was
-.Pa bin/emacs .
-.Bl -tag -width indent -compact
-.It Cm "\&%F"
-Expands to the last filename extracted (as specified), in the example case
-.Pa bin/emacs
-.It Cm "\&%D"
-Expand to the current directory prefix, as set with
-.Cm @cwd ,
-in the example case
-.Pa /usr/local .
-.It Cm "\&%B"
-Expand to the
-.Pq basename
-of the fully qualified filename, that
-is the current directory prefix, plus the last filespec, minus
-the trailing filename.
-In the example case, that would be
-.Pa /usr/local/bin .
-.It Cm "\&%f"
-Expand to the
-.Pq filename
-part of the fully qualified name, or
-the converse of
-.Cm \&%B ,
-being in the example case,
-.Pa emacs .
-.El
-.It Cm @unexec Ar command
-Execute
-.Ar command
-as part of the deinstallation process.
-Expansion of special
-.Cm \&%
-sequences is the same as for
-.Cm @exec .
-This command is not executed during the package add, as
-.Cm @exec
-is, but rather when the package is deleted.
-This is useful for deleting links and other ancillary files that were created
-as a result of adding the package, but not directly known to the package's
-table of contents (and hence not automatically removable).
-The advantage of using
-.Cm @unexec
-over a deinstallation script is that you can use the
-.Pq special sequence expansion
-to get at files regardless of where they've
-been potentially redirected (see
-.Fl p ) .
-.It Cm @mode Ar mode
-Set default permission for all subsequently extracted files to
-.Ar mode .
-Format is the same as that used by the
-.Cm chmod
-command (well, considering that it's later handed off to it, that's
-no surprise).
-Use without an arg to set back to default (extraction) permissions.
-.It Cm @option Ar option
-Set internal package options, the only two currently supported ones
-being
-.Ar extract-in-place ,
-which tells the pkg_add command not to extract the package's tarball
-into a staging area but rather directly into the target
-hierarchy (this is typically meant to be used only by distributions
-or other special package types), and
-.Ar preserve ,
-which tells pkg_add to move any existing files out of the way,
-preserving the previous contents (which are also resurrected on
-pkg_delete, so caveat emptor).
-.It Cm @owner Ar user
-Set default ownership for all subsequently extracted files to
-.Ar user .
-Use without an arg to set back to default (extraction)
-ownership.
-.It Cm @group Ar group
-Set default group ownership for all subsequently extracted files to
-.Ar group .
-Use without an arg to set back to default (extraction)
-group ownership.
-.It Cm @comment Ar string
-Imbed a comment in the packing list.
-Useful in trying to document some particularly hairy sequence that
-may trip someone up later.
-.It Cm @ignore
-Used internally to tell extraction to ignore the next file (don't
-copy it anywhere), as it's used for some special purpose.
-.It Cm @ignore_inst
-Similar to
-.Cm @ignore ,
-but the ignoring of the next file is delayed one evaluation cycle.
-This makes it possible to use this directive in the
-.Ar packinglist
-file, so you can pack a
-specialized datafile in with a distribution for your install script (or
-something) yet have the installer ignore it.
-.It Cm @name Ar name
-Set the name of the package.
-This is mandatory and is usually put at the top.
-This name is potentially different than the name of the file it came in,
-and is used when keeping track of the package for later deinstallation.
-Note that
-.Nm
-will derive this field from the package name and add it automatically
-if none is given.
-.It Cm @dirrm Ar name
-Declare directory
-.Pa name
-to be deleted at deinstall time.
-By default, directories created by a package installation are not deleted
-when the package is deinstalled; this provides an explicit directory cleanup
-method.
-This directive should appear at the end of the package list.
-If more than one
-.Cm @dirrm
-directives are used, the directories are removed in the order specified.
-The
-.Pa name
-directory will not be removed unless it is empty.
-.It Cm @mtree Ar name
-Declare
-.Pa name
-as an
-.Xr mtree 8
-input file to be used at install time (see
-.Fl m
-above).
-Only the first
-.Cm @mtree
-directive is honored.
-.It Cm @display Ar name
-Declare
-.Pa name
-as the file to be displayed at install time (see
-.Fl D
-above).
-.It Cm @pkgdep Ar pkgname
-Declare a dependency on the
-.Ar pkgname
-package.
-The
-.Ar pkgname
-package must be installed before this package may be
-installed, and this package must be deinstalled before the
-.Ar pkgname
-package is deinstalled.
-Multiple
-.Cm @pkgdep
-directives may be used if the package depends on multiple other packages.
-.It Cm @blddep Ar pkgname
-Declare that this package was built with the exact version
-of
-.Ar pkgname
-(since the
-.Cm @pkgdep
-directive may contain wildcards or relational
-package version information).
-.It Cm @pkgcfl Ar pkgcflname
-Declare a conflict with the
-.Ar pkgcflname
-package, as the two packages contain references to the same files,
-and so cannot co-exist on the same system.
-.El
-.Sh SEE ALSO
-.Xr pkg_add 1 ,
-.Xr pkg_admin 1 ,
-.Xr pkg_delete 1 ,
-.Xr pkg_info 1 ,
-.Xr sysconf 3 ,
-.Xr packages 7
-.Sh HISTORY
-The
-.Nm
-command first appeared in
-.Fx .
-.Sh AUTHORS
-.Bl -tag -width indent -compact
-.It Jordan Hubbard
-most of the work
-.It John Kohl
-refined it for
-.Nx
-.It Hubert Feyrer
-.Nx
-wildcard dependency processing, pkgdb, pkg size recording etc.
-.El
-.Sh BUGS
-Hard links between files in a distribution must be bracketed by
-.Cm @cwd
-directives in order to be preserved as hard links when the package is
-extracted.
-They additionally must not end up being split between
-.Cm tar
-invocations due to exec argument-space limitations (this depends on the
-value returned by
-.Fn sysconf _SC_ARG_MAX ) .
diff --git a/pkgtools/pkg_install/files/create/pkg_create.cat1 b/pkgtools/pkg_install/files/create/pkg_create.cat1
deleted file mode 100644
index bc6e0a6f8b3..00000000000
--- a/pkgtools/pkg_install/files/create/pkg_create.cat1
+++ /dev/null
@@ -1,304 +0,0 @@
-PKG_CREATE(1) NetBSD General Commands Manual PKG_CREATE(1)
-
-NNAAMMEE
- ppkkgg__ccrreeaattee -- a utility for creating software package distributions
-
-SSYYNNOOPPSSIISS
- ppkkgg__ccrreeaattee [--EEllOORRUUVVvv] [--BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e] [--bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e]
- [--CC _c_p_k_g_s] [--DD _d_i_s_p_l_a_y_f_i_l_e] [--II _r_e_a_l_p_r_e_f_i_x] [--ii _i_s_c_r_i_p_t]
- [--KK _p_k_g___d_b_d_i_r] [--kk _d_s_c_r_i_p_t] [--LL _S_r_c_D_i_r] [--mm _m_t_r_e_e_f_i_l_e]
- [--nn _p_r_e_s_e_r_v_e_-_f_i_l_e] [--PP _d_p_k_g_s] [--TT _b_u_i_l_d_p_k_g_s] [--pp _p_r_e_f_i_x]
- [--SS _s_i_z_e_-_a_l_l_-_f_i_l_e] [--ss _s_i_z_e_-_p_k_g_-_f_i_l_e] [--tt _t_e_m_p_l_a_t_e] --cc _c_o_m_m_e_n_t
- --dd _d_e_s_c_r_i_p_t_i_o_n --ff _p_a_c_k_l_i_s_t _p_k_g_-_n_a_m_e
-
-DDEESSCCRRIIPPTTIIOONN
- The ppkkgg__ccrreeaattee command is used to create packages that will subsequently
- be fed to one of the package extraction/info utilities. The input
- description and command line arguments for the creation of a package are
- not really meant to be human-generated, though it is easy enough to do
- so. It is more expected that you will use a front-end tool for the job
- rather than muddling through it yourself. Nonetheless, a short descrip-
- tion of the input syntax is included in this document.
-
-OOPPTTIIOONNSS
- The following command line options are supported:
-
- --BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e
- Install the file _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e so that users of binary packages
- can see what make(1) definitions were used to control the build
- when creating the binary package. This allows various build def-
- initions to be retained in a binary package and viewed wherever
- it is installed, using pkg_info(1).
-
- --bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e
- Install the file _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e so that users of binary pack-
- ages can see what versions of the files used to control the build
- were used when creating the binary package. This allows some
- fine-grained version control information to be retained in a
- binary package and viewed wherever it is installed, using
- pkg_info(1).
-
- --CC _c_p_k_g_s
- Set the initial package conflict list to _c_p_k_g_s. This is assumed
- to be a whitespace separated list of package names and is meant
- as a convenient shorthand for specifying multiple @@ppkkggccffll direc-
- tives in the packing list (see PACKING LIST DETAILS section
- below).
-
- --cc _[_-_]_d_e_s_c
- Fetch package (one line description) from file _d_e_s_c or, if pre-
- ceded by --, the argument itself. This string should also give
- some idea of which version of the product (if any) the package
- represents.
-
- --DD _d_i_s_p_l_a_y_f_i_l_e
- Display the file after installing the package. Useful for things
- like legal notices on almost-free software, etc.
-
- --dd _[_-_]_d_e_s_c
- Fetch long description for package from file _d_e_s_c or, if preceded
- by --, the argument itself.
-
- --EE Add an empty views file to the package.
-
- --ff _p_a_c_k_l_i_s_t
- Fetch (packing list) for package from the file _p_a_c_k_l_i_s_t or ssttddiinn
- if _p_a_c_k_l_i_s_t is a -- (dash).
-
- --II _r_e_a_l_p_r_e_f_i_x
- Provide the real prefix, as opposed to the staging prefix, for
- use in staged installations of packages.
-
- --ii _i_s_c_r_i_p_t
- Set _i_s_c_r_i_p_t to be the install procedure for the package. This
- can be any executable program (or shell script). It will be
- invoked automatically when the package is later installed.
-
- --KK _p_k_g___d_b_d_i_r
- Set _p_k_g___d_b_d_i_r as the package database directory. If this option
- isn't specified, then the package database directory is taken
- from the value of the environment variable PKG_DBDIR if it's set,
- otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
-
- --kk _d_s_c_r_i_p_t
- Set _d_s_c_r_i_p_t to be the de-install procedure for the package. This
- can be any executable program (or shell script). It will be
- invoked automatically when the package is later (if ever) de-
- installed.
-
- --LL _S_r_c_D_i_r
- This sets the package's @src directive; see below for a descrip-
- tion of what this does.
-
- --ll Check that any symbolic links which are to be placed in the pack-
- age are relative to the current prefix. This means using
- unlink(2) and symlink(2) to remove and re-link any symbolic links
- which are targeted at full path names.
-
- --mm _m_t_r_e_e_f_i_l_e
- Run mtree(8) with input from mtreefile before the package is
- installed. Mtree is invoked as mmttrreeee --uu --ff _m_t_r_e_e_f_i_l_e --dd --ee --pp
- _p_r_e_f_i_x, where _p_r_e_f_i_x is the name of the first directory named by
- a @@ccwwdd directive.
-
- --nn _p_r_e_s_e_r_v_e_-_f_i_l_e
- The file is used to denote that the package should not be
- deleted. This is intended for use where the deletion of packages
- may present a bootstrap problem.
-
- --OO Go into a (packing list only) mode. This is used to do (fake
- pkg_add) operations when a package is installed. In such cases,
- it is necessary to know what the final, adjusted packing list
- will look like.
-
- --PP _d_p_k_g_s
- Set the initial package dependency list to _d_p_k_g_s. This is
- assumed to be a whitespace separated list of package names and is
- meant as a convenient shorthand for specifying multiple @@ppkkggddeepp
- directives in the packing list (see PACKING LIST DETAILS section
- below). In addition, the exact versions of the packages referred
- to in the _d_p_k_g_s list will be added to the packing list in the
- form of @@bbllddddeepp directives.
-
- --TT _b_u_i_l_d_p_k_g_s
- This is assumed to be a whitespace separated list of package
- names. The exact versions of the packages referred to in the
- _b_u_i_l_d_p_k_g_s list will be added to the packing list in the form of
- @@bbllddddeepp directives. This directives are stored after those cre-
- ated by the --PP option.
-
- --pp _p_r_e_f_i_x
- Set _p_r_e_f_i_x as the initial directory (base) to start from in
- selecting files for the package.
-
- --RR Re-order any directories in the pkg/PLIST file into reverse
- alphabetic order, so that child directories will automatically be
- removed before parent directories.
-
- --SS _s_i_z_e_-_a_l_l_-_f_i_l_e
- Store the given file for later querying with the pkg_info(1) --SS
- flag. The file is expected to contain the size (in bytes) of all
- files of this package plus any required packages added up and
- stored as a ASCII string, terminated by a newline.
-
- --ss _s_i_z_e_-_p_k_g_-_f_i_l_e
- Store the given file for later querying with the pkg_info(1) --ss
- flag. The file is expected to contain the size (in bytes) of all
- files of this package added up and stored as a ASCII string, ter-
- minated by a newline.
-
- --tt _t_e_m_p_l_a_t_e
- Use _t_e_m_p_l_a_t_e as the input to mktemp(3). By default, this is the
- string _/_t_m_p_/_i_n_s_t_m_p_._X_X_X_X_X_X, but it may be necessary to override it
- in the situation where space in your _/_t_m_p directory is limited.
- Be sure to leave some number of `X' characters for mktemp(3) to
- fill in with a unique ID.
-
- --UU Do not update the package file database with any file informa-
- tion.
-
- --VV Print version number and exit.
-
- --vv Turn on verbose output.
-
-PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS
- The (packing list) format (see --ff) is fairly simple, being nothing more
- than a single column of filenames to include in the package. However,
- since absolute pathnames are generally a bad idea for a package that
- could be installed potentially anywhere, there is another method of spec-
- ifying where things are supposed to go and, optionally, what ownership
- and mode information they should be installed with. This is done by
- embedding specialized command sequences in the packing list. Briefly
- described, these sequences are:
- @@ccwwdd _d_i_r_e_c_t_o_r_y
- Set the internal directory pointer to point to _d_i_r_e_c_t_o_r_y. All
- subsequent filenames will be assumed relative to this directory.
- Note: @@ccdd is also an alias for this command.
- @@ssrrcc _d_i_r_e_c_t_o_r_y
- Set the internal directory pointer for _creation only_ to
- _d_i_r_e_c_t_o_r_y. That is to say that it overrides @@ccwwdd for package
- creation but not extraction.
- @@eexxeecc _c_o_m_m_a_n_d
- Execute _c_o_m_m_a_n_d as part of the unpacking process. If _c_o_m_m_a_n_d
- contains any of the following sequences somewhere in it, they
- will be expanded inline. For the following examples, assume that
- @@ccwwdd is set to _/_u_s_r_/_l_o_c_a_l and the last extracted file was
- _b_i_n_/_e_m_a_c_s.
- %%FF Expands to the last filename extracted (as specified), in
- the example case _b_i_n_/_e_m_a_c_s
- %%DD Expand to the current directory prefix, as set with @@ccwwdd,
- in the example case _/_u_s_r_/_l_o_c_a_l.
- %%BB Expand to the (basename) of the fully qualified filename,
- that is the current directory prefix, plus the last file-
- spec, minus the trailing filename. In the example case,
- that would be _/_u_s_r_/_l_o_c_a_l_/_b_i_n.
- %%ff Expand to the (filename) part of the fully qualified
- name, or the converse of %%BB, being in the example case,
- _e_m_a_c_s.
- @@uunneexxeecc _c_o_m_m_a_n_d
- Execute _c_o_m_m_a_n_d as part of the deinstallation process. Expansion
- of special %% sequences is the same as for @@eexxeecc. This command is
- not executed during the package add, as @@eexxeecc is, but rather when
- the package is deleted. This is useful for deleting links and
- other ancillary files that were created as a result of adding the
- package, but not directly known to the package's table of con-
- tents (and hence not automatically removable). The advantage of
- using @@uunneexxeecc over a deinstallation script is that you can use
- the (special sequence expansion) to get at files regardless of
- where they've been potentially redirected (see --pp).
- @@mmooddee _m_o_d_e
- Set default permission for all subsequently extracted files to
- _m_o_d_e. Format is the same as that used by the cchhmmoodd command
- (well, considering that it's later handed off to it, that's no
- surprise). Use without an arg to set back to default (extrac-
- tion) permissions.
- @@ooppttiioonn _o_p_t_i_o_n
- Set internal package options, the only two currently supported
- ones being _e_x_t_r_a_c_t_-_i_n_-_p_l_a_c_e, which tells the pkg_add command not
- to extract the package's tarball into a staging area but rather
- directly into the target hierarchy (this is typically meant to be
- used only by distributions or other special package types), and
- _p_r_e_s_e_r_v_e, which tells pkg_add to move any existing files out of
- the way, preserving the previous contents (which are also resur-
- rected on pkg_delete, so caveat emptor).
- @@oowwnneerr _u_s_e_r
- Set default ownership for all subsequently extracted files to
- _u_s_e_r. Use without an arg to set back to default (extraction)
- ownership.
- @@ggrroouupp _g_r_o_u_p
- Set default group ownership for all subsequently extracted files
- to _g_r_o_u_p. Use without an arg to set back to default (extraction)
- group ownership.
- @@ccoommmmeenntt _s_t_r_i_n_g
- Imbed a comment in the packing list. Useful in trying to docu-
- ment some particularly hairy sequence that may trip someone up
- later.
- @@iiggnnoorree
- Used internally to tell extraction to ignore the next file (don't
- copy it anywhere), as it's used for some special purpose.
- @@iiggnnoorree__iinnsstt
- Similar to @@iiggnnoorree, but the ignoring of the next file is delayed
- one evaluation cycle. This makes it possible to use this direc-
- tive in the _p_a_c_k_i_n_g_l_i_s_t file, so you can pack a specialized
- datafile in with a distribution for your install script (or some-
- thing) yet have the installer ignore it.
- @@nnaammee _n_a_m_e
- Set the name of the package. This is mandatory and is usually
- put at the top. This name is potentially different than the name
- of the file it came in, and is used when keeping track of the
- package for later deinstallation. Note that ppkkgg__ccrreeaattee will
- derive this field from the package name and add it automatically
- if none is given.
- @@ddiirrrrmm _n_a_m_e
- Declare directory _n_a_m_e to be deleted at deinstall time. By
- default, directories created by a package installation are not
- deleted when the package is deinstalled; this provides an
- explicit directory cleanup method. This directive should appear
- at the end of the package list. If more than one @@ddiirrrrmm direc-
- tives are used, the directories are removed in the order speci-
- fied. The _n_a_m_e directory will not be removed unless it is empty.
- @@mmttrreeee _n_a_m_e
- Declare _n_a_m_e as an mtree(8) input file to be used at install time
- (see --mm above). Only the first @@mmttrreeee directive is honored.
- @@ddiissppllaayy _n_a_m_e
- Declare _n_a_m_e as the file to be displayed at install time (see --DD
- above).
- @@ppkkggddeepp _p_k_g_n_a_m_e
- Declare a dependency on the _p_k_g_n_a_m_e package. The _p_k_g_n_a_m_e package
- must be installed before this package may be installed, and this
- package must be deinstalled before the _p_k_g_n_a_m_e package is dein-
- stalled. Multiple @@ppkkggddeepp directives may be used if the package
- depends on multiple other packages.
- @@bbllddddeepp _p_k_g_n_a_m_e
- Declare that this package was built with the exact version of
- _p_k_g_n_a_m_e (since the @@ppkkggddeepp directive may contain wildcards or
- relational package version information).
- @@ppkkggccffll _p_k_g_c_f_l_n_a_m_e
- Declare a conflict with the _p_k_g_c_f_l_n_a_m_e package, as the two pack-
- ages contain references to the same files, and so cannot co-exist
- on the same system.
-
-SSEEEE AALLSSOO
- pkg_add(1), pkg_admin(1), pkg_delete(1), pkg_info(1), sysconf(3),
- packages(7)
-
-HHIISSTTOORRYY
- The ppkkgg__ccrreeaattee command first appeared in FreeBSD.
-
-AAUUTTHHOORRSS
- Jordan Hubbard
- most of the work
- John Kohl
- refined it for NetBSD
- Hubert Feyrer
- NetBSD wildcard dependency processing, pkgdb, pkg size recording
- etc.
-
-BBUUGGSS
- Hard links between files in a distribution must be bracketed by @@ccwwdd
- directives in order to be preserved as hard links when the package is
- extracted. They additionally must not end up being split between ttaarr
- invocations due to exec argument-space limitations (this depends on the
- value returned by ssyyssccoonnff(___S_C___A_R_G___M_A_X)).
-
-NetBSD 4.0 March 8, 2007 NetBSD 4.0
diff --git a/pkgtools/pkg_install/files/create/pl.c b/pkgtools/pkg_install/files/create/pl.c
deleted file mode 100644
index 55446c2bf15..00000000000
--- a/pkgtools/pkg_install/files/create/pl.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/* $NetBSD: pl.c,v 1.9 2004/12/29 12:16:56 agc Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: pl.c,v 1.11 1997/10/08 07:46:35 charnier Exp";
-#else
-__RCSID("$NetBSD: pl.c,v 1.9 2004/12/29 12:16:56 agc Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Routines for dealing with the packing list.
- *
- */
-
-#include "lib.h"
-#include "create.h"
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_MD5_H
-#include <md5.h>
-#endif
-
-/*
- * Check that any symbolic link is relative to the prefix
- */
-static void
-CheckSymlink(char *name, char *prefix, size_t prefixcc)
-{
- char newtgt[MaxPathSize];
- char oldtgt[MaxPathSize];
- char *slash;
- int slashc;
- int cc;
- int i;
-
- if ((cc = readlink(name, oldtgt, sizeof(oldtgt) - 1)) > 0) {
- oldtgt[cc] = 0;
- if (strncmp(oldtgt, prefix, prefixcc) == 0 && oldtgt[prefixcc] == '/') {
- for (slashc = 0, slash = &name[prefixcc + 1]; (slash = strchr(slash, '/')) != (char *) NULL; slash++, slashc++) {
- }
- for (cc = i = 0; i < slashc; i++) {
- strlcpy(&newtgt[cc], "../", sizeof(newtgt) - cc);
- cc += 3;
- }
- strlcpy(&newtgt[cc], &oldtgt[prefixcc + 1], sizeof(newtgt) - cc);
- (void) fprintf(stderr, "Full pathname symlink `%s' is target of `%s' - adjusting to `%s'\n", oldtgt, name, newtgt);
- if (unlink(name) != 0) {
- warn("can't unlink `%s'", name);
- } else if (symlink(newtgt, name) != 0) {
- warn("can't symlink `%s' called `%s'", newtgt, name);
- }
- }
- }
-}
-
-/*
- * (Reversed) comparison routine for directory name sorting
- */
-static int
-dircmp(const void *vp1, const void *vp2)
-{
- return strcmp((const char *) vp2, (const char *) vp1);
-}
-
-/*
- * Re-order the PLIST_DIR_RM entries into reverse alphabetic order
- */
-static void
-reorder(package_t *pkg, int dirc)
-{
- plist_t *p;
- char **dirv;
- int i;
-
- if ((dirv = (char **) calloc(dirc, sizeof(char *))) == (char **) NULL) {
- warn("No directory re-ordering will be done");
- } else {
- for (p = pkg->head, i = 0; p; p = p->next) {
- if (p->type == PLIST_DIR_RM) {
- dirv[i++] = p->name;
- }
- }
- qsort(dirv, dirc, sizeof(char *), dircmp);
- for (p = pkg->head, i = 0; p; p = p->next) {
- if (p->type == PLIST_DIR_RM) {
- p->name = dirv[i++];
- }
- }
- (void) free(dirv);
- }
-}
-
-/*
- * Check a list for files that require preconversion
- */
-void
-check_list(char *home, package_t *pkg, const char *PkgName)
-{
- struct stat st;
- plist_t *tmp;
- plist_t *p;
- char buf[ChecksumHeaderLen + LegibleChecksumLen];
- char target[MaxPathSize + SymlinkHeaderLen];
- char name[MaxPathSize];
- char *cwd = home;
- char *srcdir = NULL;
- int dirc;
- int cc;
-
- /* Open Package Database for writing */
- if (update_pkgdb && !pkgdb_open(ReadWrite)) {
- cleanup(0);
- err(EXIT_FAILURE, "can't open pkgdb");
- }
-
- for (dirc = 0, p = pkg->head; p; p = p->next) {
- switch (p->type) {
- case PLIST_CWD:
- cwd = p->name;
- break;
- case PLIST_IGNORE:
- p = p->next;
- break;
- case PLIST_SRC:
- srcdir = p->name;
- break;
- case PLIST_DIR_RM:
- dirc++;
- break;
- case PLIST_FILE:
- /*
- * pkgdb handling - usually, we enter files
- * into the pkgdb as soon as they hit the disk,
- * but as they are present before pkg_create
- * starts, it's ok to do this somewhere here
- */
- if (update_pkgdb) {
- char *s, t[MaxPathSize];
-
- (void) snprintf(t, sizeof(t), "%s%s%s",
- cwd,
- (strcmp(cwd, "/") == 0) ? "" : "/",
- p->name);
-
- s = pkgdb_retrieve(t);
-#ifdef PKGDB_DEBUG
- fprintf(stderr, "pkgdb_retrieve(\"%s\")=\"%s\"\n", t, s); /* pkgdb-debug - HF */
-#endif
- if (s && PlistOnly)
- warnx("Overwriting %s - "
- "pkg %s bogus/conflicting?", t, s);
- else {
- pkgdb_store(t, PkgName);
-#ifdef PKGDB_DEBUG
- fprintf(stderr, "pkgdb_store(\"%s\", \"%s\")\n", t, PkgName); /* pkgdb-debug - HF */
-#endif
- }
- }
-
- if (cwd == home) {
- /* no @cwd yet */
- (void) snprintf(name, sizeof(name), "%s/%s", srcdir ? srcdir : cwd, p->name);
- } else {
- /* after @cwd */
- /* prepend DESTDIR if set? - HF */
- (void) snprintf(name, sizeof(name), "%s%s%s",
- cwd,
- (strcmp(cwd, "/") == 0) ? "" : "/",
- p->name);
- }
- if (lstat(name, &st) < 0) {
- warnx("can't stat `%s'", name);
- continue;
- }
- switch (st.st_mode & S_IFMT) {
- case S_IFDIR:
- p->type = PLIST_DIR_RM;
- dirc++;
- continue;
- case S_IFLNK:
- if (RelativeLinks) {
- CheckSymlink(name, cwd, strlen(cwd));
- }
- (void) strlcpy(target, SYMLINK_HEADER,
- sizeof(target));
- if ((cc = readlink(name, &target[SymlinkHeaderLen],
- sizeof(target) - SymlinkHeaderLen - 1)) < 0) {
- warnx("can't readlink `%s'", name);
- continue;
- }
- target[SymlinkHeaderLen + cc] = 0x0;
- tmp = new_plist_entry();
- tmp->name = strdup(target);
- tmp->type = PLIST_COMMENT;
- tmp->next = p->next;
- tmp->prev = p;
- if (p == pkg->tail) {
- pkg->tail = tmp;
- }
- p->next = tmp;
- p = tmp;
- break;
- case S_IFCHR:
- warnx("Warning - char special device `%s' in PLIST", name);
- break;
- case S_IFBLK:
- warnx("Warning - block special device `%s' in PLIST", name);
- break;
- default:
- (void) strlcpy(buf, CHECKSUM_HEADER,
- sizeof(buf));
- if (MD5File(name, &buf[ChecksumHeaderLen]) != (char *) NULL) {
- tmp = new_plist_entry();
- tmp->name = strdup(buf);
- tmp->type = PLIST_COMMENT; /* PLIST_MD5 - HF */
- tmp->next = p->next;
- tmp->prev = p;
- if (p == pkg->tail) {
- pkg->tail = tmp;
- }
- p->next = tmp;
- p = tmp;
- }
- break;
- }
- break;
- default:
- break;
- }
- }
-
- if (update_pkgdb) {
- pkgdb_close();
- }
-
- if (ReorderDirs && dirc > 0) {
- reorder(pkg, dirc);
- }
-}
diff --git a/pkgtools/pkg_install/files/delete/Makefile.in b/pkgtools/pkg_install/files/delete/Makefile.in
deleted file mode 100644
index b23dbc9ea3c..00000000000
--- a/pkgtools/pkg_install/files/delete/Makefile.in
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile.in,v 1.10 2004/08/21 06:33:40 jlam Exp $
-
-srcdir= @srcdir@
-
-prefix= @prefix@
-exec_prefix= @exec_prefix@
-sbindir= @sbindir@
-mandir= @mandir@
-
-man1dir= $(mandir)/man1
-cat1dir= $(mandir)/cat1
-
-CC= @CC@
-CCLD= $(CC)
-LIBS= -linstall @LIBS@
-CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS= @DEFS@
-CFLAGS= @CFLAGS@
-LDFLAGS= @LDFLAGS@ -L../lib
-
-INSTALL= @INSTALL@
-
-PROG= pkg_delete
-
-OBJS= main.o perform.o
-
-all: $(PROG)
-
-.c.o:
- $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(PROG): $(OBJS)
- $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) $(PROG)
-
-install:
- $(INSTALL) -m 755 -d $(sbindir)
- $(INSTALL) -m 755 -d $(man1dir)
- $(INSTALL) -m 755 -d $(cat1dir)
- $(INSTALL) $(PROG) $(sbindir)
- $(INSTALL) -m 444 $(PROG).1 $(man1dir)/$(PROG).1
- $(INSTALL) -m 444 $(PROG).cat1 $(cat1dir)/$(PROG).0
diff --git a/pkgtools/pkg_install/files/delete/delete.h b/pkgtools/pkg_install/files/delete/delete.h
deleted file mode 100644
index 03092c20ea8..00000000000
--- a/pkgtools/pkg_install/files/delete/delete.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* $NetBSD: delete.h,v 1.4 2004/11/02 00:10:15 erh Exp $ */
-
-/* from FreeBSD Id: delete.h,v 1.4 1997/02/22 16:09:35 peter Exp */
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Include and define various things wanted by the delete command.
- *
- */
-
-#ifndef _INST_DELETE_H_INCLUDE
-#define _INST_DELETE_H_INCLUDE
-
-extern char *Prefix;
-extern char *ProgramPath;
-extern Boolean NoDeleteFiles;
-extern Boolean NoDeInstall;
-extern Boolean CleanDirs;
-extern Boolean Force;
-extern Boolean Recurse_up;
-extern Boolean Recurse_down;
-extern lpkg_head_t pkgs;
-
-#endif /* _INST_DELETE_H_INCLUDE */
diff --git a/pkgtools/pkg_install/files/delete/main.c b/pkgtools/pkg_install/files/delete/main.c
deleted file mode 100644
index 02a8ca64423..00000000000
--- a/pkgtools/pkg_install/files/delete/main.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* $NetBSD: main.c,v 1.17 2006/04/04 06:27:13 wiz Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.17 2006/04/04 06:27:13 wiz Exp $");
-#endif
-#endif
-
-/*
- *
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the delete module.
- *
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#include "lib.h"
-#include "delete.h"
-
-static char Options[] = "DdFfhK:NnOp:RrVv";
-
-char *Prefix = NULL;
-char *ProgramPath = NULL;
-Boolean NoDeleteFiles = FALSE;
-Boolean NoDeInstall = FALSE;
-Boolean CleanDirs = FALSE;
-Boolean File2Pkg = FALSE;
-Boolean Recurse_up = FALSE;
-Boolean Recurse_down = FALSE;
-Boolean OnlyDeleteFromPkgDB = FALSE;
-lpkg_head_t pkgs;
-
-static void
-usage(void)
-{
- fprintf(stderr, "usage: pkg_delete [-DdFfNnORrVv] [-K pkg_dbdir] [-p prefix] pkg-name ...\n");
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- lpkg_t *lpp;
- int ex;
- int ch;
-
- setprogname(argv[0]);
-
- ProgramPath = argv[0];
-
- while ((ch = getopt(argc, argv, Options)) != -1)
- switch (ch) {
- case 'D':
- NoDeInstall = TRUE;
- break;
-
- case 'd':
- CleanDirs = TRUE;
- break;
-
- case 'F':
- File2Pkg = TRUE;
- break;
-
- case 'f':
- Force += 1;
- break;
-
- case 'K':
- _pkgdb_setPKGDB_DIR(optarg);
- break;
-
- case 'N':
- NoDeleteFiles = TRUE;
- NoDeInstall = TRUE;
- break;
-
- case 'n':
- Fake = TRUE;
- Verbose = TRUE;
- break;
-
- case 'O':
- OnlyDeleteFromPkgDB = TRUE;
- break;
-
- case 'p':
- Prefix = optarg;
- break;
-
- case 'R':
- Recurse_down = TRUE;
- break;
-
- case 'r':
- Recurse_up = TRUE;
- break;
-
- case 'V':
- show_version();
- /* NOTREACHED */
-
- case 'v':
- Verbose = TRUE;
- break;
-
- case 'h':
- case '?':
- default:
- usage();
- break;
- }
-
- argc -= optind;
- argv += optind;
-
- TAILQ_INIT(&pkgs);
-
- /* Get all the remaining package names, if any */
- if (File2Pkg && !pkgdb_open(ReadOnly)) {
- err(EXIT_FAILURE, "cannot open pkgdb");
- }
-
- /* Get all the remaining package names, if any */
- for ( ; *argv ; argv++) {
- /* pkgdb: if -F flag given, don't add pkgnames to pkgs but
- * rather resolve the given filenames to pkgnames using
- * pkgdb_retrieve, then add these. */
- if (File2Pkg) {
- char *s;
-
- if ((s = pkgdb_retrieve(*argv)) == NULL) {
- errx(EXIT_FAILURE, "No matching pkg for %s in pkgdb.", *argv);
- }
- lpp = alloc_lpkg(s);
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
- } else if (ispkgpattern(*argv)) {
- switch(findmatchingname(_pkgdb_getPKGDB_DIR(), *argv, add_to_list_fn, &pkgs)) {
- case 0:
- errx(EXIT_FAILURE, "No matching pkg for %s.", *argv);
- case -1:
- errx(EXIT_FAILURE, "error expanding '%s' ('%s' nonexistent?)", *argv, _pkgdb_getPKGDB_DIR());
- }
- } else {
- char *dbdir;
-
- dbdir = _pkgdb_getPKGDB_DIR();
- if (**argv == '/' && strncmp(*argv, dbdir, strlen(dbdir)) == 0) {
- *argv += strlen(dbdir) + 1;
- if ((*argv)[strlen(*argv) - 1] == '/') {
- (*argv)[strlen(*argv) - 1] = 0;
- }
- }
- lpp = alloc_lpkg(*argv);
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
- }
- }
-
- if (File2Pkg) {
- pkgdb_close();
- }
-
- /* If no packages, yelp */
- if (TAILQ_FIRST(&pkgs) == NULL) {
- warnx("missing package name(s)");
- usage();
- }
-#ifndef __INTERIX
- if (!Fake && Verbose && getuid() != 0) {
- warnx("not running as root - trying to delete anyways");
- }
-#endif
- if (OnlyDeleteFromPkgDB) {
- /* Only delete the given packages' files from pkgdb, do not
- * touch the pkg itself. Used by "make reinstall" in
- * bsd.pkg.mk */
- char cachename[MaxPathSize];
-
- if (!pkgdb_open(ReadWrite)) {
- err(EXIT_FAILURE, "cannot open %s", _pkgdb_getPKGDB_FILE(cachename, sizeof(cachename)));
- }
- ex = EXIT_SUCCESS;
- for (lpp = TAILQ_FIRST(&pkgs); lpp ; lpp = TAILQ_NEXT(lpp, lp_link)) {
- if (!pkgdb_remove_pkg(lpp->lp_name)) {
- ex = EXIT_FAILURE;
- }
- }
- pkgdb_close();
- return ex;
- }
- if ((ex = pkg_perform(&pkgs)) != 0) {
- if (Verbose) {
- warnx("%d package deletion(s) failed", ex);
- }
- return EXIT_FAILURE;
- }
- return EXIT_SUCCESS;
-}
diff --git a/pkgtools/pkg_install/files/delete/perform.c b/pkgtools/pkg_install/files/delete/perform.c
deleted file mode 100644
index 878217bd290..00000000000
--- a/pkgtools/pkg_install/files/delete/perform.c
+++ /dev/null
@@ -1,884 +0,0 @@
-/* $NetBSD: perform.c,v 1.16 2005/05/30 13:23:31 wiz Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
-#else
-__RCSID("$NetBSD: perform.c,v 1.16 2005/05/30 13:23:31 wiz Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the main body of the delete module.
- *
- */
-/*
- * Copyright (c) 1999 Christian E. Hopps
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Added the require find and require delete code
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include "lib.h"
-#include "delete.h"
-
-
-/* In which direction to search in require_find() */
-typedef enum {
- FIND_UP, FIND_DOWN
-} rec_find_t;
-
-static int require_find_recursive_up(lpkg_t *);
-static int require_find_recursive_down(lpkg_t *, package_t *);
-static int require_find(char *, rec_find_t);
-static int require_delete(char *, int);
-static void require_print(void);
-static int undepend(const char *, void *);
-
-static char LogDir[MaxPathSize];
-static char linebuf[MaxPathSize];
-static char pkgdir[MaxPathSize];
-
-static package_t Plist;
-
-static lpkg_head_t lpfindq;
-static lpkg_head_t lpdelq;
-
-static void
-sanity_check(char *pkg)
-{
- if (!fexists(CONTENTS_FNAME)) {
- cleanup(0);
- errx(2, "installed package %s has no %s file!",
- pkg, CONTENTS_FNAME);
- }
-}
-
-void
-cleanup(int sig)
-{
- /* Nothing to do */
- if (sig) /* in case this is ever used as a signal handler */
- exit(1);
-}
-
-/*
- * deppkgname is the pkg from which's +REQUIRED_BY file we are
- * about to remove pkg2delname. This function is called from
- * findmatchingname(), deppkgname is expanded from a (possible) pattern.
- */
-static int
-undepend(const char *deppkgname, void *vp)
-{
- char *pkg2delname = vp;
- char fname[MaxPathSize], ftmp[MaxPathSize];
- char fbuf[MaxPathSize];
- FILE *fp, *fpwr;
- int s;
-
- (void) snprintf(fname, sizeof(fname), "%s/%s/%s",
- _pkgdb_getPKGDB_DIR(), deppkgname, REQUIRED_BY_FNAME);
- fp = fopen(fname, "r");
- if (fp == NULL) {
- warnx("couldn't open dependency file `%s'", fname);
- return 0;
- }
- (void) snprintf(ftmp, sizeof(ftmp), "%s.XXXXXX", fname);
- s = mkstemp(ftmp);
- if (s == -1) {
- fclose(fp);
- warnx("couldn't open temp file `%s'", ftmp);
- return 0;
- }
- fpwr = fdopen(s, "w");
- if (fpwr == NULL) {
- close(s);
- fclose(fp);
- warnx("couldn't fdopen temp file `%s'", ftmp);
- remove(ftmp);
- return 0;
- }
- while (fgets(fbuf, sizeof(fbuf), fp) != NULL) {
- if (fbuf[strlen(fbuf) - 1] == '\n')
- fbuf[strlen(fbuf) - 1] = '\0';
- if (strcmp(fbuf, pkg2delname)) /* no match */
- fputs(fbuf, fpwr), putc('\n', fpwr);
- }
- (void) fclose(fp);
- if (fchmod(s, 0644) == FAIL) {
- warnx("error changing permission of temp file `%s'", ftmp);
- fclose(fpwr);
- remove(ftmp);
- return 0;
- }
- if (fclose(fpwr) == EOF) {
- warnx("error closing temp file `%s'", ftmp);
- remove(ftmp);
- return 0;
- }
- if (rename(ftmp, fname) == -1)
- warn("error renaming `%s' to `%s'", ftmp, fname);
- remove(ftmp); /* just in case */
-
- return 0;
-}
-
-/*
- * Remove the current view's package dbdir from the +VIEWS file of the
- * depoted package named by pkgname.
- */
-static int
-unview(const char *pkgname)
-{
- char fname[MaxPathSize], ftmp[MaxPathSize];
- char fbuf[MaxPathSize];
- char dbdir[MaxPathSize];
- FILE *fp, *fpwr;
- int s;
- int cc;
-
- (void) snprintf(dbdir, sizeof(dbdir), "%s", _pkgdb_getPKGDB_DIR());
-
- /* Get the depot directory. */
- (void) snprintf(fname, sizeof(fname), "%s/%s/%s",
- dbdir, pkgname, DEPOT_FNAME);
- if ((fp = fopen(fname, "r")) == NULL) {
- warnx("unable to open `%s' file", fname);
- return -1;
- }
- if (fgets(fbuf, sizeof(fbuf), fp) == NULL) {
- (void) fclose(fp);
- warnx("empty depot file `%s'", fname);
- return -1;
- }
- if (fbuf[cc = strlen(fbuf) - 1] == '\n') {
- fbuf[cc] = 0;
- }
- fclose(fp);
-
- /*
- * Copy the contents of the +VIEWS file into a temp file, but
- * skip copying the name of the current view's package dbdir.
- */
- (void) snprintf(fname, sizeof(fname), "%s/%s", fbuf, VIEWS_FNAME);
- if ((fp = fopen(fname, "r")) == NULL) {
- warnx("unable to open `%s' file", fname);
- return -1;
- }
- (void) snprintf(ftmp, sizeof(ftmp), "%s.XXXXXX", fname);
- if ((s = mkstemp(ftmp)) == -1) {
- (void) fclose(fp);
- warnx("unable to open `%s' temp file", ftmp);
- return -1;
- }
- if ((fpwr = fdopen(s, "w")) == NULL) {
- (void) close(s);
- (void) remove(ftmp);
- (void) fclose(fp);
- warnx("unable to fdopen `%s' temp file", ftmp);
- return -1;
- }
- while (fgets(fbuf, sizeof(fbuf), fp) != NULL) {
- if (fbuf[cc = strlen(fbuf) - 1] == '\n') {
- fbuf[cc] = 0;
- }
- if (strcmp(fbuf, dbdir) != 0) {
- (void) fputs(fbuf, fpwr);
- (void) putc('\n', fpwr);
- }
- }
- (void) fclose(fp);
- if (fchmod(s, 0644) == FAIL) {
- (void) fclose(fpwr);
- (void) remove(ftmp);
- warnx("unable to change permissions of `%s' temp file", ftmp);
- return -1;
- }
- if (fclose(fpwr) == EOF) {
- (void) remove(ftmp);
- warnx("unable to close `%s' temp file", ftmp);
- return -1;
- }
-
- /* Rename the temp file to the +VIEWS file */
- if (rename(ftmp, fname) == -1) {
- (void) remove(ftmp);
- warnx("unable to rename `%s' to `%s'", ftmp, fname);
- return -1;
- }
- return 0;
-}
-
-/*
- * Delete from directory 'home' all packages on lpkg_list.
- * If tryall is set, ignore errors from pkg_delete(1).
- */
-int
-require_delete(char *home, int tryall)
-{
- lpkg_t *lpp;
- int rv, fail;
- int oldcwd;
-
- /* save cwd */
- oldcwd = open(".", O_RDONLY, 0);
- if (oldcwd == -1)
- err(EXIT_FAILURE, "cannot open \".\"");
-
- (void) snprintf(pkgdir, sizeof(pkgdir), "%s", _pkgdb_getPKGDB_DIR());
-
- /* walk list of things to delete */
- fail = 0;
- lpp = TAILQ_FIRST(&lpdelq);
- for (; lpp; lpp = TAILQ_NEXT(lpp, lp_link)) {
- int rm_installed; /* delete expanded pkg, not @pkgdep value */
- char installed[MaxPathSize];
-
- /* go to the db dir */
- if (chdir(pkgdir) == FAIL) {
- warnx("unable to change directory to %s, deinstall failed (1)",
- pkgdir);
- fail = 1;
- break;
- }
-
- /* look to see if package was already deleted */
- rm_installed = 0;
- if (ispkgpattern(lpp->lp_name)) {
- if (findmatchingname(".", lpp->lp_name, note_whats_installed, installed) != 1) {
- warnx("%s appears to have been deleted", lpp->lp_name);
- continue;
- }
- rm_installed = 1;
- } else {
- if (!fexists(lpp->lp_name)) {
- warnx("%s appears to have been deleted", lpp->lp_name);
- continue;
- }
- }
-
- /* return home for execution of command */
- if (chdir(home) == FAIL) {
- warnx("unable to change directory to %s, deinstall failed (2)", home);
- fail = 1;
- break;
- }
-
- if (Verbose)
- printf("deinstalling %s\n", rm_installed?installed:lpp->lp_name);
-
- /* delete the package */
- if (Fake)
- rv = 0;
- else
- rv = fexec_skipempty(ProgramPath, "-K",
- _pkgdb_getPKGDB_DIR(),
- Prefix ? "-p" : "", Prefix ? Prefix : "",
- Verbose ? "-v" : "",
- (Force > 1) ? "-f -f" : (Force == 1) ? "-f" : "",
- NoDeInstall ? "-D" : "",
- NoDeleteFiles ? "-N" : "",
- CleanDirs ? "-d" : "",
- Fake ? "-n" : "",
- rm_installed ? installed : lpp->lp_name, NULL);
-
- /* check for delete failure */
- if (rv && !tryall) {
- fail = 1;
- warnx("had problem removing %s%s", rm_installed?installed:lpp->lp_name,
- Force ? ", continuing" : "");
- if (!Force)
- break;
- }
- }
-
- /* cleanup list */
- while ((lpp = TAILQ_FIRST(&lpdelq))) {
- TAILQ_REMOVE(&lpdelq, lpp, lp_link);
- free_lpkg(lpp);
- }
-
- /* return to the log dir */
- if (fchdir(oldcwd) == FAIL) {
- warnx("unable to change to previous directory, deinstall failed");
- fail = 1;
- }
- close(oldcwd);
-
- return (fail);
-}
-
-/*
- * Recursively find all packages "up" the tree (follow +REQUIRED_BY).
- * Return 1 on errors
- */
-int
-require_find_recursive_up(lpkg_t *thislpp)
-{
- lpkg_head_t reqq;
- lpkg_t *lpp = NULL;
- FILE *cfile;
- char *nl;
-
- /* see if we are on the find queue -- circular dependency */
- if ((lpp = find_on_queue(&lpfindq, thislpp->lp_name))) {
- warnx("circular dependency found for pkg %s", lpp->lp_name);
- return (1);
- }
-
- TAILQ_INIT(&reqq);
-
- (void) snprintf(pkgdir, sizeof(pkgdir), "%s/%s",
- _pkgdb_getPKGDB_DIR(), thislpp->lp_name);
-
- /* change to package's dir */
- if (chdir(pkgdir) == FAIL) {
- warnx("unable to change directory to %s! deinstall failed", pkgdir);
- return (1);
- }
-
- /* terminate recursion if no required by's */
- if (isemptyfile(REQUIRED_BY_FNAME))
- return (0);
-
- /* get packages that directly require us */
- cfile = fopen(REQUIRED_BY_FNAME, "r");
- if (!cfile) {
- warnx("cannot open requirements file `%s'", REQUIRED_BY_FNAME);
- return (1);
- }
- while (fgets(linebuf, sizeof(linebuf), cfile)) {
- if ((nl = strrchr(linebuf, '\n')))
- *nl = 0;
- lpp = alloc_lpkg(linebuf);
- TAILQ_INSERT_TAIL(&reqq, lpp, lp_link);
- }
- fclose(cfile);
-
- /* put ourselves on the top of the find queue */
- TAILQ_INSERT_HEAD(&lpfindq, thislpp, lp_link);
-
- while ((lpp = TAILQ_FIRST(&reqq))) {
- /* remove a direct req from our queue */
- TAILQ_REMOVE(&reqq, lpp, lp_link);
-
- /* find direct required requires */
- if (require_find_recursive_up(lpp))
- goto fail;
-
- /* all requires taken care of, add to tail of delete queue
- * if not already there */
- if (find_on_queue(&lpdelq, lpp->lp_name))
- free_lpkg(lpp);
- else
- TAILQ_INSERT_TAIL(&lpdelq, lpp, lp_link);
- }
-
- /* take ourselves off the find queue */
- TAILQ_REMOVE(&lpfindq, thislpp, lp_link);
-
- return (0);
-
-fail:
- while ((lpp = TAILQ_FIRST(&reqq))) {
- TAILQ_REMOVE(&reqq, lpp, lp_link);
- free_lpkg(lpp);
- }
- return (1);
-}
-
-/*
- * Recursively find all packages "down" the tree (follow @pkgdep).
- * Return 1 on errors
- */
-int
-require_find_recursive_down(lpkg_t *thislpp, package_t *plist)
-{
- plist_t *p;
- lpkg_t *lpp, *lpp2;
- lpkg_head_t reqq;
- int rc, fail = 0;
-
- /* see if we are on the find queue -- circular dependency */
- if ((lpp = find_on_queue(&lpfindq, thislpp->lp_name))) {
- warnx("circular dependency found for pkg %s", lpp->lp_name);
- return (1);
- }
-
- TAILQ_INIT(&reqq);
-
- /* width-first scan */
- /* first enqueue all @pkgdep's to lpdelq, then (further below)
- * go in recursively */
- for (p = plist->head; p; p = p->next) {
- switch (p->type) {
- case PLIST_PKGDEP:
- lpp = alloc_lpkg(p->name);
- TAILQ_INSERT_TAIL(&reqq, lpp, lp_link);
-
- lpp2 = find_on_queue(&lpdelq, p->name);
- if (lpp2) {
- TAILQ_REMOVE(&lpdelq, lpp2, lp_link);
- free_lpkg(lpp2);
- }
- lpp = alloc_lpkg(p->name);
- TAILQ_INSERT_TAIL(&lpdelq, lpp, lp_link);
-
- break;
- default:
- break;
- }
- }
-
- while ((lpp = TAILQ_FIRST(&reqq))) {
- FILE *cfile;
- package_t rPlist;
-
- /* remove a direct req from our queue */
- TAILQ_REMOVE(&reqq, lpp, lp_link);
-
- /* Reset some state */
- rPlist.head = NULL;
- rPlist.tail = NULL;
-
- /* prepare for recursion */
- chdir(_pkgdb_getPKGDB_DIR());
- if (ispkgpattern(lpp->lp_name)) {
- char installed[MaxPathSize];
- if (findmatchingname(".", lpp->lp_name, note_whats_installed, installed) != 1) {
- warnx("cannot remove dependency for pkg-pattern %s", lpp->lp_name);
- fail = 1;
- goto fail;
- }
- if (chdir(installed) == -1) {
- warnx("can't chdir to %s", installed);
- fail = 1;
- goto fail;
- }
- sanity_check(installed);
- } else {
- if (chdir(lpp->lp_name) == -1) {
- warnx("cannot remove dependency from %s", lpp->lp_name);
- fail = 1;
- goto fail;
- }
- sanity_check(lpp->lp_name);
- }
-
- cfile = fopen(CONTENTS_FNAME, "r");
- if (!cfile) {
- warn("unable to open '%s' file", CONTENTS_FNAME);
- fail = 1;
- goto fail;
- }
- /* If we have a prefix, add it now */
- if (Prefix)
- add_plist(&rPlist, PLIST_CWD, Prefix);
- read_plist(&rPlist, cfile);
- fclose(cfile);
- p = find_plist(&rPlist, PLIST_CWD);
- if (!p) {
- warnx("package '%s' doesn't have a prefix", lpp->lp_name);
- free_plist(&rPlist);
- fail = 1;
- goto fail;
- }
-
- /* put ourselves on the top of the find queue */
- TAILQ_INSERT_HEAD(&lpfindq, thislpp, lp_link);
-
- rc = require_find_recursive_down(lpp, &rPlist);
- free_plist(&rPlist);
- if (rc) {
- fail = 1;
- goto fail;
- }
-
- /* take ourselves off the find queue */
- TAILQ_REMOVE(&lpfindq, thislpp, lp_link);
- free_lpkg(lpp);
- }
-
-fail:
- /* Clean out reqq */
- while ((lpp = TAILQ_FIRST(&reqq))) {
- TAILQ_REMOVE(&reqq, lpp, lp_link);
- free_lpkg(lpp);
- }
-
- return fail;
-}
-
-/*
- * Start recursion in the one or other direction.
- */
-int
-require_find(char *pkg, rec_find_t updown)
-{
- lpkg_t *lpp;
- int rv = 0;
-
- TAILQ_INIT(&lpfindq);
- TAILQ_INIT(&lpdelq);
-
- lpp = alloc_lpkg(pkg);
- switch (updown) {
- case FIND_UP:
- rv = require_find_recursive_up(lpp);
- break;
- case FIND_DOWN:
- rv = require_find_recursive_down(lpp, &Plist);
- break;
- }
- free_lpkg(lpp);
-
- return (rv);
-}
-
-void
-require_print(void)
-{
- lpkg_t *lpp;
-
- /* print all but last -- deleting if requested */
- while ((lpp = TAILQ_FIRST(&lpdelq))) {
- TAILQ_REMOVE(&lpdelq, lpp, lp_link);
- fprintf(stderr, "\t%s\n", lpp->lp_name);
- free_lpkg(lpp);
- }
-}
-
-/*
- * This is seriously ugly code following. Written very fast!
- */
-static int
-pkg_do(char *pkg)
-{
- plist_t *p;
- FILE *cfile;
- FILE *fp;
- char home[MaxPathSize];
- char view[MaxPathSize];
- int cc;
- Boolean is_depoted_pkg = FALSE;
-
- /* Reset some state */
- if (Plist.head)
- free_plist(&Plist);
-
- (void) snprintf(LogDir, sizeof(LogDir), "%s/%s",
- _pkgdb_getPKGDB_DIR(), pkg);
- if (!fexists(LogDir) || !(isdir(LogDir) || islinktodir(LogDir))) {
- /* Check if the given package name matches something
- * with 'pkg-[0-9]*' */
- char try[MaxPathSize];
- lpkg_head_t trypkgs;
- lpkg_t *lpp;
- int qlen = 0;
-
- TAILQ_INIT(&trypkgs);
- snprintf(try, MaxPathSize, "%s-[0-9]*", pkg);
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), try,
- add_to_list_fn, &trypkgs) == 0) {
- warnx("package '%s' not installed", pkg);
- return 1;
- }
-
- TAILQ_FOREACH(lpp, &trypkgs, lp_link)
- qlen++;
-
- if (qlen > 1) {
- warnx("'%s' matches more than one package:", pkg);
- while ((lpp = TAILQ_FIRST(&trypkgs))) {
- TAILQ_REMOVE(&trypkgs, lpp, lp_link);
- fprintf(stderr, "\t%s\n", lpp->lp_name);
- free_lpkg(lpp);
- }
- return 1;
- }
-
- /*
- * Append the package names we've discovered to the
- * pkgs list after this one, and return 0 so that we
- * continue processing the pkgs list.
- */
- TAILQ_FOREACH(lpp, &trypkgs, lp_link)
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
-
- return 0;
- }
- setenv(PKG_REFCOUNT_DBDIR_VNAME, pkgdb_refcount_dir(), 1);
- if (!getcwd(home, MaxPathSize)) {
- cleanup(0);
- errx(2, "unable to get current working directory!");
- }
- if (chdir(LogDir) == FAIL) {
- warnx("unable to change directory to %s! deinstall failed", LogDir);
- return 1;
- }
- if (!fexists(CONTENTS_FNAME)) {
- warnx("package '%s' is not installed, %s missing", pkg, CONTENTS_FNAME);
- if (!Force)
- return 1;
- }
- if (fexists(PRESERVE_FNAME)) {
- printf("Package `%s' is marked as not for deletion\n", pkg);
- if (Force <= (NoDeleteFiles ? 0 : 1)) {
- return 1;
- }
- printf("Deleting anyway\n");
- }
- if (!isemptyfile(REQUIRED_BY_FNAME)) {
- /* This package is required by others. Either nuke
- * them (-r), or stop. */
- if (!Recurse_up)
- warnx("package `%s' is required by other packages:", pkg);
- else if (Verbose)
- printf("Building list of packages that require `%s'"
- " to deinstall\n", pkg);
- if (require_find(pkg, FIND_UP)) {
- if (!Force || Recurse_up)
- return (1);
- }
- chdir(LogDir); /* CWD was changed by require_find() */
- if (!Recurse_up) {
- require_print();
- if (!Force)
- return 1;
- } else
- require_delete(home, 0);
- }
- if (!isemptyfile(VIEWS_FNAME)) {
- /* This package has instances in other views */
- /* Delete them from the views */
- if ((fp = fopen(VIEWS_FNAME, "r")) == NULL) {
- warnx("unable to open '%s' file", VIEWS_FNAME);
- return 1;
- }
- while (fgets(view, sizeof(view), fp) != NULL) {
- if (view[cc = strlen(view) - 1] == '\n') {
- view[cc] = 0;
- }
- if (Verbose) {
- printf("Deleting package %s instance from `%s' view\n", pkg, view);
- }
- if (fexec_skipempty(ProgramPath, "-K", view,
- (Force > 1) ? "-f -f " : (Force == 1) ? "-f " : "",
- pkg, NULL) != 0) {
- warnx("unable to delete package %s from view %s", pkg, view);
- (void) fclose(fp);
- return 1;
- }
- }
- (void) fclose(fp);
- }
- sanity_check(LogDir);
- cfile = fopen(CONTENTS_FNAME, "r");
- if (!cfile) {
- warnx("unable to open '%s' file", CONTENTS_FNAME);
- return 1;
- }
- /* If we have a prefix, add it now */
- if (Prefix)
- add_plist(&Plist, PLIST_CWD, Prefix);
- read_plist(&Plist, cfile);
- fclose(cfile);
- p = find_plist(&Plist, PLIST_CWD);
- if (!p) {
- warnx("package '%s' doesn't have a prefix", pkg);
- return 1;
- }
- setenv(PKG_PREFIX_VNAME, p->name, 1);
- setenv(PKG_METADATA_DIR_VNAME, LogDir, 1);
- if (fexists(REQUIRE_FNAME)) {
- if (Verbose)
- printf("Executing 'require' script.\n");
- (void) fexec(CHMOD_CMD, "+x", REQUIRE_FNAME, NULL); /* be sure */
- if (fexec("./" REQUIRE_FNAME, pkg, "DEINSTALL", NULL)) {
- warnx("package %s fails requirements %s", pkg,
- Force ? "" : "- not deleted");
- if (!Force)
- return 1;
- }
- }
- /*
- * Ensure that we don't do VIEW-DEINSTALL action for old packages
- * or for the package in its depot directory.
- */
- if (!NoDeInstall && fexists(DEINSTALL_FNAME) && fexists(DEPOT_FNAME)) {
- if (Fake) {
- printf("Would execute view de-install script at this point (arg: VIEW-DEINSTALL).\n");
- } else {
- (void) fexec(CHMOD_CMD, "+x", DEINSTALL_FNAME, NULL); /* make sure */
- if (fexec("./" DEINSTALL_FNAME, pkg, "VIEW-DEINSTALL", NULL)) {
- warnx("view deinstall script returned error status");
- if (!Force) {
- return 1;
- }
- }
- }
- }
- if (!NoDeInstall && fexists(DEINSTALL_FNAME) && !fexists(DEPOT_FNAME)) {
- if (Fake)
- printf("Would execute de-install script at this point (arg: DEINSTALL).\n");
- else {
- (void) fexec(CHMOD_CMD, "+x", DEINSTALL_FNAME, NULL); /* make sure */
- if (fexec("./" DEINSTALL_FNAME, pkg, "DEINSTALL", NULL)) {
- warnx("deinstall script returned error status");
- if (!Force)
- return 1;
- }
- }
- }
- if (!Fake) {
- /* Some packages aren't packed right, so we need to just ignore delete_package()'s status. Ugh! :-( */
- if (delete_package(FALSE, CleanDirs, &Plist, NoDeleteFiles) == FAIL)
- warnx(
- "couldn't entirely delete package `%s'\n"
- "(perhaps the packing list is incorrectly specified?)", pkg);
- }
- else { /* Fake means Verbose */
- printf("Attempting to delete package `%s'\n", pkg);
- }
- if (!isemptyfile(DEPOT_FNAME)) {
- if (Verbose)
- printf("Attempting to remove the %s registration on package `%s'\n", VIEWS_FNAME, pkg);
- if (!Fake)
- (void) unview(pkg);
- }
- /*
- * If this isn't a package in a view, then remove this package
- * from the +REQUIRED_BY list of the packages this depends on.
- */
- if (!fexists(DEPOT_FNAME)) {
- for (p = Plist.head; p; p = p->next) {
- if (p->type != PLIST_PKGDEP)
- continue;
- if (Verbose)
- printf("Attempting to remove dependency on package `%s'\n", p->name);
- if (!Fake)
- findmatchingname(_pkgdb_getPKGDB_DIR(),
- p->name, undepend, pkg);
- }
- }
- if (Recurse_down) {
- /* Also remove the packages further down, now that there's
- * (most likely) nothing left which requires them. */
- if (Verbose)
- printf("Building list of packages that `%s' required\n", pkg);
- if (require_find(pkg, FIND_DOWN))
- return (1);
-
- require_delete(home, 1);
- }
- if (!NoDeInstall && fexists(DEINSTALL_FNAME) && !fexists(DEPOT_FNAME)) {
- if (Fake)
- printf("Would execute post-de-install script at this point (arg: POST-DEINSTALL).\n");
- else {
- (void) fexec(CHMOD_CMD, "+x", DEINSTALL_FNAME, NULL); /* make sure */
- if (fexec("./" DEINSTALL_FNAME, pkg, "POST-DEINSTALL", NULL)) {
- warnx("post-deinstall script returned error status");
- if (!Force)
- return 1;
- }
- }
- }
- if (fexists(VIEWS_FNAME))
- is_depoted_pkg = TRUE;
-
- /* Change out of LogDir before we remove it.
- * Do not fail here, as the package is not yet completely deleted! */
- if (chdir(home) == FAIL)
- warnx("Oops - removed current working directory. Oh, well.");
- if (!Fake) {
- /* Finally nuke the +-files and the pkgdb-dir (/var/db/pkg/foo) */
- if (is_depoted_pkg) {
- (void) remove_files(LogDir, "+*");
- if (isemptydir(LogDir))
- (void)rmdir(LogDir);
- else
- warnx("%s is not empty", LogDir);
- return 0;
- } else {
- if (fexec(REMOVE_CMD, "-r", LogDir, NULL)) {
- warnx("couldn't remove log entry in %s, deinstall failed", LogDir);
- if (!Force)
- return 1;
- }
- }
- }
- return 0;
-}
-
-int
-pkg_perform(lpkg_head_t *pkghead)
-{
- int err_cnt = 0;
- int oldcwd;
- lpkg_t *lpp;
-
- /* save cwd */
- oldcwd = open(".", O_RDONLY, 0);
- if (oldcwd == -1)
- err(EXIT_FAILURE, "cannot open \".\"");
-
- while ((lpp = TAILQ_FIRST(pkghead))) {
- err_cnt += pkg_do(lpp->lp_name);
- TAILQ_REMOVE(pkghead, lpp, lp_link);
- free_lpkg(lpp);
- if (fchdir(oldcwd) == FAIL)
- err(EXIT_FAILURE, "unable to change to previous directory");
- }
- close(oldcwd);
- return err_cnt;
-}
diff --git a/pkgtools/pkg_install/files/delete/pkg_delete.1 b/pkgtools/pkg_install/files/delete/pkg_delete.1
deleted file mode 100644
index e23f06113e8..00000000000
--- a/pkgtools/pkg_install/files/delete/pkg_delete.1
+++ /dev/null
@@ -1,312 +0,0 @@
-.\" $NetBSD: pkg_delete.1,v 1.12 2005/05/30 13:23:31 wiz Exp $
-.\"
-.\" FreeBSD install - a package for the installation and maintenance
-.\" of non-core utilities.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" Jordan K. Hubbard
-.\"
-.\"
-.\" from FreeBSD: @(#)pkg_delete.1
-.\"
-.Dd February 4, 2005
-.Dt PKG_DELETE 1
-.Os
-.Sh NAME
-.Nm pkg_delete
-.Nd a utility for deleting previously installed software package distributions
-.Sh SYNOPSIS
-.Nm
-.Op Fl DdFfNnORrVv
-.Bk -words
-.Op Fl K Ar pkg_dbdir
-.Ek
-.Bk -words
-.Op Fl p Ar prefix
-.Ek
-.Ar pkg-name ...
-.Sh DESCRIPTION
-The
-.Nm
-command is used to delete packages that have been previously installed
-with the
-.Xr pkg_add 1
-command.
-.Sh WARNING
-.Bf -emphasis
-Since the
-.Nm
-command may execute scripts or programs provided by a package file,
-your system may be susceptible to
-.Dq Trojan horses
-or other subtle
-attacks from miscreants who create dangerous package files.
-.Pp
-You are advised to verify the competence and identity of those who
-provide installable package files.
-For extra protection, examine all the package control files in the
-package record directory
-.Pa ( /var/db/pkg/\*[Lt]pkg-name\*[Gt]/ ) .
-Pay particular
-attention to any
-.Pa +INSTALL ,
-.Pa +DEINSTALL ,
-.Pa +REQUIRE ,
-or
-.Pa +MTREE_DIRS
-files, and inspect the
-.Pa +CONTENTS
-file for
-.Cm @cwd ,
-.Cm @mode
-(check for setuid),
-.Cm @dirrm ,
-.Cm @exec ,
-and
-.Cm @unexec
-directives, and/or use the
-.Xr pkg_info 1
-command to examine the installed package control files.
-.Ef
-.Sh OPTIONS
-The following command line options are supported:
-.Bl -tag -width indent
-.It Ar pkg-name ...
-The named packages are deinstalled, wildcards can be used, see
-.Xr pkg_info 1 .
-If no version is given, the one currently installed
-will be removed.
-If the
-.Fl F
-flag is given, one or more (absolute) filenames may be specified and
-the Package Database will be consulted for the package to which the
-given file belongs.
-These packages are then deinstalled.
-.It Fl D
-If a deinstallation script exists for a given package, do not execute it.
-.It Fl d
-Remove empty directories created by file cleanup.
-By default, only files/directories explicitly listed in a package's
-contents (either as normal files/directories or with the
-.Cm @dirrm
-directive) will be removed at deinstallation time.
-This option tells
-.Nm
-to also remove any directories that were emptied as a result of removing
-the package.
-.It Fl F
-Any pkg-name given will be interpreted as pathname which is
-subsequently transformed in a (real) package name via the Package
-Database.
-That way, packages can be deleted by giving a filename
-instead of the package-name.
-.It Fl f
-Force removal of the package, even if a dependency is recorded or the
-deinstall or require script fails.
-.It Fl K Ar pkg_dbdir
-Set
-.Ar pkg_dbdir
-as the package database directory.
-If this option isn't specified, then the package database directory is
-taken from the value of the environment variable
-.Ev PKG_DBDIR
-if it's set, otherwise it defaults to
-.Pa /var/db/pkg .
-.It Fl N
-Remove the package's registration and its entries from the package database,
-but leave the files installed.
-Don't run any deinstall scripts or @unexec lines either.
-.It Fl n
-Don't actually deinstall a package, just report the steps that
-would be taken if it were.
-.It Fl O
-Only delete the package's entries from the package database, do not
-touch the package or its files itself.
-.It Fl p Ar prefix
-Set
-.Ar prefix
-as the directory in which to delete files from any installed packages
-which do not explicitly set theirs.
-For most packages, the prefix will
-be set automatically to the installed location by
-.Xr pkg_add 1 .
-.It Fl R
-This option triggers a recursive delete of the given package and any
-packages it depends on, unless some other package still needs a
-dependent package.
-This
-.Fl R
-option can be used to clean up by deleting a package and all its
-then-unneeded dependent packages.
-.It Fl r
-.Nm
-first builds a list of all packages that require (directly and indirectly)
-the one being deleted.
-It then deletes these packages using
-.Nm
-with the given options before deleting the user specified package.
-This
-.Fl r
-option can be used to recursively delete a package and all of the
-packages which depend on that package.
-.It Fl V
-Print version number and exit.
-.It Fl v
-Turn on verbose output.
-.El
-.Sh TECHNICAL DETAILS
-.Nm
-does pretty much what it says.
-It examines installed package records in
-.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] ,
-deletes the package contents, and finally removes the package records
-(if an alternate package database directory is specified, then it
-overrides the
-.Pa /var/db/pkg
-path shown above).
-.Pp
-If a package is required by other installed packages,
-.Nm
-will list those dependent packages and refuse to delete the package
-(unless the
-.Fl f
-option is given).
-.Pp
-If a package has been marked as a
-.Cm preserved
-package, it will not be able to be deleted
-(unless more than one occurrence of the
-.Fl f
-option is given).
-.Pp
-If a filename is given instead of a package name, the package of which
-the given file belongs to can be deleted if the
-.Fl F
-Flag is given.
-The filename needs to be absolute, see the output produced by the pkg_info
-.Fl aF
-command.
-.Pp
-If the package contains a
-.Ar require
-file (see
-.Xr pkg_create 1 ) ,
-then this is executed first as
-.Bd -filled -offset indent -compact
-.Cm require
-.Aq Ar pkg-name
-.Ar DEINSTALL
-.Ed
-(where
-.Ar pkg-name
-is the name of the package in question and
-.Ar DEINSTALL
-is a keyword denoting that this is a deinstallation)
-to see whether or not deinstallation should continue.
-A non-zero exit status means no, unless the
-.Fl f
-option is specified.
-.Pp
-If a
-.Cm deinstall
-script exists for the package, it is executed before and after
-any files are removed.
-It is this script's responsibility to clean up any additional messy details
-around the package's installation, since all
-.Nm
-knows how to do is delete the files created in the original distribution.
-The
-.Ic deinstall
-script is called as:
-.Bd -filled -offset indent -compact
-.Cm deinstall
-.Aq Ar pkg-name
-.Ar VIEW-DEINSTALL
-.Ed
-before removing the package from a view, and as:
-.Bd -filled -offset indent -compact
-.Cm deinstall
-.Aq Ar pkg-name
-.Ar DEINSTALL
-.Ed
-before deleting all files and as:
-.Bd -filled -offset indent -compact
-.Cm deinstall
-.Aq Ar pkg-name
-.Ar POST-DEINSTALL
-.Ed
-after deleting them.
-Passing the keywords
-.Ar VIEW-DEINSTALL ,
-.Ar DEINSTALL
-and
-.Ar POST-DEINSTALL
-lets you potentially write only one program/script that handles all
-aspects of installation and deletion.
-.Pp
-All scripts are called with the environment variable
-.Ev PKG_PREFIX
-set to the installation prefix (see the
-.Fl p
-option above).
-This allows a package author to write a script
-that reliably performs some action on the directory where the package
-is installed, even if the user might have changed it by specifying the
-.Fl p
-option when running
-.Nm
-or
-.Xr pkg_add 1 .
-The scripts are also called with the
-.Ev PKG_METADATA_DIR
-environment variable set to the location of the
-.Pa +*
-meta-data files, and with the
-.Ev PKG_REFCOUNT_DBDIR
-environment variable set to the location of the package reference counts
-database directory.
-.Sh ENVIRONMENT
-.Bl -tag -width PKG_DBDIR
-.It Ev PKG_DBDIR
-If the
-.Fl K
-flag isn't given, then
-.Ev PKG_DBDIR
-is the location of the package database directory.
-The default package database directory is
-.Pa /var/db/pkg .
-.It Ev PKG_REFCOUNT_DBDIR
-Location of the package reference counts database directory.
-The default location is the path to the package database directory with
-.Dq .refcount
-appended to the path, e.g.
-.Pa /var/db/pkg.refcount .
-.El
-.Sh SEE ALSO
-.Xr pkg_add 1 ,
-.Xr pkg_admin 1 ,
-.Xr pkg_create 1 ,
-.Xr pkg_info 1 ,
-.Xr mktemp 3 ,
-.Xr packages 7 ,
-.Xr mtree 8
-.Sh AUTHORS
-.Bl -tag -width indent -compact
-.It "Jordan Hubbard"
-most of the work
-.It "John Kohl"
-refined it for
-.Nx
-.It "Hubert Feyrer"
-.Nx
-wildcard dependency processing, pkgdb, recursive "down"
-delete, etc.
-.El
diff --git a/pkgtools/pkg_install/files/delete/pkg_delete.cat1 b/pkgtools/pkg_install/files/delete/pkg_delete.cat1
deleted file mode 100644
index 34f7705cef4..00000000000
--- a/pkgtools/pkg_install/files/delete/pkg_delete.cat1
+++ /dev/null
@@ -1,171 +0,0 @@
-PKG_DELETE(1) NetBSD General Commands Manual PKG_DELETE(1)
-
-NNAAMMEE
- ppkkgg__ddeelleettee -- a utility for deleting previously installed software pack-
- age distributions
-
-SSYYNNOOPPSSIISS
- ppkkgg__ddeelleettee [--DDddFFffNNnnOORRrrVVvv] [--KK _p_k_g___d_b_d_i_r] [--pp _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._.
-
-DDEESSCCRRIIPPTTIIOONN
- The ppkkgg__ddeelleettee command is used to delete packages that have been previ-
- ously installed with the pkg_add(1) command.
-
-WWAARRNNIINNGG
- _S_i_n_c_e _t_h_e ppkkgg__ddeelleettee _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _p_r_o_v_i_d_e_d _b_y
- _a _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n _h_o_r_s_e_s_'_' _o_r
- _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s _p_a_c_k_a_g_e _f_i_l_e_s_.
-
- _Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_-
- _v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _e_x_a_m_i_n_e _a_l_l _t_h_e
- _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _r_e_c_o_r_d _d_i_r_e_c_t_o_r_y
- _(_/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>_/_)_. _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L_,
- _+_D_E_I_N_S_T_A_L_L_, _+_R_E_Q_U_I_R_E_, _o_r _+_M_T_R_E_E___D_I_R_S _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S
- _f_i_l_e _f_o_r @@ccwwdd_, @@mmooddee _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_, @@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc
- _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d
- _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_.
-
-OOPPTTIIOONNSS
- The following command line options are supported:
-
- _p_k_g_-_n_a_m_e _._._.
- The named packages are deinstalled, wildcards can be used, see
- pkg_info(1). If no version is given, the one currently installed
- will be removed. If the --FF flag is given, one or more (absolute)
- filenames may be specified and the Package Database will be con-
- sulted for the package to which the given file belongs. These
- packages are then deinstalled.
-
- --DD If a deinstallation script exists for a given package, do not
- execute it.
-
- --dd Remove empty directories created by file cleanup. By default,
- only files/directories explicitly listed in a package's contents
- (either as normal files/directories or with the @@ddiirrrrmm directive)
- will be removed at deinstallation time. This option tells
- ppkkgg__ddeelleettee to also remove any directories that were emptied as a
- result of removing the package.
-
- --FF Any pkg-name given will be interpreted as pathname which is sub-
- sequently transformed in a (real) package name via the Package
- Database. That way, packages can be deleted by giving a filename
- instead of the package-name.
-
- --ff Force removal of the package, even if a dependency is recorded or
- the deinstall or require script fails.
-
- --KK _p_k_g___d_b_d_i_r
- Set _p_k_g___d_b_d_i_r as the package database directory. If this option
- isn't specified, then the package database directory is taken
- from the value of the environment variable PKG_DBDIR if it's set,
- otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
-
- --NN Remove the package's registration and its entries from the pack-
- age database, but leave the files installed. Don't run any dein-
- stall scripts or @unexec lines either.
-
- --nn Don't actually deinstall a package, just report the steps that
- would be taken if it were.
-
- --OO Only delete the package's entries from the package database, do
- not touch the package or its files itself.
-
- --pp _p_r_e_f_i_x
- Set _p_r_e_f_i_x as the directory in which to delete files from any
- installed packages which do not explicitly set theirs. For most
- packages, the prefix will be set automatically to the installed
- location by pkg_add(1).
-
- --RR This option triggers a recursive delete of the given package and
- any packages it depends on, unless some other package still needs
- a dependent package. This --RR option can be used to clean up by
- deleting a package and all its then-unneeded dependent packages.
-
- --rr ppkkgg__ddeelleettee first builds a list of all packages that require
- (directly and indirectly) the one being deleted. It then deletes
- these packages using ppkkgg__ddeelleettee with the given options before
- deleting the user specified package. This --rr option can be used
- to recursively delete a package and all of the packages which
- depend on that package.
-
- --VV Print version number and exit.
-
- --vv Turn on verbose output.
-
-TTEECCHHNNIICCAALL DDEETTAAIILLSS
- ppkkgg__ddeelleettee does pretty much what it says. It examines installed package
- records in _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>, deletes the package contents, and
- finally removes the package records (if an alternate package database
- directory is specified, then it overrides the _/_v_a_r_/_d_b_/_p_k_g path shown
- above).
-
- If a package is required by other installed packages, ppkkgg__ddeelleettee will
- list those dependent packages and refuse to delete the package (unless
- the --ff option is given).
-
- If a package has been marked as a pprreesseerrvveedd package, it will not be able
- to be deleted (unless more than one occurrence of the --ff option is
- given).
-
- If a filename is given instead of a package name, the package of which
- the given file belongs to can be deleted if the --FF Flag is given. The
- filename needs to be absolute, see the output produced by the pkg_info
- --aaFF command.
-
- If the package contains a _r_e_q_u_i_r_e file (see pkg_create(1)), then this is
- executed first as
- rreeqquuiirree <_p_k_g_-_n_a_m_e> _D_E_I_N_S_T_A_L_L
- (where _p_k_g_-_n_a_m_e is the name of the package in question and _D_E_I_N_S_T_A_L_L is a
- keyword denoting that this is a deinstallation) to see whether or not
- deinstallation should continue. A non-zero exit status means no, unless
- the --ff option is specified.
-
- If a ddeeiinnssttaallll script exists for the package, it is executed before and
- after any files are removed. It is this script's responsibility to clean
- up any additional messy details around the package's installation, since
- all ppkkgg__ddeelleettee knows how to do is delete the files created in the origi-
- nal distribution. The ddeeiinnssttaallll script is called as:
- ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _V_I_E_W_-_D_E_I_N_S_T_A_L_L
- before removing the package from a view, and as:
- ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _D_E_I_N_S_T_A_L_L
- before deleting all files and as:
- ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _P_O_S_T_-_D_E_I_N_S_T_A_L_L
- after deleting them. Passing the keywords _V_I_E_W_-_D_E_I_N_S_T_A_L_L, _D_E_I_N_S_T_A_L_L and
- _P_O_S_T_-_D_E_I_N_S_T_A_L_L lets you potentially write only one program/script that
- handles all aspects of installation and deletion.
-
- All scripts are called with the environment variable PKG_PREFIX set to
- the installation prefix (see the --pp option above). This allows a package
- author to write a script that reliably performs some action on the direc-
- tory where the package is installed, even if the user might have changed
- it by specifying the --pp option when running ppkkgg__ddeelleettee or pkg_add(1).
- The scripts are also called with the PKG_METADATA_DIR environment vari-
- able set to the location of the _+_* meta-data files, and with the
- PKG_REFCOUNT_DBDIR environment variable set to the location of the pack-
- age reference counts database directory.
-
-EENNVVIIRROONNMMEENNTT
- PKG_DBDIR If the --KK flag isn't given, then PKG_DBDIR is the location of
- the package database directory. The default package database
- directory is _/_v_a_r_/_d_b_/_p_k_g.
-
- PKG_REFCOUNT_DBDIR
- Location of the package reference counts database directory.
- The default location is the path to the package database
- directory with ``.refcount'' appended to the path, e.g.
- _/_v_a_r_/_d_b_/_p_k_g_._r_e_f_c_o_u_n_t.
-
-SSEEEE AALLSSOO
- pkg_add(1), pkg_admin(1), pkg_create(1), pkg_info(1), mktemp(3),
- packages(7), mtree(8)
-
-AAUUTTHHOORRSS
- Jordan Hubbard
- most of the work
- John Kohl
- refined it for NetBSD
- Hubert Feyrer
- NetBSD wildcard dependency processing, pkgdb, recursive "down"
- delete, etc.
-
-NetBSD 3.0 February 4, 2005 NetBSD 3.0
diff --git a/pkgtools/pkg_install/files/info/Makefile.in b/pkgtools/pkg_install/files/info/Makefile.in
deleted file mode 100644
index 8207ab4e3ef..00000000000
--- a/pkgtools/pkg_install/files/info/Makefile.in
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile.in,v 1.10 2004/08/21 06:33:40 jlam Exp $
-
-srcdir= @srcdir@
-
-prefix= @prefix@
-exec_prefix= @exec_prefix@
-sbindir= @sbindir@
-mandir= @mandir@
-
-man1dir= $(mandir)/man1
-cat1dir= $(mandir)/cat1
-
-CC= @CC@
-CCLD= $(CC)
-LIBS= -linstall @LIBS@
-CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
-DEFS= @DEFS@
-CFLAGS= @CFLAGS@
-LDFLAGS= @LDFLAGS@ -L../lib
-
-INSTALL= @INSTALL@
-
-PROG= pkg_info
-
-OBJS= main.o perform.o show.o
-
-all: $(PROG)
-
-.c.o:
- $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(PROG): $(OBJS)
- $(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) $(PROG)
-
-install:
- $(INSTALL) -m 755 -d $(sbindir)
- $(INSTALL) -m 755 -d $(man1dir)
- $(INSTALL) -m 755 -d $(cat1dir)
- $(INSTALL) $(PROG) $(sbindir)
- $(INSTALL) -m 444 $(PROG).1 $(man1dir)/$(PROG).1
- $(INSTALL) -m 444 $(PROG).cat1 $(cat1dir)/$(PROG).0
diff --git a/pkgtools/pkg_install/files/info/info.h b/pkgtools/pkg_install/files/info/info.h
deleted file mode 100644
index 04ae3e600a0..00000000000
--- a/pkgtools/pkg_install/files/info/info.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* $NetBSD: info.h,v 1.11 2006/07/11 07:45:40 rillig Exp $ */
-
-/* from FreeBSD Id: info.h,v 1.10 1997/02/22 16:09:40 peter Exp */
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 23 August 1993
- *
- * Include and define various things wanted by the info command.
- *
- */
-
-#ifndef _INST_INFO_H_INCLUDE
-#define _INST_INFO_H_INCLUDE
-
-#ifndef MAXINDEXSIZE
-#define MAXINDEXSIZE 60
-#endif
-
-#ifndef MAXNAMESIZE
-#define MAXNAMESIZE 20
-#endif
-
-#define SHOW_COMMENT 0x00001
-#define SHOW_DESC 0x00002
-#define SHOW_PLIST 0x00004
-#define SHOW_INSTALL 0x00008
-#define SHOW_DEINSTALL 0x00010
-#define SHOW_REQUIRE 0x00020
-#define SHOW_PREFIX 0x00040
-#define SHOW_INDEX 0x00080
-#define SHOW_FILES 0x00100
-#define SHOW_DISPLAY 0x00200
-#define SHOW_REQBY 0x00400
-#define SHOW_MTREE 0x00800
-#define SHOW_BUILD_VERSION 0x01000
-#define SHOW_BUILD_INFO 0x02000
-#define SHOW_DEPENDS 0x04000
-#define SHOW_PKG_SIZE 0x08000
-#define SHOW_ALL_SIZE 0x10000
-#define SHOW_BLD_DEPENDS 0x20000
-#define SHOW_BI_VAR 0x40000
-#define SHOW_SUMMARY 0x80000
-
-enum which {
- WHICH_ALL,
- WHICH_USER,
- WHICH_LIST
-};
-
-extern int Flags;
-extern enum which Which;
-extern Boolean File2Pkg;
-extern Boolean Quiet;
-extern char *InfoPrefix;
-extern char *BuildInfoVariable;
-extern char PlayPen[];
-extern size_t PlayPenSize;
-extern char *CheckPkg;
-extern size_t termwidth;
-extern lpkg_head_t pkgs;
-
-extern void show_file(char *, char *, char *, Boolean);
-extern void show_var(const char *, const char *);
-extern void show_plist(char *, package_t *, pl_ent_t);
-extern void show_files(char *, package_t *);
-extern void show_depends(char *, package_t *);
-extern void show_bld_depends(char *, package_t *);
-extern void show_index(char *, char *, char *);
-extern void show_summary(package_t *, const char *);
-
-#endif /* _INST_INFO_H_INCLUDE */
diff --git a/pkgtools/pkg_install/files/info/main.c b/pkgtools/pkg_install/files/info/main.c
deleted file mode 100644
index cbcaf68c0c7..00000000000
--- a/pkgtools/pkg_install/files/info/main.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* $NetBSD: main.c,v 1.16 2006/06/27 23:36:14 hubertf Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
-#else
-__RCSID("$NetBSD: main.c,v 1.16 2006/06/27 23:36:14 hubertf Exp $");
-#endif
-#endif
-
-/*
- *
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * This is the add module.
- *
- */
-
-#if HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
-#if HAVE_TERMIOS_H
-#include <termios.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-
-#include "lib.h"
-#include "info.h"
-
-static const char Options[] = ".aBbcDde:fFhIiK:kLl:mNnpQ:qRrsSuvVX";
-
-int Flags = 0;
-enum which Which = WHICH_LIST;
-Boolean File2Pkg = FALSE;
-Boolean Quiet = FALSE;
-char *InfoPrefix = "";
-char *BuildInfoVariable = "";
-char PlayPen[MaxPathSize];
-size_t PlayPenSize = sizeof(PlayPen);
-char *CheckPkg = NULL;
-size_t termwidth = 0;
-lpkg_head_t pkgs;
-
-static void
-usage(void)
-{
- fprintf(stderr, "%s\n%s\n%s\n%s\n",
- "usage: pkg_info [-BbcDdFfhIikLmNnpqRrSsVvX] [-e package] [-K pkg_dbdir]",
- " [-l prefix] pkg-name ...",
- " pkg_info [-a | -u] [flags]",
- " pkg_info [-Q variable] pkg-name ...");
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- lpkg_t *lpp;
- int ch;
- int rc;
-
- setprogname(argv[0]);
- while ((ch = getopt(argc, argv, Options)) != -1)
- switch (ch) {
- case '.': /* for backward compatibility */
- break;
-
- case 'a':
- Which = WHICH_ALL;
- break;
-
- case 'B':
- Flags |= SHOW_BUILD_INFO;
- break;
-
- case 'b':
- Flags |= SHOW_BUILD_VERSION;
- break;
-
- case 'c':
- Flags |= SHOW_COMMENT;
- break;
-
- case 'D':
- Flags |= SHOW_DISPLAY;
- break;
-
- case 'd':
- Flags |= SHOW_DESC;
- break;
-
- case 'e':
- CheckPkg = optarg;
- break;
-
- case 'f':
- Flags |= SHOW_PLIST;
- break;
-
- case 'F':
- File2Pkg = 1;
- break;
-
- case 'I':
- Flags |= SHOW_INDEX;
- break;
-
- case 'i':
- Flags |= SHOW_INSTALL;
- break;
-
- case 'K':
- _pkgdb_setPKGDB_DIR(optarg);
- break;
-
- case 'k':
- Flags |= SHOW_DEINSTALL;
- break;
-
- case 'L':
- Flags |= SHOW_FILES;
- break;
-
- case 'l':
- InfoPrefix = optarg;
- break;
-
- case 'm':
- Flags |= SHOW_MTREE;
- break;
-
- case 'N':
- Flags |= SHOW_BLD_DEPENDS;
- break;
-
- case 'n':
- Flags |= SHOW_DEPENDS;
- break;
-
- case 'p':
- Flags |= SHOW_PREFIX;
- break;
-
- case 'Q':
- Flags |= SHOW_BI_VAR;
- BuildInfoVariable = optarg;
- break;
-
- case 'q':
- Quiet = TRUE;
- break;
-
- case 'R':
- Flags |= SHOW_REQBY;
- break;
-
- case 'r':
- Flags |= SHOW_REQUIRE;
- break;
-
- case 's':
- Flags |= SHOW_PKG_SIZE;
- break;
-
- case 'S':
- Flags |= SHOW_ALL_SIZE;
- break;
-
- case 'u':
- Which = WHICH_USER;
- break;
-
- case 'v':
- Verbose = TRUE;
- /* Reasonable definition of 'everything' */
- Flags = SHOW_COMMENT | SHOW_DESC | SHOW_PLIST | SHOW_INSTALL |
- SHOW_DEINSTALL | SHOW_REQUIRE | SHOW_DISPLAY | SHOW_MTREE |
- SHOW_REQBY | SHOW_BLD_DEPENDS | SHOW_DEPENDS | SHOW_PKG_SIZE | SHOW_ALL_SIZE;
- break;
-
- case 'V':
- show_version();
- /* NOTREACHED */
-
- case 'X':
- Flags |= SHOW_SUMMARY;
- break;
-
- case 'h':
- case '?':
- default:
- usage();
- /* NOTREACHED */
- }
-
- argc -= optind;
- argv += optind;
-
- if (argc == 0 && !Flags && !CheckPkg) {
- /* No argument or relevant flags specified - assume -I */
- Flags = SHOW_INDEX;
- /* assume -a if neither -u nor -a is given */
- if (Which == WHICH_LIST)
- Which = WHICH_ALL;
- }
-
- if (argc != 0 && Which != WHICH_LIST) {
- warnx("can't use both -a/-u and package name");
- usage();
- }
-
- /* Don't do FTP stuff when operating on all pkgs */
- if (Which != WHICH_LIST && getenv("PKG_PATH") != 0) {
- warnx("disabling PKG_PATH when operating on all packages.");
- unsetenv("PKG_PATH");
- }
-
- path_create(getenv("PKG_PATH"));
-
- /* Set some reasonable defaults */
- if (!Flags)
- Flags = SHOW_COMMENT | SHOW_DESC | SHOW_REQBY
- | SHOW_DEPENDS | SHOW_DISPLAY;
-
- /* -Fe /filename -> change CheckPkg to real packagename */
- if (CheckPkg && File2Pkg) {
- char *s;
-
- if (!pkgdb_open(ReadOnly))
- err(EXIT_FAILURE, "cannot open pkgdb");
-
- s = pkgdb_retrieve(CheckPkg);
-
- if (s) {
- CheckPkg = strdup(s);
- } else {
- errx(EXIT_FAILURE, "No matching pkg for %s.", CheckPkg);
- }
-
- pkgdb_close();
- }
-
- TAILQ_INIT(&pkgs);
-
- /* Get all the remaining package names, if any */
- if (File2Pkg && Which == WHICH_LIST)
- if (!pkgdb_open(ReadOnly)) {
- err(EXIT_FAILURE, "cannot open pkgdb");
- }
- while (*argv) {
- /* pkgdb: if -F flag given, don't add pkgnames to the "pkgs"
- * queue but rather resolve the given filenames to pkgnames
- * using pkgdb_retrieve, then add them. */
- if (File2Pkg) {
- char *s;
-
- s = pkgdb_retrieve(*argv);
-
- if (s) {
- lpp = alloc_lpkg(s);
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
- } else
- errx(EXIT_FAILURE, "No matching pkg for %s.", *argv);
- } else {
- if (ispkgpattern(*argv)) {
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), *argv, add_to_list_fn, &pkgs) <= 0)
- errx(EXIT_FAILURE, "No matching pkg for %s.", *argv);
- } else {
- char *dbdir;
-
- dbdir = _pkgdb_getPKGDB_DIR();
- if (**argv == '/' && strncmp(*argv, dbdir, strlen(dbdir)) == 0) {
- *argv += strlen(dbdir) + 1;
- if ((*argv)[strlen(*argv) - 1] == '/') {
- (*argv)[strlen(*argv) - 1] = 0;
- }
- }
- lpp = alloc_lpkg(*argv);
- TAILQ_INSERT_TAIL(&pkgs, lpp, lp_link);
- }
- }
- argv++;
- }
-
- if (File2Pkg)
- pkgdb_close();
-
- /* If no packages, yelp */
- if (TAILQ_FIRST(&pkgs) == NULL && Which == WHICH_LIST && !CheckPkg)
- warnx("missing package name(s)"), usage();
-
- if (isatty(STDOUT_FILENO)) {
- const char *p;
- struct winsize win;
-
- if ((p = getenv("COLUMNS")) != NULL)
- termwidth = atoi(p);
- else if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) == 0 &&
- win.ws_col > 0)
- termwidth = win.ws_col;
- }
-
- rc = pkg_perform(&pkgs);
- exit(rc);
- /* NOTREACHED */
-}
diff --git a/pkgtools/pkg_install/files/info/perform.c b/pkgtools/pkg_install/files/info/perform.c
deleted file mode 100644
index e1823079c74..00000000000
--- a/pkgtools/pkg_install/files/info/perform.c
+++ /dev/null
@@ -1,458 +0,0 @@
-/* $NetBSD: perform.c,v 1.30 2007/03/11 22:05:03 joerg Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp";
-#else
-__RCSID("$NetBSD: perform.c,v 1.30 2007/03/11 22:05:03 joerg Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 23 Aug 1993
- *
- * This is the main body of the info module.
- *
- */
-
-#include "lib.h"
-#include "info.h"
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-
-static char *Home;
-
-static lfile_head_t files;
-
-static int
-pkg_do(char *pkg)
-{
- Boolean installed = FALSE, isTMP = FALSE;
- char log_dir[MaxPathSize];
- char fname[MaxPathSize];
- struct stat sb;
- char *cp = NULL;
- int code = 0;
- lfile_t *lfp;
- int result;
- char *binpkgfile = NULL;
-
- if (IS_URL(pkg)) {
- if ((cp = fileGetURL(pkg)) != NULL) {
- strlcpy(fname, cp, sizeof(fname));
- isTMP = TRUE;
- }
- } else if (fexists(pkg) && isfile(pkg)) {
- int len;
-
- if (*pkg != '/') {
- if (!getcwd(fname, MaxPathSize)) {
- cleanup(0);
- err(EXIT_FAILURE, "fatal error during execution: getcwd");
- }
- len = strlen(fname);
- (void) snprintf(&fname[len], sizeof(fname) - len, "/%s", pkg);
- } else {
- strlcpy(fname, pkg, sizeof(fname));
- }
- cp = fname;
- binpkgfile = fname;
- }
-
- if (cp) {
- if (IS_URL(pkg)) {
- /* file is already unpacked by fileGetURL() */
- strcpy(PlayPen, cp);
- } else {
- if (IS_URL(cp)) {
- /* only a package name was given, and it was expanded to a
- * full URL by fileFindByPath. Now extract...
- */
- char *cp2;
-
- binpkgfile = NULL;
-
- if ((cp2 = fileGetURL(cp)) != NULL) {
- strlcpy(fname, cp2, sizeof(fname));
- isTMP = TRUE;
-
- strcpy(PlayPen, cp2);
- }
- } else {
- /*
- * Apply a crude heuristic to see how much space the package will
- * take up once it's unpacked. I've noticed that most packages
- * compress an average of 75%, but we're only unpacking the + files
- * needed so be very optimistic.
- */
-
- /* Determine which +-files to unpack - not all may be present! */
- LFILE_ADD(&files, lfp, CONTENTS_FNAME);
- LFILE_ADD(&files, lfp, COMMENT_FNAME);
- LFILE_ADD(&files, lfp, DESC_FNAME);
- if (Flags & SHOW_MTREE)
- LFILE_ADD(&files, lfp, MTREE_FNAME);
- if (Flags & SHOW_BUILD_VERSION)
- LFILE_ADD(&files, lfp, BUILD_VERSION_FNAME);
- if (Flags & (SHOW_BUILD_INFO|SHOW_SUMMARY|SHOW_BI_VAR))
- LFILE_ADD(&files, lfp, BUILD_INFO_FNAME);
- if (Flags & (SHOW_PKG_SIZE|SHOW_SUMMARY))
- LFILE_ADD(&files, lfp, SIZE_PKG_FNAME);
- if (Flags & SHOW_ALL_SIZE)
- LFILE_ADD(&files, lfp, SIZE_ALL_FNAME);
-#if 0
- if (Flags & SHOW_REQBY)
- LFILE_ADD(&files, lfp, REQUIRED_BY_FNAME);
- if (Flags & SHOW_DISPLAY)
- LFILE_ADD(&files, lfp, DISPLAY_FNAME);
- if (Flags & SHOW_INSTALL)
- LFILE_ADD(&files, lfp, INSTALL_FNAME);
- if (Flags & SHOW_DEINSTALL)
- LFILE_ADD(&files, lfp, DEINSTALL_FNAME);
- if (Flags & SHOW_REQUIRE)
- LFILE_ADD(&files, lfp, REQUIRE_FNAME);
- /* PRESERVE_FNAME? */
-#endif
-
- if (stat(fname, &sb) == FAIL) {
- warnx("can't stat package file '%s'", fname);
- code = 1;
- goto bail;
- }
- Home = make_playpen(PlayPen, PlayPenSize, sb.st_size / 2);
- result = unpack(fname, &files);
- while ((lfp = TAILQ_FIRST(&files)) != NULL) {
- TAILQ_REMOVE(&files, lfp, lf_link);
- free(lfp);
- }
- if (result) {
- warnx("error during unpacking, no info for '%s' available", pkg);
- code = 1;
- goto bail;
- }
- }
- }
- } else {
- /*
- * It's not an uninstalled package, try and find it among the
- * installed
- */
- (void) snprintf(log_dir, sizeof(log_dir), "%s/%s",
- _pkgdb_getPKGDB_DIR(), pkg);
- if (!fexists(log_dir) || !(isdir(log_dir) || islinktodir(log_dir))) {
- {
- /* Check if the given package name matches
- * something with 'pkg-[0-9]*' */
- char try[MaxPathSize];
- snprintf(try, MaxPathSize, "%s-[0-9]*", pkg);
- if (findmatchingname(_pkgdb_getPKGDB_DIR(), try,
- add_to_list_fn, &pkgs) > 0) {
- return 0; /* we've just appended some names to the pkgs list,
- * they will be processed after this package. */
- }
- }
-
- /* No match */
- warnx("can't find package `%s'", pkg);
- return 1;
- }
- if (chdir(log_dir) == FAIL) {
- warnx("can't change directory to '%s'!", log_dir);
- return 1;
- }
- installed = TRUE;
- }
-
- /*
- * Index is special info type that has to override all others to make
- * any sense.
- */
- if (Flags & SHOW_INDEX) {
- char tmp[MaxPathSize];
-
- (void) snprintf(tmp, sizeof(tmp), "%-19s ", pkg);
- show_index(pkg, tmp, COMMENT_FNAME);
- } else if (Flags & SHOW_BI_VAR) {
- if (strcspn(BuildInfoVariable, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- == strlen(BuildInfoVariable))
- show_var(INSTALLED_INFO_FNAME, BuildInfoVariable);
- else
- show_var(BUILD_INFO_FNAME, BuildInfoVariable);
- } else {
- FILE *fp;
- package_t plist;
-
- /* Read the contents list */
- plist.head = plist.tail = NULL;
- fp = fopen(CONTENTS_FNAME, "r");
- if (!fp) {
- warn("unable to open %s file", CONTENTS_FNAME);
- code = 1;
- goto bail;
- }
- /* If we have a prefix, add it now */
- read_plist(&plist, fp);
- fclose(fp);
-
- /* Start showing the package contents */
- if (!Quiet && !(Flags & SHOW_SUMMARY)) {
- printf("%sInformation for %s:\n\n", InfoPrefix, pkg);
- if (fexists(PRESERVE_FNAME)) {
- printf("*** PACKAGE MAY NOT BE DELETED ***\n");
- }
- }
- if (Flags & SHOW_SUMMARY) {
- show_summary(&plist, binpkgfile);
- }
- if (Flags & SHOW_COMMENT) {
- show_file(pkg, "Comment:\n", COMMENT_FNAME, TRUE);
- }
- if (Flags & SHOW_DEPENDS) {
- show_depends("Requires:\n", &plist);
- }
- if (Flags & SHOW_BLD_DEPENDS) {
- show_bld_depends("Built using:\n", &plist);
- }
- if ((Flags & SHOW_REQBY) && !isemptyfile(REQUIRED_BY_FNAME)) {
- show_file(pkg, "Required by:\n",
- REQUIRED_BY_FNAME, TRUE);
- }
- if (Flags & SHOW_DESC) {
- show_file(pkg, "Description:\n", DESC_FNAME, TRUE);
- }
- if ((Flags & SHOW_DISPLAY) && fexists(DISPLAY_FNAME)) {
- show_file(pkg, "Install notice:\n",
- DISPLAY_FNAME, TRUE);
- }
- if (Flags & SHOW_PLIST) {
- show_plist("Packing list:\n", &plist, PLIST_SHOW_ALL);
- }
- if ((Flags & SHOW_INSTALL) && fexists(INSTALL_FNAME)) {
- show_file(pkg, "Install script:\n",
- INSTALL_FNAME, TRUE);
- }
- if ((Flags & SHOW_DEINSTALL) && fexists(DEINSTALL_FNAME)) {
- show_file(pkg, "De-Install script:\n",
- DEINSTALL_FNAME, TRUE);
- }
- if (fexists(REQUIRE_FNAME)) {
- warnx("package %s uses obsoleted require scripts", pkg);
- if (Flags & SHOW_REQUIRE) {
- show_file(pkg, "Require script:\n",
- REQUIRE_FNAME, TRUE);
- }
- }
- if ((Flags & SHOW_MTREE) && fexists(MTREE_FNAME)) {
- show_file(pkg, "mtree file:\n", MTREE_FNAME, TRUE);
- }
- if (Flags & SHOW_PREFIX) {
- show_plist("Prefix(s):\n", &plist, PLIST_CWD);
- }
- if (Flags & SHOW_FILES) {
- show_files("Files:\n", &plist);
- }
- if ((Flags & SHOW_BUILD_VERSION) && fexists(BUILD_VERSION_FNAME)) {
- show_file(pkg, "Build version:\n",
- BUILD_VERSION_FNAME, TRUE);
- }
- if (Flags & SHOW_BUILD_INFO) {
- if (fexists(BUILD_INFO_FNAME)) {
- show_file(pkg, "Build information:\n",
- BUILD_INFO_FNAME,
- !fexists(INSTALLED_INFO_FNAME));
- }
- if (fexists(INSTALLED_INFO_FNAME)) {
- show_file(pkg, "Installed information:\n",
- INSTALLED_INFO_FNAME, TRUE);
- }
- }
- if ((Flags & SHOW_PKG_SIZE) && fexists(SIZE_PKG_FNAME)) {
- show_file(pkg, "Size of this package in bytes: ",
- SIZE_PKG_FNAME, TRUE);
- }
- if ((Flags & SHOW_ALL_SIZE) && fexists(SIZE_ALL_FNAME)) {
- show_file(pkg, "Size in bytes including required pkgs: ",
- SIZE_ALL_FNAME, TRUE);
- }
- if (!Quiet && !(Flags & SHOW_SUMMARY)) {
- if (fexists(PRESERVE_FNAME)) {
- printf("*** PACKAGE MAY NOT BE DELETED ***\n\n");
- }
- puts(InfoPrefix);
- }
- free_plist(&plist);
- }
-bail:
- leave_playpen(Home);
- if (isTMP)
- unlink(fname);
- return code;
-}
-
-/*
- * Function to be called for pkgs found
- */
-static int
-foundpkg(const char *found, void *vp)
-{
- char *data = vp;
- char buf[MaxPathSize+1];
-
- /* we only want to display this if it really is a directory */
- snprintf(buf, sizeof(buf), "%s/%s", data, found);
- if (!(isdir(buf) || islinktodir(buf))) {
- /* return value seems to be ignored for now */
- return -1;
- }
-
- if (!Quiet) {
- printf("%s\n", found);
- }
-
- return 0;
-}
-
-/*
- * Check if a package "pkgspec" (which can be a pattern) is installed.
- * dbdir contains the return value of _pkgdb_getPKGDB_DIR(), for reading only.
- * Return 0 if found, 1 otherwise (indicating an error).
- */
-static int
-CheckForPkg(char *pkgspec, char *dbdir)
-{
- char buf[MaxPathSize];
- int error;
-
- if (strpbrk(pkgspec, "<>[]?*{")) {
- /* expensive (pattern) match */
- error = findmatchingname(dbdir, pkgspec, foundpkg, dbdir);
- if (error == -1)
- return 1;
- else
- return !error;
- }
- /* simple match */
- (void) snprintf(buf, sizeof(buf), "%s/%s", dbdir, pkgspec);
- error = !(isdir(buf) || islinktodir(buf));
- if (!error && !Quiet) {
- printf("%s\n", pkgspec);
- }
- if (error) {
- /* found nothing - try 'pkg-[0-9]*' */
-
- char try[MaxPathSize];
- snprintf(try, MaxPathSize, "%s-[0-9]*", pkgspec);
- if (findmatchingname(dbdir, try, foundpkg, dbdir) > 0) {
- error = 0;
- }
- }
- return error;
-}
-
-void
-cleanup(int sig)
-{
- leave_playpen(Home);
- exit(1);
-}
-
-int
-pkg_perform(lpkg_head_t *pkghead)
-{
- struct dirent *dp;
- char *dbdir;
- DIR *dirp;
- int err_cnt = 0;
-
- signal(SIGINT, cleanup);
-
- TAILQ_INIT(&files);
-
- dbdir = _pkgdb_getPKGDB_DIR();
-
- /* Overriding action? */
- if (CheckPkg) {
- err_cnt += CheckForPkg(CheckPkg, dbdir);
- } else if (Which != WHICH_LIST) {
- if (!(isdir(dbdir) || islinktodir(dbdir)))
- return 1;
-
- if (File2Pkg) {
- /* Show all files with the package they belong to */
- pkgdb_dump();
- } else {
- /* Show all packages with description */
- if ((dirp = opendir(dbdir)) != (DIR *) NULL) {
- while ((dp = readdir(dirp)) != (struct dirent *) NULL) {
- char tmp2[MaxPathSize];
-
- if (strcmp(dp->d_name, ".") == 0 ||
- strcmp(dp->d_name, "..") == 0)
- continue;
-
- (void) snprintf(tmp2, sizeof(tmp2), "%s/%s",
- dbdir, dp->d_name);
- if (isfile(tmp2))
- continue;
-
- if (Which == WHICH_ALL
- || !is_automatic_installed(tmp2))
- err_cnt += pkg_do(dp->d_name);
- }
- (void) closedir(dirp);
- }
- }
- } else {
- /* Show info on individual pkg(s) */
- lpkg_t *lpp;
-
- while ((lpp = TAILQ_FIRST(pkghead))) {
- TAILQ_REMOVE(pkghead, lpp, lp_link);
- err_cnt += pkg_do(lpp->lp_name);
- free_lpkg(lpp);
- }
- }
- ftp_stop();
- return err_cnt;
-}
diff --git a/pkgtools/pkg_install/files/info/pkg_info.1 b/pkgtools/pkg_install/files/info/pkg_info.1
deleted file mode 100644
index 87704db0336..00000000000
--- a/pkgtools/pkg_install/files/info/pkg_info.1
+++ /dev/null
@@ -1,350 +0,0 @@
-.\" $NetBSD: pkg_info.1,v 1.18 2006/04/24 13:52:05 dillo Exp $
-.\"
-.\" FreeBSD install - a package for the installation and maintenance
-.\" of non-core utilities.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" Jordan K. Hubbard
-.\"
-.\"
-.\" @(#)pkg_info.1
-.\"
-.Dd April 15, 2006
-.Dt PKG_INFO 1
-.Os
-.Sh NAME
-.Nm pkg_info
-.Nd a utility for displaying information on software packages
-.Sh SYNOPSIS
-.Nm
-.Op Fl BbcDdFfhIikLmNnpqRrSsVvX
-.Op Fl e Ar package
-.Op Fl K Ar pkg_dbdir
-.Op Fl l Ar prefix
-.Ar pkg-name ...
-.Nm
-.Op Fl a | Fl u
-.Op flags
-.Nm
-.Op Fl Q Ar variable
-.Ar pkg-name ...
-.Sh DESCRIPTION
-The
-.Nm
-command is used to dump out information for packages, which may be either
-packed up in files or already installed on the system with the
-.Xr pkg_create 1
-command.
-.Pp
-The
-.Ar pkg-name
-may be the name of an installed package (with our without version), a
-pattern matching several installed packages (see the
-.Sx PACKAGE WILDCARDS
-section for a description of possible patterns),
-the pathname to a
-binary package, a filename belonging to an installed
-package (if
-.Fl F
-is also given), or a URL to an ftp-available package.
-.Pp
-The following command-line options are supported:
-.Bl -tag -width indent
-.It Fl a
-Show information for all currently installed packages.
-See also
-.Fl u .
-.It Fl B
-Show some of the important definitions used when building
-the binary package (the
-.Dq Build information )
-for each package.
-Additionally, any installation information variables
-(lowercase) can be queried, too.
-In particular,
-.Ar automatic
-tells if a package was installed automatically
-as a dependency of another package.
-.It Fl b
-Show the
-.Nx
-RCS Id strings from the files used in the construction
-of the binary package (the "Build version") for each package.
-These files are the package Makefile, any patch files, any checksum
-files, and the packing list file.
-.It Fl c
-Show the one-line comment field for each package.
-.It Fl D
-Show the install-message file (if any) for each package.
-.It Fl d
-Show the long-description field for each package.
-.It Fl e Ar pkg-name
-This option
-allows you to test for the existence of a given package.
-If the package identified by
-.Ar pkg-name
-is currently installed, return code is 0, otherwise 1.
-The names of any package(s) found installed are printed to
-stdout unless turned off using the
-.Fl q
-option.
-.Ar pkg-name
-can contain wildcards (see the
-.Sx PACKAGE WILDCARDS
-section below).
-.It Fl F
-Interpret any pkg-name given as filename, and translate it to a
-package name using the Package Database.
-This can be used to query information on a per-file basis, e.g. in
-conjunction with the
-.Fl e
-flag to find out which package a file belongs to.
-.It Fl f
-Show the packing list instructions for each package.
-.It Fl I
-Show the index entry for each package.
-.It Fl i
-Show the install script (if any) for each package.
-.It Fl K Ar pkg_dbdir
-Set
-.Ar pkg_dbdir
-as the package database directory.
-If this option isn't specified, then the package database directory is
-taken from the value of the environment variable
-.Ev PKG_DBDIR
-if it's set, otherwise it defaults to
-.Pa /var/db/pkg .
-.It Fl k
-Show the de-install script (if any) for each package.
-.It Fl L
-Show the files within each package.
-This is different from just viewing the packing list, since full pathnames
-for everything are generated.
-Files that were created dynamically during installation of the package
-are not listed.
-.It Fl l Ar str
-Prefix each information category header (see
-.Fl q )
-shown with
-.Ar str .
-This is primarily of use to front-end programs that want to request a
-lot of different information fields at once for a package, but don't
-necessary want the output intermingled in such a way that they can't
-organize it.
-This lets you add a special token to the start of each field.
-.It Fl m
-Show the mtree file (if any) for each package.
-.It Fl N
-Show which packages each package was built with (exact dependencies), if any.
-.It Fl n
-Show which packages each package needs (depends upon), if any.
-.It Fl p
-Show the installation prefix for each package.
-.It Fl Q
-Show the definition of
-.Ar variable
-from the build information for each package.
-An empty string is returned if no such variable definition is found for
-the package(s).
-.It Fl q
-Be
-.Dq quiet
-in emitting report headers and such, just dump the
-raw info (basically, assume a non-human reading).
-.It Fl R
-For each package, show the packages that require it.
-.It Fl r
-Show the requirements script (if any) for each package.
-.It Fl S
-Show the size of this package and all the packages it requires,
-in bytes.
-.It Fl s
-Show the size of this package in bytes.
-The size is calculated by adding up the size of each file of the package.
-.It Fl u
-Show information for all user-installed packages.
-Automatically installed packages (as dependencies
-of other packages) are not displayed.
-See also
-.Fl a .
-.It Fl V
-Print version number and exit.
-.It Fl v
-Turn on verbose output.
-.It Fl X
-Print summary information for each package.
-The summary format is
-described in
-.Xr pkg_summary 5 .
-Its primary use is to contain all information about the contents of a
-(remote) binary package repository needed by package managing software.
-.El
-.Sh TECHNICAL DETAILS
-Package info is either extracted from package files named on the
-command line, or from already installed package information
-in
-.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] .
-.Pp
-A filename can be given instead of a (installed) package name to query
-information on the package this file belongs to.
-This filename is then resolved to a package name using the Package Database.
-For this translation to take place, the
-.Fl F
-flag must be given.
-The filename must be absolute, compare the output of pkg_info
-.Fl aF .
-.Sh PACKAGE WILDCARDS
-In the places where a package name/version is expected, e.g. for the
-.Fl e
-switch, several forms can be used.
-Either use a package name with or without version, or specify a
-package wildcard that gets matched against all installed packages.
-.Pp
-Package wildcards use
-.Xr fnmatch 3 .
-In addition,
-.Xr csh 1
-style {,} alternates have been implemented.
-Package version numbers can also be matched in a relational manner
-using the
-.Pa \*[Ge] , \*[Le] , \*[Gt] ,
-and
-.Pa \*[Lt]
-operators.
-For example,
-.Pa pkg_info -e 'name\*[Ge]1.3'
-will match versions 1.3 and later of the
-.Pa name
-package.
-Additionally, ranges can be defined by giving a lower bound with
-\*[Gt] or \*[Ge] and an upper bound with \*[Lt] or \*[Le].
-The lower bound has to come first.
-For example,
-.Pa pkg_info -e 'name\*[Ge]1.3\*[Lt]2.0'
-will match versions 1.3 (inclusive) to 2.0 (exclusive)
-of package
-.Pa name .
-.Pp
-The collating sequence of the various package version numbers is
-unusual, but strives to be consistent.
-The magic string
-.Dq alpha
-equates to
-.Pa alpha version
-and sorts before a beta version.
-The magic string
-.Dq beta
-equates to
-.Pa beta version
-and sorts before a release candidate.
-The magic string
-.Dq rc
-equates to
-.Pa release candidate
-and sorts before a release.
-The magic string
-.Dq pre ,
-short for
-.Dq pre-release ,
-is a synonym for
-.Dq rc .
-For example,
-.Pa name-1.3rc3
-will sort before
-.Pa name-1.3
-and after
-.Pa name-1.2.9 .
-Similarly
-.Pa name-1.3alpha2
-will sort before
-.Pa name-1.3beta1
-and they both sort before
-.Pa name-1.3rc1 .
-In addition, alphabetic characters sort in the same place as
-their numeric counterparts, so that
-.Pa name-1.2e
-has the same sorting value as
-.Pa name-1.2.5
-The magic string
-.Dq pl
-equates to a
-.Pa patch level
-and has the same value as a dot in the dewey-decimal ordering schemes.
-.Sh ENVIRONMENT
-.Bl -tag -width PKG_DBDIR
-.It Ev PKG_DBDIR
-If the
-.Fl K
-flag isn't given, then
-.Ev PKG_DBDIR
-is the location of the package database directory.
-The default package database directory is
-.Pa /var/db/pkg .
-.It Ev PKG_PATH
-This can be used to specify a semicolon-separated list of paths and URLs to search for
-package files.
-If
-.Ev PKG_PATH
-is used, the suffix
-.Pa .tgz
-is automatically appended to the
-.Ar pkg-name ,
-whereas searching in the current directory uses
-.Ar pkg-name
-literally.
-.It Ev PKG_TMPDIR , Ev TMPDIR
-These are tried in turn (if set) as candidate directories in which
-to create a
-.Dq staging area
-for any files extracted by
-.Nm
-from package files.
-If neither
-.Ev PKG_TMPDIR
-nor
-.Ev TMPDIR
-yields a suitable scratch directory,
-.Pa /var/tmp ,
-.Pa /tmp ,
-and
-.Pa /usr/tmp
-are tried in turn.
-Note that
-.Pa /usr/tmp
-may be created, if it doesn't already exist.
-.Pp
-Since
-.Nm
-requires very little information to be extracted from any package
-files examined, it is unlikely that these environment variables would
-ever need to be used to work around limited available space in the
-default locations.
-.El
-.Sh SEE ALSO
-.Xr pkg_add 1 ,
-.Xr pkg_admin 1 ,
-.Xr pkg_create 1 ,
-.Xr pkg_delete 1 ,
-.Xr mktemp 3 ,
-.Xr packages 7 ,
-.Xr mtree 8
-.Sh AUTHORS
-.Bl -tag -width indent -compact
-.It "Jordan Hubbard"
-most of the work
-.It "John Kohl"
-refined it for
-.Nx
-.It "Hubert Feyrer"
-.Nx
-wildcard dependency processing, pkgdb, depends displaying,
-pkg size display etc.
-.El
diff --git a/pkgtools/pkg_install/files/info/pkg_info.cat1 b/pkgtools/pkg_install/files/info/pkg_info.cat1
deleted file mode 100644
index e8ab1a27f43..00000000000
--- a/pkgtools/pkg_install/files/info/pkg_info.cat1
+++ /dev/null
@@ -1,200 +0,0 @@
-PKG_INFO(1) NetBSD General Commands Manual PKG_INFO(1)
-
-NNAAMMEE
- ppkkgg__iinnffoo -- a utility for displaying information on software packages
-
-SSYYNNOOPPSSIISS
- ppkkgg__iinnffoo [--BBbbccDDddFFffhhIIiikkLLmmNNnnppqqRRrrSSssVVvvXX] [--ee _p_a_c_k_a_g_e] [--KK _p_k_g___d_b_d_i_r]
- [--ll _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._.
- ppkkgg__iinnffoo [--aa | --uu] [flags]
- ppkkgg__iinnffoo [--QQ _v_a_r_i_a_b_l_e] _p_k_g_-_n_a_m_e _._._.
-
-DDEESSCCRRIIPPTTIIOONN
- The ppkkgg__iinnffoo command is used to dump out information for packages, which
- may be either packed up in files or already installed on the system with
- the pkg_create(1) command.
-
- The _p_k_g_-_n_a_m_e may be the name of an installed package (with our without
- version), a pattern matching several installed packages (see the _P_A_C_K_A_G_E
- _W_I_L_D_C_A_R_D_S section for a description of possible patterns), the pathname
- to a binary package, a filename belonging to an installed package (if --FF
- is also given), or a URL to an ftp-available package.
-
- The following command-line options are supported:
-
- --aa Show information for all currently installed packages. See also
- --uu.
-
- --BB Show some of the important definitions used when building the
- binary package (the ``Build information'') for each package.
- Additionally, any installation information variables (lowercase)
- can be queried, too. In particular, _a_u_t_o_m_a_t_i_c tells if a package
- was installed automatically as a dependency of another package.
-
- --bb Show the NetBSD RCS Id strings from the files used in the con-
- struction of the binary package (the "Build version") for each
- package. These files are the package Makefile, any patch files,
- any checksum files, and the packing list file.
-
- --cc Show the one-line comment field for each package.
-
- --DD Show the install-message file (if any) for each package.
-
- --dd Show the long-description field for each package.
-
- --ee _p_k_g_-_n_a_m_e
- This option allows you to test for the existence of a given pack-
- age. If the package identified by _p_k_g_-_n_a_m_e is currently
- installed, return code is 0, otherwise 1. The names of any pack-
- age(s) found installed are printed to stdout unless turned off
- using the --qq option. _p_k_g_-_n_a_m_e can contain wildcards (see the
- _P_A_C_K_A_G_E _W_I_L_D_C_A_R_D_S section below).
-
- --FF Interpret any pkg-name given as filename, and translate it to a
- package name using the Package Database. This can be used to
- query information on a per-file basis, e.g. in conjunction with
- the --ee flag to find out which package a file belongs to.
-
- --ff Show the packing list instructions for each package.
-
- --II Show the index entry for each package.
-
- --ii Show the install script (if any) for each package.
-
- --KK _p_k_g___d_b_d_i_r
- Set _p_k_g___d_b_d_i_r as the package database directory. If this option
- isn't specified, then the package database directory is taken
- from the value of the environment variable PKG_DBDIR if it's set,
- otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
-
- --kk Show the de-install script (if any) for each package.
-
- --LL Show the files within each package. This is different from just
- viewing the packing list, since full pathnames for everything are
- generated. Files that were created dynamically during installa-
- tion of the package are not listed.
-
- --ll _s_t_r Prefix each information category header (see --qq) shown with _s_t_r.
- This is primarily of use to front-end programs that want to
- request a lot of different information fields at once for a pack-
- age, but don't necessary want the output intermingled in such a
- way that they can't organize it. This lets you add a special
- token to the start of each field.
-
- --mm Show the mtree file (if any) for each package.
-
- --NN Show which packages each package was built with (exact dependen-
- cies), if any.
-
- --nn Show which packages each package needs (depends upon), if any.
-
- --pp Show the installation prefix for each package.
-
- --QQ Show the definition of _v_a_r_i_a_b_l_e from the build information for
- each package. An empty string is returned if no such variable
- definition is found for the package(s).
-
- --qq Be ``quiet'' in emitting report headers and such, just dump the
- raw info (basically, assume a non-human reading).
-
- --RR For each package, show the packages that require it.
-
- --rr Show the requirements script (if any) for each package.
-
- --SS Show the size of this package and all the packages it requires,
- in bytes.
-
- --ss Show the size of this package in bytes. The size is calculated
- by adding up the size of each file of the package.
-
- --uu Show information for all user-installed packages. Automatically
- installed packages (as dependencies of other packages) are not
- displayed. See also --aa.
-
- --VV Print version number and exit.
-
- --vv Turn on verbose output.
-
- --XX Print summary information for each package. The summary format
- is described in pkg_summary(5). Its primary use is to contain
- all information about the contents of a (remote) binary package
- repository needed by package managing software.
-
-TTEECCHHNNIICCAALL DDEETTAAIILLSS
- Package info is either extracted from package files named on the command
- line, or from already installed package information in
- _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>.
-
- A filename can be given instead of a (installed) package name to query
- information on the package this file belongs to. This filename is then
- resolved to a package name using the Package Database. For this transla-
- tion to take place, the --FF flag must be given. The filename must be
- absolute, compare the output of pkg_info --aaFF.
-
-PPAACCKKAAGGEE WWIILLDDCCAARRDDSS
- In the places where a package name/version is expected, e.g. for the --ee
- switch, several forms can be used. Either use a package name with or
- without version, or specify a package wildcard that gets matched against
- all installed packages.
-
- Package wildcards use fnmatch(3). In addition, csh(1) style {,} alter-
- nates have been implemented. Package version numbers can also be matched
- in a relational manner using the _>_=, _<_=, _>, and _< operators. For exam-
- ple, _p_k_g___i_n_f_o _-_e _'_n_a_m_e_>_=_1_._3_' will match versions 1.3 and later of the
- _n_a_m_e package. Additionally, ranges can be defined by giving a lower
- bound with > or >= and an upper bound with < or <=. The lower bound has
- to come first. For example, _p_k_g___i_n_f_o _-_e _'_n_a_m_e_>_=_1_._3_<_2_._0_' will match ver-
- sions 1.3 (inclusive) to 2.0 (exclusive) of package _n_a_m_e.
-
- The collating sequence of the various package version numbers is unusual,
- but strives to be consistent. The magic string ``alpha'' equates to
- _a_l_p_h_a _v_e_r_s_i_o_n and sorts before a beta version. The magic string ``beta''
- equates to _b_e_t_a _v_e_r_s_i_o_n and sorts before a release candidate. The magic
- string ``rc'' equates to _r_e_l_e_a_s_e _c_a_n_d_i_d_a_t_e and sorts before a release.
- The magic string ``pre'', short for ``pre-release'', is a synonym for
- ``rc''. For example, _n_a_m_e_-_1_._3_r_c_3 will sort before _n_a_m_e_-_1_._3 and after
- _n_a_m_e_-_1_._2_._9. Similarly _n_a_m_e_-_1_._3_a_l_p_h_a_2 will sort before _n_a_m_e_-_1_._3_b_e_t_a_1 and
- they both sort before _n_a_m_e_-_1_._3_r_c_1. In addition, alphabetic characters
- sort in the same place as their numeric counterparts, so that _n_a_m_e_-_1_._2_e
- has the same sorting value as _n_a_m_e_-_1_._2_._5 The magic string ``pl'' equates
- to a _p_a_t_c_h _l_e_v_e_l and has the same value as a dot in the dewey-decimal
- ordering schemes.
-
-EENNVVIIRROONNMMEENNTT
- PKG_DBDIR If the --KK flag isn't given, then PKG_DBDIR is the location of
- the package database directory. The default package database
- directory is _/_v_a_r_/_d_b_/_p_k_g.
-
- PKG_PATH This can be used to specify a semicolon-separated list of
- paths and URLs to search for package files. If PKG_PATH is
- used, the suffix _._t_g_z is automatically appended to the
- _p_k_g_-_n_a_m_e, whereas searching in the current directory uses
- _p_k_g_-_n_a_m_e literally.
-
- PKG_TMPDIR, TMPDIR
- These are tried in turn (if set) as candidate directories in
- which to create a ``staging area'' for any files extracted by
- ppkkgg__iinnffoo from package files. If neither PKG_TMPDIR nor TMPDIR
- yields a suitable scratch directory, _/_v_a_r_/_t_m_p, _/_t_m_p, and
- _/_u_s_r_/_t_m_p are tried in turn. Note that _/_u_s_r_/_t_m_p may be cre-
- ated, if it doesn't already exist.
-
- Since ppkkgg__iinnffoo requires very little information to be
- extracted from any package files examined, it is unlikely that
- these environment variables would ever need to be used to work
- around limited available space in the default locations.
-
-SSEEEE AALLSSOO
- pkg_add(1), pkg_admin(1), pkg_create(1), pkg_delete(1), mktemp(3),
- packages(7), mtree(8)
-
-AAUUTTHHOORRSS
- Jordan Hubbard
- most of the work
- John Kohl
- refined it for NetBSD
- Hubert Feyrer
- NetBSD wildcard dependency processing, pkgdb, depends displaying,
- pkg size display etc.
-
-NetBSD 3.0 April 15, 2006 NetBSD 3.0
diff --git a/pkgtools/pkg_install/files/info/show.c b/pkgtools/pkg_install/files/info/show.c
deleted file mode 100644
index 0f402c4012b..00000000000
--- a/pkgtools/pkg_install/files/info/show.c
+++ /dev/null
@@ -1,430 +0,0 @@
-/* $NetBSD: show.c,v 1.11 2006/05/10 04:25:30 jlam Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
-#else
-__RCSID("$NetBSD: show.c,v 1.11 2006/05/10 04:25:30 jlam Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 23 Aug 1993
- *
- * Various display routines for the info module.
- *
- */
-/*
- * Copyright (c) 1999 Hubert Feyrer. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Hubert Feyrer for
- * the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-
-#include "defs.h"
-#include "lib.h"
-#include "info.h"
-
-/* Structure to define entries for the "show table" */
-typedef struct show_t {
- pl_ent_t sh_type; /* type of entry */
- char *sh_quiet; /* message when quiet */
- char *sh_verbose; /* message when verbose */
-} show_t;
-
-/*
- * The entries in this table must be ordered the same as
- * pl_ent_t constants
- */
-static const show_t showv[] = {
- {PLIST_FILE, "%s", "\tFile: %s"},
- {PLIST_CWD, "@cwd %s", "\tCWD to: %s"},
- {PLIST_CMD, "@exec %s", "\tEXEC '%s'"},
- {PLIST_CHMOD, "@chmod %s", "\tCHMOD to %s"},
- {PLIST_CHOWN, "@chown %s", "\tCHOWN to %s"},
- {PLIST_CHGRP, "@chgrp %s", "\tCHGRP to %s"},
- {PLIST_COMMENT, "@comment %s", "\tComment: %s"},
- {PLIST_IGNORE, "@ignore", "Ignore next file:"},
- {PLIST_NAME, "@name %s", "\tPackage name: %s"},
- {PLIST_UNEXEC, "@unexec %s", "\tUNEXEC '%s'"},
- {PLIST_SRC, "@src: %s", "\tSRC to: %s"},
- {PLIST_DISPLAY, "@display %s", "\tInstall message file: %s"},
- {PLIST_PKGDEP, "@pkgdep %s", "\tPackage depends on: %s"},
- {PLIST_MTREE, "@mtree %s", "\tPackage mtree file: %s"},
- {PLIST_DIR_RM, "@dirrm %s", "\tDeinstall directory remove: %s"},
- {PLIST_IGNORE_INST, "@ignore_inst ??? doesn't belong here",
- "\tIgnore next file installation directive (doesn't belong)"},
- {PLIST_OPTION, "@option %s", "\tPackage has option: %s"},
- {PLIST_PKGCFL, "@pkgcfl %s", "\tPackage conflicts with: %s"},
- {PLIST_BLDDEP, "@blddep %s", "\tPackage depends exactly on: %s"},
- {-1, NULL, NULL}
-};
-
-static int print_file_as_var(const char *, const char *);
-
-void
-show_file(char *pkg, char *title, char *fname, Boolean separator)
-{
- FILE *fp;
- char line[1024];
- int n;
-
- if (!Quiet) {
- printf("%s%s", InfoPrefix, title);
- }
- if ((fp = fopen(fname, "r")) == (FILE *) NULL) {
- printf("ERROR: show_file: package \"%s\": can't open '%s' for reading\n", pkg, fname);
- } else {
- int append_nl = 0;
- while ((n = fread(line, 1, sizeof(line), fp)) != 0) {
- fwrite(line, 1, n, stdout);
- append_nl = (line[n - 1] != '\n');
- }
- (void) fclose(fp);
- if (append_nl)
- printf("\n");
- }
- if (!Quiet || separator) {
- printf("\n"); /* just in case */
- }
-}
-
-void
-show_var(const char *fname, const char *variable)
-{
- char *value;
-
- if ((value=var_get(fname, variable)) != NULL) {
- (void) printf("%s\n", value);
- free(value);
- }
-}
-
-void
-show_index(char *pkg, char *title, char *fname)
-{
- FILE *fp;
- char *line;
- size_t linelen;
- size_t maxline = termwidth;
-
- if (!Quiet) {
- printf("%s%s", InfoPrefix, title);
- maxline -= MAX(MAXNAMESIZE, strlen(title));
- }
- if ((fp = fopen(fname, "r")) == (FILE *) NULL) {
- warnx("show_index: package \"%s\": can't open '%s' for reading", pkg, fname);
- return;
- }
- if ((line = fgetln(fp, &linelen))) {
- line[linelen - 1] = '\0'; /* tromp newline & terminate string */
- if (termwidth && (linelen > maxline)) {
- /* XXX -1 if term does NOT have xn (or xenl) quirk */
- line[maxline] = '\0';
- }
- (void) printf("%s\n", line);
- }
- (void) fclose(fp);
-}
-
-/*
- * Show a packing list item type. If type is PLIST_SHOW_ALL, show all
- */
-void
-show_plist(char *title, package_t *plist, pl_ent_t type)
-{
- plist_t *p;
- Boolean ign;
-
- if (!Quiet) {
- printf("%s%s", InfoPrefix, title);
- }
- for (ign = FALSE, p = plist->head; p; p = p->next) {
- if (p->type == type || type == PLIST_SHOW_ALL) {
- switch (p->type) {
- case PLIST_FILE:
- printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose, p->name);
- if (ign) {
- if (!Quiet) {
- printf(" (ignored)");
- }
- ign = FALSE;
- }
- break;
- case PLIST_CHMOD:
- case PLIST_CHOWN:
- case PLIST_CHGRP:
- printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose,
- p->name ? p->name : "(clear default)");
- break;
- case PLIST_IGNORE:
- printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose);
- ign = TRUE;
- break;
- case PLIST_IGNORE_INST:
- printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose, p->name);
- ign = TRUE;
- break;
- case PLIST_CWD:
- case PLIST_CMD:
- case PLIST_SRC:
- case PLIST_UNEXEC:
- case PLIST_COMMENT:
- case PLIST_NAME:
- case PLIST_DISPLAY:
- case PLIST_PKGDEP:
- case PLIST_MTREE:
- case PLIST_DIR_RM:
- case PLIST_OPTION:
- case PLIST_PKGCFL:
- case PLIST_BLDDEP:
- printf(Quiet ? showv[p->type].sh_quiet : showv[p->type].sh_verbose, p->name);
- break;
- default:
- warnx("unknown command type %d (%s)", p->type, p->name);
- }
- (void) fputc('\n', stdout);
- }
- }
-}
-
-/*
- * Show all files in the packing list (except ignored ones)
- */
-void
-show_files(char *title, package_t *plist)
-{
- plist_t *p;
- Boolean ign;
- char *dir = ".";
-
- if (!Quiet) {
- printf("%s%s", InfoPrefix, title);
- }
- for (ign = FALSE, p = plist->head; p; p = p->next) {
- switch (p->type) {
- case PLIST_FILE:
- if (!ign) {
- printf("%s%s%s\n", dir,
- (strcmp(dir, "/") == 0) ? "" : "/", p->name);
- }
- ign = FALSE;
- break;
- case PLIST_CWD:
- dir = p->name;
- break;
- case PLIST_IGNORE:
- ign = TRUE;
- break;
- default:
- break;
- }
- }
-}
-
-/*
- * Show dependencies (packages this pkg requires)
- */
-void
-show_depends(char *title, package_t *plist)
-{
- plist_t *p;
- int nodepends;
-
- nodepends = 1;
- for (p = plist->head; p && nodepends; p = p->next) {
- switch (p->type) {
- case PLIST_PKGDEP:
- nodepends = 0;
- break;
- default:
- break;
- }
- }
- if (nodepends)
- return;
-
- if (!Quiet) {
- printf("%s%s", InfoPrefix, title);
- }
- for (p = plist->head; p; p = p->next) {
- switch (p->type) {
- case PLIST_PKGDEP:
- printf("%s\n", p->name);
- break;
- default:
- break;
- }
- }
-
- printf("\n");
-}
-
-/*
- * Show exact dependencies (packages this pkg was built with)
- */
-void
-show_bld_depends(char *title, package_t *plist)
-{
- plist_t *p;
- int nodepends;
-
- nodepends = 1;
- for (p = plist->head; p && nodepends; p = p->next) {
- switch (p->type) {
- case PLIST_BLDDEP:
- nodepends = 0;
- break;
- default:
- break;
- }
- }
- if (nodepends)
- return;
-
- if (!Quiet) {
- printf("%s%s", InfoPrefix, title);
- }
- for (p = plist->head; p; p = p->next) {
- switch (p->type) {
- case PLIST_BLDDEP:
- printf("%s\n", p->name);
- break;
- default:
- break;
- }
- }
-
- printf("\n");
-}
-
-
-/*
- * Show entry for pkg_summary.txt file.
- */
-void
-show_summary(package_t *plist, const char *binpkgfile)
-{
- static const char *bi_vars[] = {
- "PKGPATH",
- "CATEGORIES",
- "PROVIDES",
- "REQUIRES",
- "PKG_OPTIONS",
- "OPSYS",
- "OS_VERSION",
- "MACHINE_ARCH",
- "LICENSE",
- "HOMEPAGE",
- "PKGTOOLS_VERSION",
- "BUILD_DATE",
- NULL
- };
-
- plist_t *p;
- struct stat st;
-
- for (p = plist->head; p; p = p->next) {
- switch (p->type) {
- case PLIST_NAME:
- printf("PKGNAME=%s\n", p->name);
- break;
- case PLIST_PKGDEP:
- printf("DEPENDS=%s\n", p->name);
- break;
- case PLIST_PKGCFL:
- printf("CONFLICTS=%s\n", p->name);
- break;
-
- default:
- break;
- }
- }
-
- print_file_as_var("COMMENT", COMMENT_FNAME);
- print_file_as_var("SIZE_PKG", SIZE_PKG_FNAME);
-
- var_copy_list(BUILD_INFO_FNAME, bi_vars);
-
- if (binpkgfile != NULL && stat(binpkgfile, &st) == 0) {
- printf("FILE_SIZE=%" PRIu64 "\n", (uint64_t)st.st_size);
- /* XXX: DIGETS */
- }
-
- print_file_as_var("DESCRIPTION", DESC_FNAME);
- putc('\n', stdout);
-}
-
-/*
- * Print the contents of file fname as value of variable var to stdout.
- */
-static int
-print_file_as_var(const char *var, const char *fname)
-{
- FILE *fp;
- char *line;
- size_t len;
-
- fp = fopen(fname, "r");
- if (!fp) {
- warn("unable to open %s file", fname);
- return -1;
- }
-
- while ((line = fgetln(fp, &len)) != (char *) NULL) {
- if (line[len - 1] == '\n')
- --len;
- printf("%s=%.*s\n", var, (int)len, line);
- }
-
- fclose(fp);
-
- return 0;
-}
diff --git a/pkgtools/pkg_install/files/install-sh b/pkgtools/pkg_install/files/install-sh
deleted file mode 100755
index 89fc9b098b8..00000000000
--- a/pkgtools/pkg_install/files/install-sh
+++ /dev/null
@@ -1,238 +0,0 @@
-#! /bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# 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.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-tranformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# 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 $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/pkgtools/pkg_install/files/lib/Makefile.in b/pkgtools/pkg_install/files/lib/Makefile.in
deleted file mode 100644
index fb00a7e9902..00000000000
--- a/pkgtools/pkg_install/files/lib/Makefile.in
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile.in,v 1.13 2006/08/19 14:38:52 schwarz Exp $
-
-srcdir= @srcdir@
-
-pkgdbdir= @pkgdbdir@
-mandir= @mandir@
-
-man5dir= $(mandir)/man5
-cat5dir= $(mandir)/cat5
-
-tar= @tar@
-ftp= @ftp@
-
-RANLIB= @RANLIB@
-AR= @AR@
-CC= @CC@
-CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir)
-DEFS= @DEFS@ -DDEF_LOG_DIR=\"$(pkgdbdir)\" -DTAR_CMD=\"$(tar)\" -DFTP_CMD=\"$(ftp)\"
-CFLAGS= @CFLAGS@
-
-INSTALL= @INSTALL@
-
-LIB= libinstall.a
-
-OBJS= automatic.o dewey.o fexec.o file.o ftpio.o global.o lpkg.o path.o pen.o \
- pexec.o pkgdb.o plist.o str.o var.o version.o
-
-all: $(LIB)
-
-.c.o:
- $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
-
-$(LIB): $(OBJS)
- $(AR) crv $@ $(OBJS)
- $(RANLIB) $@
-
-clean:
- rm -f $(OBJS) $(LIB)
-
-install:
- $(INSTALL) -m 755 -d $(man5dir)
- $(INSTALL) -m 755 -d $(cat5dir)
- $(INSTALL) -m 444 pkg_summary.5 $(man5dir)/pkg_summary.5
- $(INSTALL) -m 444 pkg_summary.cat5 $(cat5dir)/pkg_summary.0
diff --git a/pkgtools/pkg_install/files/lib/automatic.c b/pkgtools/pkg_install/files/lib/automatic.c
deleted file mode 100644
index 1c39c68adb1..00000000000
--- a/pkgtools/pkg_install/files/lib/automatic.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $NetBSD: automatic.c,v 1.2 2005/11/06 12:37:43 wiz Exp $ */
-
-/*-
- * Copyright (c) 2005 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: automatic.c,v 1.2 2005/11/06 12:37:43 wiz Exp $");
-#endif
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#include "lib.h"
-
-Boolean
-is_automatic_installed(const char *path)
-{
- char filename[BUFSIZ];
- char *value;
- Boolean ret;
-
- (void)snprintf(filename, sizeof(filename), "%s/%s", path,
- INSTALLED_INFO_FNAME);
-
- value = var_get(filename, AUTOMATIC_VARNAME);
-
- if (value && strcasecmp(value, "yes") == 0)
- ret = TRUE;
- else
- ret = FALSE;
-
- free(value);
-
- return ret;
-}
-
-int
-mark_as_automatic_installed(const char *path, int value)
-{
- char filename[BUFSIZ];
-
- (void)snprintf(filename, sizeof(filename), "%s/%s", path,
- INSTALLED_INFO_FNAME);
-
- return var_set(filename, AUTOMATIC_VARNAME,
- value ? "yes" : NULL);
-}
diff --git a/pkgtools/pkg_install/files/lib/config.h.in b/pkgtools/pkg_install/files/lib/config.h.in
deleted file mode 100644
index 477e2cb3041..00000000000
--- a/pkgtools/pkg_install/files/lib/config.h.in
+++ /dev/null
@@ -1,201 +0,0 @@
-/* lib/config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the `chflags' function. */
-#undef HAVE_CHFLAGS
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
-
-/* Define to 1 if you have the <db1/db.h> header file. */
-#undef HAVE_DB1_DB_H
-
-/* Define to 1 if you have the `dbopen' function. */
-#undef HAVE_DBOPEN
-
-/* Define to 1 if you have the <db_185.h> header file. */
-#undef HAVE_DB_185_H
-
-/* Define to 1 if you have the <db.h> header file. */
-#undef HAVE_DB_H
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the <fnctl.h> header file. */
-#undef HAVE_FNCTL_H
-
-/* Define to 1 if you have the <fnmatch.h> header file. */
-#undef HAVE_FNMATCH_H
-
-/* Define to 1 if you have the `getrlimit' function. */
-#undef HAVE_GETRLIMIT
-
-/* Define to 1 if you have the <glob.h> header file. */
-#undef HAVE_GLOB_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `db' library (-ldb). */
-#undef HAVE_LIBDB
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <md5.h> header file. */
-#undef HAVE_MD5_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define to 1 if you have the <regex.h> header file. */
-#undef HAVE_REGEX_H
-
-/* Define to 1 if you have the `setrlimit' function. */
-#undef HAVE_SETRLIMIT
-
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
-/* Define to 1 if you have the <stdarg.h> header file. */
-#undef HAVE_STDARG_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 <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 <sys/cdefs.h> header file. */
-#undef HAVE_SYS_CDEFS_H
-
-/* Define to 1 if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define to 1 if you have the <sys/mount.h> header file. */
-#undef HAVE_SYS_MOUNT_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/poll.h> header file. */
-#undef HAVE_SYS_POLL_H
-
-/* Define to 1 if you have the <sys/queue.h> header file. */
-#undef HAVE_SYS_QUEUE_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/signal.h> header file. */
-#undef HAVE_SYS_SIGNAL_H
-
-/* Define to 1 if you have the <sys/statvfs.h> header file. */
-#undef HAVE_SYS_STATVFS_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/utsname.h> header file. */
-#undef HAVE_SYS_UTSNAME_H
-
-/* Define to 1 if you have the <sys/vfs.h> header file. */
-#undef HAVE_SYS_VFS_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 <termcap.h> header file. */
-#undef HAVE_TERMCAP_H
-
-/* Define to 1 if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define to 1 if you have the `tgetent' function. */
-#undef HAVE_TGETENT
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vfork' function. */
-#undef HAVE_VFORK
-
-/* Define to 1 if you have the <vis.h> header file. */
-#undef HAVE_VIS_H
-
-/* Define to 1 if you have the `__db185_open' function. */
-#undef HAVE___DB185_OPEN
-
-/* Defined when PRIu64 is missing or broken */
-#undef NEED_PRI_MACRO
-
-/* Defined when only the numeric part of the OS version should be used */
-#undef NUMERIC_VERSION_ONLY
-
-/* 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 version of this package. */
-#undef PACKAGE_VERSION
-
-/* The size of a `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of a `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of a `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-#if !HAVE_VFORK
-# define vfork fork
-#endif
-
diff --git a/pkgtools/pkg_install/files/lib/defs.h b/pkgtools/pkg_install/files/lib/defs.h
deleted file mode 100644
index 964b7c5f717..00000000000
--- a/pkgtools/pkg_install/files/lib/defs.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* $NetBSD: defs.h,v 1.5 2006/04/24 13:52:05 dillo Exp $ */
-
-/*
- * Copyright (c) 1999-2000 Alistair G. Crooks. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Alistair G. Crooks.
- * 4. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef DEFS_H_
-#define DEFS_H_
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-
-#define NEWARRAY(type,ptr,size,where,action) do { \
- if ((ptr = (type *) calloc(sizeof(type), (unsigned)(size))) == NULL) { \
- warn("%s: can't allocate %lu bytes", where, \
- (unsigned long)(size * sizeof(type))); \
- action; \
- } \
-} while( /* CONSTCOND */ 0)
-
-#define RENEW(type,ptr,size,where,action) do { \
- type *newptr; \
- if ((newptr = (type *) realloc(ptr, sizeof(type) * (size))) == NULL) { \
- warn("%s: can't realloc %lu bytes", where, \
- (unsigned long)(size * sizeof(type))); \
- action; \
- } \
- ptr = newptr; \
-} while( /* CONSTCOND */ 0)
-
-#define NEW(type, ptr, where, action) NEWARRAY(type, ptr, 1, where, action)
-
-#define FREE(ptr) (void) free(ptr)
-
-#define ALLOC(type, v, size, c, init, where, action) do { \
- if (size == 0) { \
- size = init; \
- NEWARRAY(type, v, size, where ": new", action); \
- } else if (c == size) { \
- size *= 2; \
- RENEW(type, v, size, where ": renew", action); \
- } \
-} while( /* CONSTCOND */ 0)
-
-#ifndef MIN
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
-#ifndef MAX
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-
-#ifndef ABS
-#define ABS(a) (((a) < 0) ? -(a) : (a))
-#endif
-
-#define STRNCPY(to, from, size) do { \
- (void) strncpy(to, from, size); \
- to[(size) - 1] = 0; \
-} while( /* CONSTCOND */ 0)
-
-/*
- * Some systems such as OpenBSD-3.6 do not provide PRIu64.
- * Others such as AIX-4.3.2 have a broken PRIu64 which includes
- * a leading "%".
- */
-#ifdef NEED_PRI_MACRO
-# ifdef PRIu64
-# undef PRIu64
-# endif
-# if SIZEOF_INT == 8
-# define PRIu64 "u"
-# elif SIZEOF_LONG == 8
-# define PRIu64 "lu"
-# elif SIZEOF_LONG_LONG == 8
-# define PRIu64 "llu"
-# else
-# error "unable to find a suitable PRIu64"
-# endif
-#endif
-
-#endif /* !DEFS_H_ */
diff --git a/pkgtools/pkg_install/files/lib/dewey.c b/pkgtools/pkg_install/files/lib/dewey.c
deleted file mode 100644
index f476b92042b..00000000000
--- a/pkgtools/pkg_install/files/lib/dewey.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/* $NetBSD: dewey.c,v 1.5 2006/04/04 06:30:10 wiz Exp $ */
-
-/*
- * Copyright © 2002 Alistair G. Crooks. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include "defs.h"
-#include "dewey.h"
-
-#define PKG_PATTERN_MAX 1024
-typedef int (*matchfn) (const char *, void *);
-
-/* do not modify these values, or things will NOT work */
-enum {
- Alpha = -3,
- Beta = -2,
- RC = -1,
- Dot = 0,
- Patch = 1
-};
-
-/* this struct defines a version number */
-typedef struct arr_t {
- unsigned c; /* # of version numbers */
- unsigned size; /* size of array */
- int *v; /* array of decimal numbers */
- int netbsd; /* any "nb" suffix */
-} arr_t;
-
-/* this struct describes a test */
-typedef struct test_t {
- const char *s; /* string representation */
- unsigned len; /* length of string */
- int t; /* enumerated type of test */
-} test_t;
-
-
-/* the tests that are recognised. */
- const test_t tests[] = {
- { "<=", 2, DEWEY_LE },
- { "<", 1, DEWEY_LT },
- { ">=", 2, DEWEY_GE },
- { ">", 1, DEWEY_GT },
- { "==", 2, DEWEY_EQ },
- { "!=", 2, DEWEY_NE },
- { NULL, 0, 0 }
-};
-
- const test_t modifiers[] = {
- { "alpha", 5, Alpha },
- { "beta", 4, Beta },
- { "pre", 3, RC },
- { "rc", 2, RC },
- { "pl", 2, Dot },
- { "_", 1, Dot },
- { ".", 1, Dot },
- { NULL, 0, 0 }
-};
-
-
-
-/* locate the test in the tests array */
-int
-dewey_mktest(int *op, const char *test)
-{
- const test_t *tp;
-
- for (tp = tests ; tp->s ; tp++) {
- if (strncasecmp(test, tp->s, tp->len) == 0) {
- *op = tp->t;
- return tp->len;
- }
- }
- return -1;
-}
-
-/*
- * make a component of a version number.
- * '.' encodes as Dot which is '0'
- * '_' encodes as 'patch level', or 'Dot', which is 0.
- * 'pl' encodes as 'patch level', or 'Dot', which is 0.
- * 'alpha' encodes as 'alpha version', or Alpha, which is -3.
- * 'beta' encodes as 'beta version', or Beta, which is -2.
- * 'rc' encodes as 'release candidate', or RC, which is -1.
- * 'nb' encodes as 'netbsd version', which is used after all other tests
- */
-static int
-mkcomponent(arr_t *ap, const char *num)
-{
- static const char alphas[] = "abcdefghijklmnopqrstuvwxyz";
- const test_t *modp;
- int n;
- const char *cp;
-
- if (*num == 0) {
- return 0;
- }
- ALLOC(int, ap->v, ap->size, ap->c, 62, "mkver", exit(EXIT_FAILURE));
- if (isdigit((unsigned char)*num)) {
- for (cp = num, n = 0 ; isdigit((unsigned char)*num) ; num++) {
- n = (n * 10) + (*num - '0');
- }
- ap->v[ap->c++] = n;
- return (int)(num - cp);
- }
- for (modp = modifiers ; modp->s ; modp++) {
- if (strncasecmp(num, modp->s, modp->len) == 0) {
- ap->v[ap->c++] = modp->t;
- return modp->len;
- }
- }
- if (strncasecmp(num, "nb", 2) == 0) {
- for (cp = num, num += 2, n = 0 ; isdigit((unsigned char)*num) ; num++) {
- n = (n * 10) + (*num - '0');
- }
- ap->netbsd = n;
- return (int)(num - cp);
- }
- if (isalpha((unsigned char)*num)) {
- ap->v[ap->c++] = Dot;
- cp = strchr(alphas, tolower((unsigned char)*num));
- ALLOC(int, ap->v, ap->size, ap->c, 62, "mkver", exit(EXIT_FAILURE));
- ap->v[ap->c++] = (int)(cp - alphas) + 1;
- return 1;
- }
- return 1;
-}
-
-/* make a version number string into an array of comparable 64bit ints */
-static int
-mkversion(arr_t *ap, const char *num)
-{
- (void) memset(ap, 0, sizeof(arr_t));
- while (*num) {
- num += mkcomponent(ap, num);
- }
- return 1;
-}
-
-#define DIGIT(v, c, n) (((n) < (c)) ? v[n] : 0)
-
-/* compare the result against the test we were expecting */
-static int
-result(int cmp, int tst)
-{
- switch(tst) {
- case DEWEY_LT:
- return cmp < 0;
- case DEWEY_LE:
- return cmp <= 0;
- case DEWEY_GT:
- return cmp > 0;
- case DEWEY_GE:
- return cmp >= 0;
- case DEWEY_EQ:
- return cmp == 0;
- case DEWEY_NE:
- return cmp != 0;
- default:
- return 0;
- }
-}
-
-/* do the test on the 2 vectors */
-static int
-vtest(arr_t *lhs, int tst, arr_t *rhs)
-{
- int cmp;
- int c;
- int i;
-
- for (i = 0, c = MAX(lhs->c, rhs->c) ; i < c ; i++) {
- if ((cmp = DIGIT(lhs->v, lhs->c, i) - DIGIT(rhs->v, rhs->c, i)) != 0) {
- return result(cmp, tst);
- }
- }
- return result(lhs->netbsd - rhs->netbsd, tst);
-}
-
-/*
- * Compare two dewey decimal numbers
- */
-int
-dewey_cmp(const char *lhs, int op, const char *rhs)
-{
- arr_t right;
- arr_t left;
-
- (void) memset(&left, 0, sizeof(left));
- if (!mkversion(&left, lhs)) {
- return 0;
- }
- (void) memset(&right, 0, sizeof(right));
- if (!mkversion(&right, rhs)) {
- return 0;
- }
- return vtest(&left, op, &right);
-}
-
-/*
- * Perform dewey match on "pkg" against "pattern".
- * Return 1 on match, 0 on non-match, -1 on error.
- */
-int
-dewey_match(const char *pattern, const char *pkg)
-{
- const char *version;
- const char *sep, *sep2;
- int op, op2;
- int n;
-
- /* compare names */
- if ((version=strrchr(pkg, '-')) == NULL) {
- return 0;
- }
- if ((sep = strpbrk(pattern, "<>")) == NULL)
- return -1;
- /* compare name lengths */
- if ((sep-pattern != version-pkg) ||
- strncmp(pkg, pattern, (size_t)(version-pkg)) != 0)
- return 0;
- version++;
-
- /* extract comparison operator */
- if ((n = dewey_mktest(&op, sep)) < 0) {
- return 0;
- }
- /* skip operator */
- sep += n;
-
- /* if greater than, look for less than */
- sep2 = NULL;
- if (op == DEWEY_GT || op == DEWEY_GE) {
- if ((sep2 = strchr(sep, '<')) != NULL) {
- if ((n = dewey_mktest(&op2, sep2)) < 0) {
- return 0;
- }
- /* compare upper limit */
- if (!dewey_cmp(version, op2, sep2+n))
- return 0;
- }
- }
-
- /* compare only pattern / lower limit */
- if (sep2) {
- char ver[PKG_PATTERN_MAX];
-
- strlcpy(ver, sep, MIN(sizeof(ver), sep2-sep+1));
- if (dewey_cmp(version, op, ver))
- return 1;
- }
- else {
- if (dewey_cmp(version, op, sep))
- return 1;
- }
-
- return 0;
-}
-
diff --git a/pkgtools/pkg_install/files/lib/dewey.h b/pkgtools/pkg_install/files/lib/dewey.h
deleted file mode 100644
index 14f2b413212..00000000000
--- a/pkgtools/pkg_install/files/lib/dewey.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* $NetBSD: dewey.h,v 1.1 2005/11/05 13:20:09 wiz Exp $ */
-
-#ifndef _INST_LIB_DEWEY_H_
-#define _INST_LIB_DEWEY_H_
-
-int dewey_cmp(const char *, int, const char *);
-int dewey_match(const char *, const char *);
-int dewey_mktest(int *, const char *);
-
-enum {
- DEWEY_LT,
- DEWEY_LE,
- DEWEY_EQ,
- DEWEY_GE,
- DEWEY_GT,
- DEWEY_NE
-};
-
-#endif /* _INST_LIB_DEWEY_H_ */
diff --git a/pkgtools/pkg_install/files/lib/fexec.c b/pkgtools/pkg_install/files/lib/fexec.c
deleted file mode 100644
index c5524564ec5..00000000000
--- a/pkgtools/pkg_install/files/lib/fexec.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*-
- * Copyright (c) 2003 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Matthias Scheler.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "lib.h"
-
-#ifndef lint
-__RCSID("$NetBSD: fexec.c,v 1.8 2005/12/06 01:08:09 ben Exp $");
-#endif
-
-static int vfcexec(const char *, int, const char *, va_list);
-
-/*
- * fork, then change current working directory to path and
- * execute the command and arguments in the argv array.
- * wait for the command to finish, then return the exit status.
- */
-int
-pfcexec(const char *path, const char *file, const char **argv)
-{
- pid_t child;
- int status;
-
- child = vfork();
- switch (child) {
- case 0:
- if ((path != NULL) && (chdir(path) < 0))
- _exit(127);
-
- (void)execvp(file, (char ** const)argv);
- _exit(127);
- /* NOTREACHED */
- case -1:
- return -1;
- }
-
- while (waitpid(child, &status, 0) < 0) {
- if (errno != EINTR)
- return -1;
- }
-
- if (!WIFEXITED(status))
- return -1;
-
- return WEXITSTATUS(status);
-}
-
-static int
-vfcexec(const char *path, int skipempty, const char *arg, va_list ap)
-{
- static unsigned int max = 4;
- static const char **argv = NULL;
- unsigned int argc;
-
- if (argv == NULL) {
- argv = malloc(max * sizeof(const char *));
- if (argv == NULL) {
- warn("vfcexec: Can't alloc arg space");
- return -1;
- }
- }
-
- argv[0] = arg;
- argc = 1;
-
- do {
- if (argc == max) {
- unsigned int new;
- const char **ptr;
-
- new = max * 2;
- ptr = realloc(argv, new * sizeof(const char *));
- if (ptr == NULL) {
- warn("vfcexec: Can't alloc arg space");
- free(argv);
- argv = NULL;
- max = 4;
- return -1;
- }
- argv = ptr;
- max = new;
- }
- arg = va_arg(ap, const char *);
- if (skipempty && arg && strlen(arg) == 0)
- continue;
- argv[argc++] = arg;
- } while (arg != NULL);
-
- return pfcexec(path, argv[0], argv);
-}
-
-int
-fexec(const char *arg, ...)
-{
- va_list ap;
- int result;
-
- va_start(ap, arg);
- result = vfcexec(NULL, 0, arg, ap);
- va_end(ap);
-
- return result;
-}
-
-int
-fexec_skipempty(const char *arg, ...)
-{
- va_list ap;
- int result;
-
- va_start(ap, arg);
- result = vfcexec(NULL, 1, arg, ap);
- va_end(ap);
-
- return result;
-}
-
-int
-fcexec(const char *path, const char *arg, ...)
-{
- va_list ap;
- int result;
-
- va_start(ap, arg);
- result = vfcexec(path, 0, arg, ap);
- va_end(ap);
-
- return result;
-}
diff --git a/pkgtools/pkg_install/files/lib/file.c b/pkgtools/pkg_install/files/lib/file.c
deleted file mode 100644
index 75e9e3fb010..00000000000
--- a/pkgtools/pkg_install/files/lib/file.c
+++ /dev/null
@@ -1,755 +0,0 @@
-/* $NetBSD: file.c,v 1.18 2006/04/04 06:31:22 wiz Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
-#else
-__RCSID("$NetBSD: file.c,v 1.18 2006/04/04 06:31:22 wiz Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Miscellaneous file access utilities.
- *
- */
-
-#include "lib.h"
-
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_GLOB_H
-#include <glob.h>
-#endif
-#if HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#if HAVE_PWD_H
-#include <pwd.h>
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-
-/*
- * Quick check to see if a file (or dir ...) exists
- */
-Boolean
-fexists(const char *fname)
-{
- struct stat dummy;
- if (!lstat(fname, &dummy))
- return TRUE;
- return FALSE;
-}
-
-/*
- * Quick check to see if something is a directory
- */
-Boolean
-isdir(const char *fname)
-{
- struct stat sb;
-
- if (lstat(fname, &sb) != FAIL && S_ISDIR(sb.st_mode))
- return TRUE;
- else
- return FALSE;
-}
-
-/*
- * Check if something is a link to a directory
- */
-Boolean
-islinktodir(const char *fname)
-{
- struct stat sb;
-
- if (lstat(fname, &sb) != FAIL && S_ISLNK(sb.st_mode)) {
- if (stat(fname, &sb) != FAIL && S_ISDIR(sb.st_mode))
- return TRUE; /* link to dir! */
- else
- return FALSE; /* link to non-dir */
- } else
- return FALSE; /* non-link */
-}
-
-/*
- * Check to see if file is a dir, and is empty
- */
-Boolean
-isemptydir(const char *fname)
-{
- if (isdir(fname) || islinktodir(fname)) {
- DIR *dirp;
- struct dirent *dp;
-
- dirp = opendir(fname);
- if (!dirp)
- return FALSE; /* no perms, leave it alone */
- for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
- if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) {
- closedir(dirp);
- return FALSE;
- }
- }
- (void) closedir(dirp);
- return TRUE;
- }
- return FALSE;
-}
-
-/*
- * Check if something is a regular file
- */
-Boolean
-isfile(const char *fname)
-{
- struct stat sb;
- if (stat(fname, &sb) != FAIL && S_ISREG(sb.st_mode))
- return TRUE;
- return FALSE;
-}
-
-/*
- * Check to see if file is a file and is empty. If nonexistent or not
- * a file, say "it's empty", otherwise return TRUE if zero sized.
- */
-Boolean
-isemptyfile(const char *fname)
-{
- struct stat sb;
- if (stat(fname, &sb) != FAIL && S_ISREG(sb.st_mode)) {
- if (sb.st_size != 0)
- return FALSE;
- }
- return TRUE;
-}
-
-/* This struct defines the leading part of a valid URL name */
-typedef struct url_t {
- char *u_s; /* the leading part of the URL */
- int u_len; /* its length */
-} url_t;
-
-/* A table of valid leading strings for URLs */
-static const url_t urls[] = {
- {"ftp://", 6},
- {"http://", 7},
- {NULL}
-};
-
-/*
- * Returns length of leading part of any URL from urls table, or -1
- */
-int
-URLlength(const char *fname)
-{
- const url_t *up;
- int i;
-
- if (fname != (char *) NULL) {
- for (i = 0; isspace((unsigned char) *fname); i++) {
- fname++;
- }
- for (up = urls; up->u_s; up++) {
- if (strncmp(fname, up->u_s, up->u_len) == 0) {
- return i + up->u_len; /* ... + sizeof(up->u_s); - HF */
- }
- }
- }
- return -1;
-}
-
-/*
- * Returns the host part of a URL
- */
-const char *
-fileURLHost(const char *fname, char *where, int max)
-{
- const char *ret;
- int i;
-
- assert(where != NULL);
- assert(max > 0);
-
- if ((i = URLlength(fname)) < 0) { /* invalid URL? */
- errx(EXIT_FAILURE, "fileURLhost called with a bad URL: `%s'", fname);
- }
- fname += i;
- /* Do we have a place to stick our work? */
- ret = where;
- while (*fname && *fname != '/' && --max)
- *where++ = *fname++;
- *where = '\0';
-
- return ret;
-}
-
-/*
- * Returns the filename part of a URL
- */
-const char *
-fileURLFilename(const char *fname, char *where, int max)
-{
- const char *ret;
- int i;
-
- assert(where != NULL);
- assert(max > 0);
-
- if ((i = URLlength(fname)) < 0) { /* invalid URL? */
- errx(EXIT_FAILURE, "fileURLFilename called with a bad URL: `%s'", fname);
- }
- fname += i;
- /* Do we have a place to stick our work? */
- ret = where;
- while (*fname && *fname != '/')
- ++fname;
- if (*fname == '/') {
- while (*fname && --max)
- *where++ = *fname++;
- }
- *where = '\0';
-
- return ret;
-}
-
-/*
- * Try and fetch a file by URL, returning the directory name for where
- * it's unpacked, if successful. To be handed to leave_playpen() later.
- */
-char *
-fileGetURL(const char *spec)
-{
- char host[MAXHOSTNAMELEN], file[MaxPathSize];
- const char *cp;
- char *rp;
- char pen[MaxPathSize];
- int rc;
-
- rp = NULL;
- if (!IS_URL(spec)) {
- errx(EXIT_FAILURE, "fileGetURL was called with non-URL arg '%s'", spec);
- }
-
- /* Some sanity checks on the URL */
- cp = fileURLHost(spec, host, MAXHOSTNAMELEN);
- if (!*cp) {
- warnx("URL `%s' has bad host part!", spec);
- return NULL;
- }
- cp = fileURLFilename(spec, file, MaxPathSize);
- if (!*cp) {
- warnx("URL `%s' has bad filename part!", spec);
- return NULL;
- }
-
- if (Verbose)
- printf("Trying to fetch %s.\n", spec);
-
- pen[0] = '\0';
- rp = make_playpen(pen, sizeof(pen), 0);
- if (rp == NULL) {
- printf("Error: Unable to construct a new playpen for FTP!\n");
- return NULL;
- }
-
- rp = strdup(pen);
- rc = unpackURL(spec, pen);
- if (rc < 0) {
- leave_playpen(rp); /* Don't leave dir hang around! */
-
- printf("Error on unpackURL('%s', '%s')\n", spec, pen);
- return NULL;
- }
- return rp;
-}
-
-static char *
-resolvepattern1(const char *name)
-{
- static char tmp[MaxPathSize];
- char *cp;
-
- if (IS_URL(name)) {
- /* some package depends on a wildcard pkg */
- int rc;
-
- rc = expandURL(tmp, name);
- if (rc < 0) {
- return NULL;
- }
- if (Verbose)
- printf("'%s' expanded to '%s'\n", name, tmp);
- return tmp; /* return expanded URL w/ corrent pkg */
- }
- else if (ispkgpattern(name)) {
- cp = findbestmatchingname(
- dirname_of(name), basename_of(name));
- if (cp) {
- snprintf(tmp, sizeof(tmp), "%s/%s", dirname_of(name), cp);
- free(cp);
- return tmp;
- }
- } else {
- if (isfile(name)) {
- strlcpy(tmp, name, sizeof(tmp));
- return tmp;
- }
- }
-
- return NULL;
-}
-
-static char *
-resolvepattern(const char *name)
-{
- char tmp[MaxPathSize];
- char *cp;
- const char *suf;
-
- cp = resolvepattern1(name);
- if (cp != NULL)
- return cp;
-
- if (ispkgpattern(name))
- return NULL;
-
- suf = suffix_of(name);
- if (!strcmp(suf, "tbz") || !strcmp(suf, "tgz"))
- return NULL;
-
- /* add suffix and try */
- snprintf(tmp, sizeof(tmp), "%s.tbz", name);
- cp = resolvepattern1(tmp);
- if (cp != NULL)
- return cp;
- snprintf(tmp, sizeof(tmp), "%s.tgz", name);
- cp = resolvepattern1(tmp);
- if (cp != NULL)
- return cp;
-
- /* add version number wildcard and try */
- snprintf(tmp, sizeof(tmp), "%s-[0-9]*.t[bg]z", name);
- return resolvepattern1(tmp);
-}
-
-/*
- * Look for filename/pattern "fname" in
- * Returns a full path/URL where the pkg can be found
- */
-char *
-fileFindByPath(const char *fname)
-{
- char tmp[MaxPathSize];
- struct path *path;
-
- /*
- * 1. if fname is an absolute pathname or a URL,
- * just use it.
- */
- if (IS_FULLPATH(fname) || IS_URL(fname))
- return resolvepattern(fname);
-
- /*
- * 2. otherwise, use PKG_PATH.
- */
- TAILQ_FOREACH(path, &PkgPath, pl_entry) {
- char *cp;
- const char *cp2 = path->pl_path;
-
- if (Verbose)
- printf("trying PKG_PATH %s\n", cp2);
-
- if (IS_FULLPATH(cp2) || IS_URL(cp2)) {
- snprintf(tmp, sizeof(tmp), "%s/%s", cp2, fname);
- }
- else {
- char cwdtmp[MaxPathSize];
- if (getcwd(cwdtmp, sizeof(cwdtmp)) == NULL)
- errx(EXIT_FAILURE, "getcwd");
- snprintf(tmp, sizeof(tmp), "%s/%s/%s", cwdtmp, cp2, fname);
- }
- cp = resolvepattern(tmp);
- if (cp)
- return cp;
- }
-
-#if 0
- /*
- * 3. finally, search current directory.
- */
- snprintf(tmp, sizeof(tmp), "./%s", fname);
- return resolvepattern(tmp);
-#else
- return NULL;
-#endif
-}
-
-/*
- * Expect "fname" to point at a file, and read it into
- * the buffer returned.
- */
-char *
-fileGetContents(char *fname)
-{
- char *contents;
- struct stat sb;
- int fd;
-
- if (stat(fname, &sb) == FAIL) {
- cleanup(0);
- errx(2, "can't stat '%s'", fname);
- }
-
- contents = (char *) malloc((size_t) (sb.st_size) + 1);
- fd = open(fname, O_RDONLY, 0);
- if (fd == FAIL) {
- cleanup(0);
- errx(2, "unable to open '%s' for reading", fname);
- }
- if (read(fd, contents, (size_t) sb.st_size) != (size_t) sb.st_size) {
- cleanup(0);
- errx(2, "short read on '%s' - did not get %lld bytes",
- fname, (long long) sb.st_size);
- }
- close(fd);
- contents[(size_t) sb.st_size] = '\0';
- return contents;
-}
-
-/*
- * Takes a filename and package name, returning (in "try") the canonical
- * "preserve" name for it.
- */
-Boolean
-make_preserve_name(char *try, size_t max, char *name, char *file)
-{
- int len, i;
-
- if ((len = strlen(file)) == 0)
- return FALSE;
- else
- i = len - 1;
- strncpy(try, file, max);
- if (try[i] == '/') /* Catch trailing slash early and save checking in the loop */
- --i;
- for (; i; i--) {
- if (try[i] == '/') {
- try[i + 1] = '.';
- strncpy(&try[i + 2], &file[i + 1], max - i - 2);
- break;
- }
- }
- if (!i) {
- try[0] = '.';
- strncpy(try + 1, file, max - 1);
- }
- /* I should probably be called rude names for these inline assignments */
- strncat(try, ".", max -= strlen(try));
- strncat(try, name, max -= strlen(name));
- strncat(try, ".", max--);
- strncat(try, "backup", max -= 6);
- return TRUE;
-}
-
-/*
- * Write the contents of "str" to a file
- */
-void
-write_file(char *name, char *str)
-{
- size_t len;
- FILE *fp;
-
- if ((fp = fopen(name, "w")) == (FILE *) NULL) {
- cleanup(0);
- errx(2, "cannot fopen '%s' for writing", name);
- }
- len = strlen(str);
- if (fwrite(str, 1, len, fp) != len) {
- cleanup(0);
- errx(2, "short fwrite on '%s', tried to write %ld bytes",
- name, (long) len);
- }
- if (fclose(fp)) {
- cleanup(0);
- errx(2, "failure to fclose '%s'", name);
- }
-}
-
-void
-copy_file(char *dir, char *fname, char *to)
-{
- char fpath[MaxPathSize];
-
- (void) snprintf(fpath, sizeof(fpath), "%s%s%s",
- (fname[0] != '/') ? dir : "",
- (fname[0] != '/') ? "/" : "",
- fname);
- if (fexec("cp", "-r", fpath, to, NULL)) {
- cleanup(0);
- errx(2, "could not perform 'cp -r %s %s'", fpath, to);
- }
-}
-
-void
-move_file(char *dir, char *fname, char *to)
-{
- char fpath[MaxPathSize];
-
- (void) snprintf(fpath, sizeof(fpath), "%s%s%s",
- (fname[0] != '/') ? dir : "",
- (fname[0] != '/') ? "/" : "",
- fname);
- if (fexec("mv", fpath, to, NULL)) {
- cleanup(0);
- errx(2, "could not perform 'mv %s %s'", fpath, to);
- }
-}
-
-void
-move_files(const char *dir, const char *pattern, const char *to)
-{
- char fpath[MaxPathSize];
- glob_t globbed;
- size_t i;
-
- (void) snprintf(fpath, sizeof(fpath), "%s/%s", dir, pattern);
- if ((i=glob(fpath, GLOB_NOSORT, NULL, &globbed)) != 0) {
- switch(i) {
- case GLOB_NOMATCH:
- warn("no files matching ``%s'' found", fpath);
- break;
- case GLOB_ABORTED:
- warn("globbing aborted");
- break;
- case GLOB_NOSPACE:
- warn("out-of-memory during globbing");
- break;
- default:
- warn("unknown error during globbing");
- break;
- }
- return;
- }
-
- /* Moving globbed files -- we just use mv(1) to do the job */
- for (i=0; i<globbed.gl_pathc; i++)
- if (fexec("mv", globbed.gl_pathv[i], to, NULL)) {
- cleanup(0);
- errx(2, "could not perform 'mv %s %s'", globbed.gl_pathv[i], to);
- }
-
- return;
-}
-
-void
-remove_files(const char *path, const char *pattern)
-{
- char fpath[MaxPathSize];
- glob_t globbed;
- int i;
-
- (void) snprintf(fpath, sizeof(fpath), "%s/%s", path, pattern);
- if ((i=glob(fpath, GLOB_NOSORT, NULL, &globbed)) != 0) {
- switch(i) {
- case GLOB_NOMATCH:
- warn("no files matching ``%s'' found", fpath);
- break;
- case GLOB_ABORTED:
- warn("globbing aborted");
- break;
- case GLOB_NOSPACE:
- warn("out-of-memory during globbing");
- break;
- default:
- warn("unknown error during globbing");
- break;
- }
- return;
- }
-
- /* deleting globbed files */
- for (i=0; i<globbed.gl_pathc; i++)
- if (unlink(globbed.gl_pathv[i]) < 0)
- warn("can't delete ``%s''", globbed.gl_pathv[i]);
-
- return;
-}
-
-/*
- * Unpack a tar file
- */
-int
-unpack(const char *pkg, const lfile_head_t *filesp)
-{
- const char *decompress_cmd = NULL;
- const char *suf;
- int count = 0;
- lfile_t *lfp;
- char **up_argv;
- int up_argc = 7;
- int i = 0;
- int result;
-
- if (filesp != NULL)
- TAILQ_FOREACH(lfp, filesp, lf_link)
- count++;
- up_argc += count;
- up_argv = malloc((count + up_argc + 1) * sizeof(char *));
- if (!IS_STDIN(pkg)) {
- suf = suffix_of(pkg);
- if (!strcmp(suf, "tbz") || !strcmp(suf, "bz2"))
- decompress_cmd = BZIP2_CMD;
- else if (!strcmp(suf, "tgz") || !strcmp(suf, "gz"))
- decompress_cmd = GZIP_CMD;
- else if (!strcmp(suf, "tar"))
- ; /* do nothing */
- else
- errx(EXIT_FAILURE, "don't know how to decompress %s, sorry", pkg);
- } else
- decompress_cmd = GZIP_CMD;
-
- up_argv[i] = strrchr(TAR_CMD, '/');
- if (up_argv[i] == NULL)
- up_argv[i] = TAR_CMD;
- else
- up_argv[i]++; /* skip / character */
- if (count > 0)
- up_argv[++i] = "--fast-read";
- if (decompress_cmd != NULL) {
- up_argv[++i] = "--use-compress-program";
- up_argv[++i] = (char *)decompress_cmd;
- }
- up_argv[++i] = "-xpf";
- up_argv[++i] = (char *)pkg;
- if (count > 0)
- TAILQ_FOREACH(lfp, filesp, lf_link)
- up_argv[++i] = lfp->lf_name;
- up_argv[++i] = NULL;
-
- if (Verbose) {
- printf("running: %s", TAR_CMD);
- for (i = 1; up_argv[i] != NULL; i++)
- printf(" %s", up_argv[i]);
- printf("\n");
- }
-
- result = pfcexec(NULL, TAR_CMD, (const char **)up_argv);
- free(up_argv);
- if (result != 0) {
- warnx("extract of %s failed", pkg);
- return 1;
- }
-
- return 0;
-}
-
-/*
- * Using fmt, replace all instances of:
- *
- * %F With the parameter "name"
- * %D With the parameter "dir"
- * %B Return the directory part ("base") of %D/%F
- * %f Return the filename part of %D/%F
- *
- * Check that no overflows can occur.
- */
-void
-format_cmd(char *buf, size_t size, char *fmt, char *dir, char *name)
-{
- char scratch[MaxPathSize * 2];
- char *bufp;
- char *cp;
-
- for (bufp = buf; (int) (bufp - buf) < size && *fmt;) {
- if (*fmt == '%') {
- if (*++fmt != 'D' && name == NULL) {
- cleanup(0);
- errx(2, "no last file available for '%s' command", buf);
- }
- switch (*fmt) {
- case 'F':
- strlcpy(bufp, name, size - (int) (bufp - buf));
- bufp += strlen(bufp);
- break;
-
- case 'D':
- strlcpy(bufp, dir, size - (int) (bufp - buf));
- bufp += strlen(bufp);
- break;
-
- case 'B':
- (void) snprintf(scratch, sizeof(scratch), "%s/%s", dir, name);
- if ((cp = strrchr(scratch, '/')) == (char *) NULL) {
- cp = scratch;
- }
- *cp = '\0';
- strlcpy(bufp, scratch, size - (int) (bufp - buf));
- bufp += strlen(bufp);
- break;
-
- case 'f':
- (void) snprintf(scratch, sizeof(scratch), "%s/%s", dir, name);
- if ((cp = strrchr(scratch, '/')) == (char *) NULL) {
- cp = scratch;
- } else {
- cp++;
- }
- strlcpy(bufp, cp, size - (int) (bufp - buf));
- bufp += strlen(bufp);
- break;
-
- default:
- *bufp++ = '%';
- *bufp++ = *fmt;
- break;
- }
- ++fmt;
- } else {
- *bufp++ = *fmt++;
- }
- }
- *bufp = '\0';
-}
diff --git a/pkgtools/pkg_install/files/lib/ftpio.c b/pkgtools/pkg_install/files/lib/ftpio.c
deleted file mode 100644
index e06bd6d541b..00000000000
--- a/pkgtools/pkg_install/files/lib/ftpio.c
+++ /dev/null
@@ -1,1325 +0,0 @@
-/* $NetBSD: ftpio.c,v 1.20 2006/04/18 20:41:44 hubertf Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: ftpio.c,v 1.20 2006/04/18 20:41:44 hubertf Exp $");
-#endif
-
-/*-
- * Copyright (c) 2003 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1999 Hubert Feyrer. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Hubert Feyrer for
- * the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#if HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#endif
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#if HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#if HAVE_REGEX_H
-#include <regex.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_TERMCAP_H
-#include <termcap.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef EXPECT_DEBUG
-#if HAVE_VIS_H
-#include <vis.h>
-#endif
-#endif
-
-#include "../lib/lib.h"
-
-/*
- * Names of environment variables used to pass things to
- * subprocesses, for connection caching.
- */
-#define PKG_FTPIO_COMMAND "PKG_FTPIO_COMMAND"
-#define PKG_FTPIO_ANSWER "PKG_FTPIO_ANSWER"
-#define PKG_FTPIO_CNT "PKG_FTPIO_CNT"
-#define PKG_FTPIO_CURRENTHOST "PKG_FTPIO_CURRENTHOST"
-#define PKG_FTPIO_CURRENTDIR "PKG_FTPIO_CURRENTDIR"
-
-#undef STANDALONE /* define for standalone debugging */
-
-/* File descriptors */
-typedef struct {
- int command;
- int answer;
-} fds;
-
-
-#if EXPECT_DEBUG
-static int expect_debug = 1;
-#endif /* EXPECT_DEBUG */
-static int needclose=0;
-static int ftp_started=0;
-static fds ftpio;
-static int ftp_pid;
-static char term[1024];
-static char bold_on[1024];
-static char bold_off[1024];
-
-static char *ftp_expand_URL(const char *, char *);
-static int hexvalue(char);
-static char *http_expand_URL(const char *, char *);
-static int http_extract_fn(char *, char *, size_t);
-static void URL_decode(char *);
-
-/*
- * expect "str" (a regular expression) on file descriptor "fd", storing
- * the FTP return code of the command in the integer "ftprc". The "str"
- * string is expected to match some FTP return codes after a '\n', e.g.
- * "\n(550|226).*\n"
- */
-static int
-expect(int fd, const char *str, int *ftprc)
-{
- int rc;
- char buf[256];
-#if EXPECT_DEBUG
- char *vstr;
-#endif /* EXPECT_DEBUG */
- regex_t rstr;
- int done;
- struct pollfd set[1];
- int retval;
- regmatch_t match;
- int verbose_expect=0;
-
-#if EXPECT_DEBUG
- vstr=malloc(2*sizeof(buf));
- if (vstr == NULL)
- err(EXIT_FAILURE, "expect: malloc() failed");
- strvis(vstr, str, VIS_NL|VIS_SAFE|VIS_CSTYLE);
-#endif /* EXPECT_DEBUG */
-
- if (regcomp(&rstr, str, REG_EXTENDED) != 0)
- err(EXIT_FAILURE, "expect: regcomp() failed");
-
-#if EXPECT_DEBUG
- if (expect_debug)
- printf("expecting \"%s\" on fd %d ...\n", vstr, fd);
-#endif /* EXPECT_DEBUG */
-
- if(0) setbuf(stdout, NULL);
-
- memset(buf, '\n', sizeof(buf));
-
- done=0;
- retval=0;
- set[0].fd = fd;
- set[0].events = POLLIN;
- while(!done) {
- rc = poll(set, 1, 60*60*1000); /* seconds until next message from tar */
- switch (rc) {
- case -1:
- if (errno == EINTR)
- break;
- warn("expect: poll() failed (probably ftp died because of bad args)");
- done = 1;
- retval = -1;
- break;
- case 0:
- warnx("expect: poll() timeout");
- /* need to send ftp coprocess SIGINT to make it stop
- * downloading into dir that we'll blow away in a second */
- kill(ftp_pid, SIGINT);
-
- /* Wait until ftp coprocess is responsive again
- * XXX Entering recursion here!
- */
- rc = ftp_cmd("cd .\n", "\n(550|250).*\n");
- if (rc != 250) {
- /* now we have a really good reason to bail out ;) */
- }
- /* ftp is at command prompt again, and will wait for our
- * next command. If we were downloading, we can now safely
- * continue and remove the dir that the tar command was
- * expanding to */
-
- done = 1; /* hope that's ok */
- retval = -1;
- break;
- default:
- if (set[0].revents & POLLHUP) {
- done = 1;
- retval = -1;
- break;
- }
-
- rc = read(fd, &buf[sizeof(buf) - 1], 1);
- if (rc <= 0) {
- done = 1;
- retval = -1;
- break;
- }
-
- if (verbose_expect)
- putchar(buf[sizeof(buf)-1]);
-
-#if EXPECT_DEBUG
- {
- char *v=malloc(2*sizeof(buf));
- strvis(v, buf, VIS_NL|VIS_SAFE|VIS_CSTYLE);
- if (expect_debug)
- printf("expect=<%s>, buf=<%*s>\n", vstr, strlen(v), v);
- free(v);
- }
-#endif /* EXPECT_DEBUG */
-
- if (regexec(&rstr, buf, 1, &match, 0) == 0) {
-#if EXPECT_DEBUG
- if (expect_debug)
- printf("Gotcha -> %s!\n", buf+match.rm_so+1);
- fflush(stdout);
-#endif /* EXPECT_DEBUG */
-
- if (ftprc && isdigit((unsigned char)buf[match.rm_so+1]))
- *ftprc = atoi(buf+match.rm_so+1);
-
- done=1;
- retval=0;
- }
-
- memmove(buf, buf+1, sizeof(buf)-1); /* yes, this is non-performant */
- break;
- }
- }
-
-#if EXPECT_DEBUG
- printf("done.\n");
-
- if (str)
- free(vstr);
-#endif /* EXPECT_DEBUG */
-
- return retval;
-}
-
-/*
- * send a certain ftp-command "cmd" to our FTP coprocess, and wait for
- * "expectstr" to be returned. Return numeric FTP return code or -1
- * in case of an error (usually expect() timeout)
- */
-int
-ftp_cmd(const char *cmd, const char *expectstr)
-{
- int rc=0, verbose_ftp=0;
- int len;
-
- if (Verbose)
- verbose_ftp=1;
-
- if (verbose_ftp)
- fprintf(stderr, "\n%sftp> %s%s", bold_on, cmd, bold_off);
-
- fflush(stdout);
- len = write(ftpio.command, cmd, strlen(cmd));
- if (len == strlen(cmd)) {
- if (expectstr) {
- /* set "rc" to the FTP error code: */
- if (expect(ftpio.answer, expectstr, &rc) == -1)
- rc = -1; /* some error occurred */
- }
- } else {
- if (Verbose)
- warn("short write");
- }
-
- return rc;
-}
-
-
-/*
- * Really fire up FTP coprocess
- */
-static int
-setupCoproc(const char *base)
-{
- int command_pipe[2];
- int answer_pipe[2];
- int rc1, rc2;
- char buf[20];
- char *argv0 = strrchr(FTP_CMD, '/');
- if (argv0 == NULL)
- argv0 = FTP_CMD;
- else
- argv0++;
-
- rc1 = pipe(command_pipe);
- rc2 = pipe(answer_pipe);
-
- if(rc1==-1 || rc2==-1) {
- warn("setupCoproc: pipe() failed");
- return -1;
- }
-
- if (command_pipe[0] == -1 || command_pipe[1] == -1 ||
- answer_pipe[0] == -1 || answer_pipe[1] == -1 ) {
- warn("setupCoproc: pipe() returned bogus descriptor");
- return -1;
- }
-
- rc1 = fork();
- switch (rc1) {
- case -1:
- /* Error */
-
- warn("setupCoproc: fork() failed");
- return -1;
- break;
-
- case 0:
- /* Child */
-
- (void) close(command_pipe[1]);
- rc1 = dup2(command_pipe[0], 0);
- if (rc1 == -1) {
- err(EXIT_FAILURE, "setupCoproc: dup2 failed (command_pipe[0])");
- }
- (void) close(command_pipe[0]);
-
- (void) close(answer_pipe[0]);
- rc1 = dup2(answer_pipe[1], 1);
- if (rc1 == -1) {
- err(EXIT_FAILURE, "setupCoproc: dup2 failed (answer_pipe[1])");
- }
- (void) close(answer_pipe[1]);
-
- setbuf(stdout, NULL);
-
- if (Verbose)
- fprintf(stderr, "%sftp -detv %s%s\n", bold_on, base, bold_off);
- rc1 = execlp(FTP_CMD, argv0, "-detv", base, NULL);
- warn("setupCoproc: execlp() failed");
- exit(1);
- break;
- default:
- /* Parent */
- (void) close(command_pipe[0]);
- (void) close(answer_pipe[1]);
-
- (void) snprintf(buf, sizeof(buf), "%d", command_pipe[1]);
- setenv(PKG_FTPIO_COMMAND, buf, 1);
- (void) snprintf(buf, sizeof(buf), "%d", answer_pipe[0]);
- setenv(PKG_FTPIO_ANSWER, buf, 1);
-
- ftpio.command = command_pipe[1];
- ftpio.answer = answer_pipe[0];
- ftp_pid = rc1; /* to ^C transfers */
-
- fcntl(ftpio.command, F_SETFL, O_NONBLOCK);
- fcntl(ftpio.answer , F_SETFL, O_NONBLOCK);
-
- break;
- }
-
- return 0;
-}
-
-
-/*
- * Dummy signal handler to detect if the ftp(1) coprocess or
- * and of the processes of the tar/gzip pipeline dies.
- */
-static void
-sigchld_handler (int n)
-{
- /* Make poll(2) return EINTR */
-}
-
-
-/*
- * SIGPIPE only happens when there's something wrong with the FTP
- * coprocess. In that case, set mark to not try to close shut down
- * the coprocess.
- */
-static void
-sigpipe_handler(int n)
-{
- /* aparently our ftp companion died */
- if (Verbose)
- fprintf(stderr, "SIGPIPE!\n");
- needclose = 0;
-}
-
-
-/*
- * Close the FTP coprocess' current connection, but
- * keep the process itself alive.
- */
-void
-ftp_stop(void)
-{
-#if defined(__svr4__) && defined(__sun__)
- char env[BUFSIZ];
-#endif
- const char *tmp1, *tmp2;
-
- if (!ftp_started)
- return;
-
- tmp1=getenv(PKG_FTPIO_COMMAND);
- tmp2=getenv(PKG_FTPIO_ANSWER);
-
- /* (Only) the last one closes the link */
- if (tmp1 != NULL && tmp2 != NULL) {
- if (needclose)
- ftp_cmd("close\n", "\n(221 .*|Not connected.)\n");
-
- (void) close(ftpio.command);
- (void) close(ftpio.answer);
- }
-
-#if defined(__svr4__) && defined(__sun__)
- (void) snprintf(env, sizeof(env), "%s=", PKG_FTPIO_COMMAND);
- putenv(env);
- (void) snprintf(env, sizeof(env), "%s=", PKG_FTPIO_ANSWER);
- putenv(env);
-#else
- unsetenv(PKG_FTPIO_COMMAND);
- unsetenv(PKG_FTPIO_ANSWER);
-#endif
-}
-
-
-/*
- * (Start and re-)Connect the FTP coprocess to some host/dir.
- * If the requested host/dir is different than the one that the
- * coprocess is currently at, close first.
- */
-int
-ftp_start(const char *base)
-{
- const char *tmp1, *tmp2;
- char *p;
- int rc;
- char newHost[MAXHOSTNAMELEN];
- const char *newDir;
- const char *currentHost=getenv(PKG_FTPIO_CURRENTHOST);
- const char *currentDir=getenv(PKG_FTPIO_CURRENTDIR);
- int urllen;
-
- /* talk to termcap for bold on/off escape sequences */
- if (getenv("TERM") != NULL && tgetent(term, getenv("TERM")) > 0) {
- p = bold_on; tgetstr("md", &p);
- p = bold_off; tgetstr("me", &p);
- } else {
- bold_on[0] = '\0';
- bold_off[0] = '\0';
- }
-
- fileURLHost(base, newHost, sizeof(newHost));
- urllen = URLlength(base);
- if (urllen < 0 || !(newDir = strchr(base + URLlength(base), '/')))
- errx(EXIT_FAILURE, "ftp_start: bad URL '%s'", base);
- newDir++;
- if (currentHost
- && currentDir
- && ( strcmp(newHost, currentHost) != 0
- || strcmp(newDir, currentDir) != 0)) { /* could handle new dir case better here, w/o reconnect */
- if (Verbose) {
- printf("ftp_start: new host or dir, stopping previous connect...\n");
- printf("currentHost='%s', newHost='%s'\n", currentHost, newHost);
- printf("currentDir='%s', newDir='%s'\n", currentDir, newDir);
- }
-
- ftp_stop();
-
- if (Verbose)
- printf("ftp stopped\n");
- }
- setenv(PKG_FTPIO_CURRENTHOST, newHost, 1); /* need to update this in the environment */
- setenv(PKG_FTPIO_CURRENTDIR, newDir, 1); /* for subprocesses to have this available */
-
- tmp1=getenv(PKG_FTPIO_COMMAND);
- tmp2=getenv(PKG_FTPIO_ANSWER);
- if(tmp1==NULL || tmp2==NULL || *tmp1=='\0' || *tmp2=='\0') {
- /* no FTP coprocess running yet */
-
- if (Verbose)
- printf("Spawning FTP coprocess\n");
-
- rc = setupCoproc(base);
- if (rc == -1) {
- warnx("setupCoproc() failed");
- return -1;
- }
-
- needclose=1;
- signal(SIGPIPE, sigpipe_handler);
- signal(SIGCHLD, sigchld_handler);
-
- if ((expect(ftpio.answer, "\n(221|250|221|550).*\n", &rc) != 0)
- || rc != 250) {
- warnx("expect1 failed, rc=%d", rc);
- return -1;
- }
-
- /* nbftp now issues a CWD for each part of the path
- * and will return a code for each of them. No idea how to
- * deal with that other than to issue a 'prompt off' to
- * get something that we can wait for and that does NOT
- * look like a CWD command's output */
- rc = ftp_cmd("prompt off\n", "\n(Interactive mode off|221).*\n");
- if ((rc == 221) || (rc == -1)) {
- /* something is wrong */
- ftp_started=1; /* not really, but for ftp_stop() */
- ftp_stop();
- warnx("prompt failed - wrong dir?");
- return -1;
- }
-
- ftp_started=1;
- } else {
- /* get FDs of our coprocess */
-
- ftpio.command = dup(atoi(tmp1));
- if (ftpio.command == -1 ) {
- warnx("command dup() failed, increase 'descriptors' limit");
- return -1;
- }
- ftpio.answer = dup(atoi(tmp2));
- if (ftpio.answer == -1 ) {
- warnx("answer dup() failed, increase 'descriptors' limit");
- return -1;
- }
-
- if (Verbose)
- printf("Reusing FDs %s/%s for communication to FTP coprocess\n", tmp1, tmp2);
-
- fcntl(ftpio.command, F_SETFL, O_NONBLOCK);
- fcntl(ftpio.answer , F_SETFL, O_NONBLOCK);
- }
-
- return 0;
-}
-
-
-/*
- * Expand the given wildcard URL "wildcardurl" if possible, and store the
- * expanded value into "expandedurl". return 0 if successful, -1 else.
- */
-int
-expandURL(char *expandedurl, const char *wildcardurl)
-{
- char *pattern;
- char *bestmatch;
- char base[MaxPathSize];
-
- pattern=strrchr(wildcardurl, '/');
- if (pattern == NULL){
- warnx("expandURL: no '/' in URL %s?!", wildcardurl);
- return -1;
- }
- if (pattern-strchr(wildcardurl, '/') < 2) {
- /* only one or two slashes in total */
- warnx("expandURL: not enough '/' in URL %s", wildcardurl);
- return -1;
- }
- (void) snprintf(base, sizeof(base), "%.*s/",
- (int)(pattern-wildcardurl), wildcardurl);
- pattern++;
-
- if (strncmp(wildcardurl, "ftp://", 6) == 0)
- bestmatch=ftp_expand_URL(base, pattern);
- else if (strncmp(wildcardurl, "http://", 7) == 0)
- bestmatch=http_expand_URL(base, pattern);
- else {
- warnx("expandURL: unknown protocol in URL `%s'", wildcardurl);
- return -1;
- }
-
- /* no match found */
- if (bestmatch == NULL)
- return -1;
-
- snprintf(expandedurl, MaxPathSize, "%s%s", base, bestmatch);
- if (Verbose)
- printf("best match: '%s'\n", expandedurl);
-
- return 0;
-}
-
-/* for a given wildcard ftp:// URL, find the best matching pkg */
-static char *
-ftp_expand_URL(const char *base, char *pattern)
-{
- char *s, buf[MaxPathSize];
- char tmpname[MaxPathSize];
- char best[MaxPathSize];
- int rc, tfd;
-
- rc = ftp_start(base);
- if (rc == -1) {
- warnx("ftp_start() failed");
- return NULL;
- }
-
- strlcpy(tmpname, "/var/tmp/pkg.XXXXXX", sizeof(tmpname));
- tfd=mkstemp(tmpname);
- if (tfd == -1) {
- warnx("Cannot generate temp file for ftp(1)'s nlist output");
- return NULL;
- }
- close(tfd); /* We don't need the file descriptor, but will use
- the file in a second */
-
- s=strpbrk(pattern, "<>[]?*{"); /* Could leave out "[]?*" here;
- * ftp(1) is not that stupid */
- if (!s) {
- /* This should only happen when getting here with (only) a package
- * name specified to pkg_add, and PKG_PATH containing some URL.
- */
- (void) snprintf(buf, sizeof(buf), "nlist %s %s\n", pattern, tmpname);
- } else {
- /* replace possible version(wildcard) given with "-*".
- * we can't use the pkg wildcards here as dewey compare
- * and alternates won't be handled by ftp(1); sort
- * out later, using pmatch() */
- (void) snprintf(buf, sizeof(buf), "nlist %.*s*.t[bg]z %s\n",
- (int)(s-pattern), pattern, tmpname);
- }
-
- rc = ftp_cmd(buf, "\n(550|450|226).*\n"); /* catch errors */
- if (rc != 226) {
- if (Verbose)
- warnx("nlist failed!");
- unlink(tmpname); /* remove clutter */
- return NULL;
- }
-
- /* Sync - don't remove */
- rc = ftp_cmd("cd .\n", "\n(550|250|257).*\n");
- if (rc != 250) {
- warnx("chdir failed!");
- unlink(tmpname); /* remove clutter */
- return NULL;
- }
-
- best[0]='\0';
- if (access(tmpname, R_OK)==0) {
- int matches;
- FILE *f;
- char filename[MaxPathSize];
-
- f=fopen(tmpname, "r");
- if (f == NULL) {
- warn("fopen");
- unlink(tmpname); /* remove clutter */
- return NULL;
- }
- matches=0;
- /* The following loop is basically the same as the readdir() loop
- * in findmatchingname() */
- while (fgets(filename, sizeof(filename), f)) {
-
- /*
- * We need to strip off any .t[bg]z etc.
- * suffix here
- */
-
- char s_filename[MaxPathSize];
- char s_pattern[MaxPathSize];
-
- filename[strlen(filename)-1] = '\0';
-
- strip_txz(s_filename, NULL, filename);
- strip_txz(s_pattern, NULL, pattern);
-
- if (pmatch(s_pattern, s_filename)) {
- matches++;
-
- /* compare findbestmatchingname() */
- findbestmatchingname_fn(filename, best);
- }
- }
- (void) fclose(f);
-
- if (matches == 0 && Verbose)
- warnx("nothing appropriate found");
- }
-
- unlink(tmpname);
-
- if (best[0] == '\0')
- return NULL;
-
- return strdup(best);
-}
-
-/* for a given wildcard http:// URL, find the best matching pkg */
-static char *
-http_expand_URL(const char *base, char *pattern)
-{
- char best[MaxPathSize];
- char line[BUFSIZ];
- char filename[MaxPathSize];
- FILE *fp;
- int pipefds[2];
- int state;
- pid_t pid;
-
- *best = '\0';
-
- /* Set up a pipe for getting the file list */
- if (pipe(pipefds) == -1) {
- warnx("cannot create pipe");
- return NULL;
- }
- if ((pid = fork()) == -1) {
- warnx("cannot fork ftp process");
- return NULL;
- }
- if (pid == 0) { /* The child */
- if (dup2(pipefds[1], STDOUT_FILENO) == -1) {
- warnx("dup2 failed before starting ftp");
- _exit(2);
- }
- close(pipefds[0]);
- close(pipefds[1]);
- /* get URL contents to stdout and thus to parent,
- * silently */
- execlp("ftp", "ftp", "-V", "-o", "-", base, NULL);
- warnx("failed to execute ftp");
- _exit(2);
- }
-
- /* parent */
- close(pipefds[1]);
-
- if ((fp=fdopen(pipefds[0], "r")) == NULL)
- warn("can't fdopen pipe end");
- else {
- char s_pattern[MaxPathSize];
- int len, offset;
-
- /* strip of .t[bg]z for comparison */
- strip_txz(s_pattern, NULL, pattern);
-
- /* initialize http_extract_fn internal state */
- http_extract_fn(NULL, NULL, 0);
-
- /* read line from HTTP output and extract filenames */
- while (fgets(line, sizeof(line), fp) != NULL) {
- len = offset = 0;
- while ((len=http_extract_fn(line+offset, filename,
- sizeof(filename))) > 0) {
- char s_filename[MaxPathSize];
-
- offset += len;
- strip_txz(s_filename, NULL, filename);
-
- if (pmatch(s_pattern, s_filename)) {
- /* compare findbestmatchingname() */
- findbestmatchingname_fn(filename,
- best);
- }
- }
- }
-
- }
-
- fclose(fp);
-
- /* wait for child to exit */
- if (waitpid(pid, &state, 0) < 0) {
- /* error has been reported by child */
- return NULL;
- }
-
- if (best[0] == '\0') {
- if (Verbose)
- warnx("nothing appropriate found");
- return NULL;
- }
-
- return strdup(best);
-
-}
-
-enum http_states {
- ST_NONE,
- ST_LT, ST_LTA, ST_TAGA, ST_H, ST_R, ST_E, ST_F, ST_HREF,
- ST_TAG, ST_TAGAX
-};
-
-/* return any hrefs found */
-static int
-http_extract_fn(char *input, char *outbuf, size_t outbuflen)
-{
- /* partial copied hrefs from previous calls are saved here */
- static char tempbuf[MaxPathSize];
- /* fill state of tempbuf */
- static int tempbuffill = 0;
- /* parsing state information */
- static enum http_states state;
- /* currently in double quotes (in parsing) */
- static int dqflag;
- char p;
- int offset, found;
-
- if (outbuf == NULL) {
- /* init */
- dqflag = tempbuffill = 0;
- state = ST_NONE;
- return 0;
- }
-
- offset = 0;
- found = 0;
- while ((p=input[offset++]) != '\0') {
- /* handle anything that's inside double quotes */
- if (dqflag) {
- /* incomplete href */
- if (state == ST_HREF) {
- /* check if space left in output
- * buffer */
- if (tempbuffill >= sizeof(tempbuf)) {
- warnx("href starting with `%.*s'"
- " too long", 60, tempbuf);
- /* ignore remainder */
- tempbuffill = 0;
- /* need space before "href"
- * can start again (invalidly,
- * of course, but we don't
- * care) */
- state = ST_TAGAX;
- }
-
- /* href complete */
- if (p == '\"') {
- /* complete */
- dqflag = 0;
- tempbuf[tempbuffill++] = '\0';
- /* need space before "href"
- * can start again (invalidly,
- * of course, but we don't
- * care) */
- state = ST_TAGAX;
- found = 1;
- break;
- } else {
- /* copy one more char */
- tempbuf[tempbuffill++] = p;
- }
- } else {
- /* leaving double quotes */
- if (p == '\"')
- dqflag = 0;
- }
- continue;
- }
-
- /*
- * entering double quotes? (only relevant inside a tag)
- */
- if (state != ST_NONE && p == '\"') {
- dqflag = 1;
- continue;
- }
-
- /* other cases */
- switch (state) {
- case ST_NONE:
- /* plain text, not in markup */
- if (p == '<')
- state = ST_LT;
- break;
- case ST_LT:
- /* in tag -- "<" already found */
- if (p == '>')
- state = ST_NONE;
- else if (p == 'a' || p == 'A')
- state = ST_LTA;
- else if (!isspace((unsigned char)p))
- state = ST_TAG;
- break;
- case ST_LTA:
- /* in tag -- "<a" already found */
- if (p == '>')
- state = ST_NONE;
- else if (isspace((unsigned char)p))
- state = ST_TAGA;
- else
- state = ST_TAG;
- break;
- case ST_TAG:
- /* in tag, but not "<a" -- disregard */
- if (p == '>')
- state = ST_NONE;
- break;
- case ST_TAGA:
- /* in a-tag -- "<a " already found */
- if (p == '>')
- state = ST_NONE;
- else if (p == 'h' || p == 'H')
- state = ST_H;
- else if (!isspace((unsigned char)p))
- state = ST_TAGAX;
- break;
- case ST_TAGAX:
- /* in unknown keyword in a-tag */
- if (p == '>')
- state = ST_NONE;
- else if (isspace((unsigned char)p))
- state = ST_TAGA;
- break;
- case ST_H:
- /* in a-tag -- "<a h" already found */
- if (p == '>')
- state = ST_NONE;
- else if (p == 'r' || p == 'R')
- state = ST_R;
- else if (isspace((unsigned char)p))
- state = ST_TAGA;
- else
- state = ST_TAGAX;
- break;
- case ST_R:
- /* in a-tag -- "<a hr" already found */
- if (p == '>')
- state = ST_NONE;
- else if (p == 'e' || p == 'E')
- state = ST_E;
- else if (isspace((unsigned char)p))
- state = ST_TAGA;
- else
- state = ST_TAGAX;
- break;
- case ST_E:
- /* in a-tag -- "<a hre" already found */
- if (p == '>')
- state = ST_NONE;
- else if (p == 'f' || p == 'F')
- state = ST_F;
- else if (isspace((unsigned char)p))
- state = ST_TAGA;
- else
- state = ST_TAGAX;
- break;
- case ST_F:
- /* in a-tag -- "<a href" already found */
- if (p == '>')
- state = ST_NONE;
- else if (p == '=')
- state = ST_HREF;
- else if (!isspace((unsigned char)p))
- state = ST_TAGAX;
- break;
- case ST_HREF:
- /* in a-tag -- "<a href=" already found */
- /* XXX: handle missing double quotes? */
- if (p == '>')
- state = ST_NONE;
- /* skip spaces before URL */
- else if (!isspace((unsigned char)p))
- state = ST_TAGA;
- break;
- /* no default case by purpose */
- }
- }
-
- if (p == '\0')
- return -1;
-
- if (found) {
- char *q;
-
- URL_decode(tempbuf);
-
- /* strip path (XXX) */
- if ((q=strrchr(tempbuf, '/')) == NULL)
- q = tempbuf;
-
- (void)strlcpy(outbuf, q, outbuflen);
- tempbuffill = 0;
- }
-
- return offset;
-}
-
-
-static int
-hexvalue(char p)
-{
- if (p >= '0' && p <= '9')
- return (p-'0');
- else if (p >= 'a' && p <= 'f')
- return (p-'a'+10);
- else if (p >= 'A' && p <= 'F')
- return (p-'A'+10);
- else
- return -1;
-}
-
-/* fetch and extract URL url into directory path */
-static int
-http_fetch(const char *url, const char *path)
-{
- int pipefds[2];
- int stateftp, state;
- pid_t pidftp, pid;
-
- /* Set up a pipe for passing the fetched contents. */
- if (pipe(pipefds) == -1) {
- warn("cannot create pipe");
- return -1;
- }
- /* fork ftp child */
- if ((pidftp = fork()) == -1) {
- warn("cannot fork process for ftp");
- return -1;
- }
- if (pidftp == 0) {
- /* child */
- if (dup2(pipefds[1], STDOUT_FILENO) == -1) {
- warn("dup2 failed before executing ftp");
- _exit(2);
- }
- close(pipefds[0]);
- close(pipefds[1]);
- execlp(FTP_CMD, FTP_CMD, "-o", "-", url, NULL);
- warnx("failed to execute ftp");
- _exit(2);
- }
-
- /* fork unpack child */
- if ((pid = fork()) == -1) {
- warn("cannot fork unpack process");
- return -1;
- }
- if (pid == 0) {
- /* child */
- if (dup2(pipefds[0], STDIN_FILENO) == -1) {
- warn("dup2 failed before unpack");
- _exit(2);
- }
- close(pipefds[0]);
- close(pipefds[1]);
- if ((path != NULL) && (chdir(path) < 0))
- _exit(127);
-
- if (unpack("-", NULL) != 0) {
- warnx("unpack failed");
- _exit(2);
- }
-
- _exit(0);
- }
-
- close(pipefds[0]);
- close(pipefds[1]);
-
- /* wait for unpack to exit */
- while (waitpid(pid, &state, 0) < 0) {
- if (errno != EINTR) {
- (void)waitpid(pidftp, &stateftp, 0);
- return -1;
- }
- }
- while (waitpid(pidftp, &stateftp, 0) < 0) {
- if (errno != EINTR) {
- return -1;
- }
- }
-
- if (!WIFEXITED(state) || !WIFEXITED(stateftp))
- return -1;
-
- if (WEXITSTATUS(state) != 0 || WEXITSTATUS(stateftp) != 0)
- return -1;
-
- return 0;
-}
-
-static void
-URL_decode(char *URL)
-{
- char *in, *out;
-
- in = out = URL;
-
- while (*in != '\0') {
- if (in[0] == '%' && in[1] != '\0' && in[2] != '\0') {
- /* URL-decode character */
- if (hexvalue(in[1]) != -1 && hexvalue(in[2]) != -1) {
- *out++ = hexvalue(in[1])*16+hexvalue(in[2]);
- }
- /* skip invalid encoded signs too */
- in += 3;
- }
- else
- *out++ = *in++;
- }
-
- *out = '\0';
-
- return;
-}
-/*
- * extract the given (expanded) URL "url" to the given directory "dir"
- * return -1 on error, 0 else;
- */
-int
-unpackURL(const char *url, const char *dir)
-{
- char *pkg;
- int rc;
- char base[MaxPathSize];
- char pkg_path[MaxPathSize];
-
- {
- /* Verify if the URL is really ok */
- char expnd[MaxPathSize];
-
- rc=expandURL(expnd, url);
- if (rc == -1) {
- warnx("unpackURL: verification expandURL failed");
- return -1;
- }
- if (strcmp(expnd, url) != 0) {
- warnx("unpackURL: verification expandURL failed, '%s'!='%s'",
- expnd, url);
- return -1;
- }
- }
-
- pkg=strrchr(url, '/');
- if (pkg == NULL){
- warnx("unpackURL: no '/' in URL %s?!", url);
- return -1;
- }
- (void) snprintf(base, sizeof(base), "%.*s/", (int)(pkg-url), url);
- (void) snprintf(pkg_path, sizeof(pkg_path), "%.*s",
- (int)(pkg-url), url); /* no trailing '/' */
- pkg++;
-
- /* Leave a hint for any depending pkgs that may need it */
- if (getenv("PKG_PATH") == NULL) {
- setenv("PKG_PATH", pkg_path, 1);
-#if 0
- path_create(pkg_path); /* XXX */
-#endif
- if (Verbose)
- printf("setenv PKG_PATH='%s'\n", pkg_path);
- }
-
- if (strncmp(url, "http://", 7) == 0)
- return http_fetch(url, dir);
-
- rc = ftp_start(base);
- if (rc == -1) {
- warnx("ftp_start() failed");
- return -1; /* error */
- }
-
- {
- char cmd[1024];
- const char *decompress_cmd = NULL;
- const char *suf;
-
- if (Verbose)
- printf("unpackURL '%s' to '%s'\n", url, dir);
-
- suf = suffix_of(pkg);
- if (!strcmp(suf, "tbz") || !strcmp(suf, "bz2"))
- decompress_cmd = BZIP2_CMD;
- else if (!strcmp(suf, "tgz") || !strcmp(suf, "gz"))
- decompress_cmd = GZIP_CMD;
- else if (!strcmp(suf, "tar"))
- ; /* do nothing */
- else
- errx(EXIT_FAILURE, "don't know how to decompress %s, sorry", pkg);
-
- /* yes, this is gross, but needed for borken ftp(1) */
- (void) snprintf(cmd, sizeof(cmd), "get %s \"| ( cd %s; " TAR_CMD " %s %s -vvxp -f - | tee %s )\"\n",
- pkg, dir,
- decompress_cmd != NULL ? "--use-compress-program" : "",
- decompress_cmd != NULL ? decompress_cmd : "",
- Verbose ? "/dev/stderr" : "/dev/null");
-
- rc = ftp_cmd(cmd, "\n(226|550).*\n");
- if (rc != 226) {
- warnx("Cannot fetch file (%d!=226)!", rc);
- return -1;
- }
- }
-
- return 0;
-}
-
-
-#ifdef STANDALONE
-static void
-usage(void)
-{
- errx(EXIT_FAILURE, "Usage: foo [-v] ftp://-pattern");
-}
-
-
-int
-main(int argc, char *argv[])
-{
- int rc, ch;
- char *argv0 = argv[0];
-
- while ((ch = getopt(argc, argv, "v")) != -1) {
- switch (ch) {
- case 'v':
- Verbose=1;
- break;
- default:
- usage();
- }
- }
- argc -= optind;
- argv += optind;
-
- if (argc<1)
- usage();
-
- while(argv[0] != NULL) {
- char newurl[MaxPathSize];
-
- printf("Expand %s:\n", argv[0]);
- rc = expandURL(newurl, argv[0]);
- if (rc==-1)
- warnx("Cannot expand %s", argv[0]);
- else
- printf("Expanded URL: %s\n", newurl);
-
- /* test out connection caching */
- if (1) {
- char *s, buf[MaxPathSize];
-
- if ((s=getenv(PKG_FTPIO_CNT)) && atoi(s)>0){
- (void) snprintf(buf, sizeof(buf),"%d", atoi(s)-1);
- setenv(PKG_FTPIO_CNT, buf, 1);
-
- printf("%s>>> %s -v %s\n", s, argv0, argv[0]);
- fexec(argv0, "-v", argv[0], NULL);
- }
- }
-
- printf("\n\n\n");
- argv++;
- }
-
- ftp_stop();
-
- return 0;
-}
-
-void
-cleanup(int i)
-{
-}
-#endif /* STANDALONE */
diff --git a/pkgtools/pkg_install/files/lib/global.c b/pkgtools/pkg_install/files/lib/global.c
deleted file mode 100644
index e76cc3c160b..00000000000
--- a/pkgtools/pkg_install/files/lib/global.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* $NetBSD: global.c,v 1.4 2003/09/23 07:13:53 grant Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: global.c,v 1.6 1997/10/08 07:47:58 charnier Exp";
-#else
-__RCSID("$NetBSD: global.c,v 1.4 2003/09/23 07:13:53 grant Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
-
- * 18 July 1993
- *
- * Semi-convenient place to stick some needed globals.
- *
- */
-
-#include "lib.h"
-
-/* These are global for all utils */
-Boolean Verbose = FALSE;
-Boolean Fake = FALSE;
-Boolean Force = FALSE;
diff --git a/pkgtools/pkg_install/files/lib/lib.h b/pkgtools/pkg_install/files/lib/lib.h
deleted file mode 100644
index 6d572f1d624..00000000000
--- a/pkgtools/pkg_install/files/lib/lib.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/* $NetBSD: lib.h,v 1.24 2006/04/24 13:52:05 dillo Exp $ */
-
-/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Include and define various things wanted by the library routines.
- *
- */
-
-#ifndef _INST_LIB_LIB_H_
-#define _INST_LIB_LIB_H_
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#if HAVE_SYS_FILE_H
-#include <sys/file.h>
-#endif
-#if HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-
-#if HAVE_CTYPE_H
-#include <ctype.h>
-#endif
-#if HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "path.h"
-
-/* Macros */
-#define SUCCESS (0)
-#define FAIL (-1)
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-#ifndef OPSYS_NAME
-#define OPSYS_NAME "NetBSD"
-#endif
-
-#ifndef DEF_UMASK
-#define DEF_UMASK 022
-#endif
-
-/* Usually "rm", but often "echo" during debugging! */
-#define REMOVE_CMD "rm"
-
-/* Usually "rm", but often "echo" during debugging! */
-#define RMDIR_CMD "rmdir"
-
-/* Define tar as a string, in case it's called gtar or something */
-#ifndef TAR_CMD
-#define TAR_CMD "tar"
-#endif
-
-/* Define pax as a string, used to copy files from staging area */
-#ifndef PAX_CMD
-#define PAX_CMD "pax"
-#endif
-
-/* Define gzip and bzip2, used to unpack binary packages */
-#ifndef GZIP_CMD
-#define GZIP_CMD "gzip"
-#endif
-
-#ifndef BZIP2_CMD
-#define BZIP2_CMD "bzip2"
-#endif
-
-/* Define ftp as a string, in case the ftp client is called something else */
-#ifndef FTP_CMD
-#define FTP_CMD "ftp"
-#endif
-
-#ifndef CHOWN_CMD
-#define CHOWN_CMD "chown"
-#endif
-
-#ifndef CHMOD_CMD
-#define CHMOD_CMD "chmod"
-#endif
-
-#ifndef CHGRP_CMD
-#define CHGRP_CMD "chgrp"
-#endif
-
-#ifndef MTREE_CMD
-# ifdef BINDIR
-# define MTREE_CMD BINDIR "/mtree"
-# else
-# define MTREE_CMD "mtree"
-# endif
-#endif
-
-/* some operating systems don't have this */
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
-
-enum {
- MaxPathSize = MAXPATHLEN
-};
-
-/* The names of our "special" files */
-#define CONTENTS_FNAME "+CONTENTS"
-#define COMMENT_FNAME "+COMMENT"
-#define DESC_FNAME "+DESC"
-#define INSTALL_FNAME "+INSTALL"
-#define DEINSTALL_FNAME "+DEINSTALL"
-#define REQUIRE_FNAME "+REQUIRE"
-#define REQUIRED_BY_FNAME "+REQUIRED_BY"
-#define DISPLAY_FNAME "+DISPLAY"
-#define MTREE_FNAME "+MTREE_DIRS"
-#define BUILD_VERSION_FNAME "+BUILD_VERSION"
-#define BUILD_INFO_FNAME "+BUILD_INFO"
-#define INSTALLED_INFO_FNAME "+INSTALLED_INFO"
-#define SIZE_PKG_FNAME "+SIZE_PKG"
-#define SIZE_ALL_FNAME "+SIZE_ALL"
-#define PRESERVE_FNAME "+PRESERVE"
-#define VIEWS_FNAME "+VIEWS"
-#define DEPOT_FNAME "+DEPOT"
-
-/* The names of special variables */
-#define AUTOMATIC_VARNAME "automatic"
-
-/*
- * files which we expect to be in every package, passed to
- * tar --fast-read.
- */
-#define ALL_FNAMES CONTENTS_FNAME" "COMMENT_FNAME" "DESC_FNAME" "MTREE_FNAME" "BUILD_VERSION_FNAME" "BUILD_INFO_FNAME" "SIZE_PKG_FNAME" "SIZE_ALL_FNAME
-
-#define CMD_CHAR '@' /* prefix for extended PLIST cmd */
-
-/* The name of the "prefix" environment variable given to scripts */
-#define PKG_PREFIX_VNAME "PKG_PREFIX"
-
-/*
- * The name of the "metadatadir" environment variable given to scripts.
- * This variable holds the location of the +-files for this package.
- */
-#define PKG_METADATA_DIR_VNAME "PKG_METADATA_DIR"
-
-/*
- * The name of the environment variable holding the location to the
- * reference-counts database directory.
- */
-#define PKG_REFCOUNT_DBDIR_VNAME "PKG_REFCOUNT_DBDIR"
-
-#define PKG_PATTERN_MAX MaxPathSize /* max length of pattern, including nul */
-#define PKG_SUFFIX_MAX 10 /* max length of suffix, including nul */
-
-enum {
- ReadWrite,
- ReadOnly
-};
-
-
-/* Enumerated constants for plist entry types */
-typedef enum pl_ent_t {
- PLIST_SHOW_ALL = -1,
- PLIST_FILE, /* 0 */
- PLIST_CWD, /* 1 */
- PLIST_CMD, /* 2 */
- PLIST_CHMOD, /* 3 */
- PLIST_CHOWN, /* 4 */
- PLIST_CHGRP, /* 5 */
- PLIST_COMMENT, /* 6 */
- PLIST_IGNORE, /* 7 */
- PLIST_NAME, /* 8 */
- PLIST_UNEXEC, /* 9 */
- PLIST_SRC, /* 10 */
- PLIST_DISPLAY, /* 11 */
- PLIST_PKGDEP, /* 12 */
- PLIST_MTREE, /* 13 */
- PLIST_DIR_RM, /* 14 */
- PLIST_IGNORE_INST, /* 15 */
- PLIST_OPTION, /* 16 */
- PLIST_PKGCFL, /* 17 */
- PLIST_BLDDEP /* 18 */
-} pl_ent_t;
-
-/* Enumerated constants for build info */
-typedef enum bi_ent_t {
- BI_OPSYS, /* 0 */
- BI_OS_VERSION, /* 1 */
- BI_MACHINE_ARCH, /* 2 */
- BI_IGNORE_RECOMMENDED, /* 3 */
- BI_USE_ABI_DEPENDS, /* 4 */
- BI_ENUM_COUNT /* 5 */
-} bi_ent_t;
-
-/* Types */
-typedef unsigned int Boolean;
-
-/* This structure describes a packing list entry */
-typedef struct plist_t {
- struct plist_t *prev; /* previous entry */
- struct plist_t *next; /* next entry */
- char *name; /* name of entry */
- Boolean marked; /* whether entry has been marked */
- pl_ent_t type; /* type of entry */
-} plist_t;
-
-/* This structure describes a package's complete packing list */
-typedef struct package_t {
- plist_t *head; /* head of list */
- plist_t *tail; /* tail of list */
-} package_t;
-
-#define SYMLINK_HEADER "Symlink:"
-#define CHECKSUM_HEADER "MD5:"
-
-enum {
- ChecksumHeaderLen = 4, /* strlen(CHECKSUM_HEADER) */
- SymlinkHeaderLen = 8, /* strlen(SYMLINK_HEADER) */
- ChecksumLen = 16,
- LegibleChecksumLen = 33
-};
-
-/* List of files */
-typedef struct _lfile_t {
- TAILQ_ENTRY(_lfile_t) lf_link;
- char *lf_name;
-} lfile_t;
-TAILQ_HEAD(_lfile_head_t, _lfile_t);
-typedef struct _lfile_head_t lfile_head_t;
-#define LFILE_ADD(lfhead,lfp,str) do { \
- lfp = malloc(sizeof(lfile_t)); \
- lfp->lf_name = str; \
- TAILQ_INSERT_TAIL(lfhead,lfp,lf_link); \
- } while(0)
-
-/* List of packages */
-typedef struct _lpkg_t {
- TAILQ_ENTRY(_lpkg_t) lp_link;
- char *lp_name;
-} lpkg_t;
-TAILQ_HEAD(_lpkg_head_t, _lpkg_t);
-typedef struct _lpkg_head_t lpkg_head_t;
-
-/* Type of function to be handed to findmatchingname; return value of this
- * is currently ignored */
-typedef int (*matchfn) (const char *, void *);
-
-/* This structure describes a pipe to a child process */
-typedef struct {
- int fds[2]; /* pipe, 0=child stdin, 1=parent output */
- FILE *fp; /* output from parent process */
- pid_t pid; /* process id of child process */
- void (*cleanup)(void); /* called on non-zero child exit status */
-} pipe_to_system_t;
-
-/* If URLlength()>0, then there is a ftp:// or http:// in the string,
- * and this must be an URL. Hide this behind a more obvious name. */
-#define IS_URL(str) (URLlength(str) > 0)
-
-#define IS_STDIN(str) ((str) != NULL && !strcmp((str), "-"))
-#define IS_FULLPATH(str) ((str) != NULL && (str)[0] == '/')
-
-/* Prototypes */
-/* Misc */
-void cleanup(int);
-char *make_playpen(char *, size_t, size_t);
-char *where_playpen(void);
-void leave_playpen(char *);
-uint64_t min_free(char *);
-void save_dirs(char **, char **);
-void restore_dirs(char *, char *);
-void show_version(void);
-int fexec(const char *, ...);
-int fexec_skipempty(const char *, ...);
-int fcexec(const char *, const char *, ...);
-int pfcexec(const char *, const char *, const char **);
-pipe_to_system_t *pipe_to_system_begin(const char *, char *const *, void (*)(void));
-int pipe_to_system_end(pipe_to_system_t *);
-
-/* variables file handling */
-
-char *var_get(const char *, const char *);
-int var_set(const char *, const char *, const char *);
-int var_copy_list(const char *, const char **);
-
-/* automatically installed as dependency */
-
-Boolean is_automatic_installed(const char *);
-int mark_as_automatic_installed(const char *, int);
-
-/* String */
-char *get_dash_string(char **);
-void str_lowercase(unsigned char *);
-const char *basename_of(const char *);
-const char *dirname_of(const char *);
-const char *suffix_of(const char *);
-int pmatch(const char *, const char *);
-int findmatchingname(const char *, const char *, matchfn, void *); /* doesn't really belong to "strings" */
-char *findbestmatchingname(const char *, const char *); /* neither */
-int ispkgpattern(const char *);
-void strip_txz(char *, char *, const char *);
-
-/* callback functions for findmatchingname */
-int findbestmatchingname_fn(const char *, void *); /* neither */
-int note_whats_installed(const char *, void *);
-int add_to_list_fn(const char *, void *);
-
-
-/* File */
-Boolean fexists(const char *);
-Boolean isdir(const char *);
-Boolean islinktodir(const char *);
-Boolean isemptydir(const char *);
-Boolean isemptyfile(const char *);
-Boolean isfile(const char *);
-Boolean isempty(const char *);
-int URLlength(const char *);
-char *fileGetURL(const char *);
-const char *fileURLFilename(const char *, char *, int);
-const char *fileURLHost(const char *, char *, int);
-char *fileFindByPath(const char *);
-char *fileGetContents(char *);
-Boolean make_preserve_name(char *, size_t, char *, char *);
-void write_file(char *, char *);
-void copy_file(char *, char *, char *);
-void move_file(char *, char *, char *);
-void move_files(const char *, const char *, const char *);
-void remove_files(const char *, const char *);
-int delete_hierarchy(char *, Boolean, Boolean);
-int unpack(const char *, const lfile_head_t *);
-void format_cmd(char *, size_t, char *, char *, char *);
-
-/* ftpio.c: FTP handling */
-int expandURL(char *, const char *);
-int unpackURL(const char *, const char *);
-int ftp_cmd(const char *, const char *);
-int ftp_start(const char *);
-void ftp_stop(void);
-
-/* Packing list */
-plist_t *new_plist_entry(void);
-plist_t *last_plist(package_t *);
-plist_t *find_plist(package_t *, pl_ent_t);
-char *find_plist_option(package_t *, char *);
-void plist_delete(package_t *, Boolean, pl_ent_t, char *);
-void free_plist(package_t *);
-void mark_plist(package_t *);
-void csum_plist_entry(char *, plist_t *);
-void add_plist(package_t *, pl_ent_t, const char *);
-void add_plist_top(package_t *, pl_ent_t, const char *);
-void delete_plist(package_t *, Boolean, pl_ent_t, char *);
-void write_plist(package_t *, FILE *, char *);
-void read_plist(package_t *, FILE *);
-int plist_cmd(unsigned char *, char **);
-int delete_package(Boolean, Boolean, package_t *, Boolean);
-
-/* Package Database */
-int pkgdb_open(int);
-void pkgdb_close(void);
-int pkgdb_store(const char *, const char *);
-char *pkgdb_retrieve(const char *);
-void pkgdb_dump(void);
-int pkgdb_remove(const char *);
-int pkgdb_remove_pkg(const char *);
-char *pkgdb_refcount_dir(void);
-char *_pkgdb_getPKGDB_FILE(char *, unsigned);
-char *_pkgdb_getPKGDB_DIR(void);
-void _pkgdb_setPKGDB_DIR(const char *);
-
-/* List of packages functions */
-lpkg_t *alloc_lpkg(const char *);
-lpkg_t *find_on_queue(lpkg_head_t *, const char *);
-void free_lpkg(lpkg_t *);
-
-/* For all */
-int pkg_perform(lpkg_head_t *);
-
-/* Externs */
-extern Boolean Verbose;
-extern Boolean Fake;
-extern Boolean Force;
-
-#endif /* _INST_LIB_LIB_H_ */
diff --git a/pkgtools/pkg_install/files/lib/lpkg.c b/pkgtools/pkg_install/files/lib/lpkg.c
deleted file mode 100644
index 58325d03568..00000000000
--- a/pkgtools/pkg_install/files/lib/lpkg.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $NetBSD: lpkg.c,v 1.5 2003/09/23 07:13:53 grant Exp $ */
-
-/*
- * Copyright (c) 1999 Christian E. Hopps
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Package-list auxiliary functions
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#include "lib.h"
-
-/*
- * Add a package to the (add/recursive delete) list
- */
-lpkg_t *
-alloc_lpkg(const char *pkgname)
-{
- lpkg_t *lpp;
-
- if ((lpp = malloc(sizeof(*lpp))) == 0)
- err(EXIT_FAILURE, "cannot allocate recursion data");
- if ((lpp->lp_name = strdup(pkgname)) == 0)
- err(EXIT_FAILURE, "cannot allocate recursion data");
- return (lpp);
-}
-
-void
-free_lpkg(lpkg_t *lpp)
-{
- free(lpp->lp_name);
- free(lpp);
-}
-
-lpkg_t *
-find_on_queue(lpkg_head_t *qp, const char *name)
-{
- lpkg_t *lpp;
-
- for (lpp = TAILQ_FIRST(qp); lpp; lpp = TAILQ_NEXT(lpp, lp_link))
- if (!strcmp(name, lpp->lp_name))
- return (lpp);
- return (0);
-}
diff --git a/pkgtools/pkg_install/files/lib/path.c b/pkgtools/pkg_install/files/lib/path.c
deleted file mode 100644
index 5ef484ebffd..00000000000
--- a/pkgtools/pkg_install/files/lib/path.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/* $NetBSD: path.c,v 1.6 2004/12/29 12:16:56 agc Exp $ */
-
-/*-
- * Copyright (c)2002 YAMAMOTO Takashi,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: path.c,v 1.6 2004/12/29 12:16:56 agc Exp $");
-#endif
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-
-#include "lib.h"
-
-struct pathhead PkgPath = TAILQ_HEAD_INITIALIZER(PkgPath);
-static struct path *prepend = 0;
-
-static struct path *path_new_entry(const char *cp, size_t len);
-
-/*
- * path_create: make PkgPath from a given string.
- *
- * => relative pathes are resolved to absolute ones.
- * => if NULL is passed, use "." instead. XXX
- */
-void
-path_create(const char *path)
-{
- const char *cp;
- size_t len;
-
- path_free();
-
- if (path == NULL) {
- path = "."; /* XXX */
- }
-
- if (Verbose)
- printf("parsing: %s\n", path);
-
- cp = path;
- while (*cp) {
- len = strcspn(cp, ";");
- if (len > 0) {
- /* add a new path */
- struct path *new;
-
- new = path_new_entry(cp, len);
- if (Verbose)
- printf("path: %s\n", new->pl_path);
- TAILQ_INSERT_TAIL(&PkgPath, new, pl_entry);
- }
-
- cp += len;
- if (*cp == '\0')
- break;
- cp++;
- }
-}
-
-/*
- * path_free: free PkgPath.
- */
-void
-path_free()
-{
- struct path *p;
-
- while ((p = TAILQ_FIRST(&PkgPath)) != NULL) {
- TAILQ_REMOVE(&PkgPath, p, pl_entry);
- free(p->pl_path);
- free(p);
- }
-}
-
-/*
- * path_new_entry: Generate a new 'struct path' entry to be included in
- * 'PkgPath' using the first 'len' characters of 'cp'.
- */
-static struct path *
-path_new_entry(const char *cp, size_t len)
-{
- struct path *new;
-
- new = malloc(sizeof(*new));
- if (new == NULL)
- err(EXIT_FAILURE, "path_create");
-
- if (!IS_FULLPATH(cp) && !IS_URL(cp)) {
- /* this is a relative path */
- size_t total;
- char cwd[MaxPathSize];
- size_t cwdlen;
-
- if (getcwd(cwd, sizeof(cwd)) == NULL)
- err(EXIT_FAILURE, "getcwd");
- cwdlen = strlen(cwd);
- total = cwdlen + 1 + len + 1;
- new->pl_path = malloc(total);
- if (new->pl_path == NULL)
- err(EXIT_FAILURE, "path_create");
- snprintf(new->pl_path, total, "%s/%*.*s", cwd, (int)len, (int)len, cp);
- }
- else {
- new->pl_path = malloc(len + 1);
- if (new->pl_path == NULL)
- err(EXIT_FAILURE, "path_create");
- memcpy(new->pl_path, cp, len);
- new->pl_path[len] = '\0';
- }
- return new;
-}
-
-/*
- * path_prepend_from_pkgname: prepend the path for a package onto 'PkgPath'
- */
-void
-path_prepend_from_pkgname(const char *pkgname)
-{
- char *ptr;
- if ((ptr = strrchr(pkgname , '/'))) {
- prepend = path_new_entry(pkgname, ptr - pkgname);
- TAILQ_INSERT_HEAD(&PkgPath, prepend, pl_entry);
- }
-}
-
-/*
- * path_prepend_clear: Remove any prepended entry from 'PkgPath'
- */
-void
-path_prepend_clear()
-{
- if (prepend) {
- TAILQ_REMOVE(&PkgPath, prepend, pl_entry);
- prepend = 0;
- }
-}
-
-/*
- * path_setenv: construct string from PkgPath and set it to a environment.
- *
- * => the environment name is given by envname.
- */
-void
-path_setenv(const char *envname)
-{
- struct path *p;
- ssize_t len = 0;
- char *env, *env0, *envend;
- char *sep;
-
- TAILQ_FOREACH(p, &PkgPath, pl_entry)
- len += strlen(p->pl_path) + 1;
-
- env = malloc(len);
- if (env == NULL)
- err(EXIT_FAILURE, "path_setenv");
-
- env0 = env;
- envend = env + len;
- sep = "";
- TAILQ_FOREACH(p, &PkgPath, pl_entry) {
- int r;
-
- r = snprintf(env, envend - env, "%s%s", sep, p->pl_path);
- if (r < 0 || r >= envend - env)
- err(EXIT_FAILURE, "snprintf");
- env += r;
- sep = ";";
- }
-
- if (Verbose)
- printf("%s = %s\n", envname, env0);
- if (setenv(envname, env0, 1) != 0)
- err(EXIT_FAILURE, "setenv");
- free(env0);
-}
diff --git a/pkgtools/pkg_install/files/lib/path.h b/pkgtools/pkg_install/files/lib/path.h
deleted file mode 100644
index 946eeae378b..00000000000
--- a/pkgtools/pkg_install/files/lib/path.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $NetBSD: path.h,v 1.3 2003/09/23 07:13:53 grant Exp $ */
-
-/*-
- * Copyright (c)2002 YAMAMOTO Takashi,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-struct path {
- TAILQ_ENTRY(path) pl_entry;
- char *pl_path;
-};
-
-TAILQ_HEAD(pathhead, path);
-extern struct pathhead PkgPath;
-void path_create(const char *);
-void path_free(void);
-void path_prepend_from_pkgname(const char *);
-void path_prepend_clear(void);
-void path_setenv(const char *);
diff --git a/pkgtools/pkg_install/files/lib/pen.c b/pkgtools/pkg_install/files/lib/pen.c
deleted file mode 100644
index 87853083702..00000000000
--- a/pkgtools/pkg_install/files/lib/pen.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* $NetBSD: pen.c,v 1.19 2006/04/04 06:34:25 wiz Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: pen.c,v 1.25 1997/10/08 07:48:12 charnier Exp";
-#else
-__RCSID("$NetBSD: pen.c,v 1.19 2006/04/04 06:34:25 wiz Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Routines for managing the "play pen".
- *
- */
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#include "lib.h"
-#if HAVE_SYS_SIGNAL_H
-#include <sys/signal.h>
-#endif
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#if HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-
-/* For keeping track of where we are */
-static char Current[MaxPathSize];
-static char Previous[MaxPathSize];
-static int CurrentSet; /* rm -fr Current only if it's really set! */
- /* CurrentSet is set to 0 before strcpy()s
- * to prevent rm'ing of a partial string
- * when interrupted by ^C */
-
-#if 0
-/*
- * Backup Current and Previous into temp. strings that are later
- * restored & freed by restore_dirs
- * This is to make nested calls to make_playpen/leave_playpen work
- */
-void
-save_dirs(char **c, char **p)
-{
- *c = strdup(Current); /* XXX */
- *p = strdup(Previous);
-}
-
-/*
- * Restore Current and Previous from temp strings that were created
- * by safe_dirs.
- * This is to make nested calls to make_playpen/leave_playpen work
- */
-void
-restore_dirs(char *c, char *p)
-{
- CurrentSet = 0; /* prevent from deleting */
- strlcpy(Current, c, sizeof(Current));
- CurrentSet = 1; /* rm -fr Current is safe now */
- free(c);
-
- strlcpy(Previous, p, sizeof(Previous));
- free(p);
-}
-#endif
-
-char *
-where_playpen(void)
-{
- return Current;
-}
-
-/*
- * Find a good place to play.
- */
-static char *
-find_play_pen(char *pen, size_t pensize, size_t sz)
-{
- char *cp;
- struct stat sb;
-
- if (pen == NULL) {
- cleanup(0);
- errx(2,
- "find_play_pen(): 'pen' variable is NULL\n"
- "(this should not happen, please report!");
- return NULL;
- }
-
- if (pen[0] && stat(pen, &sb) != FAIL && (min_free(pen) >= sz))
- return pen;
- else if ((cp = getenv("PKG_TMPDIR")) != NULL && stat(cp, &sb) != FAIL && (min_free(cp) >= sz))
- (void) snprintf(pen, pensize, "%s/instmp.XXXXXX", cp);
- else if ((cp = getenv("TMPDIR")) != NULL && stat(cp, &sb) != FAIL && (min_free(cp) >= sz))
- (void) snprintf(pen, pensize, "%s/instmp.XXXXXX", cp);
- else if (stat("/var/tmp", &sb) != FAIL && min_free("/var/tmp") >= sz)
- strlcpy(pen, "/var/tmp/instmp.XXXXXX", pensize);
- else if (stat("/tmp", &sb) != FAIL && min_free("/tmp") >= sz)
- strlcpy(pen, "/tmp/instmp.XXXXXX", pensize);
- else if (stat("/usr/tmp", &sb) != FAIL && min_free("/usr/tmp") >= sz)
- strlcpy(pen, "/usr/tmp/instmp.XXXXXX", pensize);
- else {
- cleanup(0);
- errx(2,
- "can't find enough temporary space to extract the files, please set your\n"
- "PKG_TMPDIR environment variable to a location with at least %lu bytes\n"
- "free", (u_long) sz);
- return NULL;
- }
- return pen;
-}
-
-/*
- * Make a temporary directory to play in and chdir() to it, returning
- * pathname of previous working directory.
- */
-char *
-make_playpen(char *pen, size_t pensize, size_t sz)
-{
- if (!find_play_pen(pen, pensize, sz))
- return NULL;
-
- if (!mkdtemp(pen)) {
- cleanup(0);
- errx(2, "can't mkdtemp '%s'", pen);
- }
- if (Verbose) {
- if (sz)
- fprintf(stderr,
- "Requested space: %lu bytes, free space: %lld bytes in %s\n",
- (u_long) sz, (long long) min_free(pen), pen);
- }
- if (min_free(pen) < sz) {
- rmdir(pen);
- cleanup(0);
- errx(2, "not enough free space to create '%s'.\n"
- "Please set your PKG_TMPDIR environment variable to a location\n"
- "with more space and\ntry the command again", pen);
- }
- if (Current[0])
- strlcpy(Previous, Current, sizeof(Previous));
- else if (!getcwd(Previous, MaxPathSize)) {
- cleanup(0);
- err(EXIT_FAILURE, "fatal error during execution: getcwd");
- }
- if (chdir(pen) == FAIL) {
- cleanup(0);
- errx(2, "can't chdir to '%s'", pen);
- }
- CurrentSet = 0; strlcpy(Current, pen, sizeof(Current)); CurrentSet = 1;
-
- return Previous;
-}
-
-/*
- * Convenience routine for getting out of playpen
- */
-void
-leave_playpen(char *save)
-{
- void (*oldsig) (int);
-
- /* Make us interruptable while we're cleaning up - just in case... */
- oldsig = signal(SIGINT, SIG_DFL);
- if (Previous[0] && chdir(Previous) == FAIL) {
- cleanup(0);
- errx(2, "can't chdir back to '%s'", Previous);
- } else if (CurrentSet && Current[0] && strcmp(Current, Previous)) {
- if (strcmp(Current, "/") == 0) {
- fprintf(stderr, "PANIC: About to rm -fr / (not doing so, aborting)\n");
- abort();
- }
- if (fexec("rm", "-fr", Current, NULL))
- warnx("couldn't remove temporary dir '%s'", Current);
- strlcpy(Current, Previous, sizeof(Current));
- }
- if (save)
- strlcpy(Previous, save, sizeof(Previous));
- else
- Previous[0] = '\0';
- signal(SIGINT, oldsig);
-}
-
-/*
- * Return free disk space (in bytes) on given file system.
- * Returns size in a uint64_t since off_t isn't 64 bits on all
- * operating systems.
- */
-uint64_t
-min_free(char *tmpdir)
-{
- struct statvfs buf;
-
- if (statvfs(tmpdir, &buf) != 0) {
- warn("statvfs");
- return 0;
- }
- return (uint64_t)buf.f_bavail * buf.f_bsize;
-}
diff --git a/pkgtools/pkg_install/files/lib/pexec.c b/pkgtools/pkg_install/files/lib/pexec.c
deleted file mode 100644
index b5b3019ac65..00000000000
--- a/pkgtools/pkg_install/files/lib/pexec.c
+++ /dev/null
@@ -1,109 +0,0 @@
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#include "lib.h"
-
-/*
- * If the supplied callback is not NULL, then call it.
- */
-static void call_callback(void (*callback)(void))
-{
- if (callback != NULL) {
- callback();
- }
-}
-
-/*
- * create pipe, fork and exec file with arguments in argv
- * child takes stdin from pipe, set up fp for parent to
- * output to pipe, and return this information.
- */
-pipe_to_system_t *pipe_to_system_begin(const char *file, char *const argv[],
- void (*cleanup_callback)(void))
-{
- pipe_to_system_t *retval;
-
- retval = malloc(sizeof(pipe_to_system_t));
- if (retval == NULL) {
- call_callback(cleanup_callback);
- errx(2, "can't get pipe space");
- }
-
- retval->cleanup = cleanup_callback;
-
- if (pipe(retval->fds) == -1) {
- call_callback(retval->cleanup);
- errx(2, "cannot create pipe");
- }
-
- retval->pid = fork();
- if (retval->pid == -1) {
- call_callback(retval->cleanup);
- errx(2, "cannot fork process for %s", file);
- }
-
- if (retval->pid == 0) { /* The child */
- if (retval->fds[0] != 0) {
- dup2(retval->fds[0], 0);
- close(retval->fds[0]);
- }
- close(retval->fds[1]);
- execvp(file, argv);
- warn("failed to execute %s command", file);
- _exit(2);
- }
-
- /* Meanwhile, back in the parent process ... */
- close(retval->fds[0]);
- retval->fp = fdopen(retval->fds[1], "w");
- if (retval->fp == NULL) {
- call_callback(retval->cleanup);
- errx(2, "fdopen failed");
- }
- return retval;
-}
-
-/*
- * close pipe and wait for child to exit. on non-zero exit status,
- * call cleanup callback. return exit status.
- */
-int pipe_to_system_end(pipe_to_system_t *to_pipe)
-{
- int status;
- int wait_ret;
-
- fclose(to_pipe->fp);
- wait_ret = waitpid(to_pipe->pid, &status, 0);
- if (wait_ret < 0) {
- if (errno != EINTR) {
- call_callback(to_pipe->cleanup);
- errx(2, "waitpid returned failure");
- }
- }
- if (!WIFEXITED(status)) {
- call_callback(to_pipe->cleanup);
- errx(2, "waitpid: process terminated abnormally");
- }
- free(to_pipe);
- return WEXITSTATUS(status);
-}
diff --git a/pkgtools/pkg_install/files/lib/pkg_summary.5 b/pkgtools/pkg_install/files/lib/pkg_summary.5
deleted file mode 100644
index b92dfad0541..00000000000
--- a/pkgtools/pkg_install/files/lib/pkg_summary.5
+++ /dev/null
@@ -1,118 +0,0 @@
-.\" $NetBSD: pkg_summary.5,v 1.5 2007/02/07 06:49:22 wiz Exp $
-.\"
-.\" Copyright (c) 2006 The NetBSD Foundation
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of the NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived from
-.\" this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION AND ITS CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-.\" NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-.\" FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-.\" SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd February 5, 2007
-.Dt PKG_SUMMARY 5
-.Os
-.Sh NAME
-.Nm pkg_summary
-.Nd summary of binary package repository
-.Sh DESCRIPTION
-The file
-.Nm
-contains information about each package in a binary package
-repository as a list of variable-value pairs.
-The variables describing different packages are separated by one empty
-line.
-Each line has the format
-.Ev VARIABLE=VALUE .
-If the value consists of more than one line, each line is prefixed with
-.Ev VARIABLE= .
-Multi-line variables are guaranteed to be in consecutive lines.
-.Pp
-The following variables are used:
-.Bl -tag -width indent
-.It Ev BUILD_DATE
-(required) The date and time when the package was built.
-.It Ev CATEGORIES
-(required) A list of categories which this package fits in, separated by
-space.
-.It Ev COMMENT
-(required) A one-line description of the package.
-.It Ev CONFLICTS
-(optional) A list of dewey patterns of packages the package conflicts
-with, one per line.
-If missing, this package has no conflicts.
-.It Ev DEPENDS
-(optional) A list of dewey patterns of packages the package depends
-on, one per line.
-If missing, this package has no dependencies.
-.It Ev DESCRIPTION
-(required) A more detailed description of the package.
-.\" DIGEST
-.It Ev FILE_SIZE
-(optional) The size of the binary package file, in bytes.
-.It Ev HOMEPAGE
-(optional) A URL where more information about the package can be found.
-.It Ev LICENSE
-(optional) The type of license this package is distributed under.
-If empty or missing, it is OSI-approved.
-.It Ev MACHINE_ARCH
-(required) The architecture on which the package was compiled.
-.It Ev OPSYS
-(required) The operating system on which the package was compiled.
-.It Ev OS_VERSION
-(required) The version of the operating system on which the package
-was compiled.
-.It Ev PKG_OPTIONS
-(optional) Any options selected to compile this package.
-If missing, the package does not support options.
-.It Ev PKGNAME
-(required) The name of the package.
-.It Ev PKGPATH
-(required) The path of the package directory within pkgsrc.
-.It Ev PKGTOOLS_VERSION
-(required) The version of the package tools used to create the package.
-.It Ev PROVIDES
-(optional) A list of shared libraries provided by the package,
-including major version number, one per line.
-If missing, this package does not provide shared libraries.
-.It Ev REQUIRES
-(optional) A list of shared libraries needed by the package, including
-major version number, one per line.
-If missing, this package does not require shared libraries.
-.It Ev SIZE_PKG
-(required) The size of the package when installed, in bytes.
-.El
-.Pp
-The
-.Nm pkg_summary
-file can be generated using the
-.Xr pkg_info 1
-.Fl X
-option.
-For example, the following will list this data for all installed packages:
-.Pp
-.Dl "pkg_info -X -a"
-.Sh SEE ALSO
-.Xr pkg_info 1
-.Sh HISTORY
-The
-.Nm pkg_summary
-format was first officially documented in April 2006.
diff --git a/pkgtools/pkg_install/files/lib/pkg_summary.cat5 b/pkgtools/pkg_install/files/lib/pkg_summary.cat5
deleted file mode 100644
index ffd69d82801..00000000000
--- a/pkgtools/pkg_install/files/lib/pkg_summary.cat5
+++ /dev/null
@@ -1,99 +0,0 @@
-PKG_SUMMARY(5) NetBSD File Formats Manual PKG_SUMMARY(5)
-
-NNAAMMEE
- ppkkgg__ssuummmmaarryy -- summary of binary package repository
-
-DDEESSCCRRIIPPTTIIOONN
- The file ppkkgg__ssuummmmaarryy contains information about each package in a binary
- package repository as a list of variable-value pairs. The variables
- describing different packages are separated by one empty line. Each line
- has the format VARIABLE=VALUE. If the value consists of more than one
- line, each line is prefixed with VARIABLE=. Multi-line variables are
- guaranteed to be in consecutive lines.
-
- The following variables are used:
-
- BUILD_DATE
- (required) The date and time when the package was built.
-
- CATEGORIES
- (required) A list of categories which this package fits in, sepa-
- rated by space.
-
- COMMENT
- (required) A one-line description of the package.
-
- CONFLICTS
- (optional) A list of dewey patterns of packages the package con-
- flicts with, one per line. If missing, this package has no con-
- flicts.
-
- DEPENDS
- (optional) A list of dewey patterns of packages the package
- depends on, one per line. If missing, this package has no depen-
- dencies.
-
- DESCRIPTION
- (required) A more detailed description of the package.
-
- FILE_SIZE
- (optional) The size of the binary package file, in bytes.
-
- HOMEPAGE
- (optional) A URL where more information about the package can be
- found.
-
- LICENSE
- (optional) The type of license this package is distributed under.
- If empty or missing, it is OSI-approved.
-
- MACHINE_ARCH
- (required) The architecture on which the package was compiled.
-
- OPSYS (required) The operating system on which the package was com-
- piled.
-
- OS_VERSION
- (required) The version of the operating system on which the pack-
- age was compiled.
-
- PKG_OPTIONS
- (optional) Any options selected to compile this package. If
- missing, the package does not support options.
-
- PKGNAME
- (required) The name of the package.
-
- PKGPATH
- (required) The path of the package directory within pkgsrc.
-
- PKGTOOLS_VERSION
- (required) The version of the package tools used to create the
- package.
-
- PROVIDES
- (optional) A list of shared libraries provided by the package,
- including major version number, one per line. If missing, this
- package does not provide shared libraries.
-
- REQUIRES
- (optional) A list of shared libraries needed by the package,
- including major version number, one per line. If missing, this
- package does not require shared libraries.
-
- SIZE_PKG
- (required) The size of the package when installed, in bytes.
-
- The ppkkgg__ssuummmmaarryy file can be generated using the pkg_info(1) --XX option.
- For example, the following will list this data for all installed pack-
- ages:
-
- pkg_info -X -a
-
-SSEEEE AALLSSOO
- pkg_info(1)
-
-HHIISSTTOORRYY
- The ppkkgg__ssuummmmaarryy format was first officially documented in April 2006.
-
-NetBSD 3.0 February 5, 2007 NetBSD 3.0
diff --git a/pkgtools/pkg_install/files/lib/pkgdb.c b/pkgtools/pkg_install/files/lib/pkgdb.c
deleted file mode 100644
index 96b959dea62..00000000000
--- a/pkgtools/pkg_install/files/lib/pkgdb.c
+++ /dev/null
@@ -1,339 +0,0 @@
-/* $NetBSD: pkgdb.c,v 1.25 2006/01/04 23:33:23 christos Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: pkgdb.c,v 1.25 2006/01/04 23:33:23 christos Exp $");
-#endif
-
-/*
- * Copyright (c) 1999 Hubert Feyrer. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Hubert Feyrer for
- * the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_DB_185_H
-#include <db_185.h>
-#elif HAVE_DB1_DB_H
-#include <db1/db.h>
-#elif HAVE_DB_H
-#include <db.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#if HAVE_STDARG_H
-#include <stdarg.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if defined(HAVE_DBOPEN) || (defined(HAVE___DB185_OPEN) && defined(HAVE_DB_185_H))
-#define HAVE_DBLIB 1
-#else
-#define HAVE_DBLIB 0
-#endif
-
-#include "lib.h"
-
-#define PKGDB_FILE "pkgdb.byfile.db" /* indexed by filename */
-
-/*
- * Where we put logging information by default if PKG_DBDIR is unset.
- */
-#ifndef DEF_LOG_DIR
-#define DEF_LOG_DIR "/var/db/pkg"
-#endif
-
-/* just in case we change the environment variable name */
-#define PKG_DBDIR "PKG_DBDIR"
-
-#if HAVE_DBLIB
-static DB *pkgdbp;
-#endif
-static char *pkgdb_dir = NULL;
-static char pkgdb_cache[MaxPathSize];
-
-#if HAVE_DBLIB
-/*
- * Open the pkg-database
- * Return value:
- * 1: everything ok
- * 0: error
- */
-int
-pkgdb_open(int mode)
-{
- BTREEINFO info;
- char cachename[MaxPathSize];
-
- /* try our btree format first */
- info.flags = 0;
- info.cachesize = 2*1024*1024;
- info.maxkeypage = 0;
- info.minkeypage = 0;
- info.psize = 4096;
- info.compare = NULL;
- info.prefix = NULL;
- info.lorder = 0;
- pkgdbp = (DB *) dbopen(_pkgdb_getPKGDB_FILE(cachename, sizeof(cachename)),
- (mode == ReadOnly) ? O_RDONLY : O_RDWR | O_CREAT,
- 0644, DB_BTREE, (void *) &info);
- return (pkgdbp != NULL);
-}
-
-/*
- * Close the pkg database
- */
-void
-pkgdb_close(void)
-{
- if (pkgdbp != NULL) {
- (void) (*pkgdbp->close) (pkgdbp);
- pkgdbp = NULL;
- }
-}
-
-/*
- * Store value "val" with key "key" in database
- * Return value is as from ypdb_store:
- * 0: ok
- * 1: key already present
- * -1: some other error, see errno
- */
-int
-pkgdb_store(const char *key, const char *val)
-{
- DBT keyd, vald;
-
- if (pkgdbp == NULL)
- return -1;
-
- keyd.data = (void *) key;
- keyd.size = strlen(key) + 1;
- vald.data = (void *) val;
- vald.size = strlen(val) + 1;
-
- if (keyd.size > MaxPathSize || vald.size > MaxPathSize)
- return -1;
-
- return (*pkgdbp->put) (pkgdbp, &keyd, &vald, R_NOOVERWRITE);
-}
-
-/*
- * Recall value for given key
- * Return value:
- * NULL if some error occurred or value for key not found (check errno!)
- * String for "value" else
- */
-char *
-pkgdb_retrieve(const char *key)
-{
- DBT keyd, vald;
- int status;
-
- if (pkgdbp == NULL)
- return NULL;
-
- keyd.data = (void *) key;
- keyd.size = strlen(key) + 1;
- errno = 0; /* to be sure it's 0 if the key doesn't match anything */
-
- vald.data = (void *)NULL;
- vald.size = 0;
- status = (*pkgdbp->get) (pkgdbp, &keyd, &vald, 0);
- if (status) {
- vald.data = NULL;
- vald.size = 0;
- }
-
- return vald.data;
-}
-
-/* dump contents of the database to stdout */
-void
-pkgdb_dump(void)
-{
- DBT key;
- DBT val;
- int type;
-
- if (pkgdb_open(ReadOnly)) {
- for (type = R_FIRST ; (*pkgdbp->seq)(pkgdbp, &key, &val, type) == 0 ; type = R_NEXT) {
- printf("file: %.*s pkg: %.*s\n",
- (int) key.size, (char *) key.data,
- (int) val.size, (char *) val.data);
- }
- pkgdb_close();
- }
-
-}
-
-/*
- * Remove data set from pkgdb
- * Return value as ypdb_delete:
- * 0: everything ok
- * 1: key not present
- * -1: some error occurred (see errno)
- */
-int
-pkgdb_remove(const char *key)
-{
- DBT keyd;
-
- if (pkgdbp == NULL)
- return -1;
-
- keyd.data = (char *) key;
- keyd.size = strlen(key) + 1;
- if (keyd.size > MaxPathSize)
- return -1;
-
- return (*pkgdbp->del) (pkgdbp, &keyd, 0);
-}
-
-/*
- * Remove any entry from the cache which has a data field of `pkg'.
- * Return value:
- * 1: everything ok
- * 0: error
- */
-int
-pkgdb_remove_pkg(const char *pkg)
-{
- DBT data;
- DBT key;
- int type;
- int ret;
- int cc;
- char cachename[MaxPathSize];
-
- if (pkgdbp == NULL) {
- return 0;
- }
- (void) _pkgdb_getPKGDB_FILE(cachename, sizeof(cachename));
- cc = strlen(pkg);
- for (ret = 1, type = R_FIRST; (*pkgdbp->seq)(pkgdbp, &key, &data, type) == 0 ; type = R_NEXT) {
- if ((cc + 1) == data.size && strncmp(data.data, pkg, cc) == 0) {
- if (Verbose) {
- printf("Removing file `%s' from %s\n", (char *)key.data, cachename);
- }
- switch ((*pkgdbp->del)(pkgdbp, &key, 0)) {
- case -1:
- warn("Error removing `%s' from %s", (char *)key.data, cachename);
- ret = 0;
- break;
- case 1:
- warn("Key `%s' not present in %s", (char *)key.data, cachename);
- ret = 0;
- break;
-
- }
- }
- }
- return ret;
-}
-
-#else /* !HAVE_DBLIB */
-
-int pkgdb_open(int mode) { return 1; }
-void pkgdb_close(void) {}
-int pkgdb_store(const char *key, const char *val) { return 0; }
-char *pkgdb_retrieve(const char *key) { return NULL; }
-void pkgdb_dump(void) {}
-int pkgdb_remove(const char *key) { return 0; }
-int pkgdb_remove_pkg(const char *pkg) { return 1; }
-
-#endif /* HAVE_DBLIB */
-
-/*
- * Return the location of the package reference counts database directory.
- */
-char *
-pkgdb_refcount_dir(void)
-{
- static char buf[MaxPathSize];
- char *tmp;
-
- if ((tmp = getenv(PKG_REFCOUNT_DBDIR_VNAME)))
- strlcpy(buf, tmp, sizeof(buf));
- else
- snprintf(buf, sizeof(buf), "%s.refcount", _pkgdb_getPKGDB_DIR());
- return buf;
-}
-
-/*
- * Return name of cache file in the buffer that was passed.
- */
-char *
-_pkgdb_getPKGDB_FILE(char *buf, unsigned size)
-{
- (void) snprintf(buf, size, "%s/%s", _pkgdb_getPKGDB_DIR(), PKGDB_FILE);
- return buf;
-}
-
-/*
- * Return directory where pkgdb is stored
- */
-char *
-_pkgdb_getPKGDB_DIR(void)
-{
- char *tmp;
-
- if (pkgdb_dir == NULL) {
- if ((tmp = getenv(PKG_DBDIR)))
- _pkgdb_setPKGDB_DIR(tmp);
- else
- _pkgdb_setPKGDB_DIR(DEF_LOG_DIR);
- }
-
- return pkgdb_dir;
-}
-
-/*
- * Set the first place we look for where pkgdb is stored.
- */
-void
-_pkgdb_setPKGDB_DIR(const char *dir)
-{
- (void) snprintf(pkgdb_cache, sizeof(pkgdb_cache), "%s", dir);
- pkgdb_dir = pkgdb_cache;
-}
diff --git a/pkgtools/pkg_install/files/lib/plist.c b/pkgtools/pkg_install/files/lib/plist.c
deleted file mode 100644
index 7470fdb773b..00000000000
--- a/pkgtools/pkg_install/files/lib/plist.c
+++ /dev/null
@@ -1,561 +0,0 @@
-/* $NetBSD: plist.c,v 1.15 2006/11/03 09:35:14 joerg Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
-#else
-__RCSID("$NetBSD: plist.c,v 1.15 2006/11/03 09:35:14 joerg Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * General packing list routines.
- *
- */
-
-#include "lib.h"
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_MD5_H
-#include <md5.h>
-#endif
-
-/* This struct defines a plist command type */
-typedef struct cmd_t {
- char *c_s; /* string to recognise */
- pl_ent_t c_type; /* type of command */
- int c_argc; /* # of arguments */
- int c_subst; /* can substitute real prefix */
-} cmd_t;
-
-/* Commands to recognise */
-static const cmd_t cmdv[] = {
- {"cwd", PLIST_CWD, 1, 1},
- {"src", PLIST_SRC, 1, 1},
- {"cd", PLIST_CWD, 1, 1},
- {"exec", PLIST_CMD, 1, 0},
- {"unexec", PLIST_UNEXEC, 1, 0},
- {"mode", PLIST_CHMOD, 1, 0},
- {"owner", PLIST_CHOWN, 1, 0},
- {"group", PLIST_CHGRP, 1, 0},
- {"comment", PLIST_COMMENT, 1, 0},
- {"ignore", PLIST_IGNORE, 0, 0},
- {"ignore_inst", PLIST_IGNORE_INST, 0, 0},
- {"name", PLIST_NAME, 1, 0},
- {"display", PLIST_DISPLAY, 1, 0},
- {"pkgdep", PLIST_PKGDEP, 1, 0},
- {"pkgcfl", PLIST_PKGCFL, 1, 0},
- {"mtree", PLIST_MTREE, 1, 0},
- {"dirrm", PLIST_DIR_RM, 1, 0},
- {"option", PLIST_OPTION, 1, 0},
- {"blddep", PLIST_BLDDEP, 1, 0},
- {NULL, FAIL, 0, 0}
-};
-
-/*
- * Add an item to the end of a packing list
- */
-void
-add_plist(package_t *p, pl_ent_t type, const char *arg)
-{
- plist_t *tmp;
-
- tmp = new_plist_entry();
- tmp->name = (arg == (char *) NULL) ? (char *) NULL : strdup(arg);
- tmp->type = type;
- if (!p->head) {
- p->head = p->tail = tmp;
- } else {
- tmp->prev = p->tail;
- p->tail->next = tmp;
- p->tail = tmp;
- }
-}
-
-/*
- * Add an item to the start of a packing list
- */
-void
-add_plist_top(package_t *p, pl_ent_t type, const char *arg)
-{
- plist_t *tmp;
-
- tmp = new_plist_entry();
- tmp->name = (arg == (char *) NULL) ? (char *) NULL : strdup(arg);
- tmp->type = type;
- if (!p->head) {
- p->head = p->tail = tmp;
- } else {
- tmp->next = p->head;
- p->head->prev = tmp;
- p->head = tmp;
- }
-}
-
-/*
- * Return the last (most recent) entry in a packing list
- */
-plist_t *
-last_plist(package_t *p)
-{
- return p->tail;
-}
-
-/*
- * Mark all items in a packing list to prevent iteration over them
- */
-void
-mark_plist(package_t *pkg)
-{
- plist_t *pp;
-
- for (pp = pkg->head; pp; pp = pp->next) {
- pp->marked = TRUE;
- }
-}
-
-/*
- * Find a given item in a packing list and, if so, return it (else NULL)
- */
-plist_t *
-find_plist(package_t *pkg, pl_ent_t type)
-{
- plist_t *pp;
-
- for (pp = pkg->head; pp && pp->type != type; pp = pp->next) {
- }
- return pp;
-}
-
-/*
- * Look for a specific boolean option argument in the list
- */
-char *
-find_plist_option(package_t *pkg, char *name)
-{
- plist_t *p;
-
- for (p = pkg->head; p; p = p->next) {
- if (p->type == PLIST_OPTION
- && strcmp(p->name, name) == 0) {
- return p->name;
- }
- }
-
- return (char *) NULL;
-}
-
-/*
- * Delete plist item 'type' in the list (if 'name' is non-null, match it
- * too.) If 'all' is set, delete all items, not just the first occurance.
- */
-void
-delete_plist(package_t *pkg, Boolean all, pl_ent_t type, char *name)
-{
- plist_t *p = pkg->head;
-
- while (p) {
- plist_t *pnext = p->next;
-
- if (p->type == type && (!name || !strcmp(name, p->name))) {
- free(p->name);
- if (p->prev)
- p->prev->next = pnext;
- else
- pkg->head = pnext;
- if (pnext)
- pnext->prev = p->prev;
- else
- pkg->tail = p->prev;
- free(p);
- if (!all)
- return;
- p = pnext;
- } else
- p = p->next;
- }
-}
-
-/*
- * Allocate a new packing list entry, and return a pointer to it.
- */
-plist_t *
-new_plist_entry(void)
-{
- plist_t *ret;
-
- if ((ret = (plist_t *) malloc(sizeof(plist_t))) == (plist_t *) NULL) {
- err(EXIT_FAILURE, "can't allocate %ld bytes", (long) sizeof(plist_t));
- }
- memset(ret, 0, sizeof(plist_t));
- return ret;
-}
-
-/*
- * Free an entire packing list
- */
-void
-free_plist(package_t *pkg)
-{
- plist_t *p = pkg->head;
-
- while (p) {
- plist_t *p1 = p->next;
-
- free(p->name);
- free(p);
- p = p1;
- }
- pkg->head = pkg->tail = NULL;
-}
-
-/*
- * For an ASCII string denoting a plist command, return its code and
- * optionally its argument(s)
- */
-int
-plist_cmd(unsigned char *s, char **arg)
-{
- const cmd_t *cmdp;
- /* 20 == fudge for max cmd len */
- unsigned char cmd[MaxPathSize + 20];
- unsigned char *cp;
- unsigned char *sp;
-
- (void) strlcpy(cmd, s, sizeof(cmd));
- str_lowercase(cmd);
- for (cp = cmd, sp = s; *cp; cp++, sp++) {
- if (isspace(*cp)) {
- for (*cp = '\0'; isspace(*sp); sp++) {
- }
- break;
- }
- }
- if (arg) {
- *arg = sp;
- }
- for (cmdp = cmdv; cmdp->c_s && strcmp(cmdp->c_s, cmd) != 0; cmdp++) {
- }
- return cmdp->c_type;
-}
-
-/*
- * Read a packing list from a file
- */
-void
-read_plist(package_t *pkg, FILE * fp)
-{
- char pline[MaxPathSize];
- char *cp;
- int cmd;
- int len;
-
- while (fgets(pline, MaxPathSize, fp) != (char *) NULL) {
- for (len = strlen(pline); len &&
- isspace((unsigned char) pline[len - 1]);) {
- pline[--len] = '\0';
- }
- if (len == 0) {
- continue;
- }
- if (*(cp = pline) == CMD_CHAR) {
- if ((cmd = plist_cmd(pline + 1, &cp)) == FAIL) {
- warnx("Unrecognised PLIST command `%s'", pline);
- continue;
- }
- if (*cp == '\0') {
- cp = NULL;
- }
- } else {
- cmd = PLIST_FILE;
- }
- add_plist(pkg, cmd, cp);
- }
-}
-
-/*
- * Write a packing list to a file, converting commands to ASCII equivs
- */
-void
-write_plist(package_t *pkg, FILE * fp, char *realprefix)
-{
- plist_t *p;
- const cmd_t *cmdp;
-
- for (p = pkg->head; p; p = p->next) {
- if (p->type == PLIST_FILE) {
- /* Fast-track files - these are the most common */
- (void) fprintf(fp, "%s\n", p->name);
- continue;
- }
- for (cmdp = cmdv; cmdp->c_type != FAIL && cmdp->c_type != p->type; cmdp++) {
- }
- if (cmdp->c_type == FAIL) {
- warnx("Unknown PLIST command type %d (%s)", p->type, p->name);
- } else if (cmdp->c_argc == 0) {
- (void) fprintf(fp, "%c%s\n", CMD_CHAR, cmdp->c_s);
- } else if (cmdp->c_subst && realprefix) {
- (void) fprintf(fp, "%c%s %s\n", CMD_CHAR, cmdp->c_s, realprefix);
- } else {
- (void) fprintf(fp, "%c%s %s\n", CMD_CHAR, cmdp->c_s,
- (p->name) ? p->name : "");
- }
- }
-}
-
-/*
- * Delete the results of a package installation.
- *
- * This is here rather than in the pkg_delete code because pkg_add needs to
- * run it too in cases of failure.
- */
-int
-delete_package(Boolean ign_err, Boolean nukedirs, package_t *pkg, Boolean NoDeleteFiles)
-{
- plist_t *p;
- char *Where = ".", *last_file = "";
- int fail = SUCCESS;
- Boolean preserve;
- char tmp[MaxPathSize], *name = NULL;
-
- if (!pkgdb_open(ReadWrite)) {
- err(EXIT_FAILURE, "cannot open pkgdb");
- }
-
- preserve = find_plist_option(pkg, "preserve") ? TRUE : FALSE;
- for (p = pkg->head; p; p = p->next) {
- switch (p->type) {
- case PLIST_NAME:
- name = p->name;
- break;
-
- case PLIST_IGNORE:
- p = p->next;
- break;
-
- case PLIST_CWD:
- Where = p->name;
- if (Verbose)
- printf("Change working directory to %s\n", Where);
- break;
-
- case PLIST_UNEXEC:
- if (NoDeleteFiles)
- break;
- format_cmd(tmp, sizeof(tmp), p->name, Where, last_file);
- printf("Executing `%s'\n", tmp);
- if (!Fake && system(tmp)) {
- warnx("unexec command for `%s' failed", tmp);
- fail = FAIL;
- }
- break;
-
- case PLIST_FILE:
- last_file = p->name;
- (void) snprintf(tmp, sizeof(tmp), "%s/%s", Where, p->name);
- if (isdir(tmp)) {
- warnx("attempting to delete directory `%s' as a file\n"
- "this packing list is incorrect - ignoring delete request", tmp);
- } else {
- int restored = 0; /* restored from preserve? */
-
- if (p->next && p->next->type == PLIST_COMMENT) {
- if (strncmp(p->next->name, CHECKSUM_HEADER, ChecksumHeaderLen) == 0) {
- char *cp, buf[LegibleChecksumLen];
-
- if ((cp = MD5File(tmp, buf)) != NULL) {
- /* Mismatch? */
- if (strcmp(cp, p->next->name + ChecksumHeaderLen) != 0) {
- printf("original MD5 checksum failed, %s: %s\n",
- Force ? "deleting anyway" : "not deleting", tmp);
- if (!Force) {
- fail = FAIL;
- continue;
- }
- }
- }
- } else if (strncmp(p->next->name, SYMLINK_HEADER, SymlinkHeaderLen) == 0) {
- char buf[MaxPathSize + SymlinkHeaderLen];
- int cc;
-
- (void) strlcpy(buf, SYMLINK_HEADER,
- sizeof(buf));
- if ((cc = readlink(tmp, &buf[SymlinkHeaderLen],
- sizeof(buf) - SymlinkHeaderLen - 1)) < 0) {
- warn("can't readlink `%s'", tmp);
- continue;
- }
- buf[SymlinkHeaderLen + cc] = 0x0;
- if (strcmp(buf, p->next->name) != 0) {
- if ((cc = readlink(&buf[SymlinkHeaderLen], &buf[SymlinkHeaderLen],
- sizeof(buf) - SymlinkHeaderLen)) < 0) {
- printf("symlink %s is not same as recorded value, %s: %s\n",
- buf, Force ? "deleting anyway" : "not deleting", tmp);
- if (!Force) {
- fail = FAIL;
- continue;
- }
- }
- buf[SymlinkHeaderLen + cc] = 0x0;
- if (strcmp(buf, p->next->name) != 0) {
- printf("symlink %s is not same as recorded value, %s: %s\n",
- buf, Force ? "deleting anyway" : "not deleting", tmp);
- if (!Force) {
- fail = FAIL;
- continue;
- }
- }
- }
- }
- }
- if (Verbose && !NoDeleteFiles)
- printf("Delete file %s\n", tmp);
- if (!Fake && !NoDeleteFiles) {
- if (delete_hierarchy(tmp, ign_err, nukedirs))
- fail = FAIL;
- if (preserve && name) {
- char tmp2[MaxPathSize];
-
- if (make_preserve_name(tmp2, MaxPathSize, name, tmp)) {
- if (fexists(tmp2)) {
- if (rename(tmp2, tmp))
- warn("preserve: unable to restore %s as %s",
- tmp2, tmp);
- else
- restored = 1;
- }
- }
- }
- }
-
- if (!Fake) {
- if (!restored) {
-#ifdef PKGDB_DEBUG
- printf("pkgdb_remove(\"%s\")\n", tmp); /* HF */
-#endif
- errno = 0;
- if (pkgdb_remove(tmp)) {
- if (errno) {
- perror("pkgdb_remove");
- }
- } else {
-#ifdef PKGDB_DEBUG
- printf("pkgdb_remove: ok\n");
-#endif
- }
- }
- }
- }
- break;
-
- case PLIST_DIR_RM:
- if (NoDeleteFiles)
- break;
-
- (void) snprintf(tmp, sizeof(tmp), "%s/%s", Where, p->name);
- if (fexists(tmp)) {
- if (!isdir(tmp)) {
- warnx("cannot remove `%s' as a directory\n"
- "this packing list is incorrect - ignoring delete request", tmp);
- } else {
- if (Verbose)
- printf("Delete directory %s\n", tmp);
- if (!Fake && delete_hierarchy(tmp, ign_err, FALSE)) {
- warnx("unable to completely remove directory '%s'", tmp);
- fail = FAIL;
- }
- }
- } else {
- warnx("cannot remove non-existent directory `%s'\n"
- "this packing list is incorrect - ignoring delete request", tmp);
- }
- last_file = p->name;
- break;
- default:
- break;
- }
- }
- pkgdb_close();
- return fail;
-}
-
-#ifdef DEBUG
-#define RMDIR(dir) fexec(RMDIR_CMD, dir, NULL)
-#define REMOVE(dir,ie) fexec_skipemtpy(REMOVE_CMD, (ie) ? "-f " : "", dir, NULL)
-#else
-#define RMDIR rmdir
-#define REMOVE(file,ie) (remove(file) && !(ie))
-#endif
-
-/*
- * Selectively delete a hierarchy
- * Returns 1 on error, 0 else.
- */
-int
-delete_hierarchy(char *dir, Boolean ign_err, Boolean nukedirs)
-{
- char *cp1, *cp2;
-
- cp1 = cp2 = dir;
- if (!fexists(dir)) {
- if (!ign_err)
- warnx("%s `%s' doesn't really exist",
- isdir(dir) ? "directory" : "file", dir);
- return !ign_err;
- } else if (nukedirs) {
- if (fexec_skipempty(REMOVE_CMD, "-r", ign_err ? "-f" : "", dir, NULL))
- return 1;
- } else if (isdir(dir)) {
- if (RMDIR(dir) && !ign_err)
- return 1;
- } else {
- if (REMOVE(dir, ign_err))
- return 1;
- }
-
- if (!nukedirs)
- return 0;
- while (cp2) {
- if ((cp2 = strrchr(cp1, '/')) != NULL)
- *cp2 = '\0';
- if (!isemptydir(dir))
- return 0;
- if (RMDIR(dir) && !ign_err) {
- if (!fexists(dir))
- warnx("directory `%s' doesn't really exist", dir);
- else
- return 1;
- }
- /* back up the pathname one component */
- if (cp2) {
- cp1 = dir;
- }
- }
- return 0;
-}
diff --git a/pkgtools/pkg_install/files/lib/str.c b/pkgtools/pkg_install/files/lib/str.c
deleted file mode 100644
index 1a0ac8338d8..00000000000
--- a/pkgtools/pkg_install/files/lib/str.c
+++ /dev/null
@@ -1,431 +0,0 @@
-/* $NetBSD: str.c,v 1.18 2006/04/05 18:17:08 wiz Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp";
-#else
-__RCSID("$NetBSD: str.c,v 1.18 2006/04/05 18:17:08 wiz Exp $");
-#endif
-#endif
-
-/*
- * FreeBSD install - a package for the installation and maintainance
- * of non-core utilities.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Jordan K. Hubbard
- * 18 July 1993
- *
- * Miscellaneous string utilities.
- *
- */
-
-#if HAVE_ASSERT_H
-#include <assert.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-#include "lib.h"
-#include "dewey.h"
-
-/* pull in definitions and macros for resizing arrays as we go */
-#include "defs.h"
-
-/*
- * Return the suffix portion of a path
- */
-const char *
-suffix_of(const char *str)
-{
- const char *dot;
-
- return ((dot = strrchr(basename_of(str), '.')) == NULL) ? "" : dot + 1;
-}
-
-/*
- * Return the filename portion of a path
- */
-const char *
-basename_of(const char *str)
-{
- const char *slash;
-
- return ((slash = strrchr(str, '/')) == NULL) ? str : slash + 1;
-}
-
-/*
- * Return the dirname portion of a path
- */
-const char *
-dirname_of(const char *path)
-{
- size_t cc;
- char *s;
- static char buf[MaxPathSize];
-
- if ((s = strrchr(path, '/')) == NULL) {
- return ".";
- }
- if (s == path) {
- /* "/foo" -> return "/" */
- return "/";
- }
- cc = (size_t) (s - path);
- if (cc >= sizeof(buf))
- errx(EXIT_FAILURE, "dirname_of: too long dirname: '%s'", path);
- (void) memcpy(buf, path, cc);
- buf[cc] = 0;
- return buf;
-}
-
-/*
- * Get a string parameter as a file spec or as a "contents follow -" spec
- */
-char *
-get_dash_string(char **s)
-{
- return *s = (**s == '-') ? strdup(*s + 1) : fileGetContents(*s);
-}
-
-/*
- * Lowercase a whole string
- */
-void
-str_lowercase(unsigned char *s)
-{
- for (; *s; s++) {
- *s = tolower(*s);
- }
-}
-
-/*
- * Perform alternate match on "pkg" against "pattern",
- * calling pmatch (recursively) to resolve any other patterns.
- * Return 1 on match, 0 otherwise
- */
-static int
-alternate_match(const char *pattern, const char *pkg)
-{
- char *sep;
- char buf[MaxPathSize];
- char *last;
- char *alt;
- char *cp;
- int cnt;
- int found;
-
- if ((sep = strchr(pattern, '{')) == (char *) NULL) {
- errx(EXIT_FAILURE, "alternate_match(): '{' expected in `%s'", pattern);
- }
- (void) strncpy(buf, pattern, (size_t) (sep - pattern));
- alt = &buf[sep - pattern];
- last = (char *) NULL;
- for (cnt = 0, cp = sep; *cp && last == (char *) NULL; cp++) {
- if (*cp == '{') {
- cnt++;
- } else if (*cp == '}' && --cnt == 0 && last == (char *) NULL) {
- last = cp + 1;
- }
- }
- if (cnt != 0) {
- errx(EXIT_FAILURE, "Malformed alternate `%s'", pattern);
- }
- for (found = 0, cp = sep + 1; *sep != '}'; cp = sep + 1) {
- for (cnt = 0, sep = cp; cnt > 0 || (cnt == 0 && *sep != '}' && *sep != ','); sep++) {
- if (*sep == '{') {
- cnt++;
- } else if (*sep == '}') {
- cnt--;
- }
- }
- (void) snprintf(alt, sizeof(buf) - (alt - buf), "%.*s%s", (int) (sep - cp), cp, last);
- if (pmatch(buf, pkg) == 1) {
- found = 1;
- }
- }
- return found;
-}
-
-/*
- * Perform glob match on "pkg" against "pattern".
- * Return 1 on match, 0 otherwise
- */
-static int
-glob_match(const char *pattern, const char *pkg)
-{
- return fnmatch(pattern, pkg, FNM_PERIOD) == 0;
-}
-
-/*
- * Perform simple match on "pkg" against "pattern".
- * Return 1 on match, 0 otherwise
- */
-static int
-simple_match(const char *pattern, const char *pkg)
-{
- return strcmp(pattern, pkg) == 0;
-}
-
-/*
- * Match pkg against pattern, return 1 if matching, 0 else
- */
-int
-pmatch(const char *pattern, const char *pkg)
-{
- if (strchr(pattern, '{') != (char *) NULL) {
- /* emulate csh-type alternates */
- return alternate_match(pattern, pkg);
- }
- if (strpbrk(pattern, "<>") != (char *) NULL) {
- int ret;
-
- /* perform relational dewey match on version number */
- ret = dewey_match(pattern, pkg);
- if (ret < 0)
- errx(EXIT_FAILURE, "dewey_match returned error");
- return ret;
- }
- if (strpbrk(pattern, "*?[]") != (char *) NULL) {
- /* glob match */
- return glob_match(pattern, pkg);
- }
-
- /* no alternate, dewey or glob match -> simple compare */
- return simple_match(pattern, pkg);
-}
-
-/*
- * Search dir for pattern, calling match(pkg_found, data) for every match.
- * Returns -1 on error, 1 if found, 0 otherwise.
- */
-int
-findmatchingname(const char *dir, const char *pattern, matchfn match, void *data)
-{
- struct dirent *dp;
- char tmp_pattern[PKG_PATTERN_MAX];
- DIR *dirp;
- int found;
- char pat_sfx[PKG_SUFFIX_MAX], file_sfx[PKG_SUFFIX_MAX]; /* suffixes */
-
- if (strlen(pattern) >= PKG_PATTERN_MAX)
- errx(EXIT_FAILURE, "too long pattern '%s'", pattern);
-
- found = 0;
- if ((dirp = opendir(dir)) == (DIR *) NULL) {
- /* warnx("can't opendir dir '%s'", dir); */
- return -1;
- }
-
- /* chop any possible suffix off of 'pattern' and
- * store it in pat_sfx
- */
- strip_txz(tmp_pattern, pat_sfx, pattern);
-
- while ((dp = readdir(dirp)) != (struct dirent *) NULL) {
- char tmp_file[MaxPathSize];
-
- if (strcmp(dp->d_name, ".") == 0 ||
- strcmp(dp->d_name, "..") == 0)
- continue;
-
- /* chop any possible suffix off of 'tmp_file' and
- * store it in file_sfx
- */
- strip_txz(tmp_file, file_sfx, dp->d_name);
-
- /* we need to match pattern and suffix separately, in case
- * each is a different pattern class (e.g. dewey and
- * character class (.t[bg]z)) */
- if (pmatch(tmp_pattern, tmp_file)
- && (pat_sfx[0] == '\0' || pmatch(pat_sfx, file_sfx))) {
- if (match) {
- match(dp->d_name, data);
- /* return value ignored for now */
- }
- found = 1;
- }
- }
- (void) closedir(dirp);
- return found;
-}
-
-/*
- * Does the pkgname contain any of the special chars ("{[]?*<>")?
- * If so, return 1, else 0
- */
-int
-ispkgpattern(const char *pkg)
-{
- return strpbrk(pkg, "<>[]?*{") != NULL;
-}
-
-/*
- * Auxiliary function called by findbestmatchingname() if pkg > data
- * Also called for FTP matching
- */
-int
-findbestmatchingname_fn(const char *found, void *vp)
-{
- char *best = vp;
- char *found_version, *best_version;
- char found_no_sfx[PKG_PATTERN_MAX];
- char best_no_sfx[PKG_PATTERN_MAX];
-
- /* The same suffix-hack-off again, but we can't do it
- * otherwise without changing the function call interface
- */
- found_version = strrchr(found, '-');
- if (found_version) {
- /* skip '-', if any version found */
- found_version++;
- }
- strip_txz(found_no_sfx, NULL, found_version);
- found_version = found_no_sfx;
-
- best_version=NULL;
- if (best && best[0] != '\0') {
- best_version = strrchr(best, '-');
- if (best_version) {
- /* skip '-' if any version found */
- best_version++;
- strip_txz(best_no_sfx, NULL, best_version);
- best_version = best_no_sfx;
- } else {
- /* how did this end up in 'best'?
- * Shouldn't happen... */
- fprintf(stderr,
- "'%s' has no usable package(version)\n",
- best);
- found_version = NULL; /* error out cheaply */
- }
- }
-
- if (found_version == NULL) {
- fprintf(stderr, "'%s' is not a usable package(version)\n",
- found);
- } else {
- /* if best_version==NULL only if best==NULL
- * (or best[0]='\0') */
- if (best != NULL) {
- if (best[0] == '\0'
- || dewey_cmp(found_version, DEWEY_GT, best_version)) {
- /* found pkg(version) is bigger than current "best"
- * version - remember! */
- strcpy(best, found);
- }
- }
- }
-
- return 0;
-}
-
-/*
- * Find best matching filename, i.e. the pkg with the highest
- * matching(!) version.
- * Returns pointer to pkg name (which can be free(3)ed),
- * or NULL if no match is available.
- */
-char *
-findbestmatchingname(const char *dir, const char *pattern)
-{
- char buf[MaxPathSize];
-
- buf[0] = '\0';
- if (findmatchingname(dir, pattern, findbestmatchingname_fn, buf) > 0
- && buf[0] != '\0') {
- return strdup(buf);
- }
- return NULL;
-}
-
-/*
- * Strip off any .tgz, .tbz or .t[bg]z suffix from fname,
- * and copy into buffer "buf", the suffix is stored in "sfx"
- * if "sfx" is not NULL. If no suffix is found, "sfx" is set
- * to an empty string.
- */
-void
-strip_txz(char *buf, char *sfx, const char *fname)
-{
- static const char *const suffixes[] = {
- ".tgz", ".tbz", ".t[bg]z", 0};
- const char *const *suffixp;
- size_t len;
-
- len = strlen(fname);
- assert(len < PKG_PATTERN_MAX);
-
- if (sfx)
- sfx[0] = '\0';
-
- for (suffixp = suffixes; *suffixp; suffixp++) {
- size_t suffixlen = strlen(*suffixp);
-
- if (memcmp(&fname[len - suffixlen], *suffixp, suffixlen))
- continue;
-
- /* matched! */
- memcpy(buf, fname, len - suffixlen);
- buf[len - suffixlen] = 0;
- if (sfx) {
- if (suffixlen >= PKG_SUFFIX_MAX)
- errx(EXIT_FAILURE, "too long suffix '%s'", fname);
- memcpy(sfx, *suffixp, suffixlen+1);
- return;
- }
- }
-
- /* not found */
- memcpy(buf, fname, len+1);
-}
-
-/*
- * Called to see if pkg is already installed as some other version,
- * note found version in "note".
- */
-int
-note_whats_installed(const char *found, void *vp)
-{
- char *note = vp;
-
- (void) strlcpy(note, found, MaxPathSize);
- return 0;
-}
-
-/*
- * alloc lpkg for pkg and add it to list.
- */
-int
-add_to_list_fn(const char *pkg, void *vp)
-{
- lpkg_head_t *pkgs = vp;
- lpkg_t *lpp;
- char fn[MaxPathSize];
-
- snprintf(fn, sizeof(fn), "%s/%s", _pkgdb_getPKGDB_DIR(), pkg);
- if (isdir(fn) || islinktodir(fn)) {
- lpp = alloc_lpkg(pkg);
- TAILQ_INSERT_TAIL(pkgs, lpp, lp_link);
- }
-
- return 0;
-}
diff --git a/pkgtools/pkg_install/files/lib/var.c b/pkgtools/pkg_install/files/lib/var.c
deleted file mode 100644
index 6945af32396..00000000000
--- a/pkgtools/pkg_install/files/lib/var.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/* $NetBSD: var.c,v 1.4 2006/04/24 13:52:05 dillo Exp $ */
-
-/*-
- * Copyright (c) 2005 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron, Thomas Klausner, and Johnny Lam.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: var.c,v 1.4 2006/04/24 13:52:05 dillo Exp $");
-#endif
-
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#include "lib.h"
-
-static const char *var_cmp(const char *, size_t, const char *, size_t);
-static void var_print(FILE *, const char *, const char *);
-
-/*
- * Copy the specified varibales from the file fname to stdout.
- */
-int
-var_copy_list(const char *fname, const char **variables)
-{
- FILE *fp;
- char *line;
- size_t len;
- const char *p;
- int i;
-
- fp = fopen(fname, "r");
- if (!fp) {
- if (errno != ENOENT)
- warn("var_copy_list: can't open '%s' for reading",
- fname);
- return -1;
- }
-
- while ((line = fgetln(fp, &len)) != (char *) NULL) {
- if (line[len - 1] == '\n')
- --len;
- for (i=0; variables[i]; i++) {
- if ((p=var_cmp(line, len, variables[i],
- strlen(variables[i]))) != NULL) {
- printf("%.*s\n", (int)len, line);
- break;
- }
- }
- }
- (void) fclose(fp);
- return 0;
-}
-
-/*
- * Print the value of variable from the file fname to stdout.
- */
-char *
-var_get(const char *fname, const char *variable)
-{
- FILE *fp;
- char *line;
- size_t len;
- size_t varlen;
- char *value;
- size_t valuelen;
- size_t thislen;
- const char *p;
-
- varlen = strlen(variable);
- if (varlen == 0)
- return NULL;
-
- fp = fopen(fname, "r");
- if (!fp) {
- if (errno != ENOENT)
- warn("var_get: can't open '%s' for reading", fname);
- return NULL;
- }
-
- value = NULL;
- valuelen = 0;
-
- while ((line = fgetln(fp, &len)) != (char *) NULL) {
- if (line[len - 1] == '\n')
- --len;
- if ((p=var_cmp(line, len, variable, varlen)) == NULL)
- continue;
-
- thislen = line+len - p;
- if (value) {
- value = realloc(value, valuelen+thislen+2);
- value[valuelen++] = '\n';
- }
- else {
- value = malloc(thislen+1);
- }
- sprintf(value+valuelen, "%.*s", (int)thislen, p);
- valuelen += thislen;
- }
- (void) fclose(fp);
- return value;
-}
-
-/*
- * Add given variable with given value to file, overwriting any
- * previous occurrence.
- */
-int
-var_set(const char *fname, const char *variable, const char *value)
-{
- FILE *fp;
- FILE *fout;
- char *tmpname;
- int fd;
- char *line;
- size_t len;
- size_t varlen;
- Boolean done;
- struct stat st;
-
- varlen = strlen(variable);
- if (varlen == 0)
- return 0;
-
- fp = fopen(fname, "r");
- if (!fp && errno != ENOENT) {
- warn("var_set: can't open '%s' for reading", fname);
- return -1;
- }
-
- tmpname = malloc(strlen(fname)+8);
- sprintf(tmpname, "%s.XXXXXX", fname);
- if ((fd=mkstemp(tmpname)) < 0) {
- free(tmpname);
- fclose(fp);
- warn("var_set: can't open temp file for '%s' for writing",
- fname);
- return -1;
- }
- if (chmod(tmpname, 0644) < 0) {
- close(fd);
- fclose(fp);
- free(tmpname);
- warn("var_set: can't set permissions for temp file for '%s'",
- fname);
- return -1;
- }
- if ((fout=fdopen(fd, "w")) == NULL) {
- close(fd);
- remove(tmpname);
- free(tmpname);
- fclose(fp);
- warn("var_set: can't open temp file for '%s' for writing",
- fname);
- return -1;
- }
-
- done = FALSE;
-
- if (fp) {
- while ((line = fgetln(fp, &len)) != (char *) NULL) {
- if (var_cmp(line, len, variable, varlen) == NULL)
- fprintf(fout, "%.*s", (int)len, line);
- else {
- if (!done && value) {
- var_print(fout, variable, value);
- done = TRUE;
- }
- }
- }
- (void) fclose(fp);
- }
-
- if (!done && value)
- var_print(fout, variable, value);
-
- if (fclose(fout) < 0) {
- free(tmpname);
- warn("var_set: write error for '%s'", fname);
- return -1;
- }
-
- if (stat(tmpname, &st) < 0) {
- free(tmpname);
- warn("var_set: cannot stat tempfile for '%s'", fname);
- return -1;
- }
-
- if (st.st_size == 0) {
- if (remove(tmpname) < 0) {
- free(tmpname);
- warn("var_set: cannot remove tempfile for '%s'",
- fname);
- return -1;
- }
- free(tmpname);
- if (remove(fname) < 0) {
- warn("var_set: cannot remove '%s'", fname);
- return -1;
- }
- return 0;
- }
-
- if (rename(tmpname, fname) < 0) {
- free(tmpname);
- warn("var_set: cannot move tempfile to '%s'", fname);
- return -1;
- }
- free(tmpname);
- return 0;
-}
-
-/*
- * Check if line contains variable var, return pointer to its value or NULL.
- */
-static const char *
-var_cmp(const char *line, size_t linelen, const char *var, size_t varlen)
-{
- /*
- * We expect lines to look like one of the following
- * forms:
- * VAR=value
- * VAR= value
- * We print out the value of VAR, or nothing if it
- * doesn't exist.
- */
- if (linelen < varlen+1)
- return NULL;
- if (strncmp(var, line, varlen) != 0)
- return NULL;
-
- line += varlen;
- if (*line != '=')
- return NULL;
-
- ++line;
- linelen -= varlen+1;
- if (linelen > 0 && *line == ' ')
- ++line;
- return line;
-}
-
-/*
- * Print given variable with value to file f.
- */
-static void
-var_print(FILE *f, const char *variable, const char *value)
-{
- const char *p;
-
- while ((p=strchr(value, '\n')) != NULL) {
- if (p != value)
- fprintf(f, "%s=%.*s\n", variable, (int)(p-value), value);
- value = p+1;
- }
-
- if (*value)
- fprintf(f, "%s=%s\n", variable, value);
-}
diff --git a/pkgtools/pkg_install/files/lib/version.c b/pkgtools/pkg_install/files/lib/version.c
deleted file mode 100644
index c4d99519a6f..00000000000
--- a/pkgtools/pkg_install/files/lib/version.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: version.c,v 1.4 2003/09/23 07:13:54 grant Exp $ */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: version.c,v 1.4 2003/09/23 07:13:54 grant Exp $");
-#endif
-
-/*
- * Copyright (c) 2001 Thomas Klausner. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Thomas Klausner for
- * the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#include "lib.h"
-#include "version.h"
-
-void
-show_version(void)
-{
- printf("%s\n", PKGTOOLS_VERSION);
- exit (0);
-}
-
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
deleted file mode 100644
index a4cce78cb57..00000000000
--- a/pkgtools/pkg_install/files/lib/version.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* $NetBSD: version.h,v 1.63 2007/03/11 22:05:03 joerg Exp $ */
-
-/*
- * Copyright (c) 2001 Thomas Klausner. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Thomas Klausner for
- * the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _INST_LIB_VERSION_H_
-#define _INST_LIB_VERSION_H_
-
-#define PKGTOOLS_VERSION "20070308"
-
-#endif /* _INST_LIB_VERSION_H_ */
diff --git a/pkgtools/pkg_install/files/pi2nbcompat b/pkgtools/pkg_install/files/pi2nbcompat
deleted file mode 100755
index 820ff5bcf69..00000000000
--- a/pkgtools/pkg_install/files/pi2nbcompat
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: pi2nbcompat,v 1.1 2005/11/05 13:20:08 wiz Exp $
-#
-# Copyright (c) 2003 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-if [ $# -lt 2 ]; then echo "src2nbcompat src dest"; exit 1; fi
-
-src=$1
-dest=$2
-
-case $src in
-/*) ;;
-*) src=`pwd`/$src ;;
-esac
-
-case $dest in
-/*) ;;
-*) dest=`pwd`/$dest ;;
-esac
-
-make_dir()
-{
- _d="$1"
- _destdir="$2"
- _newd=${3-`echo $_d | sed 's,^\./,,'`}
- case $_newd in
- *CVS)
- ;;
- .)
- ;;
- *)
- mkdir -p $_destdir/$_newd
- ;;
- esac
-}
-
-copy_file()
-{
- _f="$1"
- _destdir="$2"
- _newf=${3-`echo $_f | sed 's,^\./,,'`}
- case $_newf in
- *CVS/*)
- # Skip copying over any CVS information.
- ;;
- *Makefile|*Makefile.inc)
- # Skip copying over the Makefiles since we'll be using
- # a GNU autoconf-based build infrastructure.
- ;;
- *.sh)
- # Assume shell scripts will require variable substitution
- # by the GNU configure script.
- #
- cp $_f $_destdir/$_newf.in
- ;;
- *.[1-9])
- # Copy the manpage over, and generate the catpage.
- cp $_newf $_destdir/$_newf.tmp
- if [ -f $_destdir/$_newf ] && \
- diff -q -I "\$NetBSD.*\$" $_destdir/$_newf $_destdir/$_newf.tmp >/dev/null; then
- rm -f $_destdir/$_newf.tmp
- else
- mv -f $_destdir/$_newf.tmp $_destdir/$_newf
- _catf=`echo $_newf | sed 's,\.\([1-9]\),.cat\1,'`
- nroff -mandoc $_newf > $_destdir/$_catf
- fi
- ;;
- *)
- # Everything else just gets copied verbatim.
- cp $_newf $_destdir/$_newf.tmp
- if [ -f $_destdir/$_newf ] && \
- diff -q -I "\$NetBSD.*\$" $_destdir/$_newf $_destdir/$_newf.tmp >/dev/null; then
- rm -f $_destdir/$_newf.tmp
- else
- mv -f $_destdir/$_newf.tmp $_destdir/$_newf
- fi
- ;;
- esac
-}
-
-if [ -f "$src" ]; then
- srcdir=`dirname $src`
- destdir=`dirname $dest`
-else
- srcdir="$src"
- destdir="$dest"
-fi
-
-echo "Preparing directory $destdir"
-mkdir -p $destdir
-
-if [ -f "$src" ]; then
- echo "Copying $src to $dest"
- cd $srcdir
- copy_file `basename $src` $destdir `basename $dest`
-else
- echo "Copying files and directories to $destdir"
- cd $srcdir
- find . -type d -print |
- while read d; do
- make_dir $d $destdir
- done
- find . \! -type d -print |
- while read f; do
- copy_file $f $destdir
- done
-fi
diff --git a/pkgtools/pkg_install/files/pkg_install2nbcompat b/pkgtools/pkg_install/files/pkg_install2nbcompat
deleted file mode 100755
index d3aa3b84f7e..00000000000
--- a/pkgtools/pkg_install/files/pkg_install2nbcompat
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: pkg_install2nbcompat,v 1.3 2005/11/05 13:20:09 wiz Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-if [ $# -lt 1 ]; then echo "pkg_install2nbcompat dest"; exit 1; fi
-
-: ${PKGSRCDIR:=/usr/pkgsrc}
-: ${BSDSRCDIR:=/usr/src}
-
-if [ ! -d "${BSDSRCDIR}" ]; then
- echo "${BSDSRCDIR} doesn't exist"
- exit 1
-fi
-
-src2nbcompat="${PKGSRCDIR}/pkgtools/pkg_install/files/pi2nbcompat"
-dest=$1
-
-$src2nbcompat ${BSDSRCDIR}/usr.sbin/pkg_install $dest
diff --git a/pkgtools/pkg_install/files/tkpkg b/pkgtools/pkg_install/files/tkpkg
deleted file mode 100644
index 73f2f2907e3..00000000000
--- a/pkgtools/pkg_install/files/tkpkg
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/usr/pkg/bin/wish -f
-# from FreeBSD Id: tkpkg,v 1.4 1997/02/22 16:09:13 peter Exp
-#
-set pkgname ""
-wm title . "Package Installation"
-#--------------------------------------------------------------
-# The top level main window, consisting of a bar of buttons and a list
-# of packages and a description of the current package.
-#--------------------------------------------------------------
-frame .menu -relief raised -borderwidth 1
-frame .frame -borderwidth 4
-
-scrollbar .frame.scroll -relief sunken -command ".frame.list yview"
-listbox .frame.list -yscroll ".frame.scroll set" -relief sunken -setgrid 1
-pack append .frame .frame.scroll {right filly} \
- .frame.list {left expand fill}
-
-# build the lower window shoing the complete description of a pacage
-frame .f -borderwidth 4
-text .f.t -width 80 -height 20 -yscrollcommand ".f.s set" -relief sunken
-
-# Initially display instructions in this window. Erase the
-# instructions and show the package description when the user clicks
-# on a package.
-#
-.f.t insert end "Double click on a package above to see its
-complete description here."
-scrollbar .f.s -relief sunken -command ".f.t yview"
-pack append .f .f.s {right filly} .f.t {left expand fill}
-
-bind .frame.list <Double-Button-1> \
- { do_description [selection get] }
-pack append . .menu {top fill} \
- .f {bottom expand fill} \
- .frame {bottom expand fill}
-
-#----------------------------------------------------------------
-# Make menu bar:
-#----------------------------------------------------------------
-button .menu.inst -text "Install" \
- -command "apply_to_pkg \"pkg_add -v\""
-button .menu.dein -text "Deinstall" \
- -command "apply_to_pkg \"pkg_delete -v\""
-button .menu.installed -text "What is Installed?" \
- -command "list_pkgs \"pkg_info -I -a |tr ' ' ' '\""
-button .menu.available -text "What can I install?" \
- -command "list_pkgs \"pkg_info -I -c [glob -nocomplain *.{tgz,tar.z,tar.gz,tar.Z}] |tr ' ' ' '\""
-button .menu.cont -text "Contents?" \
- -command "apply_to_pkg \"pkg_info -d -v\""
-button .menu.quit -text "Quit" -command "destroy ."
-button .menu.help -text "Help" -command "do_help"
-
-pack append .menu \
- .menu.inst left \
- .menu.dein left \
- .menu.installed left \
- .menu.available left \
- .menu.cont left \
- .menu.quit left \
- .menu.help right
-#-------------------------------------------------------
-# Display the package description.
-#-------------------------------------------------------
-proc list_pkgs {s} {
- set line ""
- set f [eval "open {| sh -c \"$s\" } r"]
- .frame.list delete 0 end
- while {[gets $f line] > 0} {
- .frame.list insert end $line
- }
- close $f
-}
-
-# display the list of available packages
-set archives [glob -nocomplain *.{tgz,tar.z,tar.gz,tar.Z}]
-if {$archives == ""} {
- .frame.list delete 0 end
- .frame.list insert end "Warning: no compressed tar archives files found."
-} else {
- list_pkgs "pkg_info -I -c $archives |tr ' ' ' '"
-}
-
-#-------------------------------------------------------
-# Display the package description.
-#-------------------------------------------------------
-proc do_description {s} {
- global pkgname
- regexp {[^ ]*} $s filename
- set pkgname $filename
- .f.t delete 0.0 end
- set cmd "pkg_info -d $filename |tr -d ' '"
- set f [eval "open {| csh -c \"$cmd\" } r"]
- while {![eof $f]} {
- .f.t insert end [read $f]
- }
-}
-#-------------------------------------------------------
-# package install window.
-#-------------------------------------------------------
-proc do_help {{w .help}} {
- catch {destroy $w}
- toplevel $w
- wm title $w "Help"
- wm iconname $w "Help"
- button $w.ok -text OK -command "destroy $w"
- message $w.t -relief raised -bd 2 \
- -text "You can install, deinstall and list info on the available packages. To select a package and see its complete description, press mouse button 1 over the package name. To install a selected package, press the Install button. To exit, press the \"Quit\" button."
- pack append $w $w.ok {bottom fillx} $w.t {expand fill}
-}
-#-------------------------------------------------------
-# Apply a command to a package.
-#-------------------------------------------------------
-proc apply_to_pkg {s} {
- apply_to_pkg_err $s ""
-}
-#-------------------------------------------------------
-# Apply a command to a package, with error stream redirection instructions.
-#-------------------------------------------------------
-proc apply_to_pkg_err {s errredir} {
- global pkgname
- .f.t delete 0.0 end
- if {$pkgname == ""} {
- .f.t insert end "You must double click on a package name first!"
- } else {
- apply_to_pkg_int "$s $pkgname" "2>&1"
- }
-}
-proc apply_to_pkg_int {s errredir} {
- .f.t delete 0.0 end
- .f.t insert end "Running: $s\n"
- set f [eval "open {| sh -c \"$s $errredir\" } r"]
- while {![eof $f]} {
- .f.t insert end [read $f 64]
- }
-}
-#-------------------------------------------------------
-# Invoke an arbitrary command.
-#-------------------------------------------------------
-proc do_command {s} {
- .f.t delete 0.0 end
- .f.t insert end "Running: $s\n"
- set f [eval "open {| $s} r"]
- while {![eof $f]} {
- .f.t insert end [read $f 64]
- }
-}
-# local variables:
-# mode: csh
-# compile-command: ""
-# comment-start: "# "
-# comment-start-skip: "# "
-# end:
diff --git a/pkgtools/pkg_install/files/view/Makefile.in b/pkgtools/pkg_install/files/view/Makefile.in
deleted file mode 100644
index b62d1935688..00000000000
--- a/pkgtools/pkg_install/files/view/Makefile.in
+++ /dev/null
@@ -1,34 +0,0 @@
-# $NetBSD: Makefile.in,v 1.4 2004/08/21 06:33:40 jlam Exp $
-
-prefix= @prefix@
-exec_prefix= @exec_prefix@
-sbindir= @sbindir@
-mandir= @mandir@
-
-man1dir= $(mandir)/man1
-cat1dir= $(mandir)/cat1
-
-INSTALL= @INSTALL@
-
-SCRIPTS= linkfarm pkg_view
-
-all:
- @true # do nothing
-
-clean:
- @true # do nothing
-
-install:
- $(INSTALL) -m 755 -d $(sbindir)
- $(INSTALL) -m 755 -d $(man1dir)
- $(INSTALL) -m 755 -d $(cat1dir)
- @for script in $(SCRIPTS); do \
- echo "$(INSTALL) $$script.sh $(sbindir)/$$script"; \
- $(INSTALL) $$script.sh $(sbindir)/$$script; \
- done
- @for script in $(SCRIPTS); do \
- echo "$(INSTALL) -m 444 $$script.1 $(man1dir)/$$script.1"; \
- $(INSTALL) -m 444 $$script.1 $(man1dir)/$$script.1; \
- echo "$(INSTALL) -m 444 $$script.cat1 $(cat1dir)/$$script.0"; \
- $(INSTALL) -m 444 $$script.cat1 $(cat1dir)/$$script.0; \
- done
diff --git a/pkgtools/pkg_install/files/view/linkfarm.1 b/pkgtools/pkg_install/files/view/linkfarm.1
deleted file mode 100644
index 93c1b1cec6f..00000000000
--- a/pkgtools/pkg_install/files/view/linkfarm.1
+++ /dev/null
@@ -1,147 +0,0 @@
-.\" $NetBSD: linkfarm.1,v 1.5 2003/12/08 13:50:50 grant Exp $
-.\"
-.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd September 2, 2003
-.Dt LINKFARM 1
-.Os
-.Sh NAME
-.Nm linkfarm
-.Nd manage symbolic links to package files
-.Sh SYNOPSIS
-.Nm
-.Op Fl cDnRVv
-.Op Fl d Ar stowdir
-.Op Fl s Ar subdir
-.Op Fl t Ar target
-.Ar package
-.Sh DESCRIPTION
-The
-.Nm
-command is used to manage a "linkfarm", a directory tree of symbolic links in
-.Ar target
-to the files in the
-.Ar package
-sub-directory of
-.Ar stowdir .
-The default action is to create a linkfarm to a package.
-.Pp
-The following command-line options are supported:
-.Bl -tag -width indent
-.It Fl c
-Check whether a package contains a linkfarm in
-.Ar target .
-If
-.Ar package
-has no symbolic links in
-.Ar target
-that correspond to its files, then return 0, otherwise return 1.
-.It Fl D
-Delete the linkfarm for
-.Ar package .
-.It Fl d Ar stowdir
-Set
-.Ar stowdir
-as the directory in which
-.Ar package
-can be found.
-The default
-.Ar stowdir
-is the
-.Pa packages
-sub-directory in the default
-.Ar target
-directory.
-.It Fl n
-Don't actually execute the commands for removing and creating the symbolic
-links and directories.
-.It Fl R
-Delete and re-create the linkfarm for
-.Ar package .
-.It Fl s Ar subdir
-The root of the package hierarchy for the linkfarm is the
-.Ar subdir
-sub-directory in the package.
-By default, assume the root of the package hierarchy is simply the
-.Ar package
-directory.
-.It Fl t Ar target
-Set
-.Ar target
-as the directory in which to create and delete the linkfarm for
-.Ar package .
-The default
-.Ar target
-directory is
-.Pa /usr/pkg
-but may be overridden by the
-.Ev LOCALBASE
-environment variable.
-.It Fl V
-Print version number and exit.
-.It Fl v
-Turn on verbose output.
-Specifying
-.Fl v
-multiple times increases the level of verbosity.
-.El
-.Sh ENVIRONMENT
-.Bl -tag -width indent
-.It Ev LOCALBASE
-The standard packages directory,
-.Pa /usr/pkg ,
-can be overridden by specifying an alternative directory in the
-.Ev LOCALBASE
-environment variable. This affects the default
-.Ar target
-and
-.Ar stowdir
-directories.
-.It Ev PLIST_IGNORE_FILES
-This can be used to specify files in
-.Ar package
-that should ignored when creating and deleting symbolic links in
-.Ar target .
-.Ev PLIST_IGNORE_FILES
-is a space-separated list of shell glob patterns that match files relative
-to the
-.Ar package
-directory, and it defaults to "info/dir *[~#] *.OLD *.orig *,v".
-.El
-.Sh SEE ALSO
-.Xr lndir 1 ,
-.Xr pkg_view 1
-.Sh AUTHORS
-The
-.Nm
-utility was written by
-.An Alistair G. Crooks Aq agc@NetBSD.org .
diff --git a/pkgtools/pkg_install/files/view/linkfarm.cat1 b/pkgtools/pkg_install/files/view/linkfarm.cat1
deleted file mode 100644
index 77897246e1f..00000000000
--- a/pkgtools/pkg_install/files/view/linkfarm.cat1
+++ /dev/null
@@ -1,67 +0,0 @@
-LINKFARM(1) NetBSD General Commands Manual LINKFARM(1)
-
-NNAAMMEE
- lliinnkkffaarrmm - manage symbolic links to package files
-
-SSYYNNOOPPSSIISS
- lliinnkkffaarrmm [--ccDDnnRRVVvv] [--dd _s_t_o_w_d_i_r] [--ss _s_u_b_d_i_r] [--tt _t_a_r_g_e_t] _p_a_c_k_a_g_e
-
-DDEESSCCRRIIPPTTIIOONN
- The lliinnkkffaarrmm command is used to manage a "linkfarm", a directory tree of
- symbolic links in _t_a_r_g_e_t to the files in the _p_a_c_k_a_g_e sub-directory of
- _s_t_o_w_d_i_r. The default action is to create a linkfarm to a package.
-
- The following command-line options are supported:
-
- --cc Check whether a package contains a linkfarm in _t_a_r_g_e_t. If
- _p_a_c_k_a_g_e has no symbolic links in _t_a_r_g_e_t that correspond to its
- files, then return 0, otherwise return 1.
-
- --DD Delete the linkfarm for _p_a_c_k_a_g_e.
-
- --dd _s_t_o_w_d_i_r
- Set _s_t_o_w_d_i_r as the directory in which _p_a_c_k_a_g_e can be found. The
- default _s_t_o_w_d_i_r is the _p_a_c_k_a_g_e_s sub-directory in the default
- _t_a_r_g_e_t directory.
-
- --nn Don't actually execute the commands for removing and creating the
- symbolic links and directories.
-
- --RR Delete and re-create the linkfarm for _p_a_c_k_a_g_e.
-
- --ss _s_u_b_d_i_r
- The root of the package hierarchy for the linkfarm is the _s_u_b_d_i_r
- sub-directory in the package. By default, assume the root of the
- package hierarchy is simply the _p_a_c_k_a_g_e directory.
-
- --tt _t_a_r_g_e_t
- Set _t_a_r_g_e_t as the directory in which to create and delete the
- linkfarm for _p_a_c_k_a_g_e. The default _t_a_r_g_e_t directory is _/_u_s_r_/_p_k_g
- but may be overridden by the LOCALBASE environment variable.
-
- --VV Print version number and exit.
-
- --vv Turn on verbose output. Specifying --vv multiple times increases
- the level of verbosity.
-
-EENNVVIIRROONNMMEENNTT
- LOCALBASE
- The standard packages directory, _/_u_s_r_/_p_k_g, can be overridden by
- specifying an alternative directory in the LOCALBASE environment
- variable. This affects the default _t_a_r_g_e_t and _s_t_o_w_d_i_r directo-
- ries.
-
- PLIST_IGNORE_FILES
- This can be used to specify files in _p_a_c_k_a_g_e that should ignored
- when creating and deleting symbolic links in _t_a_r_g_e_t.
- PLIST_IGNORE_FILES is a space-separated list of shell glob pat-
- terns that match files relative to the _p_a_c_k_a_g_e directory, and it
- defaults to "info/dir *[~#] *.OLD *.orig *,v".
-
-SSEEEE AALLSSOO
- lndir(1), pkg_view(1)
-
-AAUUTTHHOORRSS
- The lliinnkkffaarrmm utility was written by Alistair G. Crooks <agc@NetBSD.org>.
-
-NetBSD 2.0 September 2, 2003 NetBSD 2.0
diff --git a/pkgtools/pkg_install/files/view/linkfarm.sh.in b/pkgtools/pkg_install/files/view/linkfarm.sh.in
deleted file mode 100644
index a1b1049e572..00000000000
--- a/pkgtools/pkg_install/files/view/linkfarm.sh.in
+++ /dev/null
@@ -1,232 +0,0 @@
-#! /bin/sh
-
-# $NetBSD: linkfarm.sh.in,v 1.4 2004/08/20 20:09:53 jlam Exp $
-
-#
-# Copyright (c) 2002 Alistair G. Crooks. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Alistair G. Crooks.
-# 4. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# set -x
-
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-sbindir="@sbindir@"
-
-# set up program definitions
-findprog="@FIND@"
-grepprog="@GREP@"
-lnprog="@LN@"
-mkdirprog="@MKDIR@"
-pkginfoprog="@sbindir@/pkg_info"
-rmprog="@RM@"
-rmdirprog="@RMDIR@"
-sedprog="@SED@"
-sortprog="@SORT@"
-
-usage() {
- echo 'Usage: linkfarm [options] package'
- exit 1
-}
-
-version() {
- $pkginfoprog -V
- exit 0
-}
-
-checkdir() {
- if [ ! -d "$1" ]; then
- echo "linkfarm: \`$1' doesn't exist"
- exit 1
- fi
-}
-
-ignorefiles=${PLIST_IGNORE_FILES:-"info/dir *[~#] *.OLD *.orig *,v"}
-linktype=-s
-
-# default action: create a linkfarm in $target from $stowdir/$1
-# i.e. linkfarm --target=${prefix}/${view} --dir=${prefix}/packages $1
-#
-doit=""
-target=${LOCALBASE:-/usr/pkg}
-stowdir=${target}/packages
-subdir=""
-verbose=0
-
-# default action is to create
-check=no
-delete=no
-create=yes
-
-# process args - can't use getopt(1) because of '--' style args
-while [ $# -gt 0 ]; do
- case "$1" in
- -D) delete=yes; create=no ;;
- -R) delete=yes; create=yes ;;
- -V) version ;;
- -c) check=yes; doit=":" ;;
- -d) stowdir=$2; shift ;;
- -d*) stowdir=`echo $1 | $sedprog -e 's|-d||'` ;;
- -s) subdir=$2; shift ;;
- -s*) subdir=`echo $1 | $sedprog -e 's|-s||'` ;;
- -t) target=$2; shift ;;
- -t*) target=`echo $1 | $sedprog -e 's|-t||'` ;;
- -n) doit=":" ;;
- -v) verbose=`expr $verbose + 1` ;;
-
- --delete) delete=yes; create=no ;;
- --dir=*) stowdir=`echo $1 | $sedprog -e 's|--dir=||'` ;;
- --restow) delete=yes; create=yes ;;
- --subdir=*) subdir=`echo $1 | $sedprog -e 's|--subdir=||'` ;;
- --target=*) target=`echo $1 | $sedprog -e 's|--target=||'` ;;
- --version) version ;;
-
- --) shift; break ;;
- *) break ;;
- esac
- shift
-done
-
-# set the package name
-package=$1
-
-# make sure stowdir has a full pathname
-case $stowdir in
-/*) ;;
-*) stowdir=`pwd`/$stowdir ;;
-esac
-
-# Set the directory from which we symlink.
-case $subdir in
-"") fromdir=$stowdir/$package ;;
-*) fromdir=$stowdir/$package/$subdir ;;
-esac
-
-# Set the directory to which we symlink.
-case $target in
-/*) todir=$target ;;
-*) todir=`pwd`/$target ;;
-esac
-
-# if we're checking the entries, check, then exit
-case $check in
-yes)
- checkdir $fromdir
- (cd $fromdir
- ex=0
- $findprog . ! -type d -print | \
- $sedprog -e 's|^\./||' | \
- while read f; do
- if [ -e $todir/$f ]; then
- ignore=no
- for i in $ignorefiles; do
- case $f in
- $i) ignore=yes; break ;;
- esac
- done
- case $ignore in
- no)
- echo "${f}"; ex=1 ;;
- esac
- fi
- done
- exit $ex) || exit 1
- ;;
-esac
-
-# if we need to get rid of old linkfarms, do it
-case $delete in
-yes)
- checkdir $fromdir
- (cd $fromdir
- $findprog . ! -type d -print | \
- $sedprog -e 's|^\./||' | \
- while read f; do
- ignore=no
- for i in $ignorefiles; do
- case $f in
- $i) ignore=yes; break ;;
- esac
- done
- case $ignore in
- no)
- if [ $verbose -gt 0 ]; then
- echo "$rmprog -f $todir/$f"
- fi
- $doit $rmprog -f $todir/$f ;;
- esac
- done
- $findprog . -type d -print | \
- $sedprog -e 's|^\./||' | \
- $sortprog -r | \
- while read d; do
- if [ $verbose -gt 0 ]; then
- echo "$rmdirprog $todir/$d"
- fi
- $doit $rmdirprog $todir/$d > /dev/null 2>&1
- done)
- ;;
-esac
-
-# if we need to create new linkfarms, do it
-case $create in
-yes)
- checkdir $fromdir
- (cd $fromdir
- $findprog . -type d -print | \
- $sedprog -e 's|^\./||' | \
- while read d; do
- case "$d" in
- "") continue ;;
- esac
- if [ $verbose -gt 0 ]; then
- echo "$mkdirprog -p $todir/$d"
- fi
- $doit $mkdirprog -p $todir/$d > /dev/null 2>&1
- done
- $findprog . ! -type d -print | \
- $sedprog -e 's|^\./||' | \
- while read f; do
- ignore=no
- for i in $ignorefiles; do
- case $f in
- $i) ignore=yes; break ;;
- esac
- done
- case $ignore in
- no)
- if [ $verbose -gt 0 ]; then
- echo "$lnprog ${linktype} $fromdir/$f $todir/$f"
- fi
- $doit $lnprog ${linktype} $fromdir/$f $todir/$f ;;
- esac
- done)
- ;;
-esac
-
-exit 0
diff --git a/pkgtools/pkg_install/files/view/pkg_view.1 b/pkgtools/pkg_install/files/view/pkg_view.1
deleted file mode 100644
index 7c6869a50ba..00000000000
--- a/pkgtools/pkg_install/files/view/pkg_view.1
+++ /dev/null
@@ -1,280 +0,0 @@
-.\" $NetBSD: pkg_view.1,v 1.10 2005/05/30 13:23:32 wiz Exp $
-.\"
-.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd September 8, 2003
-.Dt PKG_VIEW 1
-.Os
-.Sh NAME
-.Nm pkg_view
-.Nd add and delete instances of depoted packages in views
-.Sh SYNOPSIS
-.Nm
-.Op Fl nVv
-.Op Fl d Ar stowdir
-.Op Fl i Ar ignore
-.Op Fl k Ar pkg_dbdir
-.Op Fl W Ar viewbase
-.Op Fl w Ar view
-.Ar command
-.Ar package ...
-.Sh DESCRIPTION
-The
-.Nm
-command is used to add and delete instances of depoted packages in
-.Ar stowdir
-in a
-.Ar view
-in the
-.Ar viewbase
-directory.
-.Sh WARNING
-.Bf -emphasis
-Since the
-.Nm
-command may execute scripts or programs provided by a package file,
-your system may be susceptible to
-.Dq Trojan horses
-or other subtle
-attacks from miscreants who create dangerous package files.
-.Pp
-You are advised to verify the competence and identity of those who
-provide installable package files.
-For extra protection, examine all the package control files in the
-package database directory
-.Pa ( /usr/pkg/packages/\*[Lt]pkg-name\*[Gt]/ ) .
-Pay particular attention to any
-.Pa +INSTALL ,
-.Pa +DEINSTALL ,
-.Pa +REQUIRE ,
-or
-.Pa +MTREE_DIRS
-files, and inspect the
-.Pa +CONTENTS
-file for
-.Cm @cwd ,
-.Cm @mode
-(check for setuid),
-.Cm @dirrm ,
-.Cm @exec ,
-and
-.Cm @unexec
-directives, and/or use the
-.Xr pkg_info 1
-command to examine the installed package control files.
-.Ef
-.Sh OPTIONS
-The following command-line options are supported:
-.Bl -tag -width indent
-.It Fl d Ar stowdir
-Set
-.Ar stowdir
-as the directory in which the depoted packages can be found.
-If this option isn't specified, then the
-.Ar stowdir
-is taken from the value of the environment variable
-.Ev DEPOTBASE
-if it's set, otherwise the default
-.Ar stowdir
-is the path to the
-.Pa packages
-directory under
-.Ar viewbase .
-.It Fl i Ar ignore
-Add
-.Ar ignore
-to the list of files in
-.Ar package
-that should ignored when adding or removing the package instance from
-.Ar view .
-.It Fl k Ar pkg_dbdir
-Set
-.Ar pkg_dbdir
-as the package database directory for the default (empty) view.
-If this option isn't specified, then the package database directory is
-taken from the value of the environment variable
-.Ev PKG_DBDIR ,
-otherwise it defaults to
-.Pa /var/db/pkg .
-.It Fl n
-Don't actually execute the commands for manipulating the package instances.
-.It Fl V
-Print the version number and exit.
-.It Fl v
-Turn on verbose output.
-Specifying
-.Fl v
-multiple times increases the level of verbosity.
-.It Fl W Ar viewbase
-Set
-.Ar viewbase
-as the directory in which all the views are managed.
-The default
-.Ar viewbase
-directory is
-.Pa /usr/pkg
-but may be overridden by the
-.Ev LOCALBASE
-environment variable.
-.It Fl w Ar view
-Set
-.Ar view
-as the directory in
-.Ar viewbase
-in which the package instances should be added or deleted.
-The default
-.Ar view
-is the empty view but may be overridden by the
-.Ev PKG_VIEW
-environment variable.
-.El
-.Pp
-The following commands are supported:
-.Bl -tag -width indent
-.It Cm add
-Add the listed package instances into
-.Ar view .
-.It Cm check
-Check whether the listed package instances are present in
-.Ar view .
-If they are not present, then return 0, otherwise return 1.
-.It Cm delete
-Delete the listed package instances from
-.Ar view .
-.El
-.Sh ENVIRONMENT
-.Bl -tag -width indent
-.It Ev DEPOTBASE
-This is the location of the
-.Ar stowdir
-directory inside which all depoted packages are kept.
-The default
-.Ar stowdir
-is the
-.Pa packages
-directory under
-.Ar viewbase .
-.It Ev LOCALBASE
-This is the location of the
-.Ar viewbase
-directory in which all the views are managed.
-The default
-.Ar viewbase
-directory is
-.Pa /usr/pkg .
-.It Ev PKG_DBDIR
-If the
-.Fl k
-flag isn't given, then the value of the environment variable
-.Ev PKG_DBDIR
-is the package database directory for the default view,
-otherwise it defaults to
-.Pa /var/db/pkg .
-.It Ev PLIST_IGNORE_FILES
-This can be used to specify files in
-.Ar package
-that should ignored when adding or removing the package instance from
-.Ar view .
-.Ev PLIST_IGNORE_FILES
-is a space-separated list of shell glob patterns that match files relative
-to the
-.Ar package
-depot directory, and it defaults to "info/dir *[~#] *.OLD *.orig *,v".
-This is overridden by any
-.Ev _PLIST_IGNORE_FILES
-setting in a package's
-.Ar build-info-file
-(see
-.Xr pkg_create 1 )
-if it exists.
-.It Ev PKG_VIEW
-The default view can be specified in the
-.Ev PKG_VIEW
-environment variable.
-.El
-.Sh FILES
-.Bl -tag -width indent
-.It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+INSTALL
-If the package contains an
-.Ar install
-script (see
-.Xr pkg_create 1 ) ,
-then after the package instance is added into a view, the script is
-executed with the following arguments:
-.Bl -tag -width package
-.It Ar package
-The name of the package instance being added.
-.It Cm VIEW-INSTALL
-Keyword denoting that the script is to perform any actions needed after
-the package instance is added to a view.
-.El
-.Pp
-If the
-.Ar install
-script exits with a non-zero status code, the installation is terminated.
-.It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+DEINSTALL
-If the package contains an
-.Ar deinstall
-script (see
-.Xr pkg_create 1 ) ,
-then before the package instance is deleted from a view, the script is
-executed with the following arguments:
-.Bl -tag -width package
-.It Ar package
-The name of the package instance being deleted.
-.It Cm VIEW-DEINSTALL
-Keyword denoting that the script is to perform any actions needed before
-the package instance is deleted from a view.
-.El
-.Pp
-If the
-.Ar deinstall
-script exits with a non-zero status code, the de-installation is terminated.
-.El
-.Pp
-The
-.Ar install
-and
-.Ar deinstall
-scripts are called with the environment variable
-.Ev PKG_PREFIX
-set to the path to the
-.Ar view
-directory.
-.Sh SEE ALSO
-.Xr linkfarm 1 ,
-.Xr pkg_delete 1
-.Sh AUTHORS
-The
-.Nm
-utility was written by
-.An Alistair G. Crooks Aq agc@NetBSD.org .
diff --git a/pkgtools/pkg_install/files/view/pkg_view.cat1 b/pkgtools/pkg_install/files/view/pkg_view.cat1
deleted file mode 100644
index 2a036988de1..00000000000
--- a/pkgtools/pkg_install/files/view/pkg_view.cat1
+++ /dev/null
@@ -1,144 +0,0 @@
-PKG_VIEW(1) NetBSD General Commands Manual PKG_VIEW(1)
-
-NNAAMMEE
- ppkkgg__vviieeww -- add and delete instances of depoted packages in views
-
-SSYYNNOOPPSSIISS
- ppkkgg__vviieeww [--nnVVvv] [--dd _s_t_o_w_d_i_r] [--ii _i_g_n_o_r_e] [--kk _p_k_g___d_b_d_i_r] [--WW _v_i_e_w_b_a_s_e]
- [--ww _v_i_e_w] _c_o_m_m_a_n_d _p_a_c_k_a_g_e _._._.
-
-DDEESSCCRRIIPPTTIIOONN
- The ppkkgg__vviieeww command is used to add and delete instances of depoted pack-
- ages in _s_t_o_w_d_i_r in a _v_i_e_w in the _v_i_e_w_b_a_s_e directory.
-
-WWAARRNNIINNGG
- _S_i_n_c_e _t_h_e ppkkgg__vviieeww _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _p_r_o_v_i_d_e_d _b_y _a
- _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n _h_o_r_s_e_s_'_' _o_r
- _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s _p_a_c_k_a_g_e _f_i_l_e_s_.
-
- _Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_-
- _v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _e_x_a_m_i_n_e _a_l_l _t_h_e
- _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _d_a_t_a_b_a_s_e _d_i_r_e_c_t_o_r_y
- _(_/_u_s_r_/_p_k_g_/_p_a_c_k_a_g_e_s_/_<_p_k_g_-_n_a_m_e_>_/_)_. _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y
- _+_I_N_S_T_A_L_L_, _+_D_E_I_N_S_T_A_L_L_, _+_R_E_Q_U_I_R_E_, _o_r _+_M_T_R_E_E___D_I_R_S _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e
- _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@ccwwdd_, @@mmooddee _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_, @@ddiirrrrmm_, @@eexxeecc_, _a_n_d
- @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e
- _i_n_s_t_a_l_l_e_d _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_.
-
-OOPPTTIIOONNSS
- The following command-line options are supported:
-
- --dd _s_t_o_w_d_i_r
- Set _s_t_o_w_d_i_r as the directory in which the depoted packages can be
- found. If this option isn't specified, then the _s_t_o_w_d_i_r is taken
- from the value of the environment variable DEPOTBASE if it's set,
- otherwise the default _s_t_o_w_d_i_r is the path to the _p_a_c_k_a_g_e_s direc-
- tory under _v_i_e_w_b_a_s_e.
-
- --ii _i_g_n_o_r_e
- Add _i_g_n_o_r_e to the list of files in _p_a_c_k_a_g_e that should ignored
- when adding or removing the package instance from _v_i_e_w.
-
- --kk _p_k_g___d_b_d_i_r
- Set _p_k_g___d_b_d_i_r as the package database directory for the default
- (empty) view. If this option isn't specified, then the package
- database directory is taken from the value of the environment
- variable PKG_DBDIR, otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
-
- --nn Don't actually execute the commands for manipulating the package
- instances.
-
- --VV Print the version number and exit.
-
- --vv Turn on verbose output. Specifying --vv multiple times increases
- the level of verbosity.
-
- --WW _v_i_e_w_b_a_s_e
- Set _v_i_e_w_b_a_s_e as the directory in which all the views are managed.
- The default _v_i_e_w_b_a_s_e directory is _/_u_s_r_/_p_k_g but may be overridden
- by the LOCALBASE environment variable.
-
- --ww _v_i_e_w
- Set _v_i_e_w as the directory in _v_i_e_w_b_a_s_e in which the package
- instances should be added or deleted. The default _v_i_e_w is the
- empty view but may be overridden by the PKG_VIEW environment
- variable.
-
- The following commands are supported:
-
- aadddd Add the listed package instances into _v_i_e_w.
-
- cchheecckk Check whether the listed package instances are present in _v_i_e_w.
- If they are not present, then return 0, otherwise return 1.
-
- ddeelleettee Delete the listed package instances from _v_i_e_w.
-
-EENNVVIIRROONNMMEENNTT
- DEPOTBASE
- This is the location of the _s_t_o_w_d_i_r directory inside which all
- depoted packages are kept. The default _s_t_o_w_d_i_r is the _p_a_c_k_a_g_e_s
- directory under _v_i_e_w_b_a_s_e.
-
- LOCALBASE
- This is the location of the _v_i_e_w_b_a_s_e directory in which all the
- views are managed. The default _v_i_e_w_b_a_s_e directory is _/_u_s_r_/_p_k_g.
-
- PKG_DBDIR
- If the --kk flag isn't given, then the value of the environment
- variable PKG_DBDIR is the package database directory for the
- default view, otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
-
- PLIST_IGNORE_FILES
- This can be used to specify files in _p_a_c_k_a_g_e that should ignored
- when adding or removing the package instance from _v_i_e_w.
- PLIST_IGNORE_FILES is a space-separated list of shell glob pat-
- terns that match files relative to the _p_a_c_k_a_g_e depot directory,
- and it defaults to "info/dir *[~#] *.OLD *.orig *,v". This is
- overridden by any _PLIST_IGNORE_FILES setting in a package's
- _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e (see pkg_create(1)) if it exists.
-
- PKG_VIEW
- The default view can be specified in the PKG_VIEW environment
- variable.
-
-FFIILLEESS
- <pkg-dbdir>/<package>/+INSTALL
- If the package contains an _i_n_s_t_a_l_l script (see pkg_create(1)),
- then after the package instance is added into a view, the script
- is executed with the following arguments:
-
- _p_a_c_k_a_g_e The name of the package instance being added.
-
- VVIIEEWW--IINNSSTTAALLLL
- Keyword denoting that the script is to perform any
- actions needed after the package instance is added to a
- view.
-
- If the _i_n_s_t_a_l_l script exits with a non-zero status code, the
- installation is terminated.
-
- <pkg-dbdir>/<package>/+DEINSTALL
- If the package contains an _d_e_i_n_s_t_a_l_l script (see pkg_create(1)),
- then before the package instance is deleted from a view, the
- script is executed with the following arguments:
-
- _p_a_c_k_a_g_e The name of the package instance being deleted.
-
- VVIIEEWW--DDEEIINNSSTTAALLLL
- Keyword denoting that the script is to perform any
- actions needed before the package instance is deleted
- from a view.
-
- If the _d_e_i_n_s_t_a_l_l script exits with a non-zero status code, the
- de-installation is terminated.
-
- The _i_n_s_t_a_l_l and _d_e_i_n_s_t_a_l_l scripts are called with the environment vari-
- able PKG_PREFIX set to the path to the _v_i_e_w directory.
-
-SSEEEE AALLSSOO
- linkfarm(1), pkg_delete(1)
-
-AAUUTTHHOORRSS
- The ppkkgg__vviieeww utility was written by Alistair G. Crooks <agc@NetBSD.org>.
-
-NetBSD 3.0 September 8, 2003 NetBSD 3.0
diff --git a/pkgtools/pkg_install/files/view/pkg_view.sh.in b/pkgtools/pkg_install/files/view/pkg_view.sh.in
deleted file mode 100644
index 2d05b717074..00000000000
--- a/pkgtools/pkg_install/files/view/pkg_view.sh.in
+++ /dev/null
@@ -1,276 +0,0 @@
-#! /bin/sh
-
-# $NetBSD: pkg_view.sh.in,v 1.7 2006/06/27 23:36:14 hubertf Exp $
-
-#
-# Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Alistair G. Crooks.
-# 4. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# set -x
-
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-sbindir="@sbindir@"
-
-# set up program definitions
-chmodprog="@CHMOD@"
-cmpprog="@CMP@"
-cpprog="@CP@"
-envprog="@ENV@"
-findprog="@FIND@"
-grepprog="@GREP@"
-linkfarmprog="@sbindir@/linkfarm"
-lnprog="@LN@"
-mkdirprog="@MKDIR@"
-paxprog="@pax@"
-pkgadminprog="@sbindir@/pkg_admin"
-pkginfoprog="@sbindir@/pkg_info"
-rmprog="@RM@"
-rmdirprog="@RMDIR@"
-sedprog="@SED@"
-touchprog="@TOUCH@"
-
-usage() {
- echo 'Usage: pkg_view [-nVv] [-d stowdir] [-i ignore] [-k pkg_dbdir] [-W viewbase]'
- echo ' [-w viewname] add|check|delete pkgname...'
- exit 1
-}
-
-version() {
- $pkginfoprog -V
- exit 0
-}
-
-checkpkg() {
- if [ ! -d "$2/$1" ]; then
- echo "pkg_view: \`$1' doesn't exist in \`$2'" 1>&2
- exit 1
- fi
-}
-
-#########################################
-# Initialization and Options Processing #
-#########################################
-
-doit=""
-stowdir=""
-viewbase=${LOCALBASE:-/usr/pkg}
-view=${PKG_VIEW:-""}
-dflt_ignorefiles=${PLIST_IGNORE_FILES:-"info/dir *[~#] *.OLD *.orig *,v"}
-dflt_pkg_dbdir=${PKG_DBDIR:-/var/db/pkg}
-ignorefiles=""
-verbose=0
-
-while [ $# -gt 0 ]; do
- case "$1" in
- -d) stowdir=$2; shift ;;
- -d*) stowdir=`echo $1 | $sedprog -e 's|^-d||'` ;;
- -i) ignorefiles="$ignorefiles $2"; shift ;;
- -i*) ignorefiles="$ignorefiles `echo $1 | $sedprog -e 's|^-i||'`" ;;
- -k) dflt_pkg_dbdir="$2"; shift ;;
- -k*) dflt_pkg_dbdir=`echo $1 | $sedprog -e 's|^-k||'` ;;
- -n) doit=":" ;;
- -V) version ;;
- -v) verbose=`expr $verbose + 1` ;;
- -W) viewbase=$2; shift ;;
- -W*) viewbase=`echo $1 | $sedprog -e 's|^-p||'` ;;
- -w) view=$2; shift ;;
- --view=*) view=`echo $1 | $sedprog -e 's|--view=||'` ;;
- --) shift; break ;;
- *) break ;;
- esac
- shift
-done
-
-if [ $# -lt 1 ]; then
- usage
-fi
-
-# echoN will actually give output if ${verbose} > N.
-echo1=":"
-echo2=":"
-if [ ${verbose} -gt 0 ]; then echo1=echo; fi
-if [ ${verbose} -gt 1 ]; then echo2=echo; fi
-
-action=""
-case "$1" in
-add) action=add ;;
-check) action=check ;;
-delete|rm) action=delete ;;
-*) usage ;;
-esac
-shift
-
-# if standard view, put package info into ${dflt_pkg_dbdir}
-# if not standard view, put package info into view's pkgdb
-case "$view" in
-"")
- pkg_dbdir=${dflt_pkg_dbdir}
- targetdir=${viewbase}
- viewstr="the standard view"
- ;;
-*)
- pkg_dbdir=${viewbase}/${view}/.pkgdb
- targetdir=${viewbase}/${view}
- viewstr="view \"${view}\""
- ;;
-esac
-
-# Use stowdir if it's given, else fall back to ${DEPOTBASE} or else
-# default to ${viewbase}/packages.
-#
-depot_pkg_dbdir=${stowdir:-${DEPOTBASE:-${viewbase}/packages}}
-
-case "${depot_pkg_dbdir}" in
-${pkg_dbdir})
- echo "pkg_view: the depot and the view package database directories are the same" 1>&2
- exit 1
- ;;
-esac
-
-##########################
-# Shell helper functions #
-##########################
-
-# symlinks check|add|delete <pkg>
-#
-# Calls linkfarm(1) to check, add or delete the symlink farm in
-# ${targetdir}. We also ignore the right set of files when doing the
-# linkfarm operations.
-#
-symlinks() {
- pkg=$2
- case "$1" in
- add) linkfarmflags="" ;;
- check) linkfarmflags="-c" ;;
- delete) linkfarmflags="-D" ;;
- esac
- if [ -f ${depot_pkg_dbdir}/$pkg/+BUILD_INFO ]; then
- ignore=`$grepprog "^_PLIST_IGNORE_FILES=" ${depot_pkg_dbdir}/$pkg/+BUILD_INFO | $sedprog -e 's|^_PLIST_IGNORE_FILES=[ ]*||'`
- fi
- case "$ignore" in
- "") ignore="${dflt_ignorefiles}" ;;
- esac
- dbs=`(cd ${depot_pkg_dbdir}/$pkg; echo +*)`
- ignore="${ignore} ${ignorefiles} $dbs"
- $doit $envprog PLIST_IGNORE_FILES="${ignore}" $linkfarmprog $linkfarmflags --target=${targetdir} --dir=${depot_pkg_dbdir} $pkg
-}
-
-#############
-# Main Loop #
-#############
-
-while [ $# -gt 0 ]; do
- case $action in
- add)
- checkpkg $1 ${depot_pkg_dbdir}
- if [ -f ${pkg_dbdir}/$1/+DEPOT ]; then
- echo "pkg_view: \`$1' already exists in $viewstr" 1>&2
- exit 1
- fi
- $echo1 "Adding $1 to ${targetdir}."
- symlinks add $1
- $doit $mkdirprog -p ${depot_pkg_dbdir}/$1
- temp=${depot_pkg_dbdir}/$1/+VIEWS.$$
- $doit $touchprog ${depot_pkg_dbdir}/$1/+VIEWS
- $doit $cpprog ${depot_pkg_dbdir}/$1/+VIEWS ${temp}
- case "$doit" in
- "") ($grepprog -v '^'${pkg_dbdir}'$' ${temp} || true; echo ${pkg_dbdir}) > ${depot_pkg_dbdir}/$1/+VIEWS ;;
- esac
- $doit $rmprog ${temp}
- $doit $mkdirprog -p ${pkg_dbdir}/$1
- #
- # Copy all of the metadata files except for +VIEWS,
- # which is only for the depoted package, and
- # +REQUIRED_BY, which is irrelevant for a package in
- # a view.
- #
- case "$doit" in
- "") (cd ${depot_pkg_dbdir}/$1; $paxprog -rwpe '-s|\./+VIEWS$||' '-s|\./+REQUIRED_BY$||' ./+* ${pkg_dbdir}/$1)
- $sedprog -e 's|'${depot_pkg_dbdir}/$1'|'${targetdir}'|g' < ${depot_pkg_dbdir}/$1/+CONTENTS > ${pkg_dbdir}/$1/+CONTENTS
- echo "${depot_pkg_dbdir}/$1" > ${pkg_dbdir}/$1/+DEPOT
- ;;
- esac
- $doit $pkgadminprog -K ${pkg_dbdir} add $1
- if [ -f ${pkg_dbdir}/$1/+INSTALL ]; then
- $doit $chmodprog +x ${pkg_dbdir}/$1/+INSTALL
- $doit $envprog -i PKG_PREFIX=${targetdir} ${pkg_dbdir}/$1/+INSTALL $1 VIEW-INSTALL
- ec=$?
- if [ $ec != 0 ]; then
- echo "pkg_view: install script returned an error." 1>&2
- exit $ec
- fi
- fi
- ;;
- check)
- checkpkg $1 ${depot_pkg_dbdir}
- $echo1 "Checking $1 in ${targetdir}."
- symlinks check $1
- exit $?
- ;;
- delete)
- checkpkg $1 ${depot_pkg_dbdir}
- if [ ! -f ${pkg_dbdir}/$1/+DEPOT ]; then
- echo "pkg_view: \`$1' doesn't exist in $viewstr" 1>&2
- exit 1
- fi
- $echo1 "Deleting $1 from ${targetdir}."
- if [ -f ${pkg_dbdir}/$1/+REQUIRED_BY ]; then
- if $cmpprog -s ${pkg_dbdir}/$1/+REQUIRED_BY /dev/null; then
- : # not really required by another pkg
- else
- (echo "pkg_view: \`$1' is required by other packages:"
- $sedprog -e 's|^| |' ${pkg_dbdir}/$1/+REQUIRED_BY) 1>&2
- exit 1
- fi
- fi
- if [ -f ${pkg_dbdir}/$1/+DEINSTALL ]; then
- $doit $chmodprog +x ${pkg_dbdir}/$1/+DEINSTALL
- $doit $envprog -i PKG_PREFIX=${targetdir} ${pkg_dbdir}/$1/+DEINSTALL $1 VIEW-DEINSTALL
- ec=$?
- if [ $ec != 0 ]; then
- echo "pkg_view: de-install script returned an error." 1>&2
- exit $ec
- fi
- fi
- symlinks delete $1
- temp=${depot_pkg_dbdir}/$1/+VIEWS.$$
- $doit $cpprog ${depot_pkg_dbdir}/$1/+VIEWS ${temp}
- case "$doit" in
- "") ($grepprog -v '^'${pkg_dbdir}'$' ${temp} || true) > ${depot_pkg_dbdir}/$1/+VIEWS ;;
- esac
- $doit $rmprog ${temp}
- $doit $rmprog -rf ${pkg_dbdir}/$1
- $doit $pkgadminprog -K ${pkg_dbdir} delete $1
- ;;
- esac
- shift
-done
-
-exit 0
diff --git a/pkgtools/pkg_notify/DESCR b/pkgtools/pkg_notify/DESCR
deleted file mode 100644
index df042b64fc9..00000000000
--- a/pkgtools/pkg_notify/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-pkg_notify notifies package maintainer when a new version of the
-software is available.
diff --git a/pkgtools/pkg_notify/Makefile b/pkgtools/pkg_notify/Makefile
deleted file mode 100644
index 03271e9efc5..00000000000
--- a/pkgtools/pkg_notify/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# $NetBSD: Makefile,v 1.10 2006/10/04 21:54:59 wiz Exp $
-#
-
-DISTNAME= pkg_notify-0.4.2
-CATEGORIES= pkgtools
-MASTER_SITES= http://imil.net/NetBSD/
-
-MAINTAINER= imil@gcu.info
-HOMEPAGE= http://imil.net/wp/
-COMMENT= Notifies package maintainer when a new version is available
-
-DEPENDS+= p5-libwww>=5.76:../../www/p5-libwww
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-NO_BUILD= yes
-NO_CONFIGURE= yes
-USE_TOOLS+= perl:run
-WRKSRC= ${WRKDIR}/pkg_notify
-
-EXAMPLEDIR= ${PREFIX}/share/examples/${PKGBASE}
-CONF_FILES= ${EXAMPLEDIR}/${PKGBASE}.list \
- ${PKG_SYSCONFDIR}/${PKGBASE}.list
-
-SUBST_CLASSES+= pkg_notify
-SUBST_MESSAGE.pkg_notify= Setting up hardcoded path.
-SUBST_STAGE.pkg_notify= post-patch
-SUBST_FILES.pkg_notify= pkg_notify
-SUBST_SED.pkg_notify= -e 's|/usr/pkgsrc|${PKGSRCDIR}|' \
- -e 's|/usr/pkg|${LOCALBASE}|g' \
- -e 's|/usr/bin/make|${MAKE}|g' \
- -e 's|/usr/pkg/bin/perl|${PERL5}|g'
-
-INSTALLATION_DIRS= bin
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_notify ${PREFIX}/bin
- ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
- ${INSTALL_DATA} ${WRKSRC}/${PKGBASE}.list ${EXAMPLEDIR}
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/${PKGBASE}
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/${PKGBASE}
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_notify/PLIST b/pkgtools/pkg_notify/PLIST
deleted file mode 100644
index df3a09d0ab5..00000000000
--- a/pkgtools/pkg_notify/PLIST
+++ /dev/null
@@ -1,6 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2005/01/14 10:04:01 jmmv Exp $
-bin/pkg_notify
-share/doc/pkg_notify/README
-share/examples/pkg_notify/pkg_notify.list
-@dirrm share/examples/pkg_notify
-@dirrm share/doc/pkg_notify
diff --git a/pkgtools/pkg_notify/distinfo b/pkgtools/pkg_notify/distinfo
deleted file mode 100644
index c55923675ab..00000000000
--- a/pkgtools/pkg_notify/distinfo
+++ /dev/null
@@ -1,5 +0,0 @@
-$NetBSD: distinfo,v 1.4 2005/02/24 12:28:30 agc Exp $
-
-SHA1 (pkg_notify-0.4.2.tar.gz) = 67e7b2216d046abdb9179c67f5ce2a661570b105
-RMD160 (pkg_notify-0.4.2.tar.gz) = 43646e4c9c5004a762c823041f4a4290b262607f
-Size (pkg_notify-0.4.2.tar.gz) = 5741 bytes
diff --git a/pkgtools/pkg_regress/DESCR b/pkgtools/pkg_regress/DESCR
deleted file mode 100644
index 31422d1372c..00000000000
--- a/pkgtools/pkg_regress/DESCR
+++ /dev/null
@@ -1 +0,0 @@
-pkg_regress runs the regression test suite for the pkgsrc infrastructure.
diff --git a/pkgtools/pkg_regress/Makefile b/pkgtools/pkg_regress/Makefile
deleted file mode 100644
index 404c808034c..00000000000
--- a/pkgtools/pkg_regress/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-# $NetBSD: Makefile,v 1.7 2006/07/10 12:44:19 rillig Exp $
-
-DISTNAME= pkg_regress-0.2
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= rillig@NetBSD.org
-COMMENT= Run pkgsrc infrastructure regression test suite
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= # empty
-USE_LANGUAGES= # empty
-NO_CHECKSUM= YES
-
-INSTALLATION_DIRS= sbin
-
-.include "../../mk/bsd.prefs.mk"
-
-do-build:
- ${SED} -e 's#@MAKE@#${MAKE}#g' \
- -e 's#@PKGSRCDIR@#${PKGSRCDIR}#g' \
- -e 's#@SH@#${SH}#g' \
- -e 's#@EGREP@#${EGREP}#g' \
- ${FILESDIR}/pkg_regress.sh >${WRKSRC}/pkg_regress.sh
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_regress.sh ${PREFIX}/sbin/pkg_regress
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_regress/PLIST b/pkgtools/pkg_regress/PLIST
deleted file mode 100644
index 83382cef77e..00000000000
--- a/pkgtools/pkg_regress/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2004/08/28 00:26:57 gavan Exp $
-sbin/pkg_regress
diff --git a/pkgtools/pkg_regress/files/pkg_regress.sh b/pkgtools/pkg_regress/files/pkg_regress.sh
deleted file mode 100755
index 4af6c0c7d87..00000000000
--- a/pkgtools/pkg_regress/files/pkg_regress.sh
+++ /dev/null
@@ -1,162 +0,0 @@
-#! @SH@
-#
-# $NetBSD: pkg_regress.sh,v 1.4 2006/07/10 12:44:19 rillig Exp $
-#
-set -e
-
-: ${PKGSRCDIR="@PKGSRCDIR@"}
-: ${TEST_EGREP="@EGREP@"}
-: ${TEST_MAKE="@MAKE@"}
-
-# hooks overridable by test spec file
-
-do_setup()
-{
- return
-}
-
-do_cleanup()
-{
- return
-}
-
-do_test()
-{
- do_test_default
-}
-
-do_test_default()
-{
- # Run the test. We use an if statement to ensure that the script
- # isn't terminated if it is executed with sh -e.
- if ${TEST_MAKE} ${MAKEARGS_TEST} >${TEST_OUTFILE} 2>&1
- then
- TEST_EXITSTATUS=$?
- else
- TEST_EXITSTATUS=$?
- fi
-}
-
-check_result()
-{
- return
-}
-
-#
-# Internal helper routines
-#
-
-# regress_fail <msg>
-regress_fail() {
-
- echo "ERROR: $*" 1>&2
- TEST_RESULT=1
-}
-
-# result checking routines
-
-# Test exit status
-exit_status()
-{
-
- [ "$1" -eq "${TEST_EXITSTATUS}" ] \
- || regress_fail "Expected exit code $1, but got ${TEST_EXITSTATUS}."
-}
-
-# Test positive match against output
-output_require()
-{
-
- for re in "$@"; do
- ${TEST_EGREP} "${re}" < ${TEST_OUTFILE} >/dev/null \
- || regress_fail "Expected \"${re}\" in the output, but it is not there."
- done
-}
-
-# Test negative match against output
-output_prohibit()
-{
-
- for re in "$@"; do
- if ${TEST_EGREP} "${re}" < ${TEST_OUTFILE} >/dev/null; then
- regress_fail "Didn't expect \"${re}\" in the output, but found it."
- fi
- done
-}
-
-# runtest runs a test in a subshell, so that environment settings etc in
-# one test do not interfere with other tests.
-runtest() {
- if (
- cd $1
- TEST_RESULT=0
- TEST_EXITSTATUS=0
- TEST_OUTFILE=`mktemp -t pkg_regress` || exit 1
- . ./spec
-
- do_setup
-
- do_test
-
- check_result
-
- # Perform cleanup
-
- do_cleanup
-
- if [ -n "${MAKEARGS_CLEAN}" ]
- then
- ${TEST_MAKE} ${MAKEARGS_CLEAN} >>${TEST_OUTFILE}
- fi
-
- if [ -n "${TEST_VERBOSE}" ]
- then
- cat ${TEST_OUTFILE}
- fi
-
- rm -f ${TEST_OUTFILE}
- exit ${TEST_RESULT}
- )
- then
- TEST_PASS=`expr ${TEST_PASS} + 1`
- else
- TEST_FAIL=`expr ${TEST_FAIL} + 1`
- TEST_FAILURES="${TEST_FAILURES} $1"
- fi
-}
-
-
-TEST_PASS=0
-TEST_FAIL=0
-TEST_FAILURES=
-
-cd $PKGSRCDIR/regress
-
-case $1 in
- -v) TEST_VERBOSE=1
- shift ;;
-esac
-
-if [ $# -ne 0 ]
-then
- TEST_LIST="$@"
-else
- TEST_LIST="*"
-fi
-
-for dir in ${TEST_LIST}
-do
- if [ -f $dir/spec ]
- then
- runtest $dir
- fi
-done
-
-if [ -n "${TEST_FAILURES}" ]
-then
- echo "Tests failed: ${TEST_FAILURES}"
- echo
-fi
-
-echo "Statistics:"
-echo " $TEST_PASS passed, $TEST_FAIL failed"
diff --git a/pkgtools/pkg_rolling-replace/DESCR b/pkgtools/pkg_rolling-replace/DESCR
deleted file mode 100644
index 1f04a63715a..00000000000
--- a/pkgtools/pkg_rolling-replace/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-pkg_rolling-replace does 'make replace' on one package at a time,
-tsorting the packages being replaced according to their
-interdependencies, which avoids most duplicate rebuilds.
diff --git a/pkgtools/pkg_rolling-replace/Makefile b/pkgtools/pkg_rolling-replace/Makefile
deleted file mode 100644
index 1848e78d5a9..00000000000
--- a/pkgtools/pkg_rolling-replace/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-# $NetBSD: Makefile,v 1.4 2007/01/07 09:14:08 rillig Exp $
-
-DISTNAME= pkg_rolling-replace-0.04
-PKGREVISION= 3
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= ngoffee@bbn.com
-COMMENT= Replace/upgrade packages in-place
-
-DEPENDS+= pkg_chk>=1.76:../../pkgtools/pkg_chk
-DEPENDS+= pkg_tarup>=1.6.6:../../pkgtools/pkg_tarup
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-USE_TOOLS+= patch
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_BUILD= yes
-USE_LANGUAGES= # none
-
-INSTALLATION_DIRS= sbin ${PKGMANDIR}/man8
-
-SUBST_CLASSES+= makepath
-SUBST_STAGE.makepath= pre-configure
-SUBST_MESSAGE.makepath= Fixing path to ${MAKE}.
-SUBST_FILES.makepath= pkg_rolling-replace.sh
-SUBST_SED.makepath= -e 's,@MAKE@,${MAKE},g'
-
-.include "../../mk/bsd.prefs.mk"
-
-# target exists only to force check-pkgsrc-patch prior to install
-do-extract: check-pkgsrc-patch
- cp ${FILESDIR}/pkg_rolling-replace.sh ${WRKSRC}
-
-do-install: check-pkgsrc-patch
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_rolling-replace.sh \
- ${PREFIX}/sbin/pkg_rolling-replace
- ${INSTALL_SCRIPT} ${FILESDIR}/pkg_rolling-replace.8 \
- ${PREFIX}/${PKGMANDIR}/man8/pkg_rolling-replace.8
-
-check-pkgsrc-patch:
- @${ECHO_N} "=> Checking for unsafe_depends support in pkgsrc..."; \
- REPLACE_MK="${PKGSRCDIR}/mk/flavor/pkg/replace.mk"; \
- if [ -f "$$REPLACE_MK" ]; then \
- if [ "`${EGREP} unsafe_depends=YES $$REPLACE_MK`" ]; then \
- ${ECHO} "found."; \
- ${TRUE}; \
- else \
- ${ECHO}; \
- ${ECHO} "*** pkg_rolling replace requires pkgsrc>=2006Q3" \
- ${FALSE}; \
- fi; \
- else \
- ${ECHO} "*** pkg_rolling replace requires pkgsrc>=2006Q3"; \
- ${FALSE}; \
- fi
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_rolling-replace/PLIST b/pkgtools/pkg_rolling-replace/PLIST
deleted file mode 100644
index dd7d1172d9e..00000000000
--- a/pkgtools/pkg_rolling-replace/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2006/12/05 18:23:52 gdt Exp $
-sbin/pkg_rolling-replace
-man/man8/pkg_rolling-replace.8
diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8
deleted file mode 100644
index 4f6c7fd0e25..00000000000
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8
+++ /dev/null
@@ -1,108 +0,0 @@
-.\" $NetBSD: pkg_rolling-replace.8,v 1.2 2006/12/06 10:41:29 wiz Exp $
-.Dd August 7, 2006
-.Dt PKG_ROLLING-REPLACE 8
-.Os
-.Sh NAME
-.Nm pkg_rolling-replace
-.Nd rebuild or update packages using 'make replace' in tsorted order
-.Sh SYNOPSIS
-.Nm
-.Op Fl hnuv
-.Op Fl x Ar pkgs
-.Sh DESCRIPTION
-.Nm
-runs
-.Dq make replace
-on packages that have been marked with the
-.Dq unsafe_depends=YES
-flag or the
-.Dq rebuild=YES
-flag, optionally replacing any outdated packages (as reported by
-.Xr pkg_chk 8 )
-as well.
-.Pp
-Whenever
-.Dq make replace
-is run on a package, all installed packages
-that depend on it are marked with the
-.Dq unsafe_depends=YES
-flag, which indicates that they may no longer be ABI-compatible
-with the replaced package.
-Running
-.Nm
-with no arguments will restore such packages to a safe state by
-building a dependency graph, running
-.Xr tsort 1
-on it, and running
-.Dq make replace
-in the resulting topological order.
-The dependency graph and topological sort are re-calculated after each
-.Dq make replace ,
-in case it causes additional packages to be marked unsafe.
-.Pp
-The user can mark additional packages to be rebuilt by setting the
-.Dq rebuild=YES
-flag on them using the command
-.Dl % pkg_admin set rebuild=YES Aq pkg
-.Pp
-If the
-.Fl u
-option is given,
-.Nm
-will use
-.Xl pkg_chk 8
-to check for packages for which the version in pkgsrc is different
-than the installed version, and run
-.Dq make replace
-on those packages as well (tsorting them along with the unsafe/rebuild
-packages).
-(Usually this results in packages being upgraded to newer versions,
-assuming the pkgsrc tree is more recent than the currently installed
-packages.)
-.Ss Options
-.Bl -tag -width xxxxxxxx
-.It Fl h
-Brief help.
-.It Fl n
-Display actions that would be taken, but don't actually run
-.Dq make replace
-or change any flags on installed packages.
-This option attempts to calculate the new packages that would be
-marked unsafe after each
-.Dq make replace .
-.It Fl u
-Use
-.Xl pkg_chk 8
-to check for outdated packages, and replace those too.
-.It Fl v
-Verbose output.
-.It Fl x Ar pkgs
-Exclude the comma-separated list of packages from the update check
-when
-.Fl u
-is given (does not exclude unsafe or rebuild-requested packages).
-.El
-.Sh ENVIRONMENT
-.Nm
-uses the following environment variables.
-.Bl -tag -width xxxx
-.It Ev PKGSRCDIR
-Base of pkgsrc tree.
-Defaults to
-.Pa /usr/pkgsrc .
-.It Ev PKG_DBDIR
-pkgsrc database directory.
-If not set in environment then defaults to
-.Pa /var/db/pkg .
-.El
-.Sh AUTHORS
-.An -nosplit
-.An Nick Goffee
-.Aq ngoffee@bbn.com ,
-with initial idea and many suggestions from
-.An Greg Troxel
-.Aq gdt@ir.bbn.com .
-.Sh BUGS
-.Nm
-does not run fully automatically when any significant number of
-packages need to be replaced.
diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
deleted file mode 100755
index a963c575447..00000000000
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
+++ /dev/null
@@ -1,396 +0,0 @@
-#!/bin/sh
-
-# $NetBSD: pkg_rolling-replace.sh,v 1.2 2006/12/18 12:36:17 gdt Exp $
-#<license>
-# Copyright (c) 2006 BBN Technologies Corp. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of BBN Technologies nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY BBN TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL BBN TECHNOLOGIES OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# Effort sponsored in part by the Defense Advanced Research Projects
-# Agency (DARPA) and the Department of the Interior National Business
-# Center under agreement number NBCHC050166.
-#</license>
-
-# REVIEW NOTATION LEGEND
-# XXX marks things that are broken/kludgy
-# TODO marks things that need to be done
-# FIXED marks items fixed, needs review and deletion of FIXED comment
-
-# Items to be completed for initial release:
-
-# TODO: move bulk of help into a real man page.
-
-# Items for future work (some imply changes in pkgsrc, not necessarily here)
-#
-# Make a pass over all packages for build depends, and rememeber
-# which packages have been so checked. Check newly unsafe packages.
-# The current lazy evaluation can perhaps fail to do things in the
-# right order. Alternatively, explain why the current scheme is safe
-# and preferred.
-#
-# Consider expansion to update via binary packages. This raises
-# interesting questions about ABIs and binary builds
-#
-# Deal with conflicts in a smarter way, perhaps more automatically.
-# This is hard because just removing packages is not ok.
-#
-# Handle foo being split into foo and foo-share. Now, make replace
-# of foo pulls in foo-share which conflicts with foo. This needlessly
-# loses.
-#
-# Parse mk.conf for PKGSRCDIR, etc.
-
-test -n "$PKG_DBDIR" || PKG_DBDIR=/var/db/pkg
-test -n "$PKGSRCDIR" || PKGSRCDIR=/usr/pkgsrc
-
-unset PKG_PATH || true #or pkgsrc makefiles will complain
-
-# Substituted by pkgsrc at pre-configure time.
-MAKE=@MAKE@
-
-usage()
-{
- echo "Usage: pkg_rolling-replace [opts]
- -h This help
- -n Don't actually do make replace
- -u Update mismatched packages
- -v Verbose
- -x <pkg> exclude <pkg> from update check
-
-pkg_rolling-replace does 'make replace' on one package at a time,
-tsorting the packages being replaced according to their
-interdependencies, which avoids most duplicate rebuilds.
-
-pkg_rolling-replace can be used in one of two ways:
-
- - 'make replace' is unsafe in that, if the replaced package's ABI
- changes, its dependent packages may break. If this happens, run
- 'pkg_rolling-replace' (no arguments) to rebuild them against the
- new version.
-
- - 'pkg_chk -u' will delete all your mismatched (outdated)
- packages, then reinstall them one at a time, leaving you without
- those packages in the meantime. 'pkg_rolling-replace -u' will
- instead upgrade them in place, allowing you to keep using your
- system in the meantime (maybe...if you're lucky...because
- pkg_rolling-replace replaces the \"deepest\" dependency first,
- things could still break if that happens to be a fundamental
- library whose ABI has changed).
-"
- exit 1
-}
-
-# pkg_rolling-replace's output is intermingled with pkgsrc make
-# output. Thus, we use a different prefix. pkgsrc uses '===>' for
-# major steps, and '=>' for minor ones. Thus, we use 'RR>'.
-
-OPI='RR>'
-OPC='rr>' # continuation
-
-
-# Echo the names of packages needing updates, versions stripped. This
-# has been tested with pkg_chk 1.76. Older versions are not
-# supported. Newer versions may or may not work (patches welcome).
-check_packages_mismatched()
-{
- pkg_chk -u -q | while read line; do
- # duplicate output of pkg_chk to stderr (bypass $(...) or `...`)
- echo "${OPC} $line" > /dev/stderr
- # Look for the first thing that looks like pkg-version rather
- # than category/pkg and remove the version.
- for word in $line; do
- if [ "$(echo $word | egrep '^[^/]+-[0-9][^/]*$')" ]; then
- echo $word | sed 's/-[0-9].*//'
- break #done with this line
- fi
- done
- done
-}
-
-# usage: check_packages_w_flag flag
-# echo packages with flag=YES
-check_packages_w_flag()
-{
- _flag=$1; shift
- for pkgver in $(pkg_info -e '*'); do
- if pkg_info -Bq $pkgver \
- | egrep "^$_flag=[Yy][Ee][Ss]" > /dev/null; then
- echo $pkgver | sed 's/-[0-9].*//'
- fi
- done
-}
-
-# echo dep->pkg edges for all installed packages
-depgraph_installed()
-{
- for pkgver in $(pkg_info -e '*'); do
- pkg=$(echo $pkgver | sed 's/-[0-9].*//')
- # Include $pkg as a node without dependencies in case it has none.
- echo $pkg $pkg
- for depver in $(pkg_info -Nq $pkg); do
- dep=$(echo $depver | sed 's/-[0-9].*//')
- echo $dep $pkg
- done
- done
-}
-
-# usage: who_requires pkg --in-graph DEPGRAPH
-who_requires()
-{
- _target=$1; shift
- test "$1" = '--in-graph' && shift || return $((false))
-
- while [ $# -gt 0 ]; do
- _dep=$1; _pkg=$2; shift 2;
- if [ $_dep = $_target -a $_dep != $_pkg ]; then
- echo $_pkg
- fi
- done
-}
-
-# usage: is_member x list
-# return true (0) if x appears in list, false (1) otherwise
-is_member()
-{
- _x="$1"; shift;
- while [ $# -gt 0 -a "$1" != "$_x" ]; do
- shift
- done
-
- test $# -gt 0
-}
-
-# usage: exclude list1 --from list2
-# echo list2 with items from list1 excluded
-exclude()
-{
- _excl=
- while [ $# -gt 0 -a $1 != "--from" ]; do
- _excl="$_excl $1"
- shift
- done
- if [ $# -gt 0 ]; then
- shift #discard '--from'
- fi
- while [ $# -gt 0 ]; do
- is_member $1 $_excl || echo $1
- shift
- done
-}
-
-# usage: uniquify list
-# just does sort -u on list (equiv. to sort | uniq)
-# CAUTION: reorders list
-uniqify()
-{
- for _x in $*; do echo $_x; done | sort -u
-}
-
-verbose()
-{
- if [ -n "$opt_v" ]; then
- echo "$@"
- fi
-}
-
-vsleep()
-{
- if [ -n "$opt_v" ]; then
- sleep $1
- fi
-}
-
-######################################################################
-##
-## main()
-##
-
-EXCLUDE=
-
-args=$(getopt hnuvx: $*)
-if [ $? -ne 0 ]; then
- opt_h=1
-fi
-set -- $args
-while [ $# -gt 0 ]; do
- case "$1" in
- -h) opt_h=1 ;;
- -n) opt_n=1 ;;
- -u) opt_u=1 ;;
- -v) opt_v=1 ;;
- -x) EXCLUDE="$EXCLUDE $(echo $2 | sed 's/,/ /g')" ; shift ;;
- --) shift; break ;;
- esac
- shift
-done
-
-if [ -n "$opt_h" ]; then
- usage
-fi
-
-MISMATCH_TODO=
-if [ -n "$opt_u" ]; then
- echo "${OPI} Checking for mismatched installed packages using pkg_chk"
- MISMATCH_TODO=$(check_packages_mismatched)
- echo "${OPI} Excluding the following mismatched packages:"
- echo "${OPC} EXCLUDE=[$EXCLUDE]"
- MISMATCH_TODO=$(exclude $EXCLUDE --from $MISMATCH_TODO)
-fi
-
-echo "${OPI} Checking for rebuild-requested installed packages (rebuild=YES)"
-REBUILD_TODO=$(check_packages_w_flag 'rebuild')
-
-echo "${OPI} Checking for unsafe installed packages (unsafe_depends=YES)"
-UNSAFE_TODO=$(check_packages_w_flag 'unsafe_depends')
-
-# DEPGRAPH_INSTALLED is rebuilt each round. DEPGRAPH_SRC will collect
-# edges that we discover using 'make show-depends', but that weren't
-# listed as depends by the installed version of a package, and
-# DEPENDS_CHECKED lists packages for which we've already done that
-# check.
-DEPGRAPH_INSTALLED=
-DEPGRAPH_SRC=
-DEPENDS_CHECKED=
-
-verbose "${OPI} Packages to rebuild:"
-verbose "${OPC} MISMATCH_TODO=[$(echo $MISMATCH_TODO)]" #strip newlines
-verbose "${OPC} REBUILD_TODO=[$(echo $REBUILD_TODO)]"
-verbose "${OPC} UNSAFE_TODO=[$(echo $UNSAFE_TODO)]"
-vsleep 2
-
-REPLACE_TODO=$(uniqify $MISMATCH_TODO $REBUILD_TODO $UNSAFE_TODO)
-depgraph_built=0
-
-while [ -n "$REPLACE_TODO" ]; do
- # don't rebuild depgraph if we continued from new-depends step below
- if [ "$depgraph_built" -eq 0 ]; then
- echo "${OPI} Building dependency graph for installed packages"
- DEPGRAPH_INSTALLED=$(depgraph_installed)
- depgraph_built=1
- fi
-
- echo "${OPI} Tsorting dependency graph"
- TSORTED=$(echo $DEPGRAPH_INSTALLED $DEPGRAPH_SRC | tsort)
- for pkg in $TSORTED; do
- if is_member $pkg $REPLACE_TODO; then
- break;
- fi
- done
- pkgdir=$(pkg_info -Bq $pkg | awk -F= '/PKGPATH=/{print $2}')
- echo "${OPI} Selecting $pkg ($pkgdir) as next package to replace"
- sleep 1
-
- # Newer versions in pkgsrc sometimes have more depends than are
- # recorded for the installed version (this is entirely to be
- # expected as packages are split, renamed, and add new features).
- # When this happens, add the new edges to the graph and re-tsort.
- # Don't re-tsort if the new edges were already installed once
- # (otherwise we'll go into a loop).
-
- # XXX I'm not sure that DEPENDS_CHECKED is necessary, or whether
- # simply ignoring new deps that aren't in $REPLACE_TODO would have
- # been sufficient. The DEPENDS_CHECKED approach causes one extra
- # tsort in some cases, which isn't overly expensive.
-
- # XXX After tsorting and choosing what to 'make replace', we
- # filter out packages that aren't already installed and marked for
- # replacement. This is safe, since uninstalled depends will be
- # pulled in automatically by 'make replace'; but in rare cases it
- # might be non-optimal, leading to a duplicate rebuild that we
- # would have avoided had we selected the uninstalled package in
- # tsorted order and run 'make install' on it. This seems like
- # such a rare case that the added complexity isn't worth it.
-
- if ! is_member $pkg $DEPENDS_CHECKED; then
- echo "${OPI} Checking if $pkg has new depends..."
- OLD_DEPENDS=$(pkg_info -Nq $pkg | sed 's/-[0-9].*[[:>:]]//g')
- NEW_DEPENDS=
- cd "$PKGSRCDIR/$pkgdir"
- bdeps=$(${MAKE} show-depends VARNAME=BUILD_DEPENDS)
- rdeps=$(${MAKE} show-depends)
- for depver in $bdeps $rdeps; do
- dep=$(echo $depver | sed -e 's/-[0-9].*//' -e 's/[<>]=[0-9].*//' \
- -e 's/-[][].*//')
- if ! is_member $dep $OLD_DEPENDS $NEW_DEPENDS; then
- NEW_DEPENDS="$NEW_DEPENDS $dep"
- DEPGRAPH_SRC="$DEPGRAPH_SRC $dep $pkg"
- fi
- done
- DEPENDS_CHECKED="$DEPENDS_CHECKED $pkg"
- if [ -n "$NEW_DEPENDS" ]; then
- echo "${OPI} $pkg has the following new depends (need to re-tsort):"
- echo "${OPC} [$(echo $NEW_DEPENDS)]"
- sleep 2
- continue
- fi
- fi
-
- # Do make replace, with clean before, and package and clean afterwards.
- echo "${OPI} Replacing $(pkg_info -e $pkg)"
- FAIL=
- if [ -z "$opt_n" ]; then
- cd "$PKGSRCDIR/$pkgdir" \
- && ${MAKE} clean && ${MAKE} replace && ${MAKE} package && ${MAKE} clean \
- || FAIL=1
- else
- echo "cd $PKGSRCDIR/$pkgdir && ${MAKE} clean && ${MAKE} replace && ${MAKE} package && ${MAKE} clean"
- fi
- if [ -n "$FAIL" ]; then
- echo "*** 'make replace' failed for package $pkg."
- echo "*** Please read the errors listed above, fix the problem,"
- echo "*** then re-run pkg_rolling-replace to continue."
- exit 1
- fi
- sleep 1
-
- # remove just-replaced package from all *_TODO lists
- MISMATCH_TODO=$(exclude $pkg --from $MISMATCH_TODO)
- REBUILD_TODO=$(exclude $pkg --from $REBUILD_TODO)
- UNSAFE_TODO=$(exclude $pkg --from $UNSAFE_TODO)
-
- echo "${OPI} Re-checking for unsafe installed packages (unsafe_depends=YES)"
- if [ -n "$opt_n" ]; then
- # With -n, the replace didn't happen, and thus the packages that would
- # have been marked unsafe_depends=YES were not. Add the set that
- # would have been marked so we can watch what pkg_rolling-replace
- # would have done (approximately).
- UNSAFE_TODO=$(uniqify $UNSAFE_TODO \
- $(who_requires $pkg --in-graph $DEPGRAPH_INSTALLED))
- sleep 1
- else
- UNSAFE_TODO=$(check_packages_w_flag 'unsafe_depends')
- fi
-
- verbose "${OPI} Packages to rebuild:"
- verbose "${OPC} MISMATCH_TODO=[$(echo $MISMATCH_TODO)]" #strips newlines
- verbose "${OPC} REBUILD_TODO=[$(echo $REBUILD_TODO)]"
- verbose "${OPC} UNSAFE_TODO=[$(echo $UNSAFE_TODO)]"
- vsleep 4
-
- REPLACE_TODO=$(uniqify $MISMATCH_TODO $REBUILD_TODO $UNSAFE_TODO)
- depgraph_built=0
-done
-
-echo "${OPI} No more packages to replace; done."
diff --git a/pkgtools/pkg_select/DESCR b/pkgtools/pkg_select/DESCR
deleted file mode 100644
index 458d19a03dd..00000000000
--- a/pkgtools/pkg_select/DESCR
+++ /dev/null
@@ -1,16 +0,0 @@
-pkg_select will display a curses file browser for the pkg system. You can
-browse pkgsrc and gather various informations about packages, like avail-
-able version, installed version, comment and homepage. A simple paging
-system lets you read information files. You can browse both installed
-and uninstalled packages, as well as dependencies list and perform vari-
-ous administrative tasks to them. A package finder system helps you to
-easily locate a package by its name. pkg_select can handle either source
-or binary installations when pkgsrc is installed on the local system, or
-binary only when using the pkgsrc-over-ftp feature.
-
-If no pkgsrc is installed, pkg_select offers ability fo fetch it, either
-by FTP or CVS. It is also possible to update an existing pkgsrc via the
-interface.
-
-pkg_select user interface is quite self explainatory, every available
-shortcut is shown and annotated.
diff --git a/pkgtools/pkg_select/Makefile b/pkgtools/pkg_select/Makefile
deleted file mode 100644
index d7562341eed..00000000000
--- a/pkgtools/pkg_select/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# $NetBSD: Makefile,v 1.9 2007/03/16 20:22:16 rillig Exp $
-#
-
-DISTNAME= pkg_select-20050817
-PKGREVISION= 2
-CATEGORIES= pkgtools
-MASTER_SITES= http://imil.net/NetBSD/
-
-MAINTAINER= imil@gcu.info
-COMMENT= Curses based pkgsrc system browser / manager
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}/pkg_select
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-INSTALLATION_DIRS+= ${EXAMPLEDIR} share/pkg_select
-
-EXAMPLEDIR= ${PREFIX}/share/examples/${PKGBASE}
-CONF_FILES= ${EXAMPLEDIR}/${PKGBASE}.conf.example \
- ${PKG_SYSCONFDIR}/${PKGBASE}.conf
-
-SUBST_CLASSES+= path
-SUBST_STAGE.path= pre-configure
-SUBST_MESSAGE.path= Adjusting path.
-SUBST_FILES.path= Makefile pkg_select.1 ${PKGBASE}.conf.example
-SUBST_SED.path= -e "s|/usr/pkgsrc|${PKGSRCDIR}|g"
-SUBST_SED.path+= -e "s|/usr/pkg/etc|${PKG_SYSCONFDIR}|g"
-SUBST_SED.path+= -e "s|/usr/pkg|${PREFIX}|g"
-SUBST_SED.path+= -e "s|/var/db/pkg|${PKG_DBDIR}|g"
-SUBST_SED.path+= -e "s|/usr/bin/make|${MAKE}|g"
-
-CFLAGS+= -DPKGTOOLS_PATH=\"${PKG_TOOLS_BIN}\"
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/pkg_select ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/${PKGBASE}.conf.example ${EXAMPLEDIR}
- ${INSTALL_DATA} ${WRKSRC}/mirrors.cvs ${PREFIX}/share/pkg_select
- ${INSTALL_DATA} ${WRKSRC}/mirrors.ftp ${PREFIX}/share/pkg_select
- ${INSTALL_MAN} ${WRKSRC}/pkg_select.1 ${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../devel/ncurses/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_select/PLIST b/pkgtools/pkg_select/PLIST
deleted file mode 100644
index 7412936b820..00000000000
--- a/pkgtools/pkg_select/PLIST
+++ /dev/null
@@ -1,8 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2005/04/06 15:20:42 xtraeme Exp $
-bin/pkg_select
-man/man1/pkg_select.1
-share/examples/pkg_select/pkg_select.conf.example
-share/pkg_select/mirrors.cvs
-share/pkg_select/mirrors.ftp
-@dirrm share/pkg_select
-@dirrm share/examples/pkg_select
diff --git a/pkgtools/pkg_select/distinfo b/pkgtools/pkg_select/distinfo
deleted file mode 100644
index 07567a981ae..00000000000
--- a/pkgtools/pkg_select/distinfo
+++ /dev/null
@@ -1,8 +0,0 @@
-$NetBSD: distinfo,v 1.5 2007/03/16 20:22:16 rillig Exp $
-
-SHA1 (pkg_select-20050817.tar.gz) = a7e22c666e4098c44cf6100a3b5e1cbcbeb48375
-RMD160 (pkg_select-20050817.tar.gz) = 0a16ea710303471730b7dbc0399a34d5e7cfff8b
-Size (pkg_select-20050817.tar.gz) = 45184 bytes
-SHA1 (patch-aa) = c59ecd6d4cfdde450aac1f2794ab7d42da8cbc07
-SHA1 (patch-ab) = a8750c8a5603fa63e0fc17c4be3db7cd340e75b7
-SHA1 (patch-ac) = 2ac66f0222d8f0f80af51eac1878d9f9e97dbbcb
diff --git a/pkgtools/pkg_select/patches/patch-aa b/pkgtools/pkg_select/patches/patch-aa
deleted file mode 100644
index 9749922e41b..00000000000
--- a/pkgtools/pkg_select/patches/patch-aa
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2006/03/13 00:13:37 minskim Exp $
-
---- pkg_select.h.orig 2005-03-09 03:30:07.000000000 -0800
-+++ pkg_select.h
-@@ -45,6 +45,10 @@
- #include "texts.h"
- #include "live.h"
-
-+#ifndef SLIST_HEAD_INITIALIZER
-+#define SLIST_HEAD_INITIALIZER(head) { NULL }
-+#endif
-+
- #define IN_PKGSRC 1
- #define IN_PKGDB 0
- #define IN_DEPENDS 2
diff --git a/pkgtools/pkg_select/patches/patch-ab b/pkgtools/pkg_select/patches/patch-ab
deleted file mode 100644
index 6dcc1799a69..00000000000
--- a/pkgtools/pkg_select/patches/patch-ab
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2006/03/13 00:16:41 minskim Exp $
-
---- lib.h.orig 2005-03-15 08:43:20.000000000 -0800
-+++ lib.h
-@@ -320,7 +320,6 @@ void free_lpkg(lpkg_t *);
- int pkg_perform(lpkg_head_t *);
-
- /* Externs */
--extern Boolean Verbose;
- extern Boolean Fake;
- extern Boolean Force;
- extern Boolean Replace;
diff --git a/pkgtools/pkg_select/patches/patch-ac b/pkgtools/pkg_select/patches/patch-ac
deleted file mode 100644
index 09100d38720..00000000000
--- a/pkgtools/pkg_select/patches/patch-ac
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2007/03/16 20:22:16 rillig Exp $
-
---- pkg_adm.h.orig 2005-05-12 20:18:27.000000000 +0200
-+++ pkg_adm.h 2007-03-16 21:02:16.000000000 +0100
-@@ -43,7 +43,9 @@ extern void set_pkg_path(const char *);
-
- /* this is where you may want to port to another port framework */
-
-+#ifndef PKGTOOLS_PATH
- #define PKGTOOLS_PATH "/usr/sbin"
-+#endif
- #ifndef MAKE
- #define MAKE "/usr/bin/make"
- #endif
diff --git a/pkgtools/pkg_tarup/DESCR b/pkgtools/pkg_tarup/DESCR
deleted file mode 100644
index 21481a976d4..00000000000
--- a/pkgtools/pkg_tarup/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-Script to tar up an already installed package.
-
-Now my question is, how can we include this? I'd prefer to have it
-available from pkg_admin, but that is C, and the other is a script -
-rewrite in C?
-
-The Script has still a problem, as the MTREE file is removed after
-a pkg_add/make install. As leaving the MTREE file will lead to a
-~10% increase in space needed for /var/db/pkg which I'm not sure
-we should do, esp. as the files are almost always the same again.
-(On my notebook with ~250 installed pkgs, the size increasement
-would be from 8.8MB to 10MB).
-
-Send your thoughts to me <hubertf@netbsd.org> !
diff --git a/pkgtools/pkg_tarup/Makefile b/pkgtools/pkg_tarup/Makefile
deleted file mode 100644
index 81d2747d7c9..00000000000
--- a/pkgtools/pkg_tarup/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# $NetBSD: Makefile,v 1.30 2007/02/22 19:27:02 wiz Exp $
-
-DISTNAME= pkg_tarup-1.6.6
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= hubertf@NetBSD.org
-COMMENT= Generates binary package(s) from installed pkg(s)
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= yes
-NO_BUILD= yes
-NO_MTREE= yes
-USE_LANGUAGES= # none
-
-# Set SCRIPT_SUBST to substitute "@VARIABLE@" with "value"
-SCRIPT_SUBST+= \
- ECHO=${ECHO:Q} \
- ECHO_N=${ECHO_N:Q} \
- GREP=${GREP:Q} \
- HEAD=${HEAD:Q} \
- ID=${ID:Q} \
- PKG_DBDIR=${PKG_DBDIR:Q} \
- PKG_SUFX=${PKG_SUFX:Q} \
- PREFIX=${PREFIX:Q} \
- PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \
- ROOT_USER=${ROOT_USER:Q} \
- SED=${SED:Q} \
- SH=${SH:Q} \
- SU_CMD=${SU_CMD:Q} \
- XARGS=${XARGS:Q}
-
-SCRIPT_SUBST_SED= ${SCRIPT_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-
-do-configure:
- ${SED} ${SCRIPT_SUBST_SED} \
- < ${FILESDIR}/pkg_tarup \
- > ${WRKSRC}/pkg_tarup
- ${SED} ${SCRIPT_SUBST_SED} \
- < ${FILESDIR}/pkg_tarup_all \
- > ${WRKSRC}/pkg_tarup_all
- ${SED} ${SCRIPT_SUBST_SED} \
- < ${FILESDIR}/pkg_tarup.1 \
- > ${WRKSRC}/pkg_tarup.1
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_tarup ${PREFIX}/bin
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_tarup_all ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/pkg_tarup.1 ${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_tarup/PLIST b/pkgtools/pkg_tarup/PLIST
deleted file mode 100644
index 1fccc07bd85..00000000000
--- a/pkgtools/pkg_tarup/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2004/07/14 16:08:48 erh Exp $
-bin/pkg_tarup
-bin/pkg_tarup_all
-man/man1/pkg_tarup.1
diff --git a/pkgtools/pkg_tarup/files/pkg_tarup b/pkgtools/pkg_tarup/files/pkg_tarup
deleted file mode 100644
index a5afb753e30..00000000000
--- a/pkgtools/pkg_tarup/files/pkg_tarup
+++ /dev/null
@@ -1,263 +0,0 @@
-#! @SH@
-#
-# $Id: pkg_tarup,v 1.20 2006/10/29 07:50:27 erh Exp $
-#
-# Tar up installed package
-#
-# Package names are assumed to not contain spaces.
-#
-# (c) Copyright 2000-2002 Hubert Feyrer <hubert@feyrer.de>
-#
-
-PREFIX=${PREFIX:-@PREFIX@}
-
-PATH=${PREFIX}/sbin:${PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:@PKG_TOOLS_BIN@
-export PATH
-
-OS=`uname -s`
-
-ECHO=${ECHO:-@ECHO@}
-ECHO_N=${ECHO_N:-@ECHO_N@}
-HEAD=${HEAD:-@HEAD@}
-ID=${ID:-@ID@}
-ROOT_USER=${ROOT_USER:-@ROOT_USER@}
-SED=${SED:-@SED@}
-SU_CMD=${SU_CMD:-@SU_CMD@}
-GREP=${GREP:-@GREP@}
-XARGS=${XARGS:-@XARGS@}
-
-if [ `${ID} -u` != `${ID} -u ${ROOT_USER}` ]; then
- ${ECHO} "Becoming ${ROOT_USER}@`/bin/hostname` to create a binary package"
- ${ECHO_N} "`${ECHO} ${SU_CMD} | ${SED} -e's/[[:space:]].*//'` ";\
- ( for arg in "$@"; do echo \"${arg}\"; done ) |
- ${SU_CMD} "exec ${XARGS} \"$0\""
- exit $?
-fi
-
-PKG_DBDIR=${PKG_DBDIR:-@PKG_DBDIR@}
-PKG_SUFX=${PKG_SUFX:-@PKG_SUFX@}
-
-PKGREPOSITORY=${PKGREPOSITORY:-/tmp}
-
-# XXX Force pkg_info to ignore .tgz files.
-export PKG_PATH=
-
-# Set to 1 if we also want to tar up dependencies also
-GETDEPS=0
-
-usage()
-{
- ${ECHO} "Usage: $1 [-a] [-K pkg_dbdir] [-d pkgrepository] [-s pkg_sufx] installed_pkg|pattern [...]"
- ${ECHO} "The following environment variables are used:"
- ${ECHO} " (unless overriden by command line parameters)"
- ${ECHO} " PKGREPOSITORY - A destination directory for packages (/tmp)"
- ${ECHO} " PKG_DBDIR - The location of the package database directory"
- ${ECHO} " PKG_SUFX - The suffix to append to the package (.tgz)"
- exit 1
-}
-
-check_and_add()
-{
- opt="$1"
- file="$2"
-
- if [ x"$opt" = x"" -o x"$file" = x"" ]; then
- ${ECHO} Usage: check_and_add -opt +FILE
- exit 1
- fi
-
- if [ -f "$file" ]
- then
- PKG_ARGS="${PKG_ARGS} \"${opt}\" \"${file}\""
- fi
-}
-
-create_package()
-{
- PKG="$1"
- PKG_ARGS=
- ${ECHO} "Creating binary package: $PKG"
-
- check_and_add -c "${PKG_DBDIR}/${PKG}/+COMMENT"
- check_and_add -d "${PKG_DBDIR}/${PKG}/+DESC"
- check_and_add -b "${PKG_DBDIR}/${PKG}/+BUILD_VERSION"
- check_and_add -B "${PKG_DBDIR}/${PKG}/+BUILD_INFO"
- check_and_add -s "${PKG_DBDIR}/${PKG}/+SIZE_PKG"
- check_and_add -S "${PKG_DBDIR}/${PKG}/+SIZE_ALL"
- check_and_add -i "${PKG_DBDIR}/${PKG}/+INSTALL"
- check_and_add -k "${PKG_DBDIR}/${PKG}/+DEINSTALL"
- check_and_add -r "${PKG_DBDIR}/${PKG}/+REQUIRE"
- check_and_add -D "${PKG_DBDIR}/${PKG}/+DISPLAY"
- check_and_add -m "${PKG_DBDIR}/${PKG}/+MTREE" #NOTYET#
- check_and_add -n "${PKG_DBDIR}/${PKG}/+PRESERVE"
-
- PLIST=/tmp/+CONTENTS.$$
-
- # This sed command trims out all of the following:
- # md5 magic comments, symlink magic comments
- # lines starting with @blddep, @pkgdep, @pkgcfl, @name, @mtree
- # @cwd lines that refer to the current directory "@cwd ."
- # @ignore and any line immediately following it
- ${SED} \
- -e '/^@comment MD5:/d' \
- -e '/^@comment Symlink:/d' \
- -e '/^@blddep/d' \
- -e '/^@pkgdep/d' \
- -e '/^@pkgcfl/d' \
- -e '/^@name/d' \
- -e '/^@mtree/d' \
- -e '/^@cwd \.$/d' \
- -e '/^@ignore/,/^.*$/d' \
- <"${PKG_DBDIR}/${PKG}/+CONTENTS" >"${PLIST}"
-
- # Duplicate first @cwd (work around pkg_create "feature" ...)
- ${GREP} '^@cwd' "${PLIST}" | ${HEAD} -1 >"${PLIST}.1"
- if [ -s "${PLIST}.1" ]
- then
- ${SED} \
- -e "/`cat \"${PLIST}.1\" | ${SED} 's,/,\\\\/,g'`/r${PLIST}.1" \
- <"${PLIST}" >"${PLIST}.2"
- mv "${PLIST}.2" "${PLIST}"
- fi
- rm "${PLIST}.1"
-
- # ${ECHO} -----
- # cat $PLIST
- # ${ECHO} -----
- # exit 0
-
- # Just for kicks ...
- # pkg_admin check "${PKG}"
-
- # It's kind of silly to jump through hoops to get stuff with spaces
- # here, since we have no way to pass it to pkg_create, but maybe someone
- # will care enough to fix the rest of this.
- PKG_PREFIX=`pkg_info -qp "${PKG}" | ${HEAD} -1 | ${SED} -e's/^@cwd[[:space:]]*//'`
- PKG_DEPS=`pkg_info -qf "${PKG}" | ${GREP} "^@pkgdep" | ${SED} -e's/^@pkgdep[[:space:]]*//'`
- PKG_CONFLICT=`pkg_info -qf "${PKG}" | ${GREP} "^@pkgcfl" | ${SED} -e's/^@pkgcfl[[:space:]]*//'`
-
- PKG_ARGS="${PKG_ARGS} -v"
- PKG_ARGS="${PKG_ARGS} -f \"${PLIST}\""
- PKG_ARGS="${PKG_ARGS} -l"
- PKG_ARGS="${PKG_ARGS} -p \"${PKG_PREFIX}\""
- PKG_ARGS="${PKG_ARGS} -P \"${PKG_DEPS}\""
- PKG_ARGS="${PKG_ARGS} -C \"${PKG_CONFLICT}\""
- PKG_ARGS="${PKG_ARGS} \"${PKGREPOSITORY}/${PKG}${PKG_SUFX}\""
- eval pkg_create "${PKG_ARGS}"
-
- rm -f "${PLIST}"
- return 0
-}
-
-add_to_list()
-{
- local added
-
- added=0
-
- oIFS="$IFS"
- IFS="
-"
- # Get expanded name, and escape quotes
- for rPKG in `pkg_info -e "$1" | ${SED} -e's/\"/\\\"/g'` ; do
- if [ -z "$rPKG" -o -f "${PKG_DBDIR}/${rPKG}" ] ; then
- ${ECHO} "Error: package $1 not found"
- usage "$0"
- fi
-
- added=1
- if ! ${ECHO} "${PKGS}" | ${GREP} -q "\"${rPKG}\"" ; then
- PKGS="${PKGS} \"${rPKG}\""
- fi
- done
- IFS="$oIFS"
- if [ $added -eq 0 ] ; then
- ${ECHO} "Warning: no package matching $1 found"
- fi
-}
-
-
-while [ $# -gt 0 ] ; do
- case "$1" in
- -a)
- GETDEPS=1
- shift
- ;;
- -d)
- PKGREPOSITORY="$2"
- shift 2
- ;;
- -h)
- usage
- exit 0
- ;;
- -K)
- PKG_DBDIR="$2"
- shift 2
- ;;
- -s)
- PKG_SUFX="$2"
- shift 2
- ;;
- *)
- break
- ;;
- esac
-done
-
-add_all_deps_to_list()
-{
- # Make the input separator only a newline so spaces are allowed
- oIFS="$IFS"
- IFS="
-"
- for f in `pkg_info -qf "$1" | ${GREP} @pkgdep | ${SED} -e's/^@pkgdep[[:space:]]*//' ` ; do
- add_to_list "$f"
- add_all_deps_to_list "$f"
- done
- IFS="$oIFS"
-}
-
-while [ $# -gt 0 ] ; do
- add_to_list "$1"
- if [ $GETDEPS -eq 1 ] ; then
- add_all_deps_to_list "$1"
- fi
- shift
-done
-if [ -z "${PKGS}" ] ; then
- ${ECHO} "ERROR: No packages to tarup identified!"
- usage "$0"
-fi
-FOR="
-for xPKG in ${PKGS} ; do
- create_package \"\${xPKG}\"
- if [ \$? -ne 0 ] ; then
- exit 1
- fi
-done"
-eval "${FOR}"
-
-exit 0
-
-
-+REQUIRED_BY:
-
- - maybe the squirelling away of +REQUIRED_BY should be done here
- instead of in the bsd.pkg.mk framework that normally calls this.
-
-
-mtree file considerations:
-
- - keeping uncompressed mtree file adds ~10% to the size of /var/db/pkg
-
- - could gzip file, space saving: 5kb->850b (plus some intelligence to
- uncompress them when needed)
-
- - not keeping mtree file results in pkgs w/o mtree file (but should work)
-
-integration:
-
- - how/where? I'd prefer not to have yet another pkg_* utility flying
- around, integration into pkg_admin would be nice. But how merge a
- shell script into a C executable? REWRITE in C of course! ;-)
diff --git a/pkgtools/pkg_tarup/files/pkg_tarup.1 b/pkgtools/pkg_tarup/files/pkg_tarup.1
deleted file mode 100644
index 4b2bf6512c8..00000000000
--- a/pkgtools/pkg_tarup/files/pkg_tarup.1
+++ /dev/null
@@ -1,117 +0,0 @@
-.\" $NetBSD: pkg_tarup.1,v 1.3 2004/09/21 07:11:30 cube Exp $
-.Dd July 14, 2004
-.Dt PKG_TARUP 1
-.Os
-.Sh NAME
-.Nm pkg_tarup
-.Nd a utility for tarring up installed software packages
-.Sh SYNOPSIS
-.Nm
-.Op Fl a
-.Bk -words
-.Op Fl d Ar pkgrepository
-.Ek
-.Bk -words
-.Op Fl K Ar pkg_dbdir
-.Ek
-.Bk -words
-.Op Fl s Ar pkg_sufx
-.Ek
-.Ar pkg-name-or-pattern
-.Op Ar ...
-.Sh DESCRIPTION
-The
-.Nm
-command is used to create a binary package from an installed package.
-It can be used to tar up one or more packages, including dependent
-packages, if desired.
-.Pp
-The following options are available:
-.Bl -tag -width indent
-.It Fl a
-Create packages for all dependent packages too.
-.It Fl d Ar pkgrepository
-Set
-.Ar pkgrepository
-as the destination directory for the created package file(s).
-If this option isn't specified, then
-.Pa /tmp
-is used.
-.It Fl K Ar pkg_dbdir
-Set
-.Ar pkg_dbdir
-as the package database directory.
-If this option isn't specified, then the package database directory
-is taken from the value of the environment variable
-.Ev PKG_DBDIR
-if it is set, otherwise it defaults to
-.Pa @PKG_DBDIR@ .
-.It Fl s Ar pkg_sufx
-Set
-.Ar pkg_sufx
-as the extension used for the created package file(s).
-If this option isn't specified, then
-.Pa .tgz
-is used.
-.El
-.Sh EXIT STATUS
-The
-.Nm
-utility exits 0 on success and 1 on errors.
-.Sh ENVIRONMENT
-The following environment variables affect the execution of
-.Nm :
-.Bl -tag -width indent
-.It Ev PREFIX
-Package binaries installation prefix used to build the path.
-Defaults to
-.Pa @PREFIX@ .
-.It Ev ECHO , ID , SED , SU , GREP
-Actual commands to use.
-These default to
-.Pa @ECHO@ ,
-.Pa @ID@ ,
-.Pa @SED@ ,
-.Pa @SU@ ,
-and
-.Pa @GREP@ .
-.It Ev PKG_DBDIR
-If the
-.Fl K
-flag isn't given, then
-.Ev PKG_DBDIR
-is the location of the package database directory.
-The default package database directory is
-.Pa @PKG_DBDIR@ .
-.It Ev PKG_SUFX
-If the
-.Fl s
-flag isn't given, then
-.Ev PKG_SUFX
-is the suffix of the created package file.
-The default is
-.Pa @PKG_SUFX@ .
-.It Ev PKGREPOSITORY
-If the
-.Fl d
-flag isn't given, then
-.Ev PKGREPOSITORY
-is the destination directory for the created package file(s).
-The default is
-.Pa /tmp .
-.El
-.Pp
-Any variable that affects
-.Xr pkg_info 1
-or
-.Xr pkg_create 1 .
-.Sh SEE ALSO
-.Xr pkg_create 1 ,
-.Xr pkg_info 1 ,
-.Xr packages 7
-.Sh BUGS
-Packages that contain files with spaces in their names probably
-won't work.
-There is no way to safely tell
-.Xr pkg_create 1
-about these files.
diff --git a/pkgtools/pkg_tarup/files/pkg_tarup_all b/pkgtools/pkg_tarup/files/pkg_tarup_all
deleted file mode 100644
index 4d819724aa7..00000000000
--- a/pkgtools/pkg_tarup/files/pkg_tarup_all
+++ /dev/null
@@ -1,9 +0,0 @@
-#! @SH@
-# $NetBSD: pkg_tarup_all,v 1.5 2004/10/13 23:18:35 xtraeme Exp $
-
-PREFIX=${PREFIX:-@PREFIX@}
-
-PATH=${PREFIX}/sbin:${PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:@PKG_TOOLS_BIN@
-export PATH
-
-${PREFIX}/bin/pkg_tarup -a "$@"
diff --git a/pkgtools/pkgclean/DESCR b/pkgtools/pkgclean/DESCR
deleted file mode 100644
index b6f9d527065..00000000000
--- a/pkgtools/pkgclean/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-pkgclean cleans up your pkgsrc by removing the work directories.
-It's a fast alternative for ``cd /usr/pkgsrc && make clean''.
diff --git a/pkgtools/pkgclean/Makefile b/pkgtools/pkgclean/Makefile
deleted file mode 100644
index 613316772fb..00000000000
--- a/pkgtools/pkgclean/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# $NetBSD: Makefile,v 1.12 2007/02/22 19:27:02 wiz Exp $
-
-DISTNAME= pkgclean-20051116
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= peter@pointless.nl
-COMMENT= Quickly clean up all work directories in pkgsrc
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-NO_BUILD= yes
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkgclean.sh ${PREFIX}/bin/pkgclean
- ${INSTALL_MAN} ${WRKSRC}/pkgclean.1 ${PREFIX}/${PKGMANDIR}/man1/pkgclean.1
-
-SUBST_CLASSES+= path
-SUBST_STAGE.path= post-patch
-SUBST_FILES.path= pkgclean.sh pkgclean.1
-SUBST_SED.path+= -e 's,@SH@,${SH},g'
-SUBST_SED.path+= -e 's,@PKGSRCDIR@,${PKGSRCDIR},g'
-SUBST_MESSAGE.path= Adjusting pkgsrc directory.
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkgclean/PLIST b/pkgtools/pkgclean/PLIST
deleted file mode 100644
index a216d0ab502..00000000000
--- a/pkgtools/pkgclean/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2005/01/18 22:32:01 tv Exp $
-bin/pkgclean
-man/man1/pkgclean.1
diff --git a/pkgtools/pkgclean/files/pkgclean.1 b/pkgtools/pkgclean/files/pkgclean.1
deleted file mode 100644
index 0aa88488231..00000000000
--- a/pkgtools/pkgclean/files/pkgclean.1
+++ /dev/null
@@ -1,56 +0,0 @@
-.\"
-.\" Copyright (c) 2004 Peter Postma <peter@pointless.nl>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd November 16, 2005
-.Dt PKGCLEAN 1
-.Sh NAME
-.Nm pkgclean
-.Nd clean up pkgsrc
-.Sh SYNOPSIS
-.Nm
-.Op Ar work-directory
-.Sh DESCRIPTION
-.Nm
-cleans up your pkgsrc by removing the work directories.
-It's a fast alternative for
-.Dq cd @PKGSRCDIR@ && make clean .
-.Pp
-A custom
-.Ar work-directory
-(such as "work.i386") can be listed on the command line.
-By default, it removes the "work" directories.
-.Pp
-.Nm
-uses
-.Pa @PKGSRCDIR@
-by default.
-You may specify a different path by setting
-the environment variable
-.Pa PKGSRCDIR .
-.Sh SEE ALSO
-http://www.pkgsrc.org/
-.Sh AUTHORS
-.An Peter Postma Aq peter@pointless.nl ,
-.An Roland Illig Aq rillig@NetBSD.org .
diff --git a/pkgtools/pkgclean/files/pkgclean.sh b/pkgtools/pkgclean/files/pkgclean.sh
deleted file mode 100644
index 1d4e7842c01..00000000000
--- a/pkgtools/pkgclean/files/pkgclean.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#! @SH@
-# $NetBSD: pkgclean.sh,v 1.2 2005/11/17 22:58:36 rillig Exp $
-#
-
-# Copyright (c) 2005 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Roland Illig <rillig@NetBSD.org>.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-#
-# Command line parsing
-#
-
-pkgsrcdir=${PKGSRCDIR-@PKGSRCDIR@}
-
-case $# in
-0) wrkdir_basename="work";;
-1) wrkdir_basename="$1";;
-esac
-
-#
-# Sanity checks
-#
-
-case $pkgsrcdir in
-/*) ;;
-*) echo "$0: error: PKGSRCDIR must be an absolute path." 1>&2
- exit 1;;
-esac
-case $wrkdir_basename in
-*/*) echo "$0: error: wrkdir_basename must not contain slashes." 1>&2
- exit 1;;
-esac
-
-#
-# Clean up the pkgsrc directory
-#
-
-for wrkdir in "${pkgsrcdir}"/*/*/"${wrkdir_basename}"; do
- case $wrkdir in
- "${pkgsrcdir}/*/*/${wrkdir_basename}") continue;;
- esac
-
- echo "===> Cleaning in ${wrkdir}"
-
- # When WRKOBJDIR is set, ${wrkdir_basename} is just a symlink to
- # a real directory, so both must be removed properly.
- if real_wrkdir=`cd "${wrkdir}"/. 2>/dev/null && exec pwd`; then
- rm -rf "${real_wrkdir}"
- fi
-
- rm -rf "${wrkdir}"
-done
diff --git a/pkgtools/pkgdep/DESCR b/pkgtools/pkgdep/DESCR
deleted file mode 100644
index 3ed1bb1066e..00000000000
--- a/pkgtools/pkgdep/DESCR
+++ /dev/null
@@ -1,12 +0,0 @@
-a script for displaying dependence information on software packages
-
-Usage: pkgdep [opts] package
- -I INDEX file path (default: /usr/pkgsrc/INDEX)
- -e match package by regular expression
- -r recursive
- -v output graph data for xvcg (graphics/vcg package)
-
-Examples:
- pkgdep -I /cvs/pkgsrc/INDEX x11/gtk
- pkgdep -e jpeg
- pkgdep -v -e imlib |xvcg -
diff --git a/pkgtools/pkgdep/Makefile b/pkgtools/pkgdep/Makefile
deleted file mode 100644
index e7f0c713893..00000000000
--- a/pkgtools/pkgdep/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# $NetBSD: Makefile,v 1.12 2006/09/03 00:56:30 wiz Exp $
-#
-
-DISTNAME= pkgdep-1.0
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-COMMENT= Script for displaying dependence information on software packages
-
-WRKSRC= ${WRKDIR}
-USE_TOOLS+= perl:run
-
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-
-INSTALLATION_DIRS= bin
-
-do-build:
- ${CP} ${FILESDIR}/pkgdep.pl ${WRKDIR}/pkgdep
-# ${SED} -e 's|/usr/pkgsrc|${PKGSRCDIR}|' \
-# ${FILESDIR}/pkgdep.pl > ${WRKDIR}/pkgdep
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/pkgdep ${PREFIX}/bin
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkgdep/PLIST b/pkgtools/pkgdep/PLIST
deleted file mode 100644
index 83d9209f427..00000000000
--- a/pkgtools/pkgdep/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:31:39 zuntum Exp $
-bin/pkgdep
diff --git a/pkgtools/pkgdep/files/pkgdep.pl b/pkgtools/pkgdep/files/pkgdep.pl
deleted file mode 100644
index 44ebd2171b0..00000000000
--- a/pkgtools/pkgdep/files/pkgdep.pl
+++ /dev/null
@@ -1,298 +0,0 @@
-#!/usr/bin/env perl
-# $NetBSD: pkgdep.pl,v 1.2 2000/11/27 04:42:48 sakamoto Exp $
-
-require 'getopts.pl';
-use strict;
-$^W=1;
-$|=1;
-
-use vars qw($opt_I $opt_h $opt_e $opt_r $opt_v);
-my (%pkgdir, %builddeps, %rundeps, %buildreqd, %runreqd, %printed);
-my ($indexfile) = "/usr/pkgsrc/INDEX";
-my ($package, $match_pkgs);
-my (%node, %arrow, $home_level);
-my(%color);
-$color{"D"} = "black";
-$color{"B"} = "blue";
-$color{"R"} = "red";
-
-if (!&Getopts('I:herv') || $opt_h) {&usage_and_exit;}
-if (defined($opt_I)) {$indexfile = $opt_I;}
-$package = shift;
-if (!defined($package)) {&usage_and_exit;}
-
-open(INDEX, $indexfile) || die "$indexfile: $!\n";
-while (<INDEX>) {
- my (@data) = split(/\|/);
- $data[1] =~ s/.*\/([^\/]+\/[^\/]+)$/$1/;
- $pkgdir{$data[0]} = $data[1];
- $builddeps{$data[0]} = $data[7];
- $rundeps{$data[0]} = $data[8];
-}
-close(INDEX);
-
-%buildreqd = &mkreqd(%builddeps);
-%runreqd = &mkreqd(%rundeps);
-
-for (keys %pkgdir) {
- my ($match) = 0;
- if (defined($opt_e)) {
- if (/$package/ || $pkgdir{$_} =~ /$package/) {
- $match = 1;
- }
- } else {
- if ($_ eq $package || $pkgdir{$_} eq $package) {
- $match = 1;
- }
- }
-
- if ($match) {
- $match_pkgs .= " $_";
- }
-}
-
-if (!defined($match_pkgs)) {
- print "no such package \'$package\'\n";
- exit 1;
-} else {
- $match_pkgs =~ s/^ //;
-}
-
-if (split(/ /, $match_pkgs) != 1) {
- print "\'$package\' matches the following packages.\n";
- for (split(/ /, $match_pkgs)) {
- if (!defined($pkgdir{$_})) {$_ = &searchpkg($_);}
- print "\t$_ [$pkgdir{$_}]\n";
- }
- exit 1;
-}
-
-if (!defined($opt_v)) {
- my ($pkg) = $match_pkgs;
- my (@pkglist) = $pkg;
-
- while ($#pkglist >= 0) {
- my ($p);
- ($p, @pkglist) = @pkglist;
- if (defined($printed{$p})) {next;}
-
- print "\n$p [$pkgdir{$p}]\n";
- $printed{$p} = 1;
- @pkglist = (@pkglist,
- &printdeps($p, "build", %builddeps));
- @pkglist = (@pkglist, &printdeps($p, "run", %rundeps));
- @pkglist = (@pkglist,
- &printreqd($p, "build", %buildreqd));
- @pkglist = (@pkglist, &printreqd($p, "run", %runreqd));
- }
-} else {
- my ($pkg) = $match_pkgs;
- my ($min);
-
- print "graph: {\n";
- print "title: \"Dependent graph of $pkg\"\n";
-
- $home_level = 0;
- &depends_search($home_level, "", "", $pkg);
- $min = 0;
- for (keys %node) {if ($node{$_} < $min) {$min = $node{$_};}}
- for (keys %node) {$node{$_} += -$min;}
-
- $home_level = $node{$pkg};
- &required_search($home_level, "", "", $pkg);
-
- for (keys %node) {
- print "node: { title: \"$_\"\tlevel: $node{$_}" .
- " label: \"$_\n$pkgdir{$_}\"}\n";
- }
- for (keys %arrow) {
- print "$arrow{$_}";
- }
- print "}\n";
-}
-
-sub usage_and_exit {
- print <<EOF;
-Usage: pkgdep [opts] package
- -I INDEX file path (default: $indexfile)
- -e match package by regular expression
- -r recursive
- -v output graph data for xvcg
-EOF
- exit 1;
-}
-
-sub mkreqd {
- my (%deps) = @_;
- my (%reqd);
- for (keys %deps) {
- my ($p) = $_;
- for (split(/ /, $deps{$p})) {
- $_ =~ s/(\+)/\\\1/g;
- if (defined($reqd{$_})) {
- if (!($reqd{$_} =~ /$_/)) {
- $reqd{$_} .= " " . $p;
- }
- } else {
- $reqd{$_} .= $p;
- }
- }
- }
- %reqd;
-}
-
-sub searchpkg {
- my ($pkg) = @_;
- $pkg =~ s/\*/.\*/;
- $pkg =~ s/-[^-]+/-.\*/;
- for (keys %pkgdir) {
- if ($_ =~ /$pkg/) {
- $pkg = $_;
- last;
- }
- }
- $pkg;
-}
-
-sub printdeps {
- my ($pkg, $depname, %deps) = @_;
- my (@rpkg);
-
- print "\t$depname depends on:\n";
- if (defined($deps{$pkg}) && $deps{$pkg} ne "") {
- for (sort split(/ /, $deps{$pkg})) {
- if (!defined($pkgdir{$_})) {$_ = &searchpkg($_);}
- print "\t\t$_ [$pkgdir{$_}]\n";
- if ($opt_r) {@rpkg = (@rpkg, $_);}
- }
- } else {
- print "\t\t(none)\n";
- }
- @rpkg;
-}
-
-sub printreqd {
- my ($pkg, $reqname, %reqd) = @_;
- my (@rpkg);
-
- print "\t$reqname required by:\n";
- if (defined($reqd{$pkg}) && $reqd{$pkg} ne "") {
- for (sort split(/ /, $reqd{$pkg})) {
- if (!defined($pkgdir{$_})) {$_ = &searchpkg($_);}
- print "\t\t$_ [$pkgdir{$_}]\n";
- if ($opt_r) {@rpkg = (@rpkg, $_);}
- }
- } else {
- print "\t\t(none)\n";
- }
- @rpkg;
-}
-
-sub depends_search {
- my ($level, $from, $type, $p) = @_;
- my (%types);
-
- if ($from ne "") {
- $arrow{"$from:$p"} =
- "edge: { sourcename: \"$from\" targetname: \"$p\"" .
- " color: $color{$type}}\n";
- }
-
- if (defined($node{$p})) {
- if ($level < $node{$p}) {
- $node{$p} = $level;
- }
- return;
- }
- $node{$p} = $level;
-
- if ($home_level - $level <= 1) {
- %types = &mktypes($builddeps{$p}, $rundeps{$p});
- for (sort(keys %types)) {
- &depends_search($level - 1, $p, $types{$_}, $_);
- }
- }
-
- if ($opt_r) {
- %types = &mktypes($buildreqd{$p}, $runreqd{$p});
- for (sort(keys %types)) {
- &required_search($level + 1, $p, $types{$_}, $_);
- }
- }
-}
-
-sub required_search {
- my ($level, $from, $type, $p) = @_;
- my (%types);
-
- if ($from ne "") {
- $arrow{"$p:$from"} =
- "edge: { sourcename: \"$p\" targetname: \"$from\"" .
- " color: $color{$type}}\n";
-
- if (defined($node{$p})) {
- if ($level > $node{$p}) {
- $node{$p} = $level;
- &level_fit($level, $p);
- }
- return;
- }
- $node{$p} = $level;
- &level_fit($level, $p);
- }
-
- if ($level - $home_level <= 1) {
- %types = &mktypes($buildreqd{$p}, $runreqd{$p});
- for (sort(keys %types)) {
- &required_search($level + 1, $p, $types{$_}, $_);
- }
- }
-
- if ($opt_r) {
- %types = &mktypes($builddeps{$p}, $rundeps{$p});
- for (sort(keys %types)) {
- &depends_search($level - 1, $p, $types{$_}, $_);
- }
- }
-}
-
-sub mktypes {
- my ($build, $run) = @_;
- my (%types);
- if (defined($build)) {
- for (split(/ /, $build)) {
- if (!defined($pkgdir{$_})) {$_ = &searchpkg($_);}
- if (!defined($run) || $run =~ /$_/) {$types{$_} = "D";}
- else {$types{$_} = "B";}
- }
- }
- if (defined($run)) {
- for (split(/ /, $run)) {
- if (!defined($pkgdir{$_})) {$_ = &searchpkg($_);}
- if (!defined($build) || $build =~ /$_/)
- {$types{$_} = "D";}
- else {$types{$_} = "R";}
- }
- }
- %types;
-}
-
-sub level_fit {
- my ($level, $p) = @_;
-
- if (!defined($node{$p})) {return;}
- if ($node{$p} < $level) {$node{$p} = $level;}
-
- if ($buildreqd{$p}) {
- for (sort(split(/ /, $buildreqd{$p}))) {
- &level_fit($level + 1, $_);
- }
- }
- if ($runreqd{$p}) {
- for (sort(split(/ /, $runreqd{$p}))) {
- &level_fit($level + 1, $_);
- }
- }
-}
-
-exit 0;
diff --git a/pkgtools/pkgdepgraph/DESCR b/pkgtools/pkgdepgraph/DESCR
deleted file mode 100644
index 881e5c2364e..00000000000
--- a/pkgtools/pkgdepgraph/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-pkgdepgraph prints out a "dot" language specification of the
-inter-dependencies of your installed packages. The "dot" language
-is interpreted by the graphviz package to make graphs. There are
-several uses for such information.
-
-(1) A graphical representation of information is always good to
-look at.
-
-(2) The output itself can be sorted and filtered to provide a list
-of packages to delete in order that they can be rebuilt (to replace
-out-of-date components).
-
-(3) You can visually estimate the work involved in (or impact of)
-removing a given component in order to replace it.
diff --git a/pkgtools/pkgdepgraph/MESSAGE b/pkgtools/pkgdepgraph/MESSAGE
deleted file mode 100644
index 01cc50905b3..00000000000
--- a/pkgtools/pkgdepgraph/MESSAGE
+++ /dev/null
@@ -1,11 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1 2004/01/29 22:25:06 snj Exp $
-
-Note that in order to facilitate the use of this package on "client
-machines", the dependency of this package upon the "graphviz" package
-(located in graphics/graphviz) has been removed. You must install the
-"graphviz" package in order to view the graph data that this program
-generates, though much of the functionality of this program does not
-require you to look at the graphs.
-
-===========================================================================
diff --git a/pkgtools/pkgdepgraph/Makefile b/pkgtools/pkgdepgraph/Makefile
deleted file mode 100644
index e46789cc11b..00000000000
--- a/pkgtools/pkgdepgraph/Makefile
+++ /dev/null
@@ -1,59 +0,0 @@
-# $NetBSD: Makefile,v 1.23 2007/01/07 09:14:09 rillig Exp $
-#
-
-DISTNAME= pkgdepgraph-2.8
-CATEGORIES= pkgtools devel
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= atatat@NetBSD.org
-HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
-COMMENT= Visual representation of installed NetBSD packages
-
-# removed so that pkgdepgraph can be used on "client" machines -- @@@
-# DEPENDS+= graphviz-[0-9]*:../../graphics/graphviz
-
-WRKSRC= ${WRKDIR}
-USE_TOOLS+= perl:run
-
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-
-DISTVER= ${DISTNAME:S/pkgdepgraph-//}
-
-.include "../../mk/bsd.prefs.mk"
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1
-
-do-extract:
- ${CP} ${FILESDIR}/pkgdepgraph.pl ${WRKSRC}/pkgdepgraph.pl
- ${CP} ${FILESDIR}/pkgdepgraph.1 ${WRKSRC}/pkgdepgraph.1.in
- ${CP} ${FILESDIR}/pkgdepgraph.0 ${WRKSRC}/pkgdepgraph.0.in
-
-do-build:
-.for FILE in pkgdepgraph
- ${SED} -e 's|@PREFIX@|${PREFIX}|g' \
- -e 's|@PKG_DBDIR@|${PKG_DBDIR}|g' \
- -e 's|@PKGSRCDIR@|${PKGSRCDIR}|g' \
- -e 's|@DISTVER@|${DISTVER}|g' \
- < ${WRKSRC}/${FILE}.pl \
- > ${WRKSRC}/${FILE}
-.endfor
-.for FILE in pkgdepgraph.1 pkgdepgraph.0
- ${SED} -e 's|@PKG_DBDIR@|${PKG_DBDIR}|g' \
- -e 's|@PKGSRCDIR@|${PKGSRCDIR}|g' \
- < ${WRKSRC}/${FILE}.in \
- > ${WRKSRC}/${FILE}
-.endfor
-.if ${OPSYS} == "SunOS" || ${OPSYS} == "AIX"
- # the pre-generated man-pages are 'mandoc'; these OS need 'man'
- nroff -man ${WRKSRC}/pkgdepgraph.1 > ${WRKSRC}/pkgdepgraph.0
-.endif
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkgdepgraph ${PREFIX}/bin/pkgdepgraph
- ${INSTALL_MAN} ${WRKSRC}/pkgdepgraph.0 ${PREFIX}/${PKGMANDIR}/cat1
- ${INSTALL_MAN} ${WRKSRC}/pkgdepgraph.1 ${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkgdepgraph/PLIST b/pkgtools/pkgdepgraph/PLIST
deleted file mode 100644
index beef3f75ff9..00000000000
--- a/pkgtools/pkgdepgraph/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2002/11/07 23:18:01 atatat Exp $
-bin/pkgdepgraph
-man/cat1/pkgdepgraph.0
-man/man1/pkgdepgraph.1
diff --git a/pkgtools/pkgdepgraph/files/pkgdepgraph.0 b/pkgtools/pkgdepgraph/files/pkgdepgraph.0
deleted file mode 100644
index e55b3e080c2..00000000000
--- a/pkgtools/pkgdepgraph/files/pkgdepgraph.0
+++ /dev/null
@@ -1,345 +0,0 @@
-PKGDEPGRAPH(1) NetBSD General Commands Manual PKGDEPGRAPH(1)
-
-NNAAMMEE
- ppkkggddeeppggrraapphh - visual representation of installed packages
-
-SSYYNNOOPPSSIISS
- ppkkggddeeppggrraapphh [--AAaaCCccDDeeFFffggLLllooRRrrssvv] [--dd _p_k_g___d_b_d_i_r] [--ii _i_m_p_a_c_t] [--KK _p_a_c_k_a_g_e_s]
- [--MM _m_a_k_e] [--mm _t_a_r_g_e_t] [--OO _p_a_c_k_a_g_e] [--PP _p_k_g_s_r_c_d_i_r]
- [--SS _p_a_c_k_a_g_e] [--tt _t_a_r_g_e_t] [--UU _p_a_c_k_a_g_e] [_d_a_t_a _._._.]
-
-DDEESSCCRRIIPPTTIIOONN
- ppkkggddeeppggrraapphh emits a _d_o_t language description of the locally installed
- packages, with the inter-dependencies reduced to a minimal set of edges.
- It scans each directory under the package database directory for files
- named _+_B_U_I_L_D___I_N_F_O and _+_R_E_Q_U_I_R_E_D___B_Y in order to gather its data.
-
- ppkkggddeeppggrraapphh will also read any files passed to it as arguments (or stdin
- if it is not connected to a tty), in search of output that resembles that
- of either lintpkgsrc(1) --ii, lintpkgsrc(1) --gg, audit-packages(8), or the
- output from a previous incantation of this program.
-
- In the latter case, ppkkggddeeppggrraapphh will recolor the graph passed as input
- based, as usual, on information about currently installed pkgs. Packages
- that are in the input graph, but not currently installed, will be colored
- black, those that are installed will be colored green, and those that
- remain out of date for some reason will remain red.
-
- The graph defaults to black, but if data from lintpkgsrc(1) --ii or
- _a_u_d_i_t_-_p_a_c_k_a_g_e_s is given, or if a specific package is asserted to be out
- of date (via the --OO option), then nodes (and edges leading from them)
- will be colored in the following manner:
-
- green The package is completely up to date.
-
- orange The package is up to date, but some of its dependencies require
- updating.
-
- red The package is out of date or has had a security advisory issued
- against it, and should be replaced.
-
- purple The package was not found in the local pkgsrc tree.
-
- blue The package depends on something not found in the local pkgsrc
- tree.
-
- black The package has been removed and not yet replaced, or the graph
- is uncolored. The difference between an uncolored graph and a
- graph that has been recolored almost entirely black as a result
- of removing all the packages can be visually detected by the
- color of the ppkkggddeeppggrraapphh package with which the graph was recol-
- ored.
-
- It is important to note that all installed packages fall into one (or
- more) of the following categories:
-
- installed Any installed package.
-
- out of date Any package that can be upgraded.
-
- stale Any package that depends on a package that is out of date.
-
- leaf Any package that is not depended on by any other package.
-
- Selecting the type or types of packages that are listed, and how the
- information is put to use, can be controlled by the following options:
-
- --AA This option modifies the output of --RR to use pkg_add(1) to rein-
- stall deleted packages, instead of building directly from the
- pkgsrc tree.
-
- --aa All packages. This option can be specified more than once to
- augment the meaning of ``all'' as it relates to the selected
- output mode. For the default graph output, this option has no
- effect. When used with --mm where the default output is the list
- of out of date packages, one --aa will make ppkkggddeeppggrraapphh also list
- stale packages, and a second --aa will make it list all installed
- packages.
-
- --CC Asserts --cc and adds ``CLEANDEPENDS=YES'' so that all rebuilt
- dependencies are cleaned as well.
-
- --cc Inserts a ``make clean'' command in the set of instructions to
- rebuild packages (see the --RR option) after they are installed.
- The --cc option used to enable graph coloring, but now graph col-
- oring is done automatically if any coloring data is given.
-
- --DD Instead of the standard graph output, ppkkggddeeppggrraapphh lists the
- packages that need to be deleted, in ``least required first''
- order, so that they can be deleted without any dependency prob-
- lems. This is a good first step to take before rebuilding all
- your packages that are out of date (see the --RR option). This
- option is an alias for --aass.
-
- --dd _p_k_g___d_b_d_i_r
- The location of the package database files. This defaults to
- the value of the _P_K_G___D_B_D_I_R environment variable, if it is set,
- or to _@_P_K_G___D_B_D_I_R_@.
-
- --ee Adds an ``existence check'' to each of the lines of sh(1) style
- output so that commands can be skipped if the package is already
- installed.
-
- --FF Makes ppkkggddeeppggrraapphh emit a series of sh(1) commands that will
- fetch all the required distfiles for rebuilding out of date
- packages. This option is an alias for --mm _f_e_t_c_h.
-
- --ff Force a rebuild of all dependent packages. This option is for
- use in conjunction with the --UU option to force a rebuild of all
- the dependencies of a package to be updated.
-
- --gg Add package subgraph groupings. This places all packages with a
- common prefix (e.g., ``p5'' or ``gimp'') in a subgraph with a
- line around it so you can visually associate packages.
-
- --ii _i_m_p_a_c_t
- Specify the impact you want to allow when rebuilding packages.
- The impact of a given package being rebuilt is a number that
- reflects the longest path from the ``top'' of the installed
- packages (those packages upon which most other packages depend)
- to the ``bottom'' of the installed packages (those packages upon
- which no other packages depend). A package that needs to be
- rebuilt but has nothing above it in the tree requiring rebuild-
- ing and nothing below it has an impact of 0. Values of 10 or
- more for _i_m_p_a_c_t will probably eliminate nothing from the rebuild
- list. The value for _i_m_p_a_c_t can also be the name of a package to
- be avoided when constructing the list of things to be rebuilt.
-
- --KK _p_a_c_k_a_g_e_s
- The base location or url from which to install binary packages.
- This defaults to the value of PKG_PATH, or to PACKAGES with
- ``/All'' added to the end, or to the value determined for pkgsr-
- cdir (see the --PP option) with ``/packages/All'' appended to it.
-
- --LL Limit the graph to those packages that are out of date or ulti-
- mately depend on some package that is. When used with --mm or --ss,
- this limits the list to ``leaf'' packages that are out of date
- or stale.
-
- --ll Adds package ``location'' information to the labels on the
- nodes. This is the path to the package under the local pkgsrc
- tree.
-
- --MM _m_a_k_e Sets the name or path of the proper make(1) program for the
- sh(1) commands generated by the --RR and --FF options. Some systems
- may have more than one make(1) command or the correct choice
- might not be named ``make''. The default value for this is
- taken from the MAKE environment variable, if it is set, or is
- simply ``make''.
-
- --mm _t_a_r_g_e_t
- Emits generic sh(1) commands to ``make _t_a_r_g_e_t'' for each listed
- package. One interesting target to specify is _'_$_*_' since that
- will yield a script that will pass its own command line argu-
- ments to make for processing.
-
- --OO _p_a_c_k_a_g_e
- Marks _p_a_c_k_a_g_e as out of date so that you can see the impact of
- deleting dependent packages and rebuilding everything. This
- option can be used as a quick alternative to using the output
- from lintpkgsrc(1) --ii for graph coloring information.
-
- --oo Adds a package ``order'' number to each node's label. The num-
- ber indicates only the place of the node in the hierarchy, such
- that each node has a number greater than that of anything which
- depends on it, and with the ``leaf'' nodes numbered one.
-
- --PP _p_k_g_s_r_c_d_i_r
- The root of the pkgsrc source tree. This defaults to the value
- of the _P_K_G_S_R_C_D_I_R environment variable, if it is set, or to
- _@_P_K_G_S_R_C_D_I_R_@.
-
- --RR Instead of the standard graph output, emits a series of sh(1)
- commands that will rebuild all the out of date packages by
- rebuilding all the deleted leaf packages. Packages that are out
- of date should be deleted first (see the --DD option). This
- option is an alias for --eeLLmm _t_a_r_g_e_t. See the --tt option for a
- description of what value is used for _t_a_r_g_e_t.
-
- --rr Reverses the order in which the packages are listed.
-
- --SS _p_a_c_k_a_g_e
- Selects a subgraph of the installed package base around which to
- generate output. By default, if a subgraph of _p_a_c_k_a_g_e is
- requested, only _p_a_c_k_a_g_e and those packages immediately above and
- below it in the graph will be listed. To select only those
- immediately below, prefix a ``-'' to the package name. To
- select all packages below _p_a_c_k_a_g_e, prefix ``--'' to the package
- name. To select packages above _p_a_c_k_a_g_e, use ``+'' and ``++'' as
- appropriate. To select all packages remotely connected to
- _p_a_c_k_a_g_e, add ``='' to the beginning. Note: take care when using
- this option with generated lists or sh scripts. Since the sub-
- graph of packages selected by this option may not include all
- stale or out of date packages involved in a proper package
- update procedure, the lists may be incomplete and can cause
- problems.
-
- --ss Print a simple list of packages instead of sh(1) commands. The
- default output set for this command is out of date packages from
- the entire package set. Use combinations of --aa, --LL, --OO _p_a_c_k_a_g_e,
- and --SS _p_a_c_k_a_g_e to select more or other package lists.
-
- --tt _t_a_r_g_e_t
- Changes the target of the --RR output from ``install'' to _t_a_r_g_e_t
- in case you want to ``make package'' or some other target.
-
- --UU _p_a_c_k_a_g_e
- Generates a graph with only the out of date dependencies of
- _p_a_c_k_a_g_e marked in red (ie, packages that are out of date but not
- dependencies of _p_a_c_k_a_g_e will not be considered out of date).
- This will show the entire effect of deleting all related pack-
- ages in order to update the dependencies of the given package.
- If the --ff option is used, then all the dependencies of _p_a_c_k_a_g_e
- will be marked as out of date and the effect on the installed
- package base will be accordingly greater.
-
- --vv Adds the package version number to the node's label in the
- graph.
-
-EENNVVIIRROONNMMEENNTT
- MMAAKKEE
- The default name for the ``make'' program used in the sh(1) commands gen-
- erated by the --FF and --RR output modes.
-
- PPKKGG__DDBBDDIIRR
- Where to find registered packages instead of _@_P_K_G___D_B_D_I_R_@.
-
- PPKKGGSSRRCCDDIIRR
- Where the pkgsrc tree is located instead of _@_P_K_G_S_R_C_D_I_R_@.
-
- PPKKGG__PPAATTHH
- PPAACCKKAAGGEESS
- Two variables that can be used as a location for binary packages. See
- the --AA and --KK options for more details.
-
-EEXXAAMMPPLLEESS
- The default output:
-
- $ pkgdepgraph | dotty -
-
- To generate graph output for later use, and a postscript image of it:
-
- $ lintpkgsrc -i > pkgdepgraph.in
- $ audit-packages >> pkgdepgraph.in
- $ pkgdepgraph -lv pkgdepgraph.in > pkgdepgraph.dot
- $ dot -Tps pkgdepgraph.dot > pkgdepgraph.ps
-
- To generate a graph of just the out of date nodes as a gif:
-
- $ pkgdepgraph -L pkgdepgraph.in > out-of-date.dot
- $ dot -Tgif out-of-date.dot > out-of-date.gif
-
- To make a list of packages that need to be removed in order to bring all
- packages up to date:
-
- $ pkgdepgraph -D pkgdepgraph.in > delete_order
- $ pkgdepgraph -R pkgdepgraph.in > rebuild.sh
-
- To rebuild everything that has no other rebuild requirements:
-
- $ pkgdepgraph -D pkgdepgraph.in -i0 > delete_order
- $ pkgdepgraph -R pkgdepgraph.in -i0 > rebuild.sh
-
- Or, to rebuild everything except those things that would require rebuild-
- ing perl:
-
- $ pkgdepgraph -D pkgdepgraph.in -iperl > delete_order
- $ pkgdepgraph -R pkgdepgraph.in -iperl > rebuild.sh
-
- To subsequently delete all out of date and stale packages:
-
- $ pkg_delete `cat delete_order`
- $ sh rebuild.sh
-
- You may also find it useful to ``pre-fetch'' all the required distfiles
- for the rebuild as below, so that you can do all the rebuilding while
- off-line:
-
- $ pkgdepgraph -F pkgdepgraph.in > fetch.sh
- $ sh fetch.sh
-
- Running the rebuild script will probably take a while, but if you need to
- stop it or it stops by itself for any reason, you can rerun the script,
- and it will pick up where it left off. If there are certain packages
- that you want installed before others are reinstalled, feel free to
- reorder the lines in the script.
-
- You can also ``make clean'' wherever you like when the rebuild script is
- not running, or even update your tree in between runs of the script,
- though in the latter case, it would be prudent to resume the script in
- the following manner so that any packages that are newly out of date are
- removed and replaced.
-
- $ pkgdepgraph -D pkgdepgraph.in > delete_order
- $ pkgdepgraph -R pkgdepgraph.in >> rebuild.sh
- $ pkg_delete `cat delete_order`
- $ sh rebuild.sh
-
- It is important to note that if you have specifically installed a partic-
- ular package that is a dependency, and another package (or other pack-
- ages) exist that can satisfy the same dependency, you should probably
- pre-install that particular package. There is no guarantee that the typ-
- ical processing order will install the same package.
-
- A similar task is to update all the out of date dependencies of an pack-
- age, rebuild the package, and any others that might share the same depen-
- dencies:
-
- $ pkgdepgraph -U mozilla -D pkgdepgraph.in > delete_order
- $ pkgdepgraph -U mozilla -R pkgdepgraph.in > rebuild.sh
- $ pkg_delete `cat delete_order`
- $ sh rebuild.sh
-
- Or perhaps to rebuild a specific package and all packages which depend on
- it:
-
- $ pkgdepgraph -O glib -D > delete_order
- $ pkgdepgraph -O glib -R > rebuild.sh
- $ pkg_delete `cat delete_order`
- $ sh rebuild.sh
-
- Finally, to see the current state of the installed packages after some
- packages have been deleted, and some (but perhaps not all) have been
- reinstalled:
-
- $ pkgdepgraph out-of-date.dot | dot -Tps > current.ps
-
-SSEEEE AALLSSOO
- dot(1), dotty(1), lintpkgsrc(1)
-
-AAUUTTHHOORRSS
- Andrew Brown <atatat@netbsd.org>
-
-BBUUGGSS
- ppkkggddeeppggrraapphh was written in perl(1), but I believe the balance of code
- layout and comments is actually reasonable, despite what you may think of
- perl.
-
- The ``rebuild'' output, ``fetch'' output, and the generic ``make target''
- output (see the --RR, --FF, and --mm options) do not deal very well with pack-
- ages that have moved within the pkgsrc tree. Feeding the output of
- lintpkgsrc(1) --gg to ppkkggddeeppggrraapphh can offset this (it contains the current
- paths to all packages under _P_K_G_S_R_C_D_I_R) but sometimes is necessary that
- you edit the generated scripts by hand to work around this.
-
-NetBSD 2.0 July 28, 2004 NetBSD 2.0
diff --git a/pkgtools/pkgdepgraph/files/pkgdepgraph.1 b/pkgtools/pkgdepgraph/files/pkgdepgraph.1
deleted file mode 100644
index e8723f4d489..00000000000
--- a/pkgtools/pkgdepgraph/files/pkgdepgraph.1
+++ /dev/null
@@ -1,542 +0,0 @@
-.\" $NetBSD: pkgdepgraph.1,v 1.12 2004/07/28 11:01:18 wiz Exp $
-.\"
-.\" Copyright (c) 2002, 2003, 2004 by Andrew Brown <atatat@netbsd.org>
-.\" Absolutely no warranty.
-.\"
-.Dd July 28, 2004
-.Dt PKGDEPGRAPH 1
-.Sh NAME
-.Nm pkgdepgraph
-.Nd visual representation of installed packages
-.Sh SYNOPSIS
-.Nm
-.Op Fl AaCcDeFfgLloRrsv
-.Op Fl d Ar pkg_dbdir
-.Op Fl i Ar impact
-.Op Fl K Ar packages
-.Op Fl M Ar make
-.Op Fl m Ar target
-.Op Fl O Ar package
-.Op Fl P Ar pkgsrcdir
-.Op Fl S Ar package
-.Op Fl t Ar target
-.Op Fl U Ar package
-.Op Pa data ...
-.Sh DESCRIPTION
-.Nm
-emits a
-.Pa dot
-language description of the locally installed packages, with the
-inter-dependencies reduced to a minimal set of edges.
-It scans each directory under the package database directory for files
-named
-.Pa +BUILD_INFO
-and
-.Pa +REQUIRED_BY
-in order to gather its data.
-.Pp
-.Nm
-will also read any files passed to it as arguments (or stdin if it
-is not connected to a tty), in search of output that resembles that
-of either
-.Xr lintpkgsrc 1
-.Fl i ,
-.Xr lintpkgsrc 1
-.Fl g ,
-.Xr audit-packages 8 ,
-or the output from a previous incantation of this program.
-.Pp
-In the latter case,
-.Nm
-will recolor the graph passed as input based, as usual, on information
-about currently installed pkgs.
-Packages that are in the input graph, but not currently installed,
-will be colored black, those that are installed will be colored green,
-and those that remain out of date for some reason will remain red.
-.Pp
-The graph defaults to black, but if data from
-.Xr lintpkgsrc 1
-.Fl i
-or
-.Pa audit-packages
-is given, or if a specific package is asserted to be out of date (via the
-.Fl O
-option), then nodes (and edges leading from them) will be colored in
-the following manner:
-.Bl -tag -width purple
-.It green
-The package is completely up to date.
-.It orange
-The package is up to date, but some of its dependencies require updating.
-.It red
-The package is out of date or has had a security advisory issued
-against it, and should be replaced.
-.It purple
-The package was not found in the local pkgsrc tree.
-.It blue
-The package depends on something not found in the local pkgsrc tree.
-.It black
-The package has been removed and not yet replaced, or the graph is
-uncolored.
-The difference between an uncolored graph and a graph that has been
-recolored almost entirely black as a result of removing all the
-packages can be visually detected by the color of the
-.Nm
-package with which the graph was recolored.
-.El
-.Pp
-It is important to note that all installed packages fall into one (or
-more) of the following categories:
-.Bl -tag -width out-of-date
-.It installed
-Any installed package.
-.It out of date
-Any package that can be upgraded.
-.It stale
-Any package that depends on a package that is out of date.
-.It leaf
-Any package that is not depended on by any other package.
-.El
-.Pp
-Selecting the type or types of packages that are listed, and how the
-information is put to use, can be controlled by the following options:
-.Bl -tag -width package
-.It Fl A
-This option modifies the output of
-.Fl R
-to use
-.Xr pkg_add 1
-to reinstall deleted packages, instead of building directly from the
-pkgsrc tree.
-.It Fl a
-All packages.
-This option can be specified more than once to augment the meaning of
-.Dq all
-as it relates to the selected output mode.
-For the default graph output, this option has no effect.
-When used with
-.Fl m
-where the default output is the list of out of date packages, one
-.Fl a
-will make
-.Nm
-also list stale packages, and a second
-.Fl a
-will make it list all installed packages.
-.It Fl C
-Asserts
-.Fl c
-and adds
-.Dq CLEANDEPENDS=YES
-so that all rebuilt dependencies are cleaned as well.
-.It Fl c
-Inserts a
-.Dq make clean
-command in the set of instructions to rebuild packages (see the
-.Fl R
-option) after they are installed.
-The
-.Fl c
-option used to enable graph coloring, but now graph coloring is done
-automatically if any coloring data is given.
-.It Fl D
-Instead of the standard graph output,
-.Nm
-lists the packages that need to be deleted, in
-.Dq least required first
-order, so that they can be deleted without any dependency problems.
-This is a good first step to take before rebuilding all your packages
-that are out of date (see the
-.Fl R
-option).
-This option is an alias for
-.Fl as .
-.It Fl d Ar pkg_dbdir
-The location of the package database files.
-This defaults to the value of the
-.Pa PKG_DBDIR
-environment variable, if it is set, or to
-.Pa @PKG_DBDIR@ .
-.It Fl e
-Adds an
-.Dq existence check
-to each of the lines of
-.Xr sh 1
-style output so that commands can be skipped if the package is already
-installed.
-.It Fl F
-Makes
-.Nm
-emit a series of
-.Xr sh 1
-commands that will fetch all the required distfiles for rebuilding out
-of date packages.
-This option is an alias for
-.Fl m Ar fetch .
-.It Fl f
-Force a rebuild of all dependent packages.
-This option is for use in conjunction with the
-.Fl U
-option to force a rebuild of all the dependencies of a package to be
-updated.
-.It Fl g
-Add package subgraph groupings.
-This places all packages with a common prefix (e.g.,
-.Dq p5
-or
-.Dq gimp )
-in a subgraph with a line around it so you can visually associate
-packages.
-.It Fl i Ar impact
-Specify the impact you want to allow when rebuilding packages.
-The impact of a given package being rebuilt is a number that reflects
-the longest path from the
-.Dq top
-of the installed packages (those packages upon which most other
-packages depend) to the
-.Dq bottom
-of the installed packages (those packages upon which no other packages
-depend).
-A package that needs to be rebuilt but has nothing above it in the
-tree requiring rebuilding and nothing below it has an impact of 0.
-Values of 10 or more for
-.Ar impact
-will probably eliminate nothing from the rebuild list.
-The value for
-.Ar impact
-can also be the name of a package to be avoided when constructing the
-list of things to be rebuilt.
-.It Fl K Ar packages
-The base location or url from which to install binary packages.
-This defaults to the value of PKG_PATH, or to PACKAGES with
-.Dq Dv /All
-added to the end, or to the value determined for pkgsrcdir (see the
-.Fl P
-option) with
-.Dq Dv /packages/All
-appended to it.
-.It Fl L
-Limit the graph to those packages that are out of date
-or ultimately depend on some package that is.
-When used with
-.Fl m
-or
-.Fl s ,
-this limits the list to
-.Dq leaf
-packages that are out of date or stale.
-.It Fl l
-Adds package
-.Dq location
-information to the labels on the nodes.
-This is the path to the package under the local pkgsrc tree.
-.It Fl M Ar make
-Sets the name or path of the proper
-.Xr make 1
-program for the
-.Xr sh 1
-commands generated by the
-.Fl R
-and
-.Fl F
-options.
-Some systems may have more than one
-.Xr make 1
-command or the correct choice might not be named
-.Dq make .
-The default value for this is taken from the MAKE environment
-variable, if it is set, or is simply
-.Dq make .
-.It Fl m Ar target
-Emits generic
-.Xr sh 1
-commands to
-.Dq make Ar target
-for each listed package.
-One interesting target to specify is
-.Ar '$*'
-since that will yield a script that will pass its own command
-line arguments to make for processing.
-.It Fl O Ar package
-Marks
-.Ar package
-as out of date so that you can see the impact of deleting dependent
-packages and rebuilding everything.
-This option can be used as a quick alternative to using the output
-from
-.Xr lintpkgsrc 1
-.Fl i
-for graph coloring information.
-.It Fl o
-Adds a package
-.Dq order
-number to each node's label.
-The number indicates only the place of the node in the hierarchy, such
-that each node has a number greater than that of anything which
-depends on it, and with the
-.Dq leaf
-nodes numbered one.
-.It Fl P Ar pkgsrcdir
-The root of the pkgsrc source tree.
-This defaults to the value of the
-.Pa PKGSRCDIR
-environment variable, if it is set, or to
-.Pa @PKGSRCDIR@ .
-.It Fl R
-Instead of the standard graph output, emits a series of
-.Xr sh 1
-commands that will rebuild all the out of date packages by rebuilding
-all the deleted leaf packages.
-Packages that are out of date should be deleted first (see the
-.Fl D
-option).
-This option is an alias for
-.Fl eLm Ar target .
-See the
-.Fl t
-option for a description of what value is used for
-.Ar target .
-.It Fl r
-Reverses the order in which the packages are listed.
-.It Fl S Ar package
-Selects a subgraph of the installed package base around which to
-generate output.
-By default, if a subgraph of
-.Ar package
-is requested, only
-.Ar package
-and those packages immediately above and below it in the graph will be
-listed.
-To select only those immediately below, prefix a
-.Dq -
-to the package name.
-To select all packages below
-.Ar package ,
-prefix
-.Dq --
-to the package name.
-To select packages above
-.Ar package ,
-use
-.Dq +
-and
-.Dq ++
-as appropriate.
-To select all packages remotely connected to
-.Ar package ,
-add
-.Dq =
-to the beginning.
-Note: take care when using this option with generated lists or sh
-scripts.
-Since the subgraph of packages selected by this option may not include
-all stale or out of date packages involved in a proper package update
-procedure, the lists may be incomplete and can cause problems.
-.It Fl s
-Print a simple list of packages instead of
-.Xr sh 1
-commands.
-The default output set for this command is out of date packages from
-the entire package set.
-Use combinations of
-.Fl a ,
-.Fl L ,
-.Fl O Ar package ,
-and
-.Fl S Ar package
-to select more or other package lists.
-.It Fl t Ar target
-Changes the target of the
-.Fl R
-output from
-.Dq install
-to
-.Ar target
-in case you want to
-.Dq make package
-or some other target.
-.It Fl U Ar package
-Generates a graph with only the out of date dependencies of
-.Ar package
-marked in red (ie, packages that are out of date but not dependencies
-of
-.Ar package
-will not be considered out of date).
-This will show the entire effect of deleting all related packages in
-order to update the dependencies of the given package.
-If the
-.Fl f
-option is used, then all the dependencies of
-.Ar package
-will be marked as out of date and the effect on the installed package
-base will be accordingly greater.
-.It Fl v
-Adds the package version number to the node's label in the graph.
-.El
-.Sh ENVIRONMENT
-.Ss MAKE
-The default name for the
-.Dq make
-program used in the
-.Xr sh 1
-commands generated by the
-.Fl F
-and
-.Fl R
-output modes.
-.Ss PKG_DBDIR
-Where to find registered packages instead of
-.Pa @PKG_DBDIR@ .
-.Ss PKGSRCDIR
-Where the pkgsrc tree is located instead of
-.Pa @PKGSRCDIR@ .
-.Ss PKG_PATH
-.Ss PACKAGES
-Two variables that can be used as a location for binary packages.
-See the
-.Fl A
-and
-.Fl K
-options for more details.
-.Sh EXAMPLES
-The default output:
-.Bd -literal -offset indent
-$ pkgdepgraph | dotty -
-.Ed
-.Pp
-To generate graph output for later use, and a postscript image of it:
-.Bd -literal -offset indent
-$ lintpkgsrc -i \*[Gt] pkgdepgraph.in
-$ audit-packages \*[Gt]\*[Gt] pkgdepgraph.in
-$ pkgdepgraph -lv pkgdepgraph.in \*[Gt] pkgdepgraph.dot
-$ dot -Tps pkgdepgraph.dot \*[Gt] pkgdepgraph.ps
-.Ed
-.Pp
-To generate a graph of just the out of date nodes as a gif:
-.Bd -literal -offset indent
-$ pkgdepgraph -L pkgdepgraph.in \*[Gt] out-of-date.dot
-$ dot -Tgif out-of-date.dot \*[Gt] out-of-date.gif
-.Ed
-.Pp
-To make a list of packages that need to be removed in order to bring
-all packages up to date:
-.Bd -literal -offset indent
-$ pkgdepgraph -D pkgdepgraph.in \*[Gt] delete_order
-$ pkgdepgraph -R pkgdepgraph.in \*[Gt] rebuild.sh
-.Ed
-.Pp
-To rebuild everything that has no other rebuild requirements:
-.Bd -literal -offset indent
-$ pkgdepgraph -D pkgdepgraph.in -i0 \*[Gt] delete_order
-$ pkgdepgraph -R pkgdepgraph.in -i0 \*[Gt] rebuild.sh
-.Ed
-.Pp
-Or, to rebuild everything except those things that would require
-rebuilding perl:
-.Bd -literal -offset indent
-$ pkgdepgraph -D pkgdepgraph.in -iperl \*[Gt] delete_order
-$ pkgdepgraph -R pkgdepgraph.in -iperl \*[Gt] rebuild.sh
-.Ed
-.Pp
-To subsequently delete all out of date and stale packages:
-.Bd -literal -offset indent
-$ pkg_delete `cat delete_order`
-$ sh rebuild.sh
-.Ed
-.Pp
-You may also find it useful to
-.Dq pre-fetch
-all the required distfiles for the rebuild as below, so that you can
-do all the rebuilding while off-line:
-.Bd -literal -offset indent
-$ pkgdepgraph -F pkgdepgraph.in \*[Gt] fetch.sh
-$ sh fetch.sh
-.Ed
-.Pp
-Running the rebuild script will probably take a while, but if you
-need to stop it or it stops by itself for any reason, you can rerun
-the script, and it will pick up where it left off.
-If there are certain packages that you want installed before others
-are reinstalled, feel free to reorder the lines in the script.
-.Pp
-You can also
-.Dq make clean
-wherever you like when the rebuild script is not running, or even
-update your tree in between runs of the script, though in the latter
-case, it would be prudent to resume the script in the following manner
-so that any packages that are newly out of date are removed and
-replaced.
-.Bd -literal -offset indent
-$ pkgdepgraph -D pkgdepgraph.in \*[Gt] delete_order
-$ pkgdepgraph -R pkgdepgraph.in \*[Gt]\*[Gt] rebuild.sh
-$ pkg_delete `cat delete_order`
-$ sh rebuild.sh
-.Ed
-.Pp
-It is important to note that if you have specifically installed a
-particular package that is a dependency, and another package (or other
-packages) exist that can satisfy the same dependency, you should
-probably pre-install that particular package.
-There is no guarantee that the typical processing order will install
-the same package.
-.Pp
-A similar task is to update all the out of date dependencies of an
-package, rebuild the package, and any others that might share the same
-dependencies:
-.Bd -literal -offset indent
-$ pkgdepgraph -U mozilla -D pkgdepgraph.in \*[Gt] delete_order
-$ pkgdepgraph -U mozilla -R pkgdepgraph.in \*[Gt] rebuild.sh
-$ pkg_delete `cat delete_order`
-$ sh rebuild.sh
-.Ed
-.Pp
-Or perhaps to rebuild a specific package and all packages which depend
-on it:
-.Bd -literal -offset indent
-$ pkgdepgraph -O glib -D \*[Gt] delete_order
-$ pkgdepgraph -O glib -R \*[Gt] rebuild.sh
-$ pkg_delete `cat delete_order`
-$ sh rebuild.sh
-.Ed
-.Pp
-Finally, to see the current state of the installed packages after some
-packages have been deleted, and some (but perhaps not all) have been
-reinstalled:
-.Bd -literal -offset indent
-$ pkgdepgraph out-of-date.dot | dot -Tps \*[Gt] current.ps
-.Ed
-.Sh SEE ALSO
-.Xr dot 1 ,
-.Xr dotty 1 ,
-.Xr lintpkgsrc 1
-.Sh AUTHORS
-.An Andrew Brown Aq atatat@netbsd.org
-.Sh BUGS
-.Nm
-was written in
-.Xr perl 1 ,
-but I believe the balance of code layout and comments is actually
-reasonable, despite what you may think of perl.
-.Pp
-The
-.Dq rebuild
-output,
-.Dq fetch
-output, and the generic
-.Dq make target
-output (see the
-.Fl R ,
-.Fl F ,
-and
-.Fl m
-options) do not deal very well with packages that have moved within
-the pkgsrc tree.
-Feeding the output of
-.Xr lintpkgsrc 1
-.Fl g
-to
-.Nm
-can offset this (it contains the current paths to all packages under
-.Pa PKGSRCDIR )
-but sometimes is necessary that you edit the generated scripts by hand
-to work around this.
diff --git a/pkgtools/pkgdepgraph/files/pkgdepgraph.pl b/pkgtools/pkgdepgraph/files/pkgdepgraph.pl
deleted file mode 100755
index 3b399f28920..00000000000
--- a/pkgtools/pkgdepgraph/files/pkgdepgraph.pl
+++ /dev/null
@@ -1,737 +0,0 @@
-#!@PREFIX@/bin/perl
-
-# Copyright (c) 2002, 2003, 2004 by Andrew Brown <atatat@netbsd.org>
-# Absolutely no warranty.
-
-# $NetBSD: pkgdepgraph.pl,v 1.11 2005/06/26 17:34:19 atatat Exp $
-# pkgdepgraph: @DISTVER@
-
-use strict;
-# no strict 'refs';
-
-use Getopt::Long;
-Getopt::Long::Configure("bundling");
-my(@opts, %opt);
-my($iam, $version, $usecolor, $group, $locations, $order, $versions);
-my($limit, $delete, $rebuild, $force, @outofdate, @update, $clean);
-my($pkg_dbdir, $pkgsrcdir, $packages, $pkgadd, $fetch, $make);
-my($all, $target, $exists, $reverse, $simple, @subgraph, @impact, %impactof);
-
-$version = '@DISTVER@';
-($iam = $0) =~ s:.*/::;
-@opts = ('A', 'a+', 'C', 'c', 'D', 'd=s', 'e', 'F', 'f', 'g', 'i=s',
- 'K=s', 'L', 'l', 'M=s', 'm=s', 'O=s', 'o', 'P=s', 'R', 'r',
- 'S=s', 's', 't=s', 'U=s', 'v');
-
-%opt = (
- 'A' => \$pkgadd,
- 'a' => \$all,
- # 'C' => implies "realclean", handled later
- # 'c' => implies "clean", handled later
- 'D' => \$delete,
- 'd' => \$pkg_dbdir,
- 'e' => \$exists,
- 'F' => \$fetch,
- 'f' => \$force,
- 'g' => \$group,
- 'i' => \@impact,
- 'K' => \$packages,
- 'L' => \$limit,
- 'l' => \$locations,
- 'M' => \$make,
- 'm' => \$target,
- 'O' => \@outofdate,
- 'o' => \$order,
- 'P' => \$pkgsrcdir,
- 'R' => \$rebuild,
- 'r' => \$reverse,
- 'S' => \@subgraph,
- 's' => \$simple,
- # 't' => goes to rebuild, handled later
- 'U' => \@update,
- 'v' => \$versions,
- );
-die("usage: $iam [-AaCcDeFfgLloRrsv] [-d pkg_dbdir] [-i impact]\n",
- " " x (length($iam) + 8),
- "[-K packages] [-M make] [-m target] [-O package]\n",
- " " x (length($iam) + 8),
- "[-P pkgsrcdir] [-S package] [-t target] [-U package]\n",
- " " x (length($iam) + 8),
- "[data ...]\n")
- if (!GetOptions(\%opt, @opts));
-
-die("$iam: -D, -F, -m, and -R are mutually exclusive -- please pick one\n")
- if (($delete != 0) +
- ($fetch != 0) +
- ($target ne "") +
- ($rebuild ne "") > 1);
-
-$pkg_dbdir ||= $ENV{'PKG_DBDIR'} || "@PKG_DBDIR@";
-$pkgsrcdir ||= $ENV{'PKGSRCDIR'} || "@PKGSRCDIR@";
-$packages = $ENV{'PKG_PATH'} if (!$packages);
-$packages = $ENV{'PACKAGES'} . "/All" if (!$packages && $ENV{'PACKAGES'});
-$packages = $pkgsrcdir . "/packages/All" if (!$packages);
-$rebuild &&= $opt{t} || "install";
-$clean = "clean" if ($opt{c});
-$clean = "CLEANDEPENDS=YES clean" if ($opt{C});
-$make ||= $ENV{'MAKE'} || "make";
-
-my(@pkgs, $pkg, $req, %req, %dep, @reqs, @rreqs);
-my(%clusters, $cluster);
-my(%where, $pkgcnt, $num, %num, @num, %ord, $suffix);
-my(%color, $color, %vuln);
-my(%need, %forced, $label);
-my($recolor, @graph);
-my(%vpkgs);
-
-# @pkgs - list of all installed pkgs
-# %req - pkg to ref to hash of pkgs that it requires
-# %dep - pkg to ref to hash of pkgs that depend on it
-# %clusters - pkg prefix to number of pkgs that share the prefix
-# %where - pkg to location in source tree
-# %num/@num - pkg to group number/group number array ref
-# %ord - pkg to its height in the tree
-# %color - pkg to pkg color (green, yellow, red, etc)
-# %vuln - pkg to vulnerabilities recorded against it
-# %need - pkg to version required (pkg is out of date)
-# %forced - pkg marked as "forced" to be out of date
-# %vpkgs - pkg is viewable (part of selected subgraph)
-
-##
-## load out-of-date or security problem list (if given), or a graph to
-## recolor
-##
-$recolor = 0;
-if (@ARGV || ! -t) {
- $usecolor = 1;
- while (<>) {
- if (/^digraph/) {
- $recolor = 1;
- @graph = ($_);
- }
- elsif ($recolor > 0) {
- push(@graph, $_);
- $recolor++ if (/^subgraph/);
- $recolor-- if (/^\}/);
- $recolor -= ($recolor == 0);
- }
- elsif (m:^([^/\s]+)\t([^/\s]+/[^/\s]+)\t(\d+[^/\s]*)$:) {
- $where{"$1-$3"} = $2;
- }
- elsif (/^Version mismatch: '(\S+)' (\S+) vs (\S+)/) {
- $color{"$1-$2"} = "red";
- $need{"$1-$2"} = "$1-$3";
- }
- elsif (/^Unknown package: '(\S+)' version (\S+)/) {
- $color{"$1-$2"} = "purple";
- }
- elsif (/Package (\S+) has a (\S+) vulnerability/) {
- $vuln{$1} = $2;
- $color{$1} = "red";
- }
- }
-}
-
-##
-## load pkg list
-##
-opendir(P, $pkg_dbdir) || die("opendir");
-@pkgs = grep(/-/ && -d "$pkg_dbdir/$_" && -f "$pkg_dbdir/$_/+BUILD_INFO",
- readdir(P));
-closedir(P);
-$pkgcnt = @pkgs;
-
-##
-## where are they needed
-##
-foreach $pkg (@pkgs) {
- $where{$pkg} ||= $pkg;
- open(R, "<$pkg_dbdir/$pkg/+BUILD_INFO") ||
- die("$pkg: +BUILD_INFO: $!\n");
- while (<R>) {
- if (/^PKGPATH\s*=\s*(\S+)/) {
- $where{$pkg} = $1 if ($where{$pkg} eq $pkg);
- last;
- }
- }
- close(R);
- next if (!open(R, "<$pkg_dbdir/$pkg/+REQUIRED_BY"));
- while ($req = <R>) {
- chomp($req);
- $req{$req}->{$pkg} = 1;
- $dep{$pkg}->{$req} = 1;
- }
- close(R);
-}
-
-##
-## reset %where based on "better" information, if we have it
-##
-foreach $pkg (@pkgs) {
- if ($need{$pkg} && $where{$need{$pkg}}) {
- $where{$pkg} = $where{$need{$pkg}};
- }
-}
-
-##
-## if we're recoloring an existing graph, recolor it now and finish
-##
-if ($recolor) {
- my(%over, %nver, @label, $ocolor);
- map({ /(.*)-(.*)/ && ($nver{$1} = $2) } @pkgs);
-
- foreach (@graph) {
- # we don't recolor edges
- ($pkg) = (/\"([^\"]+)\"/);
- $pkg =~ s/(.*)-(.*)/$1/;
- $over{$pkg} = $2;
-
- if (/, EDGE$/) {
- if (defined($nver{$pkg})) {
- s/color=\"[^\"]+\"/color=\"green\"/;
- }
- else {
- s/color=\"[^\"]+\"/color=\"black\"/;
- }
- }
-
- elsif (/label=/) {
- s/color=\"([^\"]+)\"/color="NEWCOLOR"/;
- $ocolor = $1;
- s/label=\"([^\"]+)\"/label="NEWLABEL"/;
- $label = $1;
- if ($nver{$pkg}) {
- if ($nver{$pkg} ne $over{$pkg} || $ocolor ne "red") {
- s/NEWCOLOR/green/;
- }
- else {
- s/NEWCOLOR/$ocolor/;
- }
-
- @label = split(/\\n/, $label);
- $label = "";
-
- # "where" tag
- if ($label[0] =~ m:/:) {
- $label .= "\\n" . shift(@label);
- }
-
- # installed pkg
- $label[0] =~ s/(.*$pkg)-\S*$/$1-$nver{$pkg}/ if ($nver{$pkg});
- $label .= "\\n" . shift(@label);
-
- # "needed" pkg
- if ($label[0] =~ /^$pkg-(.*)/) {
- $label .= "\\n$label[0]" if ($1 ne $nver{$pkg});
- shift(@label);
- }
-
- # there shouldn't be anything left, but...
- $label .= "\\n" . join("\\n", @label);
-
- $label =~ s/\\n//;
- }
- else {
- s/NEWCOLOR/black/;
- }
- s/NEWLABEL/$label/;
- }
- print;
- }
- exit(0);
-}
-
-##
-## eliminate redundancies by deleting edges that are redundant
-##
-foreach $pkg (@pkgs) {
- @reqs = sort(keys %{$req{$pkg}});
- @rreqs = recurse(\%req, @reqs);
- map(delete($req{$pkg}->{$_}), @rreqs);
-
- @reqs = sort(keys %{$dep{$pkg}});
- @rreqs = recurse(\%dep, @reqs);
- map(delete($dep{$pkg}->{$_}), @rreqs);
-}
-
-##
-## create a hash of clusters of package prefixes, with counts. later,
-## clusters that have more than one member can be marked as subgraphs.
-##
-## the outer map() iterates over each pkg name after all instances of
-## _ in the pkg name have been changed to - (for the purposes of
-## accurate clustering). the inner map() breaks each pkg name up into
-## tokens that end in - and loops over the resulting list, appending
-## each one to $a. for example:
-##
-## pkg: one_two-three-4.56
-## tokens: one- two- three-
-## $a: one- one-two- one-two-three-
-##
-map({ $a = "";
- ($b = $_) =~ s/_/-/g;
- map({ $a .= $_; $clusters{$a}++; }
- $b =~ /([^-]*-)/g); }
- @pkgs);
-
-##
-## impose some sort of order on the pkgs by assigning them numbers
-## that indicate their height in the graph. leaf pkgs will always
-## have an order of 1, and each pkg above will be numbered at least 2
-## (possibly higher, if there exists another longer path to another
-## leaf).
-##
-map(order(1, $_), @pkgs);
-
-##
-## assign each pkg a group number, and count the number of pkgs in
-## that group. the group numbers are arbitrary, and serve only to
-## identify pkgs that belong to the same group.
-##
-$num = 1;
-foreach $pkg (@pkgs) {
- my($pkgnum);
- # my direct requirements
- @reqs = sort(keys %{$req{$pkg}});
- # all the requirements of my requirements
- @rreqs = recurse(\%req, @reqs);
- # the lowest group number from all of those
- $pkgnum = number($pkg, @reqs, @rreqs) || $num;
- # stuff all those into the list for that group
- push(@{$num[$pkgnum]}, $pkg, @reqs, @rreqs);
- # now check for packages coming from other groups
- foreach $req ($pkg, @reqs, @rreqs) {
- # no group yet, skip on
- next if (!$num{$req});
- # was $req in a different group
- if ($num{$req} != $pkgnum) {
- # yes, pull that group into the current group
- push(@{$num[$pkgnum]}, @{$num[$num{$req}]});
- # empty out the old group
- @{$num[$num{$req}]} = ();
- }
- }
- # reduce the group list
- @{$num[$pkgnum]} = uniq(sort(@{$num[$pkgnum]}));
- # make sure all packages in this group know
- map($num{$_} = $pkgnum, @{$num[$pkgnum]});
- # skip to next available group number
- $num += ($num == $pkgnum);
-}
-
-##
-## if we want to check a specific pkg for rebuild impact, mark it as
-## "forced" to be out of date, unless it already *is* out of date.
-##
-if (@outofdate) {
- $usecolor = 1;
- canonicalize(@outofdate);
-
- foreach (@outofdate) {
- if ($color{$_} ne "red") {
- $color{$_} = "red";
- $need{$_} = $_;
- $forced{$_} = " (forced)";
- }
- }
-}
-
-##
-## if we want to update a specific package, mark all non-related
-## packages as "green". this avoids rebuilding unnecessary pkgs that
-## don't depend on any of the same dependencies as the given pkg. if
-## $force is set, mark *all* dependencies of the given pkg as out of
-## date.
-##
-if (@update) {
- my(@leftover);
-
- canonicalize(@update);
- @update = uniq(sort(@update, recurse(\%req, @update)));
-
- if ($force) {
- foreach (@update) {
- if ($color{$_} ne "red") {
- $color{$_} = "red";
- $need{$_} = $_;
- $forced{$_} = " (forced)";
- }
- }
- }
-
- foreach (sort(@pkgs)) {
- if ($_ eq $update[0]) {
- shift(@update);
- }
- else {
- push(@leftover, $_);
- }
- }
-
- delete(@color{@leftover});
- delete(@need{@leftover});
-}
-
-##
-## pick packages for a subgraph
-##
-## + means up from given package, - means down, ++ means all the way
-## up, -- means all the way down, = means all "connected" packages, etc.
-##
-if (@subgraph) {
- my ($sub, $up, $down, $eq);
- foreach (@subgraph) {
- ($sub) = (/^([-+=]+)/);
- s/^[-+=]+//;
- $sub = "+-" if ($sub eq "");
- canonicalize($_);
- $up = join("", ($sub =~ /(\+)/g));
- $down = join("", ($sub =~ /(-)/g));
- $eq = join("", ($sub =~ /(=)/g));
- if ($eq) {
- map($vpkgs{$_} = 1, @{$num[$num{$_}]});
- }
- else {
- if ($up) {
- @reqs = sort(keys %{$req{$_}});
- @rreqs = (length($up) > 1) ? recurse(\%req, @reqs) : ();
- map($vpkgs{$_} = 1, ($_, @reqs, @rreqs));
- }
- if ($down) {
- @reqs = sort(keys %{$dep{$_}});
- @rreqs = (length($down) > 1) ? recurse(\%dep, @reqs) : ();
- map($vpkgs{$_} = 1, ($_, @reqs, @rreqs));
- }
- }
- }
-}
-else {
- @vpkgs{@pkgs} = (1) x @pkgs;
-}
-
-##
-## if checking for rebuild impact, also mark packages that are too
-## deeply involved as "green" so that they're not candidates for
-## destruction
-##
-if (@impact) {
- my ($impact);
-
- # step 1: canonicalize anything that's not a number (ie, is the
- # name of a pkg) and eliminate duplicates (we just don't need 'em)
- foreach (@impact) {
- next if (/^\d+$/);
- canonicalize($_);
- }
- @impact = uniq(sort(@impact));
-
- # step 2: the "default" impact allows for anything to be rebuilt,
- # but numeric values in @impact are also allowed, so pick the
- # lowest one (specifying both 1 and 2 really means just 1)
- $impact = $ord{(sort(byord @pkgs))[0]};
- while ($impact[0] =~ /^\d+$/) {
- $_ = shift(@impact);
- $impact = $_ if ($_ < $impact);
- }
-
- # step 3: anything that would have too great an impact on the tree
- # gets marked (the impactof() function will check the @impact
- # array to avoid specific pkgs being rebuild)
- foreach $pkg (keys %vpkgs) {
- next if (impactof($impact, $pkg) <= $impact);
- $vpkgs{$pkg} = 2;
- }
-
- # step 4: anything so marked gets tagged as green. this tagging
- # is a separate step so that we can properly judge impact over the
- # entire tree (marking too early could prematurely split chunks
- # that need to be rebuilt)
- foreach $pkg (keys %vpkgs) {
- $color{$pkg} = "green" if ($vpkgs{$pkg} == 2);
- }
-}
-
-##
-## translate "older" alternate output modes to the new generic version
-##
-if ($fetch) {
- $target = "fetch";
-}
-elsif ($rebuild) {
- $exists = 1;
- $limit = 1;
- $target = $rebuild;
-}
-elsif ($delete) {
- $all++;
- $simple = 1;
-}
-
-##
-## "target" output mode, ordered by ascendency
-##
-if ($target || $simple) {
- my(@targets);
- printf("PKG_PATH=\"$packages\"\nexport PKG_PATH\n")
- if ($pkgadd && $rebuild);
- @targets = grep((color($_) eq "red" && !$limit) ||
- (color($_) ne "green" &&
- ($all || ($ord{$_} == 1 && $limit))) ||
- ($all > 1), keys %vpkgs);
- @targets = sort(byord @targets);
- @targets = reverse(@targets) if (!$reverse);
- print_package(@targets);
- print("true\n") if (!$simple);
- exit(0);
-}
-
-##
-## show left overs as a graph
-##
-printf("digraph \"%s packages\" {\n",
- $limit ? "out of date" : "installed");
-printf("label = \"%s packages %s, generated by %s v%s, on %s\";\n",
- $limit ? "out of date" : "installed",
- @subgraph ? "subgraph (@subgraph)" : "graph",
- $iam, $version, scalar(localtime));
-foreach $pkg (sort(bynum keys %vpkgs)) {
- $color = color($pkg);
- next if ($limit && $color eq "green");
- $label = $pkg;
- $label =~ s/(.*)-.*/$1/ if (!$versions);
- $label = "($ord{$pkg}) $label" if ($order);
- $label = "$where{$pkg}\\n$label" if ($locations);
- $label .= "\\n$need{$pkg}$forced{$pkg}" if ($need{$pkg});
- if ($vuln{$pkg}) {
- $label .= "\\n(no update available)" if (!$need{$pkg});
- $label .= "\\n[$vuln{$pkg}]";
- }
- $suffix = "\t// \#$ord{$pkg}, group $num{$pkg}, " .
- (exists($impactof{$pkg}) ? "impact $impactof{$pkg}, " : "") .
- scalar(@{$num[$num{$pkg}]}) . " members, $pkgcnt pkgs";
- $suffix .= ", LEAF" if ($ord{$pkg} == 1);
-
- ##
- ## scan the cluster list, but in the opposite order so in the case
- ## of pkgs with a common "multi-token" prefix, we only emit the
- ## one with the longest name. we have to prepend the names to a
- ## buffer so that they end up being printed in the reverse of
- ## discovery order, so that we end up with the "least-specific"
- ## subgroup announced first.
- ##
- ($a = $pkg) =~ s/_/-/g;
- $b = 1;
- $cluster = "";
- while ($group && $a =~ s/-[^-]+-?$/-/) {
- next if ($clusters{$a} == $b);
- $b = $clusters{$a};
- $cluster = sprintf("subgraph \"cluster_%s\" {\n", substr($a, 0, -1)) .
- sprintf("label = \"%s (%d)\";\n", substr($a, 0, -1), $b) .
- $cluster;
- }
- print($cluster);
- printf("\"%s\" [color=\"%s\",label=\"%s\"];$suffix\n", $pkg,
- $usecolor ? $color : "black", $label);
- $cluster =~ s/label = .*\n//g;
- $cluster =~ s/.+\{/\}/g;
- print($cluster);
- @reqs = sort(keys %{$req{$pkg}});
- $suffix =~ s/, LEAF$//;
- $suffix .= ", EDGE";
- foreach $req (@reqs) {
- $color = color($req);
- next if ($limit && $color eq "green");
- printf("\"%s\" -> \"%s\" [color=\"%s\"];$suffix\n", $req, $pkg,
- $usecolor ? $color : "black");
- }
-}
-print("}\n");
-
-##
-## print sh(1) style commands to handle work on a given package, or
-## just the package name if $simple is set
-##
-sub print_package {
- foreach (@_) {
- printf("( pkg_info -qe %s || ", /(.*)-.*/) if ($exists && !$simple);
- if ($simple) {
- print($_);
- }
- elsif ($pkgadd) {
- printf("( pkg_add %s.tgz", ($need{$_} || $_));
- }
- else {
- print("( cd $pkgsrcdir/$where{$_} && $make $target");
- print(" && $make $clean") if ($clean);
- }
- if (!$simple) {
- print(" )") if ($exists);
- print(" ) &&");
- }
- print("\n");
- }
-}
-
-##
-## find all dependencies above or below a given node
-##
-sub recurse {
- my(@list, @new, $map);
- @list = ();
- $map = shift;
- foreach (@_) {
- @new = keys %{$map->{$_}};
- push(@list, @new, recurse($map, @new));
- }
- uniq(sort(@list));
-}
-
-##
-## canonicalize a pkg name based on what we have installed
-##
-sub canonicalize {
- my($canon, $pkg);
-
- foreach $pkg (@_) {
- # attempt to find actual pkg, first by argument given...
- ($canon) = grep($pkg eq $_, @pkgs);
-
- # ...then by comparing against the internal list sans version numbers
- ($canon) = grep(($a = $_) =~ s/(.*)-.*/$1/ && $pkg eq $a, @pkgs)
- if (!defined($canon));
-
- die("package '$pkg' not found\n")
- if (!defined($canon));
-
- $pkg = $canon;
- }
-
- @_;
-}
-
-##
-## lowest group number of a set of packages
-##
-sub number {
- my($n, $pkg);
- $n = 0;
- foreach $pkg (@_) {
- $n = $num{$pkg} if ($n == 0 || $num{$pkg} < $n);
- }
- $n + 0;
-}
-
-##
-## pick a color based on the color of the dependencies
-##
-sub color {
- my($pkg) = @_;
- if ($color{$pkg}) {
- $color{$pkg};
- }
- else {
- my($req, @reqs, $color);
- @reqs = sort(keys %{$req{$pkg}});
- @reqs = (@reqs, recurse(\%req, @reqs));
- $color = "green";
- foreach $req (@reqs) {
- if ($color{$req} eq "red") {
- return "orange";
- }
- elsif ($color{$req} eq "purple") {
- $color = "blue";
- }
- }
- $color;
- }
-}
-
-##
-## bynum - higher numbers come last
-##
-sub bynum {
- return $num{$a} <=> $num{$b} ||
- $a cmp $b;
-}
-
-##
-## byord - higher orders come first
-##
-sub byord {
- return $ord{$b} <=> $ord{$a} ||
- $b cmp $a;
-}
-
-##
-## order - the order of a pkg is one higher than anything below it
-##
-sub order {
- my($n, @pkgs) = @_;
- my($pkg);
- foreach $pkg (@pkgs) {
- $ord{$pkg} = $n if ($ord{$pkg} <= $n);
- order($n + 1, sort(keys %{$req{$pkg}}));
- }
-}
-
-##
-## uniq - eliminate adjacent duplicate entries in an array
-##
-sub uniq {
- my($i);
- for ($i = 0; $i < $#_; ) {
- if ($_[$i] eq $_[$i + 1]) {
- splice(@_, $i, 1);
- }
- else {
- $i++;
- }
- }
- @_;
-}
-
-##
-## impactof - impact of pkg delete/rebuild is the longest path (either
-## up or down the tree) that encompasses all things that need
-## rebuilding
-##
-sub impactof {
- my ($impact, $pkg) = @_;
- my (@in, @out);
-
- # if we already know or it's dead-simple, get out early
- return $impactof{$pkg} if (exists($impactof{$pkg}));
- return $impactof{$pkg} = 0 if (color($pkg) eq "green");
-
- # starting with the given pkg, repeatedly look up and down the
- # tree for connected pkgs that also require a rebuild
- @out = ($pkg);
- do {
- @in = @out;
- @out = ($pkg);
- push(@out, grep(color($_) ne "green", recurse(\%dep, @in)));
- push(@out, grep(color($_) ne "green", recurse(\%req, @out)));
- @out = uniq(sort(byord @out));
- } while (@in != @out);
-
- # check to see if the set of related pkgs intersects with the set
- # we want to avoid and if so, mark this set as "too expensive"
- $a = "";
- if (@impact) {
- foreach $b (@impact) {
- if (grep($_ eq $b, @out)) {
- $a = $b;
- $impact++;
- last;
- }
- }
- }
-
- # if we didn't hit anything, the impact is the one less than the
- # highest ordered remotely connected pkg we found (the longest
- # path from the top to the bottom of the set to be rebuilt)
- $impact = $ord{$out[0]} - 1 if ($a eq "");
- @impactof{@in} = ($impact) x @in;
-
- $impactof{$pkg};
-}
diff --git a/pkgtools/pkgdiff/DESCR b/pkgtools/pkgdiff/DESCR
deleted file mode 100644
index 6c4dec7885e..00000000000
--- a/pkgtools/pkgdiff/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-This package contains four tools to ease creating and maintaining
-patches for pkgsrc: mkpatches, patchdiff, pkgdiff, and pkgvi.
-
-pkgdiff compares two files (like diff) and produces an output file
-that can be used in pkgsrc.
-
-mkpatches automatically generates a set of patches, if the original
-versions of the files had been saved as filename.orig.
-
-patchdiff compares a previously existing set of patches with another
-one created by mkpatches, and outputs any changes.
-
-pkgvi makes backup copies if a file is changed, so pkgdiff can be run
-on it later, generating a patch for the changes made.
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
deleted file mode 100644
index c436ccef2a5..00000000000
--- a/pkgtools/pkgdiff/Makefile
+++ /dev/null
@@ -1,81 +0,0 @@
-# $NetBSD: Makefile,v 1.63 2006/11/02 18:02:07 joerg Exp $
-#
-
-DISTNAME= pkgdiff-0.119
-CATEGORIES= pkgtools devel
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= wiz@NetBSD.org
-HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
-COMMENT= Tools to create, maintain and send back patches for pkgsrc
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-PKG_DESTDIR_SUPPORT= user-destdir
-
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-
-WRKSRC= ${WRKDIR}
-USE_LANGUAGES= # empty
-USE_TOOLS+= perl:run
-
-MAKE_ENV+= PKGSRCDIR=${_PKGSRCDIR:Q}
-
-.include "../../mk/bsd.prefs.mk"
-
-BUILD_DEFS+= MANINSTALL
-
-.if ${OPSYS} == "SunOS"
-DEPENDS+= diffutils-[0-9]*:../../devel/diffutils
-DIFF?= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}diff
-MANINSTALL= none
-.else
-DIFF?= diff
-.endif
-
-INSTALLATION_DIRS= bin
-.if !empty(MANINSTALL:Mcatinstall)
-INSTALLATION_DIRS+= ${PKGMANDIR}/cat1
-.endif
-.if !empty(MANINSTALL:Mmaninstall)
-INSTALLATION_DIRS+= ${PKGMANDIR}/man1
-.endif
-
-do-build:
-.for FILE in mkpatches patchdiff
- ${SED} -e 's|@PREFIX@|${PREFIX}|g' \
- -e 's|@PERL5@|${PERL5}|g' \
- -e 's|@MAKE@|${MAKE}|g' \
- < ${FILESDIR}/${FILE}.pl \
- > ${WRKSRC}/${FILE}
-.endfor
- ${SED} -e 's|@DIFF@|${DIFF}|g' \
- -e 's|@SH@|${SH}|g' \
- < ${FILESDIR}/pkgdiff \
- > ${WRKSRC}/pkgdiff
- ${CP} ${FILESDIR}/pkgvi ${WRKSRC}
- ${CP} ${FILESDIR}/feedback-patches ${WRKSRC}
-.if !empty(MANINSTALL:Mcatinstall)
-. for FILE in mkpatches patchdiff pkgdiff pkgvi feedback-patches
-. if ${OPSYS} == "SunOS" || ${OPSYS} == "AIX"
- nroff -man ${FILESDIR}/${FILE}.1 >${WRKSRC}/${FILE}.0
-. else
- ${CP} ${FILESDIR}/${FILE}.0 ${WRKSRC}/${FILE}.0
-. endif
-. endfor
-.endif
-
-do-install:
-.for FILE in mkpatches patchdiff pkgdiff pkgvi feedback-patches
- ${INSTALL_SCRIPT} ${WRKSRC}/${FILE} ${DESTDIR}${PREFIX}/bin
-. if !empty(MANINSTALL:Mcatinstall)
- ${INSTALL_MAN} ${WRKSRC}/${FILE}.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1
-. endif
-. if !empty(MANINSTALL:Mmaninstall)
- ${INSTALL_MAN} ${FILESDIR}/${FILE}.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-. endif
-.endfor
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkgdiff/PLIST b/pkgtools/pkgdiff/PLIST
deleted file mode 100644
index d2d40a2b440..00000000000
--- a/pkgtools/pkgdiff/PLIST
+++ /dev/null
@@ -1,16 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2004/11/23 22:00:48 hubertf Exp $
-bin/feedback-patches
-bin/mkpatches
-bin/patchdiff
-bin/pkgdiff
-bin/pkgvi
-man/cat1/feedback-patches.0
-man/cat1/mkpatches.0
-man/cat1/patchdiff.0
-man/cat1/pkgdiff.0
-man/cat1/pkgvi.0
-man/man1/feedback-patches.1
-man/man1/mkpatches.1
-man/man1/patchdiff.1
-man/man1/pkgdiff.1
-man/man1/pkgvi.1
diff --git a/pkgtools/pkgdiff/files/feedback-patches b/pkgtools/pkgdiff/files/feedback-patches
deleted file mode 100644
index cb566892523..00000000000
--- a/pkgtools/pkgdiff/files/feedback-patches
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-#
-# Send back NetBSD patches
-#
-
-PKGSRCBASE=/usr/pkgsrc
-
-pkg_f=$1
-to=$2
-
-if [ "$pkg_f" = "." ]
-then
- pkg_f=`pwd`
-fi
-
-if [ "$pkg_f" = "" ]
-then
- echo "Usage: $0 category/pkg [maintainer@software.org]"
- exit 1
-fi
-
-pkg=`echo $pkg_f | sed -e 's,.*/pkgsrc/,,' -e 's,/$,,'`
-cd $PKGSRCBASE/$pkg
-
-if [ ! -d patches -o `ls patches 2>/dev/null | grep -v orig | grep -v BAK | wc -l` -eq 0 ]
-then
- echo '***' Package $pkg has no patches, exiting.
- exit 0
-fi
-
-pkgname=`make show-var VARNAME=PKGNAME | sed -e 's,nb.*$,,'`
-
-
-tmp=`mktemp -t feedback-patches`
-
-(
-cat <<EOTXT
-Hi!
-
-below you will find some patches against $pkgname that are
-currently part of the NetBSD Packages Collection, pkgsrc, to get your
-software build properly on NetBSD and maybe some other platforms. We'd
-be pleased if you could include as much of these patches into your next
-release as possible, thanks!
-
-FWIW, your software has a webpage at the NetBSD site, see
-
- http://www.NetBSD.org/packages/$pkg/README.html
-
-See http://www.NetBSD.org/Documentation/software/packages.html
-to learn more about the NetBSD Packages Collection, to find out
-more about the NetBSD operating system, see http://www.NetBSD.org/.
-
-
---- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X ---
-
-EOTXT
-
-find $PKGSRCBASE/$pkg/patches/. -type f -print \
-| grep -v CVS | xargs cat
-) >$tmp
-
-if [ "$to" = "" ]
-then
- cat $tmp
- rm $tmp
-else
- echo Mailing patches for $pkgname...
- cat $tmp | mail -v -s "Patches for $pkgname" $to
- rm $tmp
- echo done.
-fi
diff --git a/pkgtools/pkgdiff/files/feedback-patches.0 b/pkgtools/pkgdiff/files/feedback-patches.0
deleted file mode 100644
index 949955aa3b0..00000000000
--- a/pkgtools/pkgdiff/files/feedback-patches.0
+++ /dev/null
@@ -1,59 +0,0 @@
-FEEDBACK-PATCHES(1) NetBSD General Commands Manual FEEDBACK-PATCHES(1)
-
-NNAAMMEE
- ffeeeeddbbaacckk--ppaattcchheess - help sending pkgsrc patches back
-
-SSYYNNOOPPSSIISS
- ffeeeeddbbaacckk--ppaattcchheess _c_a_t_e_g_o_r_y_/_p_k_g [maintainer@software.org]
-
-DDEESSCCRRIIPPTTIIOONN
- The ffeeeeddbbaacckk--ppaattcchheess script is intended to help sending back patches in
- the NetBSD Packages Collection, pkgsrc, back to the maintainers of the
- original package, for inclusion into future releases. The given
- _c_a_t_e_g_o_r_y_/_p_k_g is either a path relative to the pkgsrc base directory, or
- an absolute patch, which will be stripped the base directory. A pathname
- of _. will be expanded to the current directory, which is useful when the
- current working directory is in a package's directory in pkgsrc.
-
- If an email address is given, the patches will be sent to that address,
- with some nice words. If no email address is given, the mail will only be
- displayed instead of sent.
-
-EEXXAAMMPPLLEESS
- The command:
-
- feedback-patches audio/gqmpeg
-
- will display a mail that can be sent to the gqmpeg people with patches to
- include.
-
- feedback-patches somecat/dunno whoever@foobar.baz
-
- will invoke mail(1) to send the patches back immediately.
-
- feedback-patches /usr/pkgsrc/somecat/dunno whoever@foobar.baz
-
- works just as well, you can use either full path or path relative to
- pkgsrc base when specifying a package. As you're usually already in the
- pkg's directory for finding out the contact address (probably by looking
- at the HOMEPAGE variable in the pkg's Makefile), you can also do:
-
- cd .../category/pkg
- feedback-patches `pwd` whoever@foobar.baz
-
- or
-
- cd .../category/pkg
- feedback-patches . whoever@foobar.baz
-
-SSEEEE AALLSSOO
- pkgdiff(1), mkpatches(1)
-
-AAUUTTHHOORRSS
- The feedback-patches utility was written by Hubert Feyrer
- <hubertf@NetBSD.org>.
-
-BBUUGGSS
- Currently the pkgsrc base directory is hardcoded to _/_u_s_r_/_p_k_g_s_r_c.
-
-NetBSD 2.0_BETA Sep 29, 2003 NetBSD 2.0_BETA
diff --git a/pkgtools/pkgdiff/files/feedback-patches.1 b/pkgtools/pkgdiff/files/feedback-patches.1
deleted file mode 100644
index 5fd97f9842d..00000000000
--- a/pkgtools/pkgdiff/files/feedback-patches.1
+++ /dev/null
@@ -1,100 +0,0 @@
-.\" $NetBSD: feedback-patches.1,v 1.1 2004/11/23 22:00:48 hubertf Exp $
-.\"
-.\" Copyright (c) 2003 Hubert Feyrer. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Hubert Feyrer
-.\" for the NetBSD Project
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd Sep 29, 2003
-.Dt FEEDBACK-PATCHES 1
-.Os
-.Sh NAME
-.Nm feedback-patches
-.Nd "help sending pkgsrc patches back"
-.Sh SYNOPSIS
-.Nm
-.Ar category/pkg
-.Op maintainer@software.org
-.Sh DESCRIPTION
-The
-.Nm
-script is intended to help sending back patches in the
-NetBSD Packages Collection, pkgsrc, back to the maintainers
-of the original package, for inclusion into future releases.
-The given
-.Pa category/pkg
-is either a path relative to the pkgsrc base directory,
-or an absolute patch, which will be stripped the base
-directory.
-A pathname of
-.Pa \&.
-will be expanded to the current directory, which is useful
-when the current working directory is in a package's
-directory in pkgsrc.
-.Pp
-If an email address is given, the patches will be sent to that
-address, with some nice words. If no email address is given,
-the mail will only be displayed instead of sent.
-.Sh EXAMPLES
-The command:
-.Pp
-.Dl feedback-patches audio/gqmpeg
-.Pp
-will display a mail that can be sent to the gqmpeg people
-with patches to include.
-.Pp
-.Dl feedback-patches somecat/dunno whoever@foobar.baz
-.Pp
-will invoke
-.Xr mail 1
-to send the patches back immediately.
-.Pp
-.Dl feedback-patches /usr/pkgsrc/somecat/dunno whoever@foobar.baz
-.Pp
-works just as well, you can use either full path or path relative
-to pkgsrc base when specifying a package. As you're usually already
-in the pkg's directory for finding out the contact address
-(probably by looking at the HOMEPAGE variable in the pkg's Makefile),
-you can also do:
-.Pp
-.Dl cd .../category/pkg
-.Dl feedback-patches `pwd` whoever@foobar.baz
-.Pp
-or
-.Pp
-.Dl cd .../category/pkg
-.Dl feedback-patches \ . whoever@foobar.baz
-.Pp
-.Sh SEE ALSO
-.Xr pkgdiff 1 ,
-.Xr mkpatches 1
-.Sh AUTHORS
-The feedback-patches utility was written by
-.An Hubert Feyrer Aq hubertf@NetBSD.org .
-.Sh BUGS
-Currently the pkgsrc base directory is hardcoded to
-.Pa /usr/pkgsrc .
diff --git a/pkgtools/pkgdiff/files/mkpatches.0 b/pkgtools/pkgdiff/files/mkpatches.0
deleted file mode 100644
index 1b4fe532c03..00000000000
--- a/pkgtools/pkgdiff/files/mkpatches.0
+++ /dev/null
@@ -1,27 +0,0 @@
-MKPATCHES(1) NetBSD General Commands Manual MKPATCHES(1)
-
-NNAAMMEE
- mmkkppaattcchheess - create patch files appropriate for pkgsrc
-
-SSYYNNOOPPSSIISS
- mmkkppaattcchheess [--dd _o_u_t_p_u_t_-_d_i_r_e_c_t_o_r_y]
-
-DDEESSCCRRIIPPTTIIOONN
- mmkkppaattcchheess is a perl script that simplifies creating patches from a
- changed work tree if for each changed file the original was kept with an
- added extension ``.orig''.
-
- mmkkppaattcchheess must be called from the package's main directory, that is
- _$_{_P_K_G_S_R_C_}_/_c_a_t_e_g_o_r_y_/_p_r_o_g_r_a_m. It then proceeds to find all files that
- match the pattern ``*.orig''. Each of these is then compared to the
- changed file of the same name (with no ``.orig'' extension) using
- pkgdiff(1).
-
- The resulting patches are saved in the directory _$_{_W_R_K_D_I_R_}_/_._n_e_w_p_a_t_c_h_e_s or
- the directory specified after --dd, and can be easily compared to the cur-
- rently existing set using patchdiff(1).
-
-SSEEEE AALLSSOO
- patchdiff(1), pkgdiff(1)
-
-NetBSD 1.6 June 25, 2000 NetBSD 1.6
diff --git a/pkgtools/pkgdiff/files/mkpatches.1 b/pkgtools/pkgdiff/files/mkpatches.1
deleted file mode 100644
index 691aeca6da0..00000000000
--- a/pkgtools/pkgdiff/files/mkpatches.1
+++ /dev/null
@@ -1,42 +0,0 @@
-.\" $NetBSD: mkpatches.1,v 1.3 2005/12/13 12:05:08 wiz Exp $
-.\"
-.\" Copyright (c) 2000 by Thomas Klausner <wiz@NetBSD.org>
-.\" All Rights Reserved. Absolutely no warranty.
-.\"
-.Dd June 25, 2000
-.Dt MKPATCHES 1
-.Os
-.Sh NAME
-.Nm mkpatches
-.Nd create patch files appropriate for pkgsrc
-.Sh SYNOPSIS
-.Nm
-.Op Fl d Ar output-directory
-.Sh DESCRIPTION
-.Nm
-is a perl script that simplifies creating patches from a changed work
-tree if for each changed file the original was kept with an added
-extension
-.Dq .orig .
-.Pp
-.Nm
-must be called from the package's main directory, that is
-.Pa ${PKGSRC}/category/program .
-It then proceeds to find all files that
-match the pattern
-.Dq *.orig .
-Each of these is then compared to the
-changed file of the same name (with no
-.Dq .orig
-extension) using
-.Xr pkgdiff 1 .
-.Pp
-The resulting patches are saved in the directory
-.Pa ${WRKDIR}/.newpatches
-or the directory specified after
-.Fl d ,
-and can be easily compared to the currently existing set using
-.Xr patchdiff 1 .
-.Sh SEE ALSO
-.Xr patchdiff 1 ,
-.Xr pkgdiff 1
diff --git a/pkgtools/pkgdiff/files/mkpatches.pl b/pkgtools/pkgdiff/files/mkpatches.pl
deleted file mode 100755
index 4a4fd9a1d8f..00000000000
--- a/pkgtools/pkgdiff/files/mkpatches.pl
+++ /dev/null
@@ -1,181 +0,0 @@
-#!@PERL5@
-#
-# $NetBSD: mkpatches.pl,v 1.12 2005/12/13 12:05:08 wiz Exp $
-#
-# mkpatches: creates a set of patches patch-aa, patch-ab, ...
-# in work/.newpatches by looking for *.orig files in and below
-# WRKDIR and comparing them to the corresponding changed file. All
-# files are then referrenced relative to WRKSRC.
-#
-# It should be called from the packages directory,
-# e.g. /usr/pkgsrc/example/test
-#
-# It retains the naming and header (RCS Id and comment) from the
-# patches directory.
-#
-# Copyright (c) 2000 by Thomas Klausner <wiz@NetBSD.org>
-# 2004 by Dieter Baron <dillo@NetBSD.org>
-# All Rights Reserved. Absolutely no warranty.
-#
-
-use Getopt::Std;
-use Cwd;
-use File::Spec;
-
-my $patchdir;
-my $old_patchdir;
-my $wrkdir;
-my %old_filename;
-my %old_header;
-
-# create patchdir, or empty it if already existing
-
-sub create_patchdir {
- if ( -d $patchdir ) {
- unlink "$patchdir/*";
- } else {
- mkdir($patchdir, 0755);
- }
-}
-
-# read command line arguments
-
-undef($opt_d);
-undef($opt_h);
-undef($opt_v);
-
-getopts('d:hv');
-
-if ($opt_h) {
- ($prog) = ($0 =~ /([^\/]+)$/);
- print STDERR <<EOF;
-usage: $prog [-d output-directory]
- -d dirname directory to put the resulting patches into;
- defaults to \$WRKDIR/.newpatches
- -v verbose - list .orig files as processed
-EOF
- exit 0;
-};
-
-# get WRKDIR
-
-$wrkdir=`@MAKE@ show-var VARNAME=WRKDIR` or
- die ("can't find WRKDIR -- wrong dir?");
-chomp($wrkdir);
-$old_patchdir=`@MAKE@ show-var VARNAME=PATCHDIR` or
- die ("can't find PATCHDIR -- wrong dir?");
-chomp($old_patchdir);
-
-if ($opt_d) {
- $patchdir = cwd()."/$opt_d";
-}
-else {
- $patchdir="$wrkdir"."/.newpatches";
-}
-
-create_patchdir();
-
-# get WRKSRC
-
-$wrksrc=`@MAKE@ show-var VARNAME=WRKSRC` or
- die ("can't find WRKSRC -- wrong dir?");
-chomp($wrksrc);
-
-analyze_old_patches();
-
-chdir $wrksrc or die ("can't cd to WRKSRC ($wrksrc)");
-
-# find files
-
-open(HANDLE, "find ${wrkdir} -type f -name \\\*.orig |");
-
-# create patches
-
-foreach (sort <HANDLE>) {
- my ($path, $complete);
- my ($new, $old);
- chomp();
- $path = $_;
- $complete = $path;
- $complete =~ s/.orig$//;
- $new = File::Spec->abs2rel( $complete, $wrksrc );
- $old = File::Spec->abs2rel( $path, $wrksrc );
- if ( -f $complete ) {
- $patchfile = patch_name($new);
- if ($opt_v) {
- print "$patchfile -> $complete\n";
- }
- $diff=`pkgdiff $old $new`;
- if ( $? ) {
- print "$old: $diff";
- }
- if ( "$diff" eq "" ) {
- print ("$new and $old don't differ\n");
- } else {
- make_patch($old, $new, $patchfile, $diff);
- }
- } else {
- print ("$new doesn't exist, though $old does\n");
- }
-}
-
-sub analyze_old_patches
-{
- my $filename;
- my $patch;
- my $name;
-
- %old_header = ();
- %old_filename = ();
-
- open(HANDLE, "ls $old_patchdir/patch-* 2>/dev/null |");
-
- while ($filename = <HANDLE>) {
- chomp $filename;
- $patch = `sed '/^\+\+\+/ q' $filename`;
- if (!($patch =~ m/^\+\+\+ ([^\t\n]*)(\n$|\t)/m)) {
- warn "cannot extract filename from patch $filename";
- next;
- }
- $name = $1;
- $patch =~ s/\n--- .*/\n/s;
- $old_header{$name} = $patch;
- $filename =~ s!.*/!!;
- $old_filename{$name} = $filename;
- }
-
- close(HANDLE);
-}
-
-
-sub patch_name # filename
-{
- my $name = shift;
- my ($pname, $l);
-
- if (defined($old_filename{$name})) {
- return $old_filename{$name};
- }
-
- for ($l=0; ; $l++) {
- $pname = 'patch-' . ("aa" .. "zz")[$l];
- if (! -f "$old_patchdir/$pname" and ! -f "$patchdir/$pname") {
- return $pname;
- }
- }
-}
-
-
-sub make_patch # new old patchfile diff
-{
- my ($old, $new, $patchfile, $diff) = @_;
-
- if (defined($old_header{$new})) {
- $diff =~ s/^.*\n(--- )/$1/s;
- $diff = $old_header{$new} . $diff;
- }
-
- open(HANDLE, "> $patchdir/$patchfile");
- print HANDLE $diff;
- close(HANDLE);
-}
diff --git a/pkgtools/pkgdiff/files/patchdiff.0 b/pkgtools/pkgdiff/files/patchdiff.0
deleted file mode 100644
index 3e22cf780f9..00000000000
--- a/pkgtools/pkgdiff/files/patchdiff.0
+++ /dev/null
@@ -1,23 +0,0 @@
-PATCHDIFF(1) NetBSD General Commands Manual PATCHDIFF(1)
-
-NNAAMMEE
- ppaattcchhddiiffff - compare sets of patches
-
-SSYYNNOOPPSSIISS
- ppaattcchhddiiffff [--dd _o_u_t_p_u_t_-_d_i_r_e_c_t_o_r_y]
-
-DDEESSCCRRIIPPTTIIOONN
- ppaattcchhddiiffff is a perl script that simplifies comparing a set of previously
- existing patches with a new one created with mkpatches(1).
-
- ppaattcchhddiiffff must be called from the package's main directory, that is
- _$_{_P_K_G_S_R_C_}_/_c_a_t_e_g_o_r_y_/_p_r_o_g_r_a_m. For each patch existing in either the
- patches or the _$_{_W_R_K_D_I_R_}_/_._n_e_w_p_a_t_c_h_e_s directory (the second of which can
- be overridden by the argument of the --dd option), a matching patch is
- looked for in the other directory, and, if one is found, the two are com-
- pared with diff(1).
-
-SSEEEE AALLSSOO
- diff(1), patchdiff(1), pkgdiff(1)
-
-NetBSD 1.6 June 25, 2000 NetBSD 1.6
diff --git a/pkgtools/pkgdiff/files/patchdiff.1 b/pkgtools/pkgdiff/files/patchdiff.1
deleted file mode 100644
index 9f24f844f92..00000000000
--- a/pkgtools/pkgdiff/files/patchdiff.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.\" $NetBSD: patchdiff.1,v 1.3 2005/12/13 12:05:08 wiz Exp $
-.\"
-.\" Copyright (c) 2000 by Thomas Klausner <wiz@NetBSD.org>
-.\" All Rights Reserved. Absolutely no warranty.
-.\"
-.Dd June 25, 2000
-.Dt PATCHDIFF 1
-.Os
-.Sh NAME
-.Nm patchdiff
-.Nd compare sets of patches
-.Sh SYNOPSIS
-.Nm
-.Op Fl d Ar output-directory
-.Sh DESCRIPTION
-.Nm
-is a perl script that simplifies comparing a set of previously
-existing patches with a new one created with
-.Xr mkpatches 1 .
-.Pp
-.Nm
-must be called from the package's main directory, that is
-.Pa ${PKGSRC}/category/program .
-For each patch existing in either the
-patches or the
-.Pa ${WRKDIR}/.newpatches
-directory (the second of which can be overridden by the argument of the
-.Fl d
-option), a matching patch is
-looked for in the other directory, and, if one is found, the two are
-compared with
-.Xr diff 1 .
-.Sh SEE ALSO
-.Xr diff 1 ,
-.Xr patchdiff 1 ,
-.Xr pkgdiff 1
diff --git a/pkgtools/pkgdiff/files/patchdiff.pl b/pkgtools/pkgdiff/files/patchdiff.pl
deleted file mode 100755
index 873c93d1748..00000000000
--- a/pkgtools/pkgdiff/files/patchdiff.pl
+++ /dev/null
@@ -1,106 +0,0 @@
-#!@PERL5@
-#
-# $NetBSD: patchdiff.pl,v 1.7 2005/12/13 12:05:08 wiz Exp $
-#
-# patchdiff: compares a set of patches patch-aa, patch-ab, ... in
-# $WRKDIR/.newpatches in the with another set in patches.
-#
-# Copyright (c) 2000 by Dieter Baron <dillo@giga.or.at> and
-# Thomas Klausner <wiz@NetBSD.org>
-# All Rights Reserved. Absolutely no warranty.
-
-use Getopt::Std;
-use Cwd;
-use File::Spec;
-
-my $oldpatchdir, $newpatchdir;
-my $wrkdir, $thisdir;
-my %orig, %new;
-
-sub getfilename {
- my $fname=shift;
- local $_;
- local *handle;
- open(handle, $fname);
- while (<handle>) {
- next unless m/^\+\+\+[ ]([^ ]*)/;
- close(handle);
- $_ = $1;
- chomp();
- return $_;
- }
- close(handle);
- return undef;
-}
-
-sub putinhash {
- my $hash=shift;
- my $files=shift;
- my $temp;
- local *handle;
- open(handle, "ls $files|");
- while(<handle>) {
- chomp;
- $temp=getfilename($_);
- $$hash{$temp}=File::Spec->abs2rel($_, $thisdir);
- }
- close(handle);
-}
-
-getopts('d:h');
-
-if ($opt_h) {
- ($prog) = ($0 =~ /([^\/]+)$/);
- print STDERR <<EOF;
-usage: $prog [-d output-directory]
- -d dirname directory to compare the patches in patches/ to;
- defaults to \$WRKDIR/.newpatches
-EOF
- exit 0;
-};
-
-%orig=();
-%new=();
-$thisdir=cwd();
-chomp($thisdir);
-$oldpatchdir=`@MAKE@ show-var VARNAME=PATCHDIR` or
- die ("can't find PATCHDIR -- wrong dir?");
-chomp($oldpatchdir);
-
-$wrkdir=`@MAKE@ show-var VARNAME=WRKDIR` or
- die ("can't find WRKDIR -- wrong dir?");
-chomp($wrkdir);
-
-if ($opt_d) {
- $newpatchdir = cwd()."/$opt_d";
-}
-else {
- $newpatchdir="$wrkdir"."/.newpatches";
-}
-
-if ( ! -d $oldpatchdir) {
- print "No old patches found (directory $oldpatchdir not found)\n";
- exit(0);
-}
-if ( ! -d $newpatchdir ) {
- print "No new patches found (directory $newpatchdir not found)\n";
- exit(0);
-}
-putinhash(\%orig,"$oldpatchdir/patch-*");
-putinhash(\%new,"$newpatchdir/patch-*");
-foreach $patch (keys%orig) {
- print "Only in old: $orig{$patch} ($patch)\n" unless defined($new{$patch});
-}
-foreach $patch (keys%new) {
- if (defined($orig{$patch})) {
-# system("diff",$orig{$patch},$new{$patch});
- $diff=`diff $orig{$patch} $new{$patch}`;
- $diff=~s/^\dc\d\n..\$NetBSD.*\$\n---\n..\$NetBSD.*\$\n//m;
- $diff=~s/^\dc\d\n..\+\+\+.*\n---\n..\+\+\+.*\n//m;
- if ($diff) {
- print "Comparing $orig{$patch} to $new{$patch}\n$diff";
- }
- } else {
- print "Only in new: $new{$patch} ($patch)\n"
- }
-}
diff --git a/pkgtools/pkgdiff/files/pkgdiff b/pkgtools/pkgdiff/files/pkgdiff
deleted file mode 100755
index f2f62b4abf8..00000000000
--- a/pkgtools/pkgdiff/files/pkgdiff
+++ /dev/null
@@ -1,65 +0,0 @@
-#!@SH@
-#
-# $NetBSD: pkgdiff,v 1.16 2005/08/02 12:16:19 seb Exp $
-#
-# Usage: pkgdiff newfile
-# pkgdiff oldfile newfile
-#
-# Will output a patch ready for the NetBSD Pkgs Collection (unified
-# diff, plus no RCS IDs if possible). If only newfile is given,
-# oldfile is assumed as newfile.orig.
-#
-# Copyright (c) 2000 by Hubert Feyrer <hubertf@netbsd.org>
-# All Rights Reserved. Absolutely no warranty.
-#
-
-if [ $# -le 1 ]
-then
- if [ -f "$1.orig" ]; then
- old="$1.orig"
- new="$1"
- else
- echo $0: need at least one argument >&2
- exit 1;
- fi
-else
- old="$1"
- new="$2"
-fi
-basename_new="`basename $new`"
-
-dodiff() {
- case x"$basename_new" in
- xconfigure)
- @DIFF@ -I '\(echo .*as_me:[0-9][0-9]*:\|echo .*configure:[0-9][0-9]*:\|line [0-9][0-9]* "configure\)' $*
- ;;
- *)
- @DIFF@ $*
- esac
-}
-
-case x"$PKGDIFF_FMT" in x)
-lines=3
-PKGDIFF_FMT="-p"
-while [ `dodiff "$PKGDIFF_FMT" -U $lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)(:.*)?\\$'` != 0 ]
-do
- lines=`expr $lines - 1`
- if [ $lines = 0 ]; then
- echo "Cannot strip away RCS IDs, please handle manually!" >&2
- exit 1
- fi
-done
-PKGDIFF_FMT="${PKGDIFF_FMT} -U $lines"
-;;
-esac # PKGDIFF_FMT unset or null
-
-if dodiff -q "$PKGDIFF_FMT" "$old" "$new" > /dev/null
-then
- :
-else
- echo '$'NetBSD'$'
- echo ''
- # Strip out the date on the +++ line to reduce needless
- # differences in regenerated patches
- dodiff "$PKGDIFF_FMT" "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:'
-fi
diff --git a/pkgtools/pkgdiff/files/pkgdiff.0 b/pkgtools/pkgdiff/files/pkgdiff.0
deleted file mode 100644
index 67fad329896..00000000000
--- a/pkgtools/pkgdiff/files/pkgdiff.0
+++ /dev/null
@@ -1,27 +0,0 @@
-PKGDIFF(1) NetBSD General Commands Manual PKGDIFF(1)
-
-NNAAMMEE
- ppkkggddiiffff - diff files in a way appropriate for pkgsrc
-
-SSYYNNOOPPSSIISS
- ppkkggddiiffff [_o_p_t_i_o_n_s] _o_l_d_f_i_l_e _n_e_w_f_i_l_e
-
-DDEESSCCRRIIPPTTIIOONN
- The ppkkggddiiffff utility runs diff(1) on the named files, and generates output
- on stdout that is appropriate to be put as patch file into pkgsrc. An
- empty NetBSD RCS ID is output first, and some effort is made to ensure
- that the generated patch does not include any RCS IDs.
-
- _o_p_t_i_o_n_s can be any options that are allowed for diff(1).
-
-EENNVVIIRROONNMMEENNTT
- PPKKGGDDIIFFFF__FFMMTT
- The flags passed to diff(1) when generating patches. If not set, the
- flags --uu and --pp are used. Though only unified format patches are used in
- pkgsrc as proper patches, sometimes it can be useful to have context or
- plain diffs available.
-
-SSEEEE AALLSSOO
- cvs(1), diff(1), mkpatches(1), patch(1), pkgvi(1)
-
-NetBSD 1.6 Jun 14, 2003 NetBSD 1.6
diff --git a/pkgtools/pkgdiff/files/pkgdiff.1 b/pkgtools/pkgdiff/files/pkgdiff.1
deleted file mode 100644
index 755dcac94bc..00000000000
--- a/pkgtools/pkgdiff/files/pkgdiff.1
+++ /dev/null
@@ -1,50 +0,0 @@
-.\" $NetBSD: pkgdiff.1,v 1.4 2003/06/14 19:12:41 atatat Exp $
-.\"
-.\" Copyright (c) 2000 by Hubert Feyrer <hubertf@netbsd.org>
-.\" All Rights Reserved. Absolutely no warranty.
-.\"
-.Dd Jun 14, 2003
-.Dt PKGDIFF 1
-.Os
-.Sh NAME
-.Nm pkgdiff
-.Nd diff files in a way appropriate for pkgsrc
-.Sh SYNOPSIS
-.Nm
-.Op Ar options
-.Ar oldfile
-.Ar newfile
-.Sh DESCRIPTION
-The
-.Nm
-utility runs
-.Xr diff 1
-on the named files, and generates output on stdout that is appropriate
-to be put as patch file into pkgsrc. An empty
-.Nx
-RCS ID is output
-first, and some effort is made to ensure that the generated patch does
-not include any RCS IDs.
-.Pp
-.Ar options
-can be any options that are allowed for
-.Xr diff 1 .
-.Sh ENVIRONMENT
-.Ss PKGDIFF_FMT
-The flags passed to
-.Xr diff 1
-when generating patches.
-If not set, the flags
-.Fl u
-and
-.Fl p
-are used.
-Though only unified format patches are used in pkgsrc as proper
-patches, sometimes it can be useful to have context or plain diffs
-available.
-.Sh SEE ALSO
-.Xr cvs 1 ,
-.Xr diff 1 ,
-.Xr mkpatches 1 ,
-.Xr patch 1 ,
-.Xr pkgvi 1
diff --git a/pkgtools/pkgdiff/files/pkgvi b/pkgtools/pkgdiff/files/pkgvi
deleted file mode 100755
index 47c53bf6278..00000000000
--- a/pkgtools/pkgdiff/files/pkgvi
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/bin/sh
-# $NetBSD: pkgvi,v 1.10 2006/08/01 17:59:17 bad Exp $
-#
-# Copyright (c) 2001 Tomasz Luchowski. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Tomasz Luchowski for
-# the NetBSD Project
-# 4. The name of the author may not be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-
-if [ "$PKGEDITOR" != "" ]; then
- editor="$PKGEDITOR"
-elif [ "$EDITOR" != "" ]; then
- editor="$EDITOR"
-else
- editor="vi"
-fi
-
-progname=`basename $0`
-
-if [ $# -eq 0 ]
-then
- echo Usage: $progname file >&2
- exit 1
-fi
-
-file="$1"
-cmd=""
-case x"$file" in
- x+*) cmd="$1"; shift ; file="$1" ;;
-esac
-
-if [ ! -f "$file" ]
-then
- echo "$progname: $file: No such file"
- exit 2
-fi
-
-if [ -f $file.orig ]
-then
- chmod u+w "$file"
- $editor $cmd "$file"
- echo "$progname: Backup already exists. For a diff type:"
- echo "pkgdiff $file"
- exit 0
-fi
-
-bfile=`basename $file`
-dfile=`dirname $file`
-
-ext=`echo $bfile | awk -F. '{ print $NF }'`
-
-if [ "$bfile" != "$ext" ]; then
- tmp="$dfile/$bfile.$$.$ext"
-else
- tmp="$file.$$"
-fi
-
-cp "$file" "$tmp"
-chmod u+w "$tmp"
-
-if [ $? -ne 0 ]; then
- echo "$progname: unable to create temporary file"
- exit 1
-fi
-
-$editor $cmd "$tmp"
-
-if cmp "$file" "$tmp" >/dev/null 2>&1
-then
- echo "$progname: File unchanged."
-else
- mv "$file" "$file.orig"
- mv "$tmp" "$file"
- echo "$progname: File was modified. For a diff, type:"
- echo "pkgdiff $file"
-fi
-
-if [ -f "$tmp" ]
-then
- rm "$tmp"
-fi
-
-if [ -f "$tmp~" ]
-then
- rm "$tmp~"
-fi
diff --git a/pkgtools/pkgdiff/files/pkgvi.0 b/pkgtools/pkgdiff/files/pkgvi.0
deleted file mode 100644
index 6383d541bff..00000000000
--- a/pkgtools/pkgdiff/files/pkgvi.0
+++ /dev/null
@@ -1,33 +0,0 @@
-PKGVI(1) NetBSD General Commands Manual PKGVI(1)
-
-NNAAMMEE
- ppkkggvvii -- run editor and make backup of given file if necessary
-
-SSYYNNOOPPSSIISS
- ppkkggvvii [+command] _f_i_l_e
-
-DDEESSCCRRIIPPTTIIOONN
- The ppkkggvvii utility runs the user's favourite editor on a copy of specified
- file. If no changes are made in the editor, nothing happens. Else the
- original file is kept as _f_i_l_e_n_a_m_e_._o_r_i_g, and the modified file is saved as
- _f_i_l_e_n_a_m_e. If ppkkggvvii finds _f_i_l_e_n_a_m_e_._o_r_i_g, it behaves as normal editor and
- changes are only made to _f_i_l_e_n_a_m_e, not affecting _f_i_l_e_n_a_m_e_._o_r_i_g. In both
- cases ppkkggvvii ensures that the file to be edited is writable by the user.
-
- Available option:
-
- ++ccoommmmaanndd
- This option is passed unmodified as first argument to the editor.
- This is useful when the editor used is vi(1).
-
-EENNVVIIRROONNMMEENNTT
- ppkkggvvii uses $PKGEDITOR if defined, then it looks for $EDITOR, if neither
- is defined, it uses vi(1).
-
-SSEEEE AALLSSOO
- pkgdiff(1)
-
-AAUUTTHHOORRSS
- The pkgvi utility was written by Tomasz Luchowski <zuntum@netbsd.org>.
-
-NetBSD 3.0_STABLE Aug 1, 2006 NetBSD 3.0_STABLE
diff --git a/pkgtools/pkgdiff/files/pkgvi.1 b/pkgtools/pkgdiff/files/pkgvi.1
deleted file mode 100644
index 559374943d1..00000000000
--- a/pkgtools/pkgdiff/files/pkgvi.1
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" $NetBSD: pkgvi.1,v 1.8 2006/08/01 17:59:17 bad Exp $
-.\"
-.\" Copyright (c) 2001 Tomasz Luchowski. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Tomasz Luchowski
-.\" for the NetBSD Project
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd Aug 1, 2006
-.Dt PKGVI 1
-.Os
-.Sh NAME
-.Nm pkgvi
-.Nd "run editor and make backup of given file if necessary"
-.Sh SYNOPSIS
-.Nm
-.Op +command
-.Ar file
-.Sh DESCRIPTION
-The
-.Nm
-utility runs the user's favourite editor
-on a copy of specified file.
-If no changes are made in the editor, nothing happens.
-Else the original file is kept as
-.Pa filename.orig ,
-and the modified file
-is saved as
-.Pa filename .
-If
-.Nm
-finds
-.Pa filename.orig ,
-it behaves as normal editor and changes are only made to
-.Pa filename ,
-not affecting
-.Pa filename.orig .
-In both cases
-.Nm
-ensures that the file to be edited is writable by the user.
-.Pp
-Available option:
-.Bl -tag -width indent
-.It Cm +command
-This option is passed unmodified as first argument to the editor.
-This is useful when the editor used is
-.Xr vi 1 .
-.El
-.Sh ENVIRONMENT
-.Nm
-uses $PKGEDITOR if defined, then it looks for $EDITOR,
-if neither is defined, it uses
-.Xr vi 1 .
-.Sh SEE ALSO
-.Xr pkgdiff 1
-.Sh AUTHORS
-The pkgvi utility was written by
-.An Tomasz Luchowski Aq zuntum@netbsd.org .
diff --git a/pkgtools/pkgfind/DESCR b/pkgtools/pkgfind/DESCR
deleted file mode 100644
index cd6f2b79852..00000000000
--- a/pkgtools/pkgfind/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-pkgfind can find packages in pkgsrc. It tries to find packages which
-matches a keyword in the package name.
diff --git a/pkgtools/pkgfind/Makefile b/pkgtools/pkgfind/Makefile
deleted file mode 100644
index da1fe34b9fb..00000000000
--- a/pkgtools/pkgfind/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# $NetBSD: Makefile,v 1.16 2007/01/07 09:14:09 rillig Exp $
-
-DISTNAME= pkgfind-20050804
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= peter@pointless.nl
-COMMENT= Find packages by package name in pkgsrc
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-NO_CONFIGURE= yes
-NO_CHECKSUM= yes
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-do-build:
- ${LINK.c} -o ${WRKSRC}/pkgfind ${WRKSRC}/pkgfind.c
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/pkgfind ${PREFIX}/bin/pkgfind
- ${INSTALL_MAN} ${WRKSRC}/pkgfind.1 ${PREFIX}/${PKGMANDIR}/man1/pkgfind.1
-
-SUBST_CLASSES+= path
-SUBST_STAGE.path= post-patch
-SUBST_FILES.path= pkgfind.c pkgfind.1
-SUBST_SED.path= -e "s,/usr/pkgsrc,${PKGSRCDIR},g"
-SUBST_MESSAGE.path= Adjusting pkgsrc directory.
-
-.include "../../mk/bsd.prefs.mk"
-
-# need err(1), warn(1), set/getprogname(1)
-.if ${OPSYS} != "NetBSD" && ${OPSYS} != "FreeBSD" && ${OPSYS} != "DragonFly"
-CFLAGS+= -DNEED_LIBNBCOMPAT
-LDFLAGS+= -lnbcompat
-. include "../../pkgtools/libnbcompat/buildlink3.mk"
-.endif
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkgfind/PLIST b/pkgtools/pkgfind/PLIST
deleted file mode 100644
index aa1fe984fbe..00000000000
--- a/pkgtools/pkgfind/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2005/01/18 22:03:55 tv Exp $
-bin/pkgfind
-man/man1/pkgfind.1
diff --git a/pkgtools/pkgfind/files/pkgfind.1 b/pkgtools/pkgfind/files/pkgfind.1
deleted file mode 100644
index 6d1cd357972..00000000000
--- a/pkgtools/pkgfind/files/pkgfind.1
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" $NetBSD: pkgfind.1,v 1.8 2005/05/25 16:53:59 wiz Exp $
-.\"
-.\" Copyright (c) 2004 Peter Postma <peter@pointless.nl>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd May 8, 2005
-.Dt PKGFIND 1
-.Sh NAME
-.Nm pkgfind
-.Nd find packages in pkgsrc
-.Sh SYNOPSIS
-.Nm
-.Op Fl CcMqx
-.Op Fl n Ar number
-.Ar keyword
-.Op Ar ...
-.Sh DESCRIPTION
-.Nm
-can find packages in pkgsrc.
-It tries to find packages which match the
-.Ar keyword
-in the package name.
-.Pp
-.Nm
-searches in
-.Pa /usr/pkgsrc
-by default.
-You may specify a different path by setting
-the environment variable
-.Pa PKGSRCDIR .
-.Pp
-The following options may be used:
-.Bl -tag -width Ds
-.It Fl C
-Search in the
-.Dq COMMENT
-field, instead of looking at package names.
-.It Fl c
-Do case sensitive searches.
-.It Fl M
-Search in the
-.Dq MAINTAINER
-field, instead of looking at package names.
-.It Fl n Ar number
-Stop searching after
-.Ar number
-packages are found.
-.It Fl q
-Don't show the comment in the output, only the package name.
-.It Fl x
-Do exact word searches.
-.El
-.Sh SEE ALSO
-.Pa http://www.pkgsrc.org/
-.Sh AUTHORS
-.An Peter Postma Aq peter@pointless.nl
diff --git a/pkgtools/pkgfind/files/pkgfind.c b/pkgtools/pkgfind/files/pkgfind.c
deleted file mode 100644
index 0704594f39c..00000000000
--- a/pkgtools/pkgfind/files/pkgfind.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (c) 2004 Peter Postma <peter@pointless.nl>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-/*
- * pancake@phreaker.net ** changes 2004/09/14
- *
- * -C search in comments
- * -c case sensitive
- * -q quiet, don't output comment
- * -x exact matches
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#ifdef NEED_LIBNBCOMPAT
-#include <nbcompat.h>
-#else
-#include <err.h>
-#endif
-
-#include <ctype.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define PKGSRCDIR "/usr/pkgsrc"
-
-static const char * const skip[] = {
- ".", "..", "CVS", "bootstrap", "doc", "distfiles",
- "licenses", "mk", "packages", NULL
-};
-
-static void pkgfind(const char *, const char *, int);
-static void showpkg(const char *, const char *, const char *);
-static int getstring(const char *, const char *, char **);
-static int checkskip(const struct dirent *);
-static int partialmatch(const char *, const char *);
-static int exactmatch(const char *, const char *);
-static void usage(void);
-
-static int (*match)(const char *, const char *);
-
-static const char *search;
-static int cflag, qflag;
-
-int
-main(int argc, char *argv[])
-{
- const char *path;
- int ch, count = 0;
-
- setprogname("pkgfind");
-
- /* default matches are partial matches */
- match = partialmatch;
- /* no special searches by default */
- search = NULL;
-
- cflag = qflag = 0;
-
- while ((ch = getopt(argc, argv, "Ccn:Mqx")) != -1) {
- switch (ch) {
- case 'C': /* search in comments */
- search = "COMMENT";
- break;
- case 'c': /* case sensitive */
- cflag = 1;
- break;
- case 'n':
- count = atoi(optarg);
- break;
- case 'M': /* search for maintainer */
- search = "MAINTAINER";
- break;
- case 'q': /* quiet, don't output comment */
- qflag = 1;
- break;
- case 'x': /* exact matches */
- match = exactmatch;
- break;
- default:
- usage();
- /* NOTREACHED */
- }
- }
- argc -= optind;
- argv += optind;
-
- if (argc < 1)
- usage();
-
- if ((path = getenv("PKGSRCDIR")) == NULL)
- path = PKGSRCDIR;
-
- for (; *argv != NULL; ++argv)
- pkgfind(path, *argv, count);
-
- return 0;
-}
-
-static void
-pkgfind(const char *path, const char *pkg, int count)
-{
- struct dirent **cat, **list = NULL;
- int ncat, nlist, i, j;
- char tmp[PATH_MAX];
- char *text = NULL;
- struct stat sb;
-
- if ((ncat = scandir(path, &cat, checkskip, alphasort)) < 0)
- err(EXIT_FAILURE, "%s", path);
-
- for (i = 0; i < ncat; i++) {
- if (snprintf(tmp, sizeof(tmp), "%s/%s", path, cat[i]->d_name)
- >= sizeof(tmp)) {
- warnx("filename too long");
- continue;
- }
- if (stat(tmp, &sb) < 0 || !S_ISDIR(sb.st_mode))
- continue;
- if ((nlist = scandir(tmp, &list, checkskip, alphasort)) < 0) {
- warn("%s", tmp);
- continue;
- }
- for (j = 0; j < nlist; j++) {
- if (snprintf(tmp, sizeof(tmp), "%s/%s/%s", path,
- cat[i]->d_name, list[j]->d_name) >= sizeof(tmp)) {
- warnx("filename too long");
- continue;
- }
- if (stat(tmp, &sb) < 0 || !S_ISDIR(sb.st_mode))
- continue;
- if (search != NULL) {
- (void)strncat(tmp, "/Makefile", sizeof(tmp));
- if (getstring(tmp, search, &text) == 0) {
- (void)strncat(tmp, ".common",
- sizeof(tmp));
- if (getstring(tmp, search, &text) == 0)
- continue;
- }
- } else {
- text = list[j]->d_name;
- }
- if ((*match)(text, pkg)) {
- showpkg(path, cat[i]->d_name, list[j]->d_name);
- if (count != 0 && --count < 1) {
- i = ncat;
- break;
- }
- }
- free(list[j]);
- }
- free(cat[i]);
- }
- free(list);
- free(cat);
-}
-
-static void
-showpkg(const char *path, const char *cat, const char *pkg)
-{
- char *mk, *comment = NULL;
- size_t len;
-
- len = strlen(path) + strlen(cat) + strlen(pkg) +
- strlen("Makefile") + 3 + 1;
-
- if (!qflag) {
- if ((mk = malloc(len)) == NULL)
- err(EXIT_FAILURE, "malloc");
- (void)snprintf(mk, len, "%s/%s/%s/Makefile", path, cat, pkg);
-
- if (getstring(mk, "COMMENT", &comment) == 0) {
- if ((mk = realloc(mk, len + 7)) == NULL)
- err(EXIT_FAILURE, "malloc");
- (void)snprintf(mk, len+7, "%s/%s/%s/Makefile.common",
- path, cat, pkg);
- (void)getstring(mk, "COMMENT", &comment);
- }
- free(mk);
- }
-
- if (comment != NULL)
- (void)printf("%s/%s: %s\n", cat, pkg, comment);
- else
- (void)printf("%s/%s\n", cat, pkg);
-}
-
-static int
-getstring(const char *file, const char *string, char **nstring)
-{
- char line[120], *p;
- FILE *fp;
-
- if ((fp = fopen(file, "r")) == NULL)
- return 0;
- while (fgets(line, sizeof(line), fp) != NULL) {
- if ((p = strchr(line, '\n')) == NULL)
- continue;
- *p = '\0';
- if (strncmp(line, string, strlen(string)) != 0)
- continue;
- p = line + strlen(string);
- if (*++p == '=')
- p++;
- while (*p != '\0' && isspace((unsigned char)*p))
- p++;
- if (*p == '\0')
- continue;
- *nstring = strdup(p);
- (void)fclose(fp);
- return 1;
- }
- (void)fclose(fp);
- return 0;
-}
-
-static int
-checkskip(const struct dirent *dp)
-{
- const char * const *p;
-
- for (p = skip; *p != NULL; p++)
- if (strcmp(dp->d_name, *p) == 0)
- return 0;
- return 1;
-}
-
-static int
-partialmatch(const char *s, const char *find)
-{
- size_t len, n;
-
- len = strlen(find);
- n = strlen(s) - len;
-
- do {
- if (cflag) {
- if (strncmp(s, find, len) == 0)
- return 1;
- } else {
- if (strncasecmp(s, find, len) == 0)
- return 1;
- }
- } while (*++s != '\0' && n-- > 0);
-
- return 0;
-}
-
-static int
-exactmatch(const char *s, const char *find)
-{
- if (cflag)
- return (strcmp(s, find) == 0);
- else
- return (strcasecmp(s, find) == 0);
-}
-
-static void
-usage(void)
-{
- (void)fprintf(stderr, "Usage: %s [-CcMqx] [-n number] keyword [...]\n",
- getprogname());
- exit(EXIT_FAILURE);
-}
diff --git a/pkgtools/pkglint/DESCR b/pkgtools/pkglint/DESCR
deleted file mode 100644
index bff78e0924e..00000000000
--- a/pkgtools/pkglint/DESCR
+++ /dev/null
@@ -1,7 +0,0 @@
-pkglint is for pkgsrc packages what lint(1) is for C files. It checks
-for various things that the used languages cannot detect, for example
-application-specific restrictions on certain variables.
-
-Before importing a new package or making changes to an existing package,
-pkglint should be run in the package's directory to check for common
-errors.
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
deleted file mode 100644
index 28242c8ae74..00000000000
--- a/pkgtools/pkglint/Makefile
+++ /dev/null
@@ -1,74 +0,0 @@
-# $NetBSD: Makefile,v 1.359 2007/03/09 03:02:35 rillig Exp $
-#
-
-DISTNAME= pkglint-4.76
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= rillig@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/Documentation/pkgsrc/
-COMMENT= Verifier for NetBSD packages and complete pkgsrc tree
-
-DEPENDS+= digest>=20010101:../../pkgtools/digest
-DEPENDS+= p5-Digest-SHA1-[0-9]*:../../security/p5-Digest-SHA1
-DEPENDS+= p5-enum>=1.016:../../devel/p5-enum
-DEPENDS+= p5-pkgsrc-Dewey>=1.0:../../pkgtools/p5-pkgsrc-Dewey
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-PKG_DESTDIR_SUPPORT= user-destdir
-
-USE_TOOLS+= perl:run
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_BUILD= yes
-USE_LANGUAGES= # none
-
-INSTALLATION_DIRS_FROM_PLIST= yes
-
-SUBST_CLASSES+= pkglint
-SUBST_STAGE.pkglint= post-configure
-SUBST_FILES.pkglint+= lintpkgsrc.0 lintpkgsrc.1 lintpkgsrc.pl
-SUBST_FILES.pkglint+= pkglint.pl
-SUBST_FILES.pkglint+= plist-clash.pl
-.if defined(BATCH)
-SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g
-.else
-SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g
-.endif
-SUBST_SED.pkglint+= -e s\|@PREFIX@\|${PREFIX}\|g
-SUBST_SED.pkglint+= -e s\|@DISTVER@\|${DISTNAME:S/pkglint-//:Q}\|g
-SUBST_SED.pkglint+= -e s\|@MAKE@\|${MAKE:Q}\|g
-SUBST_SED.pkglint+= -e s\|@PERL@\|${PERL5:Q}\|g
-SUBST_SED.pkglint+= -e s\|@DATADIR@\|${PREFIX}/share/pkglint\|g
-
-.include "../../mk/bsd.prefs.mk"
-
-# Note: This target is only intended for use by the pkglint author.
-.PHONY: quick-install
-quick-install:
- ${RM} -rf ${WRKSRC}
- ${MKDIR} ${WRKSRC}
- ${MAKE} do-extract subst-pkglint do-install selftest clean
-
-do-extract:
- cd ${FILESDIR} && ${CP} lintpkgsrc.0 lintpkgsrc.1 lintpkgsrc.pl pkglint.0 pkglint.1 pkglint.pl plist-clash.pl ${WRKSRC}
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkglint.pl ${DESTDIR}${PREFIX}/bin/pkglint
- ${INSTALL_SCRIPT} ${WRKSRC}/lintpkgsrc.pl ${DESTDIR}${PREFIX}/bin/lintpkgsrc
- ${INSTALL_SCRIPT} ${WRKSRC}/plist-clash.pl ${DESTDIR}${PREFIX}/bin/plist-clash
- ${INSTALL_MAN} ${WRKSRC}/lintpkgsrc.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1
-.if !empty(MANINSTALL:Mmaninstall)
- ${INSTALL_MAN} ${WRKSRC}/lintpkgsrc.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
- ${INSTALL_MAN} ${WRKSRC}/pkglint.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-.endif
- ${INSTALL_MAN} ${WRKSRC}/pkglint.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1
- ${INSTALL_DATA} ${FILESDIR}/makevars.map ${DESTDIR}${PREFIX}/share/pkglint/
- ${INSTALL_DATA} ${FILESDIR}/deprecated.map ${DESTDIR}${PREFIX}/share/pkglint/
-
-selftest: .PHONY
- ${LOCALBASE}/bin/pkglint
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkglint/PLIST b/pkgtools/pkglint/PLIST
deleted file mode 100644
index edf6ae4cfbc..00000000000
--- a/pkgtools/pkglint/PLIST
+++ /dev/null
@@ -1,11 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2005/05/18 21:06:58 wiz Exp $
-bin/lintpkgsrc
-bin/pkglint
-bin/plist-clash
-man/cat1/lintpkgsrc.0
-man/cat1/pkglint.0
-man/man1/lintpkgsrc.1
-man/man1/pkglint.1
-share/pkglint/deprecated.map
-share/pkglint/makevars.map
-@dirrm share/pkglint
diff --git a/pkgtools/pkglint/README b/pkgtools/pkglint/README
deleted file mode 100644
index f6d94fa4fef..00000000000
--- a/pkgtools/pkglint/README
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: README,v 1.4 2006/02/28 23:32:47 rillig Exp $
-
-== Current problems ==
-
-The current pkglint architecture will not scale much further. What is
-needed next are parsers for nested, non-context-free languages (make(1),
-sh(1), sed(1)). The parsers should be able to recognize partial
-structures, as well as structures containing foreign parts. This is
-because most of pkgsrc is heavily based on preprocessors:
-
-- The .if and .for directives in Makefiles are preprocessed by make(1)
- before building dependencies and shell commands out of the remaining
- text.
-
-- make(1) assembles shell commands from literal text and variables like
- ${PKGNAME}.
-
-- Shell commands often use dynamic evaluation of variables.
-
-All this makes enhancing pkglint non-trivial. If you know of any
-academic papers that might be of help in this case, please tell me.
-
-The pkglint source code is much too big for a single file.
diff --git a/pkgtools/pkglint/TODO b/pkgtools/pkglint/TODO
deleted file mode 100644
index 816d13f5330..00000000000
--- a/pkgtools/pkglint/TODO
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: TODO,v 1.57 2007/01/30 20:32:23 joerg Exp $
-
-Please add your own entries at the bottom of this file. If possible,
-include the name of an example package where a warning should occur.
-
-* fix false positive warnings
-* ONLY_FOR_PLATFORM => NOT_FOR_PLATFORM
-* check for direct use of user names and group names
-* warn about the use of ${WRKDIR:=...}, as this construct should only
- be used with lists.
-* record with each substring its source location to be able to make
- even more precise diagnostics
-* check wether CONFIG* override match, e.g. CONFIGURE_DIRS most likely
- needs matching CNOFIG_GUESS_OVERRIDE and CONFIG_SUB_OVERRIDE as well
-* Many of the checking routines need some context to provide better
- warnings. For example, checkline_foo() may need to know what has
- happened in the file before that line.
-* Add checks for binary packages. See Debian/lintian for ideas.
-* Of the user-defined variables, some may be used at load-time and some
- don't. Find out how pkglint can distinguish them.
-* Make sure that no variable is modified at load-time after it has been
- used once. This should at least flag BUILD_DEFS in bsd.pkg.mk.
-* Implement unescape_shellword, which is required for the type check for
- SedCommand.
-* Invent an annotation scheme for files that intentionally define
- variables for use in other files.
-* ${MACHINE_ARCH}-${LOWER_OPSYS}elf in PLISTs etc. is a NetBSD config.guess
- problem ==> use of ${APPEND_ELF}
-* Packages including lang/python/extension.mk must follow the Python version
- scheme. Enforcing PYPKGPREFIX for those is most likely a good idea.
-* pkglint ist momentan zufrieden mit wip/gdal-docs, obwohl das Makefile
- gdal-1.3.1 will, aber das distinfo noch die Checksum von 1.2.6 hat.
- Magst vielleicht einen Test einbauen, der schaut, ob die zusammenpassen?
-* Complain about configure patches with ": Avoid regenerating within pkgsrc" chunks
diff --git a/pkgtools/pkglint/files/deprecated.map b/pkgtools/pkglint/files/deprecated.map
deleted file mode 100644
index 94f764fc4fb..00000000000
--- a/pkgtools/pkglint/files/deprecated.map
+++ /dev/null
@@ -1,135 +0,0 @@
-# $NetBSD: deprecated.map,v 1.52 2007/03/02 06:02:11 wiz Exp $
-#
-
-# This file contains names of Makefile variables and a short explanation
-# what to do to make the warning disappear. Lines should only be removed
-# if the explanation changes, in which case the new explanation should
-# be added to the current date.
-
-# December 2003
-FIX_RPATH It has been removed from pkgsrc in 2003.
-
-# February 2005
-ALL_TARGET Use BUILD_TARGET instead.
-NO_WRKSUBDIR Use WRKSRC=${WRKDIR} instead.
-LIB_DEPENDS Use DEPENDS instead.
-MASTER_SITE_SUBDIR Use ${MASTER_SITE_FOO:=subdir/} instead.
-PATCH_SITE_SUBDIR Use ${PATCH_SITES_FOO:=subdir/} instead.
-ONLY_FOR_ARCHS Use ONLY_FOR_PLATFORM instead.
-NOT_FOR_ARCHS Use NOT_FOR_PLATFORM instead.
-ONLY_FOR_OPSYS Use ONLY_FOR_PLATFORM instead.
-NOT_FOR_OPSYS Use NOT_FOR_PLATFORM instead.
-
-# May 2005
-ALL_TARGET Use BUILD_TARGET instead.
-DIGEST_FILE Use DISTINFO_FILE instead.
-IGNORE Use PKG_FAIL_REASON or PKG_SKIP_REASON instead.
-IS_INTERACTIVE Use INTERACTIVE_STAGE instead.
-KERBEROS Use the PKG_OPTIONS framework instead.
-MASTER_SITE_SUBDIR Use some form of MASTER_SITES instead.
-MD5_FILE Use DISTINFO_FILE instead.
-MIRROR_DISTFILE Use NO_BIN_ON_FTP and/or NO_SRC_ON_FTP instead.
-NO_CDROM Use NO_BIN_ON_CDROM and/or NO_SRC_ON_CDROM instead.
-NO_PATCH You can just remove it.
-NO_WRKSUBDIR Use WRKSRC=${WRKDIR} instead.
-PATCH_SITE_SUBDIR Use some form of PATCHES_SITES instead.
-PATCH_SUM_FILE Use DISTINFO_FILE instead.
-PKG_JVM Use PKG_DEFAULT_JVM instead.
-USE_BUILDLINK2 You can just remove it.
-USE_BUILDLINK3 You can just remove it.
-USE_CANNA Use the PKG_OPTIONS framework instead.
-USE_DB4 Use the PKG_OPTIONS framework instead.
-USE_ESOUND Use the PKG_OPTIONS framework instead.
-USE_GIF Use the PKG_OPTIONS framework instead.
-USE_GMAKE Use USE_TOOLS+=gmake instead.
-USE_GNU_TOOLS Use USE_TOOLS instead.
-USE_IDEA Use the PKG_OPTIONS framework instead.
-USE_LIBCRACK Use the PKG_OPTIONS framework instead.
-USE_MMX Use the PKG_OPTIONS framework instead.
-USE_PKGLIBTOOL Use USE_LIBTOOL instead.
-USE_SSL Include "../../security/openssl/buildlink3.mk" instead.
-
-# July 2005
-USE_PERL5 Use USE_TOOLS+=perl or USE_TOOLS+=perl:run instead.
-
-# October 2005
-NO_TOOLS You can just remove it.
-NO_WRAPPER You can just remove it.
-
-# November 2005
-ALLFILES Use CKSUMFILES instead.
-DEPENDS_TARGET Use DEPENDS instead.
-FETCH_DEPENDS Use DEPENDS instead.
-RUN_DEPENDS Use DEPENDS instead.
-
-# December 2005
-USE_CUPS Use the PKG_OPTIONS framework (option cups) instead.
-USE_I586 Use the PKG_OPTIONS framework (option i586) instead.
-USE_INN Use the PKG_OPTIONS framework instead.
-USE_OPENLDAP Use the PKG_OPTIONS framework (option openldap) instead.
-USE_OSS Use the PKG_OPTIONS framework (option oss) instead.
-USE_RSAREF2 Use the PKG_OPTIONS framework (option rsaref) instead.
-USE_SASL Use the PKG_OPTIONS framework (option sasl) instead.
-USE_SASL2 Use the PKG_OPTIONS framework (option sasl) instead.
-USE_SJ3 Use the PKG_OPTIONS framework (option sj3) instead.
-USE_SOCKS Use the PKG_OPTIONS framework (socks4 and socks5 options) instead.
-USE_WNN4 Use the PKG_OPTIONS framework (option wnn4) instead.
-USE_XFACE Use the PKG_OPTIONS framework instead.
-
-# February 2006
-TOOLS_DEPMETHOD Use the :build or :run modifiers in USE_TOOLS instead.
-MANDIR Please use ${PREFIX}/${PKGMANDIR} instead.
-DOWNLOADED_DISTFILE Use the shell variable $$extract_file instead.
-DECOMPRESS_CMD Use EXTRACT_CMD instead.
-
-# March 2006
-INSTALL_EXTRA_TMPL Use INSTALL_TEMPLATE instead.
-DEINSTALL_EXTRA_TMPL Use DEINSTALL_TEMPLATE instead.
-
-# April 2006
-RECOMMENDED Use ABI_DEPENDS instead.
-BUILD_USES_MSGFMT Use USE_TOOLS+=msgfmt instead.
-USE_MSGFMT_PLURALS Use USE_TOOLS+=msgfmt instead.
-
-# May 2006
-EXTRACT_USING_PAX Use "EXTRACT_OPTS=-t pax" instead.
-NO_EXTRACT It doesn't exist anymore.
-_FETCH_MESSAGE Use FETCH_MESSAGE (different format) instead.
-BUILDLINK_DEPENDS.* Use BUILDLINK_API_DEPENDS.* instead.
-BUILDLINK_RECOMMENDED.* Use BUILDLINK_ABI_DEPENDS.* instead.
-SHLIB_HANDLING Use CHECK_SHLIBS_SUPPORTED instead.
-USE_RMAN It has been removed.
-
-# June 2006
-DEINSTALL_SRC Use the pkginstall framework instead.
-INSTALL_SRC Use the pkginstall framework instead.
-DEINSTALL_TEMPLATE Use DEINSTALL_TEMPLATES instead.
-INSTALL_TEMPLATE Use INSTALL_TEMPLATES instead.
-HEADER_TEMPLATE Use HEADER_TEMPLATES instead.
-_REPLACE.* Use REPLACE.* instead.
-_REPLACE_FILES.* Use REPLACE_FILES.* instead.
-MESSAGE Use MESSAGE_SRC instead.
-INSTALL_FILE It may only be used internally by pkgsrc.
-DEINSTALL_FILE It may only be used internally by pkgsrc.
-
-# July 2006
-USE_DIGEST You can just remove it.
-LTCONFIG_OVERRIDE You can just remove it.
-USE_GNU_GETTEXT You can just remove it.
-BUILD_ENV Use PKGSRC_MAKE_ENV instead.
-DYNAMIC_MASTER_SITES You can just remove it.
-
-# September 2006
-MAKEFILE Use MAKE_FILE instead.
-
-# November 2006
-SKIP_PORTABILITY_CHECK Use CHECK_PORTABILITY_SKIP (a list of patterns) instead.
-PKG_SKIP_REASON Use PKG_FAIL_REASON instead.
-
-# January 2007
-BUILDLINK_TRANSFORM.* Use BUILDLINK_FNAME_TRANSFORM.* instead.
-
-# March 2007
-SCRIPTDIR You can just remove it.
-NO_PKG_REGISTER You can just remove it.
-NO_DEPENDS You can just remove it.
diff --git a/pkgtools/pkglint/files/doc/Makefile b/pkgtools/pkglint/files/doc/Makefile
deleted file mode 100644
index d36715f890d..00000000000
--- a/pkgtools/pkglint/files/doc/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# $NetBSD: Makefile,v 1.3 2006/05/23 08:10:37 rillig Exp $
-#
-
-XMLDOCS+= pkglint.xml
-XMLDOCS+= chap.intro.xml
-XMLDOCS+= chap.defs.xml
-XMLDOCS+= chap.types.xml
-XMLDOCS+= chap.code.xml
-XMLDOCS+= chap.statemachines.xml
-XMLDOCS+= chap.future.xml
-
-IMAGES+= statemachine.patch.png
-IMAGES+= statemachine.shellcmd.png
-
-.PHONY: all
-all: pkglint.html
-
-pkglint.html: ${XMLDOCS} ${IMAGES} stylesheet.xsl
- xmlto -m stylesheet.xsl html-nochunks pkglint.xml
-
-.PHONY: clean
-clean:
- rm -f *.html *.png
-
-.SUFFIXES: .dia .png
-.dia.png:
- dia -e ${.TARGET:Q} -t png ${.IMPSRC:Q}
diff --git a/pkgtools/pkglint/files/doc/chap.code.xml b/pkgtools/pkglint/files/doc/chap.code.xml
deleted file mode 100644
index 5b8d62c2974..00000000000
--- a/pkgtools/pkglint/files/doc/chap.code.xml
+++ /dev/null
@@ -1,307 +0,0 @@
-<!-- $NetBSD: chap.code.xml,v 1.5 2006/07/21 05:11:34 rillig Exp $ -->
-
-<chapter id="code">
-<title>Code structure</title>
-
- <para>In this chapter, I give an overview of how the &pkglint;
- code is organized, starting with the <function>main</function>
- function, passing the functions that check a single line and
- finally arriving at the infrastructure that makes writing the
- other functions easier.</para>
-
-<sect1 id="code.overview">
-<title>Overview</title>
-
- <para>The &pkglint; code is structured in modular, easy to
- understand procedures. These procedures can be further
- classified with respect to what they do. There are procedures
- that check a file, others check the lines of a file, again
- others check a single line. These classes of procedures are
- described in the following sections in a top-down
- fashion.</para>
-
- <para>If nothing special is said about which procedures call
- which others, you may assume that procedures of a certain rank
- only call procedures that are of a strictly lower rank. For
- example, no <function>checkline_*</function> will ever call
- <function>checkfile_*</function>. Sometimes, functions of the
- same rank are called, but these cases are documented
- explicitly.</para>
-
-</sect1>
-
-<sect1 id="code.select">
-<title>Selecting the proper checking function</title>
-
- <para>The <function>main</function> procedure of &pkglint; is a
- simple loop around a TODO list containing pathnames of items (I
- couldn't think of a better name here). The decision of which
- checks to apply to a given item is done in
- <function>checkitem</function>, which checks whether the item is
- a file or a directory and dispatches the actual checking to
- specialized procedures.</para>
-
-</sect1>
-
-<sect1 id="code.dir">
-<title>Checking a directory</title>
-
- <para>The procedures that check a directory are
- <function>checkdir_root</function> for the pkgsrc root
- directory, <function>checkdir_category</function> for a category
- of packages and <function>checkdir_package</function> for a
- single package.</para>
-
-</sect1>
-
-<sect1 id="code.file">
-<title>Checking a file</title>
-
- <para>Since the dispatching for files requires much code, it has
- been put into a separate procedure called
- <function>checkfile</function>, which further dispatches the
- call to the other procedures.</para>
-
- <para>The procedures that check a specific file are
- <function>checkfile_ALTERNATIVES</function>,
- <function>checkfile_DESCR</function>,
- <function>checkfile_distinfo</function>,
- <function>checkfile_extra</function>,
- <function>checkfile_INSTALL</function>,
- <function>checkfile_MESSAGE</function>,
- <function>checkfile_mk</function>,
- <function>checkfile_patch</function> and
- <function>checkfile_PLIST</function>. For most of the
- procedures, it should be obvious to which files they are
- applied. A distinction is made between buildlink3 files and
- other <filename>Makefiles</filename>, as some additional checks
- apply to buildlink3 files. Of course, these procedures use
- pretty much the same code for checking, and this is where the
- <function>checklines_*</function> functions step in.</para>
-
- <para>The <function>checkfile_package_Makefile</function>
- function is somewhat special in that it expects four parameters
- instead of only one. This is because loading the package data
- has been separated from the actual checking.</para>
-
-</sect1>
-
-<sect1 id="code.lines">
-<title>Checking the lines in a file</title>
-
- <para>This class of procedures consists of
- <function>checklines_trailing_empty_lines</function>,
- <function>checklines_package_Makefile_varorder</function> and
- <function>checklines_mk</function>. The middle one is too
- complex to be included in
- <function>checkfile_package_Makefile</function>, and the other
- ones are of so generic use that they deserved to be procedures
- of their own.</para>
-
- <para>The <function>checklines_mk</function> makes heavy use of
- the various <function>checkline_*</function> functions that are
- explained in the next chapter.</para>
-
-</sect1>
-
-<sect1 id="code.line">
-<title>Checking a single line in a file</title>
-
- <para>This class of procedures checks a single line of a file.
- The number of parameters differs for most of these procedures,
- as some need more context information and others don't.</para>
-
- <para>The procedures that are applicable to any file type are
- <function>checkline_length</function>,
- <function>checkline_valid_characters</function>,
- <function>checkline_valid_characters_in_variable</function>,
- <function>checkline_trailing_whitespace</function>,
- <function>checkline_rcsid_regex</function>,
- <function>checkline_rcsid</function>,
- <function>checkline_relative_path</function>,
- <function>checkline_relative_pkgdir</function>,
- <function>checkline_spellcheck</function> and
- <function>checkline_cpp_macro_names</function>.</para>
-
- <para>The rest of the procedures is specific to
- <filename>Makefile</filename>s:
- <function>checkline_mk_text</function>,
- <function>checkline_mk_shellword</function>,
- <function>checkline_mk_shelltext</function>,
- <function>checkline_mk_shellcmd</function>,
- <function>checkline_mk_vartype_basic</function>,
- <function>checkline_mk_vartype_basic</function>,
- <function>checkline_mk_vartype</function> and
- <function>checkline_mk_varassign</function>.</para>
-
- <para>This class of procedures contains the most code in
- &pkglint;. The procedures that check shell commands and shell
- words both have around 200 lines, and the largest procedure is
- the check for predefined variable types, which has almost 500
- lines. But the code is not complex at all, since this procedure
- contains a large switch for all the predefined types. The checks
- for a single type usually fit on a single screen.</para>
-
-</sect1>
-
-<sect1 id="code.infrastructure">
-<title>The &pkglint; infrastructure</title>
-
- <para>To keep the code in the checking procedures small and
- legible, an additional layer of procedures is needed that
- provides basic operations and abstractions for handling files as
- a collection of lines and to print all diagnostics in a common
- format that is suitable to further processing by software
- tools.</para>
-
- <para>Since October 2004, this part of &pkglint; makes use of
- some of the object oriented features of the Perl programming
- language. It has worked quite well upto now, but it has not been
- fun to write object-oriented code in Perl. The most basic
- feature I am missing is that the compiler checks whether an
- object has a specific method or not, as I have often written
- <code>$line->warning()</code> instead of
- <code>$line->log_warning()</code>. This makes refacturing quite
- difficult if you don't have a 100&nbsp;% coverage test, and I
- don't have that.</para>
-
- <para>The classes are all defined in the
- <varname>PkgLint</varname> namespace.</para>
-
- <para>The traditional class is <classname>Line</classname>,
- which represents a logical line of a file. In case of
- <filename>Makefile</filename>s, line continuations are parsed
- properly and combined into a single line. For all other files,
- each logical line corresponds to a physical line. The
- <classname>Line</classname> class has accessor methods to its
- fields <methodname>fname</methodname>,
- <methodname>lines</methodname> and
- <methodname>text</methodname>. It also has the methods
- <methodname>log_fatal</methodname>,
- <methodname>log_error</methodname>,
- <methodname>log_warning</methodname>,
- <methodname>log_info</methodname> and
- <methodname>log_debug</methodname> that all have one parameter,
- the diagnostics message. The other methods are used less
- often.</para>
-
- <para>In January 2006, the logging has been improved in
- functionality. Before that, a logical line could well consist of
- 300 physical lines, so a diagnostic would say <quote>you have a
- bug somewhere between line 100 and 400</quote>. This is not
- helpful. Therefore, a new class has been invented that allows to
- map each character of a logical line to its corresponding
- physical location in the file. The new representation of a
- logical line is called a <classname>String</classname>. This
- feature is still experimental, since the only method for logging
- a string is <methodname>log_warning</methodname>. The others are
- still missing. It is also completely unclear how lines that have
- been fixed by &pkglint; are represented since this moves
- characters around in the physical lines.</para>
-
- <para>To make pattern matching with the new
- <classname>String</classname> easy to use, the additional class
- <classname>StringMatch</classname> has been created. It saves
- the result of a <classname>String</classname> that is matched
- against a regular expression. The canonical way to get such a
- <classname>StringMatch</classname> is to call the
- <methodname>String::match</methodname> method.</para>
-
- <para>Since the <classname>StringMatch</classname> was
- convenient to use, the <classname>SimpleMatch</classname> class
- represents the result of matching a Perl string against a
- regular expression. The class <classname>Location</classname> is
- currently unused.</para>
-
-</sect1>
-<sect1 id="code.style">
-<title>Perl programming style</title>
-
- <para>The &pkglint; source code has evolved from FreeBSD's portlint,
- which has been written in Perl, and up to now, &pkglint; is written
- in Perl. Since one of the main ingredients to &pkglint; are regular
- expressions, this choice seems natural, and indeed the Perl regular
- expressions are a great help to keep the code short. But &pkglint;
- is more than just throwing regular expressions at the package
- files.</para>
-
- <para>In 2004, when the &pkglint; source code comprised about
- 40&nbsp;kilobytes, this was quite appropriate. Since then, the code
- has become much more structured and various abstraction layers have
- been inserted. It became more and more clear that the Perl
- programming language has not been designed with nice-looking source
- code in mind.</para>
-
- <para>The first example are subroutines and their parameters. In
- most other languages, the names of the parameters are mentioned in
- the subroutine definition. Not so in Perl. The parameters to each
- subroutine are passed in the <literal>@_</literal> array. The usual
- way to get named parameters is to write assign the parameter array
- to a list of local variables. This extra statement is a nuisance,
- but it is merely syntactical.</para>
-
- <para>More serious is the way the arguments are passed to a
- subroutine. Perl allows the programmer to define subroutines with a
- weak form of prototypes, which helps to catch calls to subroutines
- that provide a wrong number of arguments. This feature catches many
- bugs that are easily overlooked. The downside is that anything
- besides using scalars as parameter types is difficult to understand
- and quickly leads to unexpected behavior. Therefore the subroutines
- in &pkglint; only use this style for parameter passing. Oh, and by
- the way, the subroutine prototypes are only checked for in certain
- situations like direct calls. In method calls, nothing is checked at
- all. Since almost all diagnostics are produced by calling
- <code>$line->log_warning()</code> or
- <code>$line->log_error()</code>, most of the subroutine calls in
- &pkglint; go unchecked.</para>
-
- <para>Instead of using magic numbers, well written code defines
- named constants for these numbers and then refers to them using
- their names, giving the reader extra information that plain numbers
- could not give. Although the constant definitions look quite good in
- &pkglint; there is one big caveat. The Perl programming language
- does not know constants. So these definitions are rather shortcuts
- for defining functions that return the value of the constant. And as
- functions in Perl have package-wide scope, so have these constants.
- This is why the namespace prefixes like <varname>SWST_</varname> are
- necessary to avoid name clashes.</para>
-
- <para>Most of the constants would be written as an enumeration data
- type if Perl had one. The same limitation applies for many of the
- classes (implemented as packages in Perl) that are simply structs.
- The typical Perl implementation of structs are classes, er, packages
- which then use methods for accessing the fields. Again, the names of
- these methods are only checked at runtime, so there is no language
- support for detecting spelling mistakes in field names.</para>
-
- <para>Another area where Perl fails to detect many errors is the
- loose type system. You can apply almost every operator to almost
- every data type, and the Perl language will give you more or less
- what you want. Especially it does not prevent you from matching
- a regular expression against a reference. It will simply compute
- a string representation of the reference and match the regular
- expression against that.</para>
-
- <para>The current Perl interpreter is very inefficient when
- copying strings. This happens really often in pkglint, for
- example when passing arguments to functions or saving the result
- of a regular expression match in <quote>real</quote> variables.
- For a great speed-up, an implementation that handles string
- objects by reference-counting them would be better. (Lua comes
- to mind.)</para>
-
-</sect1>
-<sect1 id="code.lang">
-<title>Switching to another language</title>
-
- <para>Switching to C++ is not an option, since the typing
- overhead would be more than twice the current amount. As a
- consequence the code would become much less readable.</para>
-
- <para>Switching to OCaml looks nice (because of the type
- inference), but the regular expressions that are provided by the
- system are by no means sufficient. On the other hand, since
- today there is a PCRE package for OCaml in pkgsrc.</para>
-
-</sect1>
-</chapter>
diff --git a/pkgtools/pkglint/files/doc/chap.defs.xml b/pkgtools/pkglint/files/doc/chap.defs.xml
deleted file mode 100644
index 86759b2a58f..00000000000
--- a/pkgtools/pkglint/files/doc/chap.defs.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- $NetBSD: chap.defs.xml,v 1.1 2006/02/26 23:38:07 rillig Exp $ -->
-
-<chapter id="defs">
-<title>Definitions</title>
-
- <para>In every non-toy program, the need arises to define new
- words or redefine and clarify existing words. This is the list
- of words that are used in pkglint.</para>
-
- <variablelist>
-
- <varlistentry><term>function</term><listitem><para>A subroutine
- that is called to obtain a return value, rather than for its
- side effects. Functions should restrict the user-visible side
- effects to the necessary minimum.</para>
- </listitem></varlistentry>
-
- <varlistentry><term>procedure</term><listitem><para>A subroutine
- that is not called to obtain a return value, but rather called
- because of its side effects, like input/output.</para>
- </listitem></varlistentry>
-
- </variablelist>
-
-</chapter>
diff --git a/pkgtools/pkglint/files/doc/chap.design.xml b/pkgtools/pkglint/files/doc/chap.design.xml
deleted file mode 100644
index 4199e8c1315..00000000000
--- a/pkgtools/pkglint/files/doc/chap.design.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<!-- $NetBSD: chap.design.xml,v 1.2 2006/02/28 23:25:23 rillig Exp $ -->
-
-<chapter id="design">
-<title>Design goals</title>
-
- <para>&pkglint; should be simple to use. It should be consistent
- and predictable in what it does. The diagnostics should be
- understandable. The number of false positive and false negative
- diagnostics should be minimal.</para>
-
-<sect1 id="design.simple-to-use">
-<title>Simple to use</title>
-
- <para><emphasis>Requirement:</emphasis> Using &pkglint; should
- not require any knowledge about obscure command line options or
- hidden features.</para>
-
- <para>Calling &pkglint; without options gives a useful amount of
- warnings. No further knowledge is needed. Users that are
- accustomed to GNU software will quickly find the
- <literal>--help</literal> command line option, which gives a
- quite verbose description of the available options. Users that
- know the GNU compilers will easily remember the
- <literal>-W</literal> class of options, especially
- <literal>-Wall</literal>. Other than with the GNU compilers, the
- latter option enables really <emphasis>all</emphasis> warnings
- that are intended to be user-visible.</para>
-
- <para>The command line options come in two flavors: short and
- long options. The long options are meant to be used when
- explaining them to others, while the short options are meant to
- be used when invoking &pkglint; in an interactive shell.</para>
-
-</sect1>
-<sect1 id="design.consistent-and-predictable">
-<title>Consistent and predictable</title>
-
- <para><emphasis>Requirement:</emphasis> &pkglint; should behave
- such that the user quickly gets an impression about what
- &pkglint; does. This impression should be persistent, that is,
- the output format for diagnostics should be stable over time,
- and diagnostic messages should not be changed without
- reason.</para>
-
- <para>There are only two cases of what the output of
- &pkglint; is. One is a single line containing the text
- <quote>looks fine.</quote>, the other is a list of diagnostics,
- followed by a summary on the number of diagnostics.</para>
-
- <para>If no warnings are printed, the single line <quote>looks
- fine.</quote> gives a little motivation to the user. This
- message is one of the few things that have been kept in
- &pkglint; since it has been adopted from FreeBSD. It just makes
- pkglint a more friendly tool. :)</para>
-
- <para>All error and warning messages are formatted by a single
- procedure, <function>PkgLint::Logging::log_message</function>. This
- way, all messages are formatted the same way, which allows easy
- recognition by human users as well as other tools. There are two
- different formats available, the traditional one and the gcc-like
- one. In both formats, each diagnostic occupies exactly one line. Up
- to the year 2005, some of the longer messages used to take more than
- one line, but this behavior has been removed.</para>
-
- <para>The default format is the traditional one. It consists of the
- severity, in upper-case letters, followed by the filename, the line
- number and finally the message text. It allows easy recognition of
- the severity of the messages. Even if errors and warnings are
- intermixed in the output, the filenames start almost in the same
- column.</para>
-
- <para>The gcc-like output format consists of the filename, the line
- numbers, the severity and finally the message text. It has been
- added to make it easier to integrate the &pkglint; diagnostics into
- various text editors, for example Emacs. Since in this format the
- filename is the first word, it can be easily seen which warning
- originates in which file.</para>
-
- <para>There are some other procedures that affect the output, but
- they have to be enabled explicitly.</para>
-
-</sect1>
-<sect1 id="design.understandable">
-<title>Understandable diagnostics</title>
-
- <para><emphasis>Requirement:</emphasis> The diagnostics are
- intended to help the user in writing better package definitions.
- They should use an unambiguous, clear language and point
- directly to the problem. If possible, they should include a hint
- on how the problem can be fixed properly.</para>
-
-</sect1>
-<sect1 id="design.false-diagnostics">
-<title>Few false diagnostics</title>
-
- <para><emphasis>Requirement:</emphasis> The number of
- <firstterm>false positives</firstterm>, that is diagnostics
- where no problem actually exists, should be minimal. On the
- other hand, &pkglint; should detect as many problems as
- possible. If it fails to detect a problem, this is called a
- <firstterm>false negative</firstterm>.</para>
-
- <para>Currently, there are very few false positives. The way
- &pkglint; parses the files is already close to the way
- <command>make</command> and <command>sh</command> parse them, so
- the structure of the files is modelled quite well.</para>
-
- <para>Since &pkglint; is also very strict in what it accepts,
- many problems can already be detected. But since the pkgsrc
- developers are quite creative when it comes to solving problems,
- &pkglint; cannot detect everything. After all, the language used
- to define packages is turing-complete, so it cannot be decided
- in every case whether a package is valid or not. Luckily, most
- packages are quite simple.</para>
-
-</sect1>
-</chapter>
diff --git a/pkgtools/pkglint/files/doc/chap.future.xml b/pkgtools/pkglint/files/doc/chap.future.xml
deleted file mode 100644
index 284f8468f90..00000000000
--- a/pkgtools/pkglint/files/doc/chap.future.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<!-- $NetBSD: chap.future.xml,v 1.3 2006/06/29 17:02:32 rillig Exp $ -->
-
-<chapter id="future">
-<title>Future directions</title>
-
-<sect1 id="future.tokenize">
-<title>Tokenizing the input</title>
-
- <para>For providing more exact diagnostics, it would be nice if
- &pkglint; could point the user to the exact character position
- of the smallest problematic text in a file. To do this, the
- file's contents has to be splitted into tokens.</para>
-
- <para>Doing this is nontrivial, since the tokenizing scheme
- depends on the context in which the tokens are used. For
- example, the <varname>COMMENT</varname> variable may contain
- arbitrary characters (including <literal>'</literal> and
- <literal>"</literal>), whereas in many other contexts these are
- parts of quoted shell words.</para>
-
-</sect1>
-<sect1 id="future.ast">
-<title>Working on abstract syntax trees (AST)</title>
-
- <para>When the tokenizing above is done, the tokens could be
- parsed by a grammar to form abstract syntax trees. These would
- consist mainly of function application so that pkglint can infer
- types and valid values over these trees. The following functions
- are likely to appear.</para>
-
- <table id="future.ast.func">
- <title>Functions in the abstract syntax trees</title>
- <tgroup cols="2">
- <thead><row><entry>Function</entry><entry>Purpose</entry></row></thead>
- <tbody>
- <row><entry><function>quote</function>(Val)</entry><entry>The <literal>:Q</literal> modifier</entry></row>
- <row><entry><function>append</function>(Val, Val)</entry><entry>The <literal>+=</literal> operator</entry></row>
- <row><entry><function>concat</function>(Val, Val)</entry><entry>The direct concatenation of two values</entry></row>
- <row><entry><function>subst</function>(Val, Subst)</entry><entry>The <literal>:S</literal> and <literal>:C</literal> modifiers</entry></row>
- <row><entry><function>shell</function>(Val)</entry><entry>The <literal>!=</literal> operator and the <literal>:sh</literal> modifier</entry></row>
- <row><entry><function>literal</function>(Val)</entry><entry>Introduces literal values</entry></row>
- </tbody>
- </tgroup>
- </table>
-
- <para>Examples:</para>
-
-<programlisting>
- WRKSRC= ${WRKDIR}
- SUBST_SED.pkglint+= -e s\|@DATADIR@\|${PREFIX:Q}/share/pkglint\|g
-</programlisting>
-
- <para>The first line would be parsed as
- <literal>assign(var("WRKSRC"), varuse("WRKDIR"))</literal>. The
- second line would be parsed as
- <literal>assign(var("SUBST_SED.pkglint"),
- append(varuse("SUBST_SED.pkglint"), concat(concat(str("-e
- s\\|@DATADIR@\\|"), quote(varuse("PREFIX"))),
- str("/share/pkglint\\|g"))))</literal>.</para>
-
- <para>At this point, unification together with a pattern matcher
- on tree structures would come in handy, to allow the parser for
- the shell commands to still operate on this parse tree. This
- might eventually enable cross-language type inference.</para>
-
-</sect1>
-<sect1 id="future.vars">
-<title>Even more restricted variables</title>
-
- <para>Currently there are mainly two restrictions for variables:
- What values they may contain (data types) and where they may be
- defined and used, on a per-file basis.</para>
-
- <para>The <filename>makevars.map</filename> file already
- contains annotations to distinguish user-defined from
- system-defined variables, but they are currently only used as
- abbreviations and not further exploited. Based on these
- definitions, sequence points may be defined in the pkgsrc
- infrastructure where the values of these variables must have
- certain properties, like being defined or being fixed (which
- means that the variable will not change further).</para>
-
- <para>For example, user-defined variables may then be specified
- as follows. They are given default values in
- <filename>mk/defaults/mk.conf</filename>, may be overridden by
- any file that is included inside <varname>MAKECONF</varname>,
- and after that, their value is fixed. They may then be used at
- both load and run time.</para>
-
-</sect1>
-</chapter>
diff --git a/pkgtools/pkglint/files/doc/chap.intro.xml b/pkgtools/pkglint/files/doc/chap.intro.xml
deleted file mode 100644
index 32a68f69e2e..00000000000
--- a/pkgtools/pkglint/files/doc/chap.intro.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<!-- $NetBSD: chap.intro.xml,v 1.1 2006/02/26 23:38:07 rillig Exp $ -->
-
-<chapter id="intro">
-<title>Introduction</title>
-
- <para>&pkglint; is a static analysis tool for pkgsrc packages.
- It finds many errors and problematic issues in those packages.
- Starting in June 2004, &pkglint; has evolved into a powerful
- tool that gives precise warnings wherever possible. With that
- power comes much additional complexity, which cannot be
- understood from reading the source code alone. This document
- provides the necessary background information to understand what
- the actual code does and why it is done this way.</para>
-
-</chapter>
diff --git a/pkgtools/pkglint/files/doc/chap.statemachines.xml b/pkgtools/pkglint/files/doc/chap.statemachines.xml
deleted file mode 100644
index 358d6f66726..00000000000
--- a/pkgtools/pkglint/files/doc/chap.statemachines.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!-- $NetBSD: chap.statemachines.xml,v 1.3 2006/07/27 09:19:37 rillig Exp $ -->
-
-<chapter id="statemachines">
-<title>State machines</title>
-
- <para>This chapter explains the various state machines that are
- used in &pkglint;. It also provides graphical representations of
- them that are much easier to read than the source code.</para>
-
- <para>The opaque arrows in the figures represent transitions
- that have a regular expression as condition. The hollow arrows
- are the default transitions if nothing else matches. When
- multiple regular expressions match in a state, the one that
- appears first in the source code is chosen.</para>
-
-<sect1 id="statemachines.shellword">
-<title>The state machine for shell words</title>
-
- <para>The state machine for single shell words is pretty simple,
- and I think it can be understood from the source code alone. So
- no graphical representation is provided.</para>
-
-</sect1>
-
-<sect1 id="statemachines.shellcommand">
-<title>The state machine for shell commands</title>
-
- <figure id="statemachine.shellcommand">
- <title>The state transitions for shell commands</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="statemachine.shellcmd.png" format="PNG"/>
- </imageobject>
- <textobject>(Here should be a drawing of the state transitions.)</textobject>
- </mediaobject>
- </figure>
-
- <para>The punch card symbols provide a means to go to a certain
- state whenever the input matches the text on the punch
- card.</para>
-
-</sect1>
-
-<sect1 id="statemachines.patch">
-<title>The state machine for patch files</title>
-
- <para>The state machine for patch files is the newest of the
- state machines. Here, the state transitions are separated from
- the code, which makes the code itself pretty small. I don't know
- yet if this programming style is elegant or not. Time will
- show.</para>
-
- <figure id="statemachine.patch">
- <title>The state transitions for patch files</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="statemachine.patch.png" format="PNG"/>
- </imageobject>
- <textobject>(Here should be a drawing of the state transitions.)</textobject>
- </mediaobject>
- </figure>
-
- <para>The states on the left side are for parsing context diffs,
- the ones on the right side are for unified diffs. Some of the
- state names are highly abbreviated as follows. The first letter
- gives the format of the patch, which is <quote>c</quote> for
- context diffs and <quote>u</quote> for unified diffs. The second
- letter gives the current syntactical level, which is
- <quote>f</quote> for a file header, <quote>h</quote> for a hunk
- header, or <quote>l</quote> for the hunk lines. The third letter
- describes the action that belongs to the line, which is
- <quote>a</quote> for an addition, and <quote>d</quote> for a
- deletion.</para>
-
-</sect1>
-
-</chapter>
diff --git a/pkgtools/pkglint/files/doc/chap.types.xml b/pkgtools/pkglint/files/doc/chap.types.xml
deleted file mode 100644
index 696a5322694..00000000000
--- a/pkgtools/pkglint/files/doc/chap.types.xml
+++ /dev/null
@@ -1,539 +0,0 @@
-<!-- $NetBSD: chap.types.xml,v 1.14 2006/11/25 20:27:42 rillig Exp $ -->
-
-<chapter id="types">
-<title>The &pkglint; type system</title>
-
- <para>One of the most notable additions to &pkglint; is the
- introduction of typed variables. Traditionally, in
- <filename>Makefile</filename>s, all variables have the type
- <type>String</type>. This prevents many useful checks from being
- done before executing the code.</para>
-
- <para>Up to 2004, &pkglint; already did some checks based on
- the value of the variables, but these checks had no common
- structure that could be described easily.</para>
-
-<sect1 id="types.history">
-<title>History</title>
-
- <para>In February 2005, initial support for the &pkglint; type
- system has been added. Some of the common variables have been
- assigned types such as <literal><type>Boolean</type></literal>
- or <literal><type>Yes_Or_Undefined</type></literal>, which are
- the two common ways to represent boolean variables in pkgsrc.
- The list of typed variables has been moved from the &pkglint;
- code to an external file, <filename>makevars.map</filename>.
- Many more basic types have been added later.</para>
-
- <para>In October 2005, the type system has been extended to
- allow <literal><type>List of
- <replaceable>simple-type</replaceable></type></literal>, which
- allowed to handle variables like <varname>DEPENDS</varname> and
- <varname>CFLAGS</varname>. One month later, enumeration types
- have been added, allowing the type of
- <varname>PTHREAD_OPTS</varname> to be expressed as <literal>List
- of { require native }</literal>.</para>
-
- <para>In May 2006, the definition and use of variables has been
- further restricted by introducing ACLs, which define the
- permitted operations (write, append, default, read, preprocess-read)
- depending on the current file.</para>
-
-</sect1>
-
-<sect1 id="types.syntax">
-<title>Syntax for defining types</title>
-
-<programlisting>
- type ::= (list-type)? simple-type (acls)?
-
- list-type ::= ("List" | "InternalList") "of"
-
- simple-type ::= predefined-type
- | enumeration
- predefined-type ::= [A-Za-z][0-9A-Z_a-z]*
- enumeration ::= "{" (enumeration-item)* "}"
- enumeration-item ::= [-0-9A-Z_a-z]+
-
- acls ::= "[" (acl-entry ("," acl-entry)*)? "]"
- acl-entry ::= acl-subject ":" acl-perms
- acl-subject ::= [.0-9A-Za-z]+ | "_"
- acl-perms ::= [adprs]*
-</programlisting>
-
-</sect1>
-<sect1 id="types.semantics">
-<title>Semantics of the types</title>
-
- <para>The <firstterm>simple types</firstterm> in &pkglint; are
- either predefined types or enumeration types. A
- <firstterm>predefined type</firstterm> is used by its name. See
- <xref linkend="types.predefined"/> for the list of predefined
- types.</para>
-
- <para>An expression of an enumeration type may have either of
- the enumeration-items as a value. It may not reference other
- variables.</para>
-
- <para>A list type can be constructed from a predefined type or
- an enumeration. It is not possible to construct lists of lists,
- since I have never needed that. There are two types of lists,
- called <literal>List</literal> and
- <literal>InternalList</literal>, which are described in the
- <ulink url="&pkgsrc-guide;/makefile.html">pkgsrc guide, the
- chapter about <filename>Makefile</filename>s</ulink>.</para>
-
-</sect1>
-<sect1 id="types.acls">
-<title>Access Control Lists</title>
-
- <para>Additionally to the data type, which specifies
- <emphasis>what</emphasis> a variable can contain, the ACLs
- define <emphasis>where</emphasis> the variable can be defined or
- used (this is called the <firstterm>ACL subject</firstterm>) and
- which operations are allowed (these are the <firstterm>ACL
- permissions</firstterm>).</para>
-
- <para>The ACL subjects are specified by the filename. For
- example, <filename>Makefile</filename> and
- <filename>buildlink3.mk</filename> are valid ACL subjects. Since
- some names occur over an over in pkgsrc, these can be
- abbreviated as shown in <xref linkend="types.acl.subjects.abbr"
- />. The character <literal>*</literal> is a placeholder for zero
- or more arbitrary characters, like in the shell. The possible
- actions on a variable are shown in <xref
- linkend="types.acl.perms" />.</para>
-
- <table id="types.acl.subjects.abbr">
- <title>ACL Subjects</title>
- <tgroup cols="2">
- <thead><row><entry>Subject</entry><entry>Abbreviation</entry></row></thead>
- <tbody>
- <row><entry><filename>Makefile</filename></entry><entry>m</entry></row>
- <row><entry><filename>Makefile.common</filename></entry><entry>c</entry></row>
- <row><entry><filename>buildlink3.mk</filename></entry><entry>b</entry></row>
- <row><entry><filename>hacks.mk</filename></entry><entry>h</entry></row>
- <row><entry><filename>options.mk</filename></entry><entry>o</entry></row>
- <row><entry>any file</entry><entry>*</entry></row>
- </tbody>
- </tgroup>
- </table>
-
- <table id="types.acl.perms">
- <title>ACL Permissions</title>
- <tgroup cols="2">
- <thead><row><entry>Permission</entry><entry>Description</entry></row></thead>
- <tbody>
- <row><entry><filename>a</filename></entry><entry>Append to the
- variable using the <literal>+=</literal> operator.</entry></row>
- <row><entry><filename>d</filename></entry><entry>Provide a
- default value for the variable using the <literal>?=</literal>
- operator.</entry></row>
- <row><entry><filename>s</filename></entry><entry>Set the
- variable unconditionally using the <literal>=</literal>,
- <literal>:=</literal> or <literal>!=</literal>
- operator.</entry></row>
- <row><entry><filename>u</filename></entry><entry>Use the value
- of the variable.</entry></row>
- <row><entry><filename>p</filename></entry><entry>Use the value
- of the variable during preprocessing.</entry></row>
- </tbody>
- </tgroup>
- </table>
-
- <para>If a variable has no ACL definition at all, all operations
- are allowed on it. Otherwise exactly those operations of the
- first ACL entry whose subject matches the current filename are
- allowed. If no entry matches, nothing is allowed.</para>
-
- <para>For determining if a variable is used in the correct
- place, the filename is only one part of the whole decision. The
- other one is the context in which the variable appears. There
- are many factors that influence whether the variable is used
- correctly.</para>
-
- <itemizedlist>
-
- <listitem>The variable may be either used at preprocessing time
- or at runtime. Some variables are defined in
- <filename>bsd.pkg.mk</filename> and thus are not available until
- that file has been included. As this should always be the very
- last thing a package includes, it practically means that these
- variables are only available at runtime.</listitem>
-
- <listitem>The variable may appear as the whole right hand side
- of an assignment, as a single word, or even as part of a word.
- First, the types on the right and left side should be
- compatible. Second, some variables need to be quoted correctly,
- depending on whether they are part of a word or not.</listitem>
-
- <listitem>In shell commands, the variable may also appear as a
- whole word or as part of a word. This is similar to the case
- above.</listitem>
-
- <listitem>The variable may appear inside some sort of quotes.
- For some variables this is acceptable, as they are assumed to
- never contain special characters. For others it
- isn't.</listitem>
-
- <listitem>The various operators in conditional statements like
- <literal>.if</literal> may further restrict the valid values.
- For example, the <varname>OPSYS</varname> variable should only
- be compared to well-known operating system names. The
- <varname>exists()</varname> function should only be called on
- pathnames. The <varname>defined()</varname> operator only checks
- if the variable is defined and does not access its
- value.</listitem>
-
- </itemizedlist>
-
-<sect2 id="types.acls.future">
-<title>Future Directions</title>
-
- <para>Currently the ACLs only cover the <quote>user
- space</quote> of pkgsrc. They will be extended later to also
- check for valid variable definition and use in the pkgsrc
- infrastructure, as well as the user configuration file. For
- completeness, those variables that are intended to be specified
- on the command line will be added to the
- <filename>makevars.map</filename> file.</para>
-
-</sect2>
-</sect1>
-<sect1 id="types.predefined">
-<title>Predefined types</title>
-
- <para>There are many predefined types in &pkglint;, which are
- described below.</para>
-
- <!-- reference: pkglint.pl, revision 1.532 -->
- <variablelist>
-
- <varlistentry><term><literal><type>AwkCommand</type></literal></term>
- <listitem><para>An awk command. Currently nothing is checked
- here.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>BuildlinkDepmethod</type></literal></term>
- <listitem><para>Must be either <literal>build</literal> or
- <literal>full</literal>.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>BuildlinkDepth</type></literal></term>
- <listitem><para>This type is only intended for one variable,
- namely <varname>BUILDLINK_DEPTH</varname>, which is only
- modified in <filename>buildlink3.mk</filename>
- files.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>BuildlinkPackages</type></literal></term>
- <listitem><para>The type of the variable
- <varname>BUILDLINK_PACKAGES</varname>. Like
- <literal><type>BuildlinkDepth</type></literal> above, this is
- only used in <filename>buildlink3.mk</filename> files. This
- variable has two different patterns to be modified. The first is
- to remove the current package from itself, and the second is to
- append the current package. This prevents a package from showing
- up twice in the list.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Category</type></literal></term>
- <listitem><para>One of the categories that a package may be
- placed in. The list of categories has been assembled manually
- when the type was introduced. There is no further agreement on
- which valid categories are valid, besides the top level
- directory names in pkgsrc.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>CFlag</type></literal></term>
- <listitem><para>One word in a <varname>CFLAGS</varname> or
- <varname>CPPFLAGS</varname> variable. &pkglint; knows the flags
- starting with <literal>-D</literal>, <literal>-U</literal>,
- <literal>-I</literal>. Flags starting with
- <literal>-O</literal>, <literal>-W</literal>,
- <literal>-f</literal>, <literal>-g</literal> or
- <literal>-m</literal> are silently accepted since they are
- commonly used for the GNU compilers. As the pkgsrc framework
- does not know how to handle most of these flags, care should be
- taken.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Comment</type></literal></term>
- <listitem><para>The comment of a package.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Dependency</type></literal></term>
- <listitem><para>A simple dependency like
- <literal>foopkg>=1.0</literal>, <literal>foopkg-[0-9]*</literal>
- or <literal>foopkg-1.0</literal>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>DependencyWithPath</type></literal></term>
- <listitem><para>A dependency (see above), followed by a colon
- and a relative directory. For some packages, special variables
- like <varname>USE_TOOLS</varname> should be used instead of an
- explicit dependency.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>DistSuffix</type></literal></term>
- <listitem><para>The value of the variable
- <varname>EXTRACT_SUFX</varname>. The difference in the name is
- intentional here, since <varname>EXTRACT_SUFX</varname> is a
- misnomer. <varname>DIST_SUFX</varname> or
- <varname>DIST_SUFFIX</varname> would be more appropriate.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Filename</type></literal></term>
- <listitem><para>A filename, as defined in <ulink
- url="http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_169">POSIX</ulink>.
- This type further restricts the set of allowed characters.
- See also <literal><type>Pathname</type></literal>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Filemask</type></literal></term>
- <listitem><para>A shell globbing pattern that does not contain a
- slash. See also <literal><type>Pathmask</type></literal>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Identifier</type></literal></term>
- <listitem><para>In various places in pkgsrc, identifiers are
- used. This type collects the most common naming conventions.
- When you need a more specific check, you have to write your own
- check.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>LdFlag</type></literal></term>
- <listitem><para>A flag that is passed to the linker. Flags
- starting with <literal>-L</literal> or <literal>-l</literal> are
- accepted, as well as some others that are assumed to be handled
- by the wrapper framework.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Mail_Address</type></literal></term>
- <listitem><para>Checks for a very restricted subset of <ulink
- url="http://www.ietf.org/rfc/rfc2822.txt">RFC
- 2822</ulink>.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Message</type></literal></term>
- <listitem><para>Messages are printed to the user as status
- indicators. <ulink
- url="http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/portlint/src/portlint.pl#rev1.77">As
- opposed to FreeBSD</ulink>, they should not be quoted since they
- may be used in contexts where quoting should be done
- differently.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Option</type></literal></term>
- <listitem><para>An option from the
- <literal>PKG_OPTIONS</literal> framework. Options should not
- contain underscores. They should be documented in
- <filename>pkgsrc/mk/defaults/options.description</filename>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Pathlist</type></literal></term>
- <listitem><para>A list of directories that are separated by
- colons, like the popular environment variable
- <varname>PATH</varname>. This type differs from the type
- <literal><type>List of Pathname</type></literal> in the
- character that is used as a separator.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Pathmask</type></literal></term>
- <listitem><para>A shell globbing expression that may include
- slashes.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Pathname</type></literal></term>
- <listitem><para>A pathname, as defined in <ulink
- url="http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266">POSIX</ulink>.
- See also <literal><type>Filename</type></literal>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Perl5Packlist</type></literal></term>
- <listitem><para>A common error has been to refer to
- <varname>INSTALLARCHLIB</varname> in the location of the packing
- list. Therefore no references to other variables are
- allowed.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>PkgName</type></literal></term>
- <listitem><para>A package name should conform to some
- restrictions, since the filename of the binary package is
- created from it, which is then interpreted by pkg_add and the
- like.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>PkgOptionsVar</type></literal></term>
- <listitem><para>I had once made the mistake of referencing
- <varname>PKGBASE</varname> in this variable, not knowing that
- <varname>PKG_OPTIONS_VAR</varname> is used during preprocessing,
- when <varname>PKGBASE</varname> is not yet defined. This type
- prevent that mistake from being done again.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>PkgRevision</type></literal></term>
- <listitem><para>The package revision must be a small integer.
- The only place where this definition may occur is the package
- <filename>Makefile</filename> itself, as this variable says
- something about the individual package. There is no mechanism in
- pkgsrc for something similar to <varname>PKGREVISION</varname>
- that can be used in <filename>Makefile.common</filename>
- files.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>PlatformTriple</type></literal></term>
- <listitem><para>pkgsrc has been ported to many platforms, all of
- which are identified using a triple of operating system,
- operating system version and hardware
- architecture.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Readonly</type></literal></term>
- <listitem><para>This type is used to mark a variable as being
- read-only to a package author. As this is not really a data type
- but an access restriction, it will disappear in the next version
- of the type system.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>RelativePkgDir</type></literal></term>
- <listitem><para>A directory name that is relative to the package
- directory. Mostly used for dependencies. See also
- <literal><type>RelativePkgPath</type></literal>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>RelativePkgPath</type></literal></term>
- <listitem><para>A pathname that is relative to the package
- directory. It may point to either a regular file or a directory.
- See also <literal><type>RelativePkgDir</type></literal>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>SVR4PkgName</type></literal></term>
- <listitem><para>When converting pkgsrc packages to Solaris
- packages, the package name is restricted to 9 characters, of
- which five remain for the package
- itself.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>ShellCommand</type></literal></term>
- <listitem><para>A shell command is similar to a
- <literal><type>List of ShellWord</type></literal>, except that
- additional checks are performed on the direct use of tool names
- or certain other deprecated shell commands.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>ShellWord</type></literal></term>
- <listitem><para>A shell word is what the shell would regard as a
- single word.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>Stage</type></literal></term>
- <listitem><para>In pkgsrc, there are phases, stages and steps.
- Especially for the <varname>SUBST_STAGE</varname> variable, this
- should always be one of the few predefined names, otherwise the
- whole substitution group will be ignored.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Tool</type></literal></term>
- <listitem><para>The pkgsrc tools framework contains very few
- plausibility checks. To prevent spelling mistakes, the list of
- valid tool names is loaded from the pkgsrc infrastructure files
- and compared with the names that are used in the
- <varname>USE_TOOLS</varname> variable.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>URL</type></literal></term>
- <listitem><para>URLs appear in <varname>MASTER_SITES</varname>
- and the <varname>HOMEPAGE</varname>. If a
- <varname>MASTER_SITES</varname> group exists for a given URL, it
- should be used instead of listing the URL directly.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>UserGroupName</type></literal></term>
- <listitem><para>User and group names should consist only of
- alphanumeric characters and the underscore. This restriction
- ensures maximum portability of pkgsrc.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Userdefined</type></literal></term>
- <listitem><para>Another instance of misuse of the type system.
- But it helps to catch some errors in packages. This type will
- disappear in the next version of the type system. See also
- <literal><type>Readonly</type></literal>.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Varname</type></literal></term>
- <listitem><para>Variable names are restricted to only uppercase
- letters and the underscore in the basename, and arbitrary
- characters in the parameterized part, following the dot.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>WrkdirSubdirectory</type></literal></term>
- <listitem><para>The variable <varname>WRKSRC</varname> is
- usually defined with reference to <varname>WRKDIR</varname>.
- This check currently does nothing, and I don't know if it's
- worth to check anything here.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>WrksrcSubdirectory</type></literal></term>
- <listitem><para>Subdirectories of <varname>WRKSRC</varname> can
- be used in <varname>CONFIGURE_DIRS</varname> and some other
- variables. For convenience, they are interpreted relative to
- <varname>WRKSRC</varname>, so package authors don't have to type
- <literal>${WRKSRC}</literal> all the time.</para>
- </listitem></varlistentry>
-
- <varlistentry><term><literal><type>Yes</type></literal></term>
- <listitem><para>This type is used for variables that are checked
- using <literal>defined(VARNAME)</literal>. Their value is
- interpreted as <quote>true</quote> if they are defined, no
- matter if they are set to <literal>yes</literal> or
- <literal>no</literal>.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>YesNo</type></literal></term>
- <listitem><para>This type is used for variables that are checked
- using <literal>defined(VARNAME) &amp;&amp;
- !empty(VARNAME:M[Yy][Ee][Ss])</literal>. A value of
- <varname>no</varname> means <quote>no</quote> for
- them.</para></listitem></varlistentry>
-
- <varlistentry><term><literal><type>YesNoFromCommand</type></literal></term>
- <listitem><para>Like <literal><type>YesNo</type></literal>, but
- the value may be produced by a shell command using the
- <literal>!=</literal> operator.</para></listitem></varlistentry>
-
- </variablelist>
-
-</sect1>
-<sect1 id="types.future">
-<title>Future directions</title>
-
-<sect2 id="types.kinds">
-<title>Different interpretation of the same data types</title>
-
- <para>As explained above, there are internal lists and external
- lists in pkgsrc. But that is not the only attribute that a list
- can have. They also differ in the way they are defined, which
- files may access them, and what it means to append to append a
- value to it.</para>
-
- <para>For example, <varname>NOT_FOR_PLATFORM</varname> is a list
- that every file may append to without leading to unexpected
- behavior. Compare this with
- <varname>ONLY_FOR_PLATFORM</varname>, which should only be set
- in a single place throughout pkgsrc. Let's say in the package
- <filename>Makefile</filename> it is set to
- <literal>NetBSD-*-*</literal>, because this file's author knows
- for sure that the package is only usable on NetBSD. Now when
- some <filename>*.mk</filename> file from a dependency package
- adds <literal>DragonFly-*-*</literal> to it, the intent of the
- package <filename>Makefile</filename> is undermined by the
- dependency package, because now it is possible to build the
- package on DragonFly, too.</para>
-
- <para>The same problem arises with the various variables that
- can be either <literal>yes</literal> or undefined. They should
- always be chosen so that two definitions in different files
- don't undermine each other. A good example is
- <varname>USE_LIBTOOL</varname>, a bad example is
- <varname>NO_BUILD</varname>.</para>
-
- <para>TODO: What are the general properties of
- <quote>good</quote> and <quote>bad</quote> variables? How can it
- be decided of which kind a certain variable is?</para>
-
- <para>For most lists, the only valid operation is to append
- something at the end. Therefore it is good practice to warn if a
- list is assigned using another operator that
- <literal>+=</literal>. For <varname>SUBST_CLASSES</varname> this
- fits perfectly. But for <varname>SUBST_FILES.*</varname> it
- doesn't. Usually all occurences of a
- <varname>SUBST_FILES.*</varname> variable occur in the same
- file, and there should be no other file modifying these
- variables. Therefore it is better to use the
- <literal>=</literal> operator for the first of the
- assignments.</para>
-
-</sect2>
-</sect1>
-</chapter>
diff --git a/pkgtools/pkglint/files/doc/pkglint.xml b/pkgtools/pkglint/files/doc/pkglint.xml
deleted file mode 100644
index 5c9de070cf9..00000000000
--- a/pkgtools/pkglint/files/doc/pkglint.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
- "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
-[
- <!ENTITY pkglint "<literal>pkglint</literal>">
- <!ENTITY pkgsrc-guide "http://www.NetBSD.org/Documentation/pkgsrc">
-
- <!ENTITY chap.intro SYSTEM "chap.intro.xml">
- <!ENTITY chap.defs SYSTEM "chap.defs.xml">
- <!ENTITY chap.design SYSTEM "chap.design.xml">
- <!ENTITY chap.types SYSTEM "chap.types.xml">
- <!ENTITY chap.code SYSTEM "chap.code.xml">
- <!ENTITY chap.statemachines SYSTEM "chap.statemachines.xml">
- <!ENTITY chap.future SYSTEM "chap.future.xml">
-]>
-
-<!-- $NetBSD: pkglint.xml,v 1.4 2006/11/25 20:27:42 rillig Exp $ -->
-
-<book>
-<title>Design and implementation of &pkglint;</title>
-
-<bookinfo>
-<author>
- <firstname>Roland</firstname>
- <surname>Illig</surname>
- <email>rillig@NetBSD.org</email>
-</author>
-</bookinfo>
-
-&chap.intro;
-&chap.defs;
-&chap.design;
-&chap.types;
-&chap.code;
-&chap.statemachines;
-&chap.future;
-
-</book>
diff --git a/pkgtools/pkglint/files/doc/statemachine.patch.dia b/pkgtools/pkglint/files/doc/statemachine.patch.dia
deleted file mode 100644
index bf1aac9919d..00000000000
--- a/pkgtools/pkglint/files/doc/statemachine.patch.dia
+++ /dev/null
Binary files differ
diff --git a/pkgtools/pkglint/files/doc/statemachine.shellcmd.dia b/pkgtools/pkglint/files/doc/statemachine.shellcmd.dia
deleted file mode 100644
index 76b7442f210..00000000000
--- a/pkgtools/pkglint/files/doc/statemachine.shellcmd.dia
+++ /dev/null
Binary files differ
diff --git a/pkgtools/pkglint/files/doc/stylesheet.xsl b/pkgtools/pkglint/files/doc/stylesheet.xsl
deleted file mode 100644
index 9b6cfb1a177..00000000000
--- a/pkgtools/pkglint/files/doc/stylesheet.xsl
+++ /dev/null
@@ -1,6 +0,0 @@
-<!-- $NetBSD: stylesheet.xsl,v 1.2 2006/02/27 02:01:17 rillig Exp $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
- <xsl:param name="html.longdesc" select="0"/>
-</xsl:stylesheet>
diff --git a/pkgtools/pkglint/files/lintpkgsrc.0 b/pkgtools/pkglint/files/lintpkgsrc.0
deleted file mode 100644
index 9ee45180428..00000000000
--- a/pkgtools/pkglint/files/lintpkgsrc.0
+++ /dev/null
@@ -1,131 +0,0 @@
-LINTPKGSRC(1) NetBSD General Commands Manual LINTPKGSRC(1)
-
-NNAAMMEE
- lliinnttppkkggssrrcc -- verifier for the pkgsrc tree
-
-SSYYNNOOPPSSIISS
- lliinnttppkkggssrrcc [--BBDDLLOORRSSVVddhhiillmmoopprruu] [--EE _f_i_l_e] [--gg _p_k_g_s_r_c_m_a_p] [--II _f_i_l_e]
- [--KK _P_A_C_K_A_G_E_S] [--MM _D_I_S_T_D_I_R] [--PP _P_K_G_S_R_C_D_I_R] [_m_a_k_e_f_i_l_e _._._.]
-
-DDEESSCCRRIIPPTTIIOONN
- lliinnttppkkggssrrcc tries to verify the entire contents of the pkgsrc tree.
- lliinnttppkkggssrrcc uses simple regular-expression matching for verifying files
- that make up a pkgsrc directory. Note that it does NOT implement com-
- plete Makefile parser.
-
- OOppttiioonnss
- --BB List packages marked as BROKEN.
-
- --DD _p_a_t_h_s Parse Makefiles and output contents (useful for debugging).
-
- --dd Extract the `DEPENDS' listing from each pkgsrc package
- Makefile, then verify the version specified in each DEPEND
- correctly matches a current pkgsrc package.
-
- --EE _f_i_l_e Exports the internal database generated from the pkgsrc
- Makefiles to a file for faster loading at a later time.
- Note that some of the stored data is, in all likelihood,
- dependent on the architecture and operating system of the
- machine where it is generated. However, the database does
- make the task of, eg, checking for out of date packages on
- a set of similarly configured machines (in the absence of
- extra copies of the pkgsrc tree) both quick and possible.
-
- --gg _p_k_g_s_r_c_m_a_p Generate pkgsrcmap file containing an entry for each pack-
- age of `pkgname pkgdir pkgver'.
-
- --hh Basic help and usage.
-
- --II _f_i_l_e Imports the data to construct the internal database for
- checking the installed versions of packages, among other
- things, against the current version found in pkgsrc. This
- database provides most or all of the data required for run-
- ning lliinnttppkkggssrrcc with any combination of --BB, --OO, --RR, --SS, --VV,
- --dd, --gg, --ii, --pp, or --uu.
-
- --ii Check the version of each installed package against the
- current version in pkgsrc.
-
- --KK _P_A_C_K_A_G_E_S Override binary packages base directory, normally set from
- _/_e_t_c_/_m_k_._c_o_n_f or defaulted to _$_{_P_K_G_S_R_C_D_I_R_}_/_p_a_c_k_a_g_e_s.
-
- Note: lintpkgsrc treats _P_A_C_K_A_G_E_S slightly differently to
- the pkgsrc build system. --pp, --RR and --VV check for binary
- packages in any depth of PACKAGES subdirs - this allows
- packages for all architectures/OS versions to be checked
- simultaneously with an _/_e_t_c_/_m_k_._c_o_n_f construct of the form:
-
- .ifdef LINTPKGSRC
- PACKAGES=${PKGSRCDIR}/packages
- .else
- PACKAGES=${PKGSRCDIR}/packages/${OS_VERSION}/${MACHINE_ARCH}
- .endif
-
- Which would be an alternative to --KK.
-
- --LL List the filenames of Makefiles as they are parsed (for
- debugging).
-
- --MM _D_I_S_T_D_I_R Set directory for distfiles, defaults to
- _$_{_P_K_G_S_R_C_D_I_R_}_/_d_i_s_t_f_i_l_e_s.
-
- --mm For each current distfile, verify its checksum against the
- appropriate package's distinfo file. Also report if any
- package's distinfo file references the same distfile with a
- different distinfo checksum.
-
- --OO Report any binary packages in any subdirs of _P_A_C_K_A_G_E_S, for
- whom the source Makefile lists _O_S_V_E_R_S_I_O_N___S_P_E_C_I_F_I_C. This is
- intended to help those making binary packages available for
- ftp.
-
- --oo Report any old distfiles (not referenced by any package's
- distinfo file).
-
- --PP _P_K_G_S_R_C_D_I_R Set base of pkgsrc tree, normally set from _/_e_t_c_/_m_k_._c_o_n_f or
- defaulted to _/_u_s_r_/_p_k_g_s_r_c.
-
- --pp Report any old binary packages in any subdirs of _P_A_C_K_A_G_E_S.
-
- --RR Report any binary packages in any subdirs of _P_A_C_K_A_G_E_S, for
- whom the source Makefile lists _N_O___B_I_N___O_N___F_T_P or _R_E_S_T_R_I_C_T_E_D.
- This is intended to help those making binary packages
- available for ftp.
-
- --rr Remove distfiles which are not referenced from any pack-
- age's distinfo file, or have an incorrect checksum (usually
- due to an interrupted download), and any old binary pack-
- ages. To remove any given type, additionally specify the
- --oo, --mm, or --pp flags respectively.
-
- --SS List packages missing from category _S_U_B_D_I_R lists.
-
- --uu As --ii plus for mismatched packages, display REQUIRED
- details and run `@MAKE@ fetch-list | sh' to ensure all the
- distfiles needed for the latest version are present.
-
- Warning: The behaviour of this command may change in a
- later version.
-
- --VV List any prebuilt packages in any subdirs of _P_A_C_K_A_G_E_S with
- known vulnerabilities, based on the data in
- _$_{_P_K_G_S_R_C_D_I_R_}_/_d_i_s_t_f_i_l_e_s_/_p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s.
-
-AAUUTTHHOORRSS
- David Brownlee <abs@netbsd.org>
-
-BBUUGGSS
- The --RR, --VV, and --pp options default to using _P_A_C_K_A_G_E_S as the base direc-
- tory from which to search for binary packages. If this includes OS or
- architecture information then packages for other OS/architecture combina-
- tions will be missed. In this case _P_A_C_K_A_G_E_S can be overridden with --KK or
- set conditionally in _/_e_t_c_/_m_k_._c_o_n_f based on the value of _L_I_N_T_P_K_G_S_R_C.
-
- The `Makefile parsing' algorithm used to obtain package versions and
- DEPENDS information is geared towards speed rather than perfection,
- though it has got somewhat better over time, it only parses the simplest
- Makefile conditionals. (a == b, no && etc).
-
- Potentially others, but non serious to date.
-
-pkgsrc November 8, 2005 pkgsrc
diff --git a/pkgtools/pkglint/files/lintpkgsrc.1 b/pkgtools/pkglint/files/lintpkgsrc.1
deleted file mode 100644
index 2cb3c491afa..00000000000
--- a/pkgtools/pkglint/files/lintpkgsrc.1
+++ /dev/null
@@ -1,194 +0,0 @@
-.\" $NetBSD: lintpkgsrc.1,v 1.29 2006/07/30 00:22:18 wiz Exp $
-.\"
-.\" Copyright (c) 1999 by David Brownlee (abs@netbsd.org)
-.\" Absolutely no warranty.
-.\"
-.Dd November 8, 2005
-.Dt LINTPKGSRC 1
-.Sh NAME
-.Nm lintpkgsrc
-.Nd verifier for the pkgsrc tree
-.Sh SYNOPSIS
-.Nm
-.Op Fl BDLORSVdhilmopru
-.Op Fl E Ar file
-.Op Fl g Ar pkgsrcmap
-.Op Fl I Ar file
-.Op Fl K Ar PACKAGES
-.Op Fl M Ar DISTDIR
-.Op Fl P Ar PKGSRCDIR
-.Op Pa makefile ...
-.Sh DESCRIPTION
-.Nm
-tries to verify the entire contents of the pkgsrc tree.
-.Nm
-uses simple regular-expression matching for verifying
-files that make up a pkgsrc directory.
-Note that it does NOT implement complete Makefile parser.
-.Ss Options
-.Bl -tag -width xxxxxxxxxxxx
-.It Fl B
-List packages marked as BROKEN.
-.It Fl D Ar paths
-Parse Makefiles and output contents (useful for debugging).
-.It Fl d
-Extract the
-.Ql DEPENDS
-listing from each pkgsrc package Makefile, then
-verify the version specified in each DEPEND correctly matches a current
-pkgsrc package.
-.It Fl E Ar file
-Exports the internal database generated from the pkgsrc Makefiles to a
-file for faster loading at a later time.
-Note that some of the stored data is, in all likelihood, dependent on
-the architecture and operating system of the machine where it is
-generated.
-However, the database does make the task of, eg, checking for out of
-date packages on a set of similarly configured machines (in the
-absence of extra copies of the pkgsrc tree) both quick and possible.
-.It Fl g Ar pkgsrcmap
-Generate pkgsrcmap file containing an entry for each package of
-.Ql pkgname pkgdir pkgver .
-.It Fl h
-Basic help and usage.
-.It Fl I Ar file
-Imports the data to construct the internal database for checking the
-installed versions of packages, among other things, against the
-current version found in pkgsrc.
-This database provides most or all of the data required for running
-.Nm
-with any combination of
-.Fl B ,
-.Fl O ,
-.Fl R ,
-.Fl S ,
-.Fl V ,
-.Fl d ,
-.Fl g ,
-.Fl i ,
-.Fl p ,
-or
-.Fl u .
-.It Fl i
-Check the version of each installed package against the current version in
-pkgsrc.
-.It Fl K Ar PACKAGES
-Override binary packages base directory, normally set from
-.Pa /etc/mk.conf
-or defaulted to
-.Pa ${PKGSRCDIR}/packages .
-.Pp
-Note: lintpkgsrc treats
-.Em PACKAGES
-slightly differently to the pkgsrc build system.
-.Fl p ,
-.Fl R
-and
-.Fl V
-check for
-binary packages in any depth of PACKAGES subdirs - this allows packages for all
-architectures/OS versions to be checked simultaneously with an
-.Pa /etc/mk.conf
-construct of the form:
-.Bd -literal
-\&.ifdef LINTPKGSRC
-PACKAGES=${PKGSRCDIR}/packages
-\&.else
-PACKAGES=${PKGSRCDIR}/packages/${OS_VERSION}/${MACHINE_ARCH}
-\&.endif
-.Ed
-.Pp
-Which would be an alternative to
-.Fl K .
-.It Fl L
-List the filenames of Makefiles as they are parsed (for debugging).
-.It Fl M Ar DISTDIR
-Set directory for distfiles, defaults to
-.Pa ${PKGSRCDIR}/distfiles .
-.It Fl m
-For each current distfile, verify its checksum against the appropriate
-package's distinfo file. Also report if any package's distinfo file references
-the same distfile with a different distinfo checksum.
-.It Fl O
-Report any binary packages in any subdirs of
-.Em PACKAGES ,
-for whom the source Makefile lists
-.Em OSVERSION_SPECIFIC .
-This is intended to help those making binary packages available for ftp.
-.It Fl o
-Report any old distfiles (not referenced by any package's distinfo file).
-.It Fl P Ar PKGSRCDIR
-Set base of pkgsrc tree, normally set from
-.Pa /etc/mk.conf
-or defaulted to
-.Pa /usr/pkgsrc .
-.It Fl p
-Report any old binary packages in any subdirs of
-.Em PACKAGES .
-.It Fl R
-Report any binary packages in any subdirs of
-.Em PACKAGES ,
-for whom the source Makefile lists
-.Em NO_BIN_ON_FTP
-or
-.Em RESTRICTED .
-This is intended to help those making binary packages available for ftp.
-.It Fl r
-Remove distfiles which are not referenced from any package's distinfo file,
-or have an incorrect checksum (usually due to an interrupted download),
-and any old binary packages. To remove any given type, additionally
-specify the
-.Fl o ,
-.Fl m ,
-or
-.Fl p
-flags respectively.
-.It Fl S
-List packages missing from category
-.Em SUBDIR
-lists.
-.It Fl u
-As
-.Fl i
-plus for mismatched packages, display REQUIRED details and run
-.Ql @MAKE@ fetch-list | sh
-to ensure all the distfiles needed for
-the latest version are present.
-.Pp
-Warning: The behaviour of this command may change in a later version.
-.It Fl V
-List any prebuilt packages in any subdirs of
-.Em PACKAGES
-with known vulnerabilities, based on the data in
-.Pa ${PKGSRCDIR}/distfiles/pkg-vulnerabilities .
-.El
-.Sh AUTHORS
-.An David Brownlee Aq abs@netbsd.org
-.Sh BUGS
-The
-.Fl R ,
-.Fl V ,
-and
-.Fl p
-options default to using
-.Em PACKAGES
-as the base directory from which to
-search for binary packages. If this includes OS or architecture information
-then packages for other OS/architecture combinations will be missed.
-In this case
-.Em PACKAGES
-can be overridden with
-.Fl K
-or set conditionally in
-.Pa /etc/mk.conf
-based on the value of
-.Em LINTPKGSRC .
-.Pp
-The
-.Ql Makefile parsing
-algorithm used to obtain package versions
-and DEPENDS information is geared towards speed rather than
-perfection, though it has got somewhat better over time, it only
-parses the simplest Makefile conditionals. (a == b, no \*[Am]\*[Am] etc).
-.Pp
-Potentially others, but non serious to date.
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
deleted file mode 100755
index cf9409196c3..00000000000
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ /dev/null
@@ -1,1823 +0,0 @@
-#! @PERL@
-
-# $NetBSD: lintpkgsrc.pl,v 1.113 2006/10/23 09:19:32 abs Exp $
-
-# Written by David Brownlee <abs@netbsd.org>.
-#
-# Caveats:
-# The 'Makefile parsing' algorithm used to obtain package versions and
-# DEPENDS information is geared towards speed rather than perfection,
-# though it has gotten somewhat better over time, it only parses the
-# simpler Makefile conditionals.
-#
-# TODO: Handle fun DEPENDS like avifile-devel with
-# {qt2-designer>=2.2.4,qt2-designer-kde>=2.3.1nb1}
-
-$^W = 1;
-use locale;
-use strict;
-use Getopt::Std;
-use File::Find;
-use File::Basename;
-use IPC::Open3;
-use Cwd 'realpath', 'getcwd';
-
-# Buildtime configuration
-my $conf_make = '@MAKE@';
-my $conf_pkgsrcdir = '@PKGSRCDIR@';
-my $conf_prefix = '@PREFIX@';
-
-my (
- $pkglist, # list of Pkg packages
- $pkg_installver, # installed version of pkg_install pseudo-pkg
- $default_vars, # Set for Makefiles, inc PACKAGES & PKGSRCDIR
- %opt, # Command line options
- %vuln, # vulnerability data
- @matched_prebuiltpackages, # List of obsolete prebuilt package paths
- @prebuilt_pkgdirs, # Use to follow symlinks in prebuilt pkgdirs
- %prebuilt_pkgdir_cache, # To avoid symlink loops in prebuilt_pkgdirs
-);
-
-$ENV{PATH} .=
- ":/bin:/usr/bin:/sbin:/usr/sbin:${conf_prefix}/sbin:${conf_prefix}/bin";
-
-if (
- !getopts( 'BDE:I:K:LM:OP:RSVdg:himopru', \%opt )
- || $opt{h}
- || !(
- defined $opt{d}
- || defined $opt{g}
- || defined $opt{i}
- || defined $opt{m}
- || defined $opt{o}
- || defined $opt{p}
- || defined $opt{r}
- || defined $opt{u}
- || defined $opt{B}
- || defined $opt{D}
- || defined $opt{R}
- || defined $opt{O}
- || defined $opt{S}
- || defined $opt{V}
- || defined $opt{E}
- )
- )
-{
-
- usage_and_exit();
-}
-$| = 1;
-
-# Horrible kludge to ensure we have a value for testing in conditionals, but
-# gets removed in the final evaluation
-my $magic_undefined = 'M_a_G_i_C_UNDEFINED';
-
-get_default_makefile_vars(); # $default_vars
-
-if ( $opt{D} && @ARGV ) {
- foreach my $file (@ARGV) {
- if ( -d $file ) {
- $file .= "/Makefile";
- }
- if ( !-f $file ) {
- fail("No such file: $file");
- }
- my ( $pkgname, $vars ) = parse_makefile_pkgsrc($file);
- $pkgname ||= 'UNDEFINED';
- print "$file -> $pkgname\n";
- foreach my $varname ( sort keys %{$vars} ) {
- print "\t$varname = $vars->{$varname}\n";
- }
-
- #if ($opt{d}) {
- # pkgsrc_check_depends();
- #}
- }
- exit;
-}
-
-sub main() {
- my ( $pkgsrcdir, $pkgdistdir );
-
- $pkgsrcdir = $default_vars->{PKGSRCDIR};
- $pkgdistdir = $default_vars->{DISTDIR};
-
- if ( $opt{r} && !$opt{o} && !$opt{m} && !$opt{p} ) {
- $opt{o} = $opt{m} = $opt{p} = 1;
- }
- if ( $opt{o} || $opt{m} ) {
- my (@baddist);
-
- @baddist =
- scan_pkgsrc_distfiles_vs_distinfo( $pkgsrcdir, $pkgdistdir, $opt{o},
- $opt{m} );
- if ( $opt{r} ) {
- verbose("Unlinking 'bad' distfiles\n");
- foreach my $distfile (@baddist) {
- unlink("$pkgdistdir/$distfile");
- }
- }
- }
-
- # List BROKEN packages
- if ( $opt{B} ) {
- scan_pkgsrc_makefiles($pkgsrcdir);
- foreach my $pkgver ( $pkglist->pkgver ) {
- $pkgver->var('BROKEN') || next;
- print $pkgver->pkgname . ': ' . $pkgver->var('BROKEN') . "\n";
- }
- }
-
- # List obsolete or NO_BIN_ON_FTP/RESTRICTED prebuilt packages
- #
- if ( $opt{p} || $opt{O} || $opt{R} || $opt{V} ) {
- if ( $opt{V} ) {
- my ($vuln) = "$pkgdistdir/pkg-vulnerabilities";
-
- if ( !open( VULN, $vuln ) ) {
- fail("Unable to open '$vuln': $!");
- }
- while (<VULN>) {
- s/#.*//;
- if (/([^*?[]+)(<|>|<=|>=)(\d\S+)/) {
- my ( $pkg, $cmp, $ver ) = ( $1, $2, $3 );
- push( @{ $vuln{$pkg} }, "$cmp $ver" );
- }
- }
- close(VULN);
- }
-
- if ( $opt{p} || $opt{O} || $opt{R} || $opt{V} ) {
- scan_pkgsrc_makefiles($pkgsrcdir);
- }
- @prebuilt_pkgdirs = ( $default_vars->{PACKAGES} );
- %prebuilt_pkgdir_cache = ();
-
- while (@prebuilt_pkgdirs) {
- find( \&check_prebuilt_packages, shift @prebuilt_pkgdirs );
- }
-
- if ( $opt{r} ) {
- verbose("Unlinking listed prebuiltpackages\n");
- foreach my $pkgfile (@matched_prebuiltpackages) {
- unlink($pkgfile);
- }
- }
- }
-
- if ( $opt{S} ) {
- my (%in_subdir);
-
- foreach my $cat ( list_pkgsrc_categories($pkgsrcdir) ) {
- my $vars = parse_makefile_vars("$pkgsrcdir/$cat/Makefile");
-
- if ( !$vars->{SUBDIR} ) {
- print "Warning - no SUBDIR for $cat\n";
- next;
- }
- foreach my $pkgdir ( split( /\s+/, $vars->{SUBDIR} ) ) {
- $in_subdir{"$cat/$pkgdir"} = 1;
- }
- }
-
- scan_pkgsrc_makefiles($pkgsrcdir);
- foreach my $pkgver ( $pkglist->pkgver ) {
- if ( !defined $in_subdir{ $pkgver->var('dir') } ) {
- print $pkgver->var('dir') . ": Not in SUBDIR\n";
- }
- }
- }
-
- if ( $opt{g} ) {
- my $tmpfile = "$opt{g}.tmp.$$";
-
- scan_pkgsrc_makefiles($pkgsrcdir);
- if ( !open( TABLE, ">$tmpfile" ) ) {
- fail("Unable to write '$tmpfile': $!");
- }
- foreach my $pkgver ( $pkglist->pkgver ) {
- print TABLE $pkgver->pkg . "\t"
- . $pkgver->var('dir') . "\t"
- . $pkgver->ver . "\n";
- }
- if ( !close(TABLE) ) {
- fail("Error while writing '$tmpfile': $!");
- }
- if ( !rename( $tmpfile, $opt{g} ) ) {
- fail("Error in rename('$tmpfile','$opt{g}'): $!");
- }
- }
-
- if ( $opt{d} ) {
- scan_pkgsrc_makefiles($pkgsrcdir);
- pkgsrc_check_depends();
- }
-
- if ( $opt{i} || $opt{u} ) {
- my ( @pkgs, @update );
-
- @pkgs = list_installed_packages();
- scan_pkgsrc_makefiles($pkgsrcdir);
-
- foreach my $pkgname ( sort @pkgs ) {
- if ( $_ = invalid_version($pkgname) ) {
- print $_;
-
- if ( $pkgname =~ /^([^*?[]+)-([\d*?[].*)/ ) {
- foreach my $pkgver ( $pkglist->pkgver($1) ) {
- $pkgver->var('dir') =~ /-current/ && next;
- push( @update, $pkgver );
- last;
- }
- }
- }
- }
-
- if ( $opt{u} ) {
- print "\nREQUIRED details for packages that could be updated:\n";
-
- foreach my $pkgver (@update) {
- print $pkgver->pkg . ':';
- if ( open( PKGINFO, 'pkg_info -R ' . $pkgver->pkg . '|' ) ) {
- my ($list);
-
- while (<PKGINFO>) {
- if (/Required by:/) {
- $list = 1;
- }
- elsif ($list) {
- chomp;
- s/-\d.*//;
- print " $_";
- }
- }
- close(PKGINFO);
- }
- print "\n";
- }
-
- print
- "\nRunning '${conf_make} fetch-list | sh' for each package:\n";
- foreach my $pkgver (@update) {
- my ($pkgdir);
-
- $pkgdir = $pkgver->var('dir');
- if ( !defined($pkgdir) ) {
- fail(
- 'Unable to determine ' . $pkgver->pkg . ' directory' );
- }
-
- print "$pkgsrcdir/$pkgdir\n";
- safe_chdir("$pkgsrcdir/$pkgdir");
- system("${conf_make} fetch-list | sh");
- }
- }
- }
-
- if ( $opt{E} ) {
- scan_pkgsrc_makefiles($pkgsrcdir);
- store_pkgsrc_makefiles( $opt{E} );
- }
-}
-
-# Could speed up by building a cache of package names to paths, then processing
-# each package name once against the tests.
-sub check_prebuilt_packages() {
-
- if ( $_ eq 'distfiles' || $_ eq 'pkgsrc' ) {
-
- # Skip these subdirs if present
- $File::Find::prune = 1;
-
- }
- elsif (/(.+)-(\d.*)\.t[bg]z$/) {
- my ( $pkg, $ver ) = ( $1, $2 );
-
- # XXX: hack for python and ruby prefix support
- $pkg =~ s/^py[0-9][0-9]pth-/py-/;
- $pkg =~ s/^py[0-9][0-9]-/py-/;
- $pkg =~ s/^ruby[0-9][0-9]-/ruby-/;
-
- if ( $opt{V} && $vuln{$pkg} ) {
- foreach my $chk ( @{ $vuln{$pkg} } ) {
- my ( $test, $matchver ) = split( ' ', $chk );
-
- if ( deweycmp( $ver, $test, $matchver ) ) {
- print "$File::Find::dir/$_\n";
- push( @matched_prebuiltpackages, "$File::Find::dir/$_" );
- last;
- }
- }
- }
-
- my ($pkgs);
- if ( $pkgs = $pkglist->pkgs($pkg) ) {
- my ($pkgver) = $pkgs->pkgver($ver);
-
- if ( !defined $pkgver ) {
- if ( $opt{p} ) {
- print "$File::Find::dir/$_\n";
- push( @matched_prebuiltpackages, "$File::Find::dir/$_" );
- }
-
- # Pick probably the last version
- $pkgver = $pkgs->latestver;
- }
-
- if ( $opt{R} && $pkgver->var('RESTRICTED') ) {
- print "$File::Find::dir/$_\n";
- push( @matched_prebuiltpackages, "$File::Find::dir/$_" );
- }
-
- if ( $opt{O} && $pkgver->var('OSVERSION_SPECIFIC') ) {
- print "$File::Find::dir/$_\n";
- push( @matched_prebuiltpackages, "$File::Find::dir/$_" );
- }
- }
-
- }
- elsif ( -d $_ ) {
- if ( $prebuilt_pkgdir_cache{"$File::Find::dir/$_"} ) {
- $File::Find::prune = 1;
- return;
- }
-
- $prebuilt_pkgdir_cache{"$File::Find::dir/$_"} = 1;
- if ( -l $_ ) {
- my ($dest) = readlink($_);
-
- if ( substr( $dest, 0, 1 ) ne '/' ) {
- $dest = "$File::Find::dir/$dest";
- }
- if ( !$prebuilt_pkgdir_cache{$dest} ) {
- push( @prebuilt_pkgdirs, $dest );
- }
- }
- }
-}
-
-# Dewey decimal verson number matching - or thereabouts
-# Also handles 'nb<N>' suffix (checked iff values otherwise identical)
-#
-sub deweycmp($$$) {
- my ( $match, $test, $val ) = @_;
- my ( $cmp, $match_nb, $val_nb );
-
- $match_nb = $val_nb = 0;
- if ( $match =~ /(.*)nb(.*)/ ) {
-
- # Handle nb<N> suffix
- $match = $1;
- $match_nb = $2;
- }
-
- if ( $val =~ /(.*)nb(.*)/ ) {
-
- # Handle nb<N> suffix
- $val = $1;
- $val_nb = $2;
- }
-
- $cmp = deweycmp_extract( $match, $val );
-
- if ( !$cmp ) {
-
- # Iff otherwise identical, check nb suffix
- $cmp = deweycmp_extract( $match_nb, $val_nb );
- }
-
- eval "$cmp $test 0";
-}
-
-sub convert_to_standard_dewey(@) {
- my ( $elem, $underscore, @temp );
-
- # According to the current implementation in pkg_install/lib/str.c
- # as of 2002/06/02, '_' before a number, '.', and 'pl' get treated as 0,
- # while 'rc' and 'pre' get treated as -1; beta as '-2', alpha as '-3'.
- # Other characters are converted to lower
- # case and then to a number: a->1, b->2, c->3, etc. Numbers stay the same.
- # 'nb' is a special case that's already been handled when we are here.
- foreach $elem (@_) {
- if ( $elem =~ /\d+/ ) {
- push( @temp, $elem );
-
- }
- elsif ( $elem =~ /^pl$/ or $elem =~ /^\.$/ ) {
- push( @temp, 0 );
-
- }
- elsif ( $elem =~ /^_$/ ) {
- push( @temp, 0 );
-
- }
- elsif ( $elem =~ /^pre$/ ) {
- push( @temp, -1 );
-
- }
- elsif ( $elem =~ /^rc$/ ) {
- push( @temp, -1 );
-
- }
- elsif ( $elem =~ /^beta$/ ) {
- push( @temp, -2 );
-
- }
- elsif ( $elem =~ /^alpha$/ ) {
- push( @temp, -3 );
-
- }
- else {
- push( @temp, 0 );
- push( @temp, ord($elem) - ord("a") + 1 );
- }
- }
- @temp;
-}
-
-sub deweycmp_extract($$) {
- my ( $match, $val ) = @_;
- my ( $cmp, @matchlist, @vallist, $i, $len );
-
- @matchlist = convert_to_standard_dewey( split( /(\D+)/, lc($match) ) );
- @vallist = convert_to_standard_dewey( split( /(\D+)/, lc($val) ) );
- $cmp = 0;
- $i = 0;
- if ( $#matchlist > $#vallist ) {
- $len = $#matchlist;
- }
- else {
- $len = $#vallist;
- }
- while ( !$cmp && ( $i++ <= $len ) ) {
- if ( !@matchlist ) {
- push( @matchlist, 0 );
- }
- if ( !@vallist ) {
- push( @vallist, 0 );
- }
- $cmp = ( shift @matchlist <=> shift @vallist );
- }
- $cmp;
-}
-
-sub fail(@) {
-
- print STDERR @_, "\n";
- exit(3);
-}
-
-sub get_default_makefile_vars() {
-
- chomp( $pkg_installver = `pkg_info -V 2>/dev/null || echo 20010302` );
-
- chomp( $_ = `uname -srm` );
- (
- $default_vars->{OPSYS},
- $default_vars->{OS_VERSION},
- $default_vars->{MACHINE}
- )
- = (split);
- if ( !$default_vars->{MACHINE} ) {
- die('Unable to extract machine from uname');
- }
-
- # Handle systems without uname -p (NetBSD pre 1.4)
- chomp( $default_vars->{MACHINE_ARCH} = `uname -p 2>/dev/null` );
-
- if ( !$default_vars->{MACHINE_ARCH}
- && $default_vars->{OS_VERSION} eq 'NetBSD' )
- {
- chomp( $default_vars->{MACHINE_ARCH} = `sysctl -n hw.machine_arch` );
- }
-
- if ( !$default_vars->{MACHINE_ARCH} ) {
- $default_vars->{MACHINE_ARCH} = $default_vars->{MACHINE};
- }
-
- $default_vars->{OBJECT_FMT} = 'x';
- $default_vars->{LOWER_OPSYS} = lc( $default_vars->{OPSYS} );
-
- if ( $opt{P} ) {
- $default_vars->{PKGSRCDIR} = $opt{P};
- }
- else {
- $default_vars->{PKGSRCDIR} = $conf_pkgsrcdir;
- }
-
- $default_vars->{DESTDIR} = '';
- $default_vars->{LOCALBASE} = '/usr/pkg';
- $default_vars->{X11BASE} = '/usr/X11R6';
-
- my ($vars);
- if ( -f '/etc/mk.conf' && ( $vars = parse_makefile_vars('/etc/mk.conf') ) )
- {
- foreach my $var ( keys %{$vars} ) {
- $default_vars->{$var} = $vars->{$var};
- }
- }
-
- if ( $opt{P} ) {
- $default_vars->{PKGSRCDIR} = $opt{P};
- }
-
- if ( $opt{M} ) {
- $default_vars->{DISTDIR} = $opt{M};
- }
- else {
- $default_vars->{DISTDIR} ||= $default_vars->{PKGSRCDIR} . '/distfiles';
- }
-
- if ( $opt{K} ) {
- $default_vars->{PACKAGES} = $opt{K};
- }
-
- # Extract some variables from bsd.pkg.mk
- my ($mkvars);
- $mkvars = parse_makefile_vars(
- "$default_vars->{PKGSRCDIR}/mk/bsd.pkg.mk",
- "$default_vars->{PKGSRCDIR}/mk/scripts"
- );
- foreach my $varname ( keys %{$mkvars} ) {
- if ( $varname =~ /_REQD$/ || $varname eq 'EXTRACT_SUFX' ) {
- $default_vars->{$varname} = $mkvars->{$varname};
- }
- }
-
- $default_vars->{PACKAGES} ||= $default_vars->{PKGSRCDIR} . '/packages';
-}
-
-# Determine if a package version is current. If not, report correct version
-# if found
-#
-sub invalid_version($) {
- my ($pkgmatch) = @_;
- my ( $fail, $ok );
- my ( @pkgmatches, @todo );
-
- @todo = ($pkgmatch);
-
- # We handle {} here, everything else in package_globmatch
- while ( $pkgmatch = shift @todo ) {
- if ( $pkgmatch =~ /(.*){([^{}]+)}(.*)/ ) {
- foreach ( split( ',', $2 ) ) {
- push( @todo, "$1$_$3" );
- }
- }
- else {
- push( @pkgmatches, $pkgmatch );
- }
- }
-
- foreach $pkgmatch (@pkgmatches) {
- my ( $pkg, $badver ) = package_globmatch($pkgmatch);
-
- if ( defined($badver) ) {
- my ($pkgs);
-
- if ( $pkgs = $pkglist->pkgs($pkg) ) {
- $fail .=
- "Version mismatch: '$pkg' $badver vs "
- . join( ',', $pkgs->versions ) . "\n";
- }
- else {
- $fail .= "Unknown package: '$pkg' version $badver\n";
- }
- }
- else {
-
- # If we find one match, don't bitch about others
- $ok = 1;
- }
- }
- $ok && ( $fail = undef );
- $fail;
-}
-
-# List (recursive) non directory contents of specified directory
-#
-sub listdir($$) {
- my ( $base, $dir ) = @_;
- my ($thisdir);
- my ( @list, @thislist );
-
- $thisdir = $base;
- if ( defined($dir) ) {
- $thisdir .= "/$dir";
- $dir .= '/';
- }
- else {
- $dir = '';
- }
-
- opendir( DIR, $thisdir ) || fail("Unable to opendir($thisdir): $!");
- @thislist = grep( substr( $_, 0, 1 ) ne '.' && $_ ne 'CVS', readdir(DIR) );
- closedir(DIR);
- foreach my $entry (@thislist) {
- if ( -d "$thisdir/$entry" ) {
- push( @list, listdir( $base, "$dir$entry" ) );
- }
- else {
- push( @list, "$dir$entry" );
- }
- }
- @list;
-}
-
-# Use pkg_info to list installed packages
-#
-sub list_installed_packages() {
- my (@pkgs);
- my $pkgver;
-
- open( PKG_INFO, 'pkg_info -a|' ) || fail("Unable to run pkg_info: $!");
- while (<PKG_INFO>) {
- my ($pkg);
-
- $pkg = (split)[0];
-
- # XXX: hack for python and ruby prefix support
- $pkg =~ s/^py[0-9][0-9]pth-/py-/;
- $pkg =~ s/^py[0-9][0-9]-/py-/;
- $pkg =~ s/^ruby[0-9][0-9]-/ruby-/;
-
- push( @pkgs, $pkg );
- }
- close(PKG_INFO);
-
- @pkgs;
-}
-
-# List top level pkgsrc categories
-#
-sub list_pkgsrc_categories($) {
- my ($pkgsrcdir) = @_;
- my (@categories);
-
- opendir( BASE, $pkgsrcdir ) || die("Unable to opendir($pkgsrcdir): $!");
- @categories =
- grep( substr( $_, 0, 1 ) ne '.'
- && $_ ne 'CVS'
- && -f "$pkgsrcdir/$_/Makefile",
- readdir(BASE) );
- closedir(BASE);
- @categories;
-}
-
-# For a given category, list potentially valid pkgdirs
-#
-sub list_pkgsrc_pkgdirs($$) {
- my ( $pkgsrcdir, $cat ) = @_;
- my (@pkgdirs);
-
- if ( !opendir( CAT, "$pkgsrcdir/$cat" ) ) {
- die("Unable to opendir($pkgsrcdir/cat): $!");
- }
- @pkgdirs =
- sort grep( $_ ne 'Makefile'
- && $_ ne 'pkg'
- && $_ ne 'CVS'
- && substr( $_, 0, 1 ) ne '.',
- readdir(CAT) );
- close(CAT);
- @pkgdirs;
-}
-
-sub glob2regex($) {
- my ($glob) = @_;
- my ( @chars, $in_alt );
- my ($regex);
-
- @chars = split( //, $glob );
- while ( defined( $_ = shift @chars ) ) {
- if ( $_ eq '*' ) {
- $regex .= '.*';
- }
- elsif ( $_ eq '?' ) {
- $regex .= '.';
- }
- elsif ( $_ eq '+' ) {
- $regex .= '.';
- }
- elsif ( $_ eq '\\+' ) {
- $regex .= $_ . shift @chars;
- }
- elsif ( $_ eq '.' || $_ eq '|' ) {
- $regex .= quotemeta;
- }
- elsif ( $_ eq '{' ) {
- $regex .= '(';
- ++$in_alt;
- }
- elsif ( $_ eq '}' ) {
- if ( !$in_alt ) {
-
- # Error
- return undef;
- }
- $regex .= ')';
- --$in_alt;
- }
- elsif ( $_ eq ',' && $in_alt ) {
- $regex .= '|';
- }
- else {
- $regex .= $_;
- }
- }
-
- if ($in_alt) {
-
- # Error
- return undef;
- }
- if ( $regex eq $glob ) {
- return ('');
- }
- if ( $opt{D} ) {
- print "glob2regex: $glob -> $regex\n";
- }
- '^' . $regex . '$';
-}
-
-# Perform some (reasonable) subset of 'pkg_info -e' / glob(3)
-# Returns (sometimes best guess at) package name,
-# and either 'problem version' or undef if all OK
-#
-sub package_globmatch($) {
- my ($pkgmatch) = @_;
- my ( $matchpkgname, $matchver, $regex );
-
- if ( $pkgmatch =~ /^([^*?[]+)(<|>|<=|>=|-)(\d[^*?[{]*)$/ ) {
-
- # (package)(cmp)(dewey)
- my ( $test, @pkgvers );
-
- ( $matchpkgname, $test, $matchver ) = ( $1, $2, $3 );
- if ( @pkgvers = $pkglist->pkgver($matchpkgname) ) {
- foreach my $pkgver (@pkgvers) {
- if ( $test eq '-' ) {
- if ( $pkgver->ver eq $matchver ) {
- $matchver = undef;
- last;
- }
- }
- else {
- if ( deweycmp( $pkgver->ver, $test, $matchver ) ) {
- $matchver = undef;
- last;
- }
- }
- }
-
- if ( $matchver && $test ne '-' ) {
- $matchver = "$test$matchver";
- }
- }
-
- }
- elsif ( $pkgmatch =~ /^([^[]+)-([\d*?{[].*)$/ ) {
-
- # (package)-(globver)
- my (@pkgnames);
-
- ( $matchpkgname, $matchver ) = ( $1, $2 );
-
- if ( defined $pkglist->pkgs($matchpkgname) ) {
- push( @pkgnames, $matchpkgname );
-
- }
- elsif ( $regex = glob2regex($matchpkgname) ) {
- foreach my $pkg ( $pkglist->pkgs ) {
- ( $pkg->pkg() =~ /$regex/ ) && push( @pkgnames, $pkg->pkg() );
- }
- }
-
- # Try to convert $matchver into regex version
- #
- $regex = glob2regex($matchver);
-
- foreach my $pkg (@pkgnames) {
- if ( defined $pkglist->pkgver( $pkg, $matchver ) ) {
- return ($matchver);
- }
-
- if ($regex) {
- foreach my $ver ( $pkglist->pkgs($pkg)->versions ) {
- if ( $ver =~ /$regex/ ) {
- $matchver = undef;
- last;
- }
- }
- }
-
- $matchver || last;
- }
-
- # last ditch attempt to handle the whole DEPENDS as a glob
- #
- if ( $matchver && ( $regex = glob2regex($pkgmatch) ) ) {
-
- # (large-glob)
- foreach my $pkgver ( $pkglist->pkgver ) {
- if ( $pkgver->pkgname =~ /$regex/ ) {
- $matchver = undef;
- last;
- }
- }
- }
-
- }
- else {
- ( $matchpkgname, $matchver ) = ( $pkgmatch, 'missing' );
- }
-
- ( $matchpkgname, $matchver );
-}
-
-# Parse a pkgsrc package makefile and return the pkgname and set variables
-#
-sub parse_makefile_pkgsrc($) {
- my ($file) = @_;
- my ( $pkgname, $vars );
-
- $vars = parse_makefile_vars($file);
-
- if ( !$vars ) {
-
- # Missing Makefile
- return undef;
- }
-
- if ( defined $vars->{PKGNAME} ) {
- $pkgname = $vars->{PKGNAME};
-
- }
- elsif ( defined $vars->{DISTNAME} ) {
- $pkgname = $vars->{DISTNAME};
- }
-
- if ( defined $vars->{PKGNAME} ) {
- debug("$file: PKGNAME=$vars->{PKGNAME}\n");
- }
- if ( defined $vars->{DISTNAME} ) {
- debug("$file: DISTNAME=$vars->{DISTNAME}\n");
- }
-
- if ( !defined $pkgname || $pkgname !~ /(.*)-(\d.*)/ ) {
-
- # invoke make here as a last resort
- my ($pkgsrcdir) = ( $file =~ m:(/.*)/: );
- my $pid =
- open3( \*WTR, \*RDR, \*ERR,
- "cd $pkgsrcdir ; ${conf_make} show-vars VARNAMES=PKGNAME" );
- if ( !$pid ) {
- warn "$file: Unable to run make: $!";
- }
- else {
- close(WTR);
- my @errors = <ERR>;
- close(ERR);
- my ($makepkgname) = <RDR>;
- close(RDR);
- wait;
- chomp @errors;
- if (@errors) { warn "\n$file: @errors\n"; }
-
- if ( $makepkgname =~ /(.*)-(\d.*)/ ) {
- $pkgname = $makepkgname;
- }
- }
- }
-
- if ( defined $pkgname ) {
- if ( $pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver ) {
- $pkgname = "pkg_install-$pkg_installver";
- }
-
- # XXX: hack for python and ruby prefix support
- $pkgname =~ s/^py..pth-/py-/;
- $pkgname =~ s/^py..-/py-/;
- $pkgname =~ s/^ruby..-/ruby-/;
-
- if ( defined $vars->{PKGREVISION}
- and not $vars->{PKGREVISION} =~ /^\s*$/ )
- {
- if ( $vars->{PKGREVISION} =~ /\D/ ) {
- print
- "\nBogus: PKGREVISION $vars->{PKGREVISION} (from $file)\n";
-
- }
- elsif ( $vars->{PKGREVISION} ) {
- $pkgname .= "nb";
- $pkgname .= $vars->{PKGREVISION};
- }
- }
-
- if ( $pkgname =~ /\$/ ) {
- print "\nBogus: $pkgname (from $file)\n";
-
- }
- elsif ( $pkgname =~ /(.*)-(\d.*)/ ) {
- if ($pkglist) {
- my ($pkgver) = $pkglist->add( $1, $2 );
-
- debug("add $1 $2\n");
-
- foreach
- my $var (qw(DEPENDS RESTRICTED OSVERSION_SPECIFIC BROKEN))
- {
- $pkgver->var( $var, $vars->{$var} );
- }
-
- if ( defined $vars->{NO_BIN_ON_FTP} ) {
- $pkgver->var( 'RESTRICTED', 'NO_BIN_ON_FTP' );
- }
-
- if ( $file =~ m:([^/]+/[^/]+)/Makefile$: ) {
- $pkgver->var( 'dir', $1 );
- }
- else {
- $pkgver->var( 'dir', 'unknown' );
- }
- }
- }
- else {
- print "Cannot extract $pkgname version ($file)\n";
- }
-
- return ( $pkgname, $vars );
-
- }
- else {
- return (undef);
- }
-}
-
-# Extract variable assignments from Makefile
-# Much unpalatable magic to avoid having to use make (all for speed)
-#
-sub parse_makefile_vars($$) {
- my ( $file, $cwd ) = @_;
- my (
- $pkgname, %vars, $plus, $value, @data,
- %incfiles, # Cache of previously included fils
- %incdirs, # Directories in which to check for includes
- @if_false
- ); # 0:true 1:false 2:nested-false&nomore-elsif
-
- if ( !open( FILE, $file ) ) {
- return (undef);
- }
- @data = map { chomp; $_ } <FILE>;
- close(FILE);
-
- $incdirs{"."} = 1;
- $incdirs{ dirname($file) } = 1;
-
- # Some Makefiles depend on these being set
- if ( $file eq '/etc/mk.conf' ) {
- $vars{LINTPKGSRC} = 'YES';
- }
- else {
- %vars = %{$default_vars};
- }
- $vars{BSD_PKG_MK} = 'YES';
-
- if ($cwd) {
- $vars{'.CURDIR'} = $cwd;
-
- }
- elsif ( $file =~ m#(.*)/# ) {
- $vars{'.CURDIR'} = $1;
-
- }
- else {
- $vars{'.CURDIR'} = getcwd;
- }
-
- $incdirs{ $vars{'.CURDIR'} } = 1;
- if ( $opt{L} ) {
- print "$file\n";
- }
-
- while ( defined( $_ = shift(@data) ) ) {
- s/\s*#.*//;
-
- # Continuation lines
- #
- while ( substr( $_, -1 ) eq "\\" ) {
- substr( $_, -2 ) = shift @data;
- }
-
- # Conditionals
- #
- if (m#^\.\s*if(|def|ndef)\s+(.*)#) {
- my ( $type, $false );
-
- $type = $1;
- if ( $if_false[$#if_false] ) {
- push( @if_false, 2 );
-
- }
- elsif ( $type eq '' ) {
-
- # Straight if
- push( @if_false, parse_eval_make_false( $2, \%vars ) );
-
- }
- else {
- $false = !defined( $vars{ parse_expand_vars( $2, \%vars ) } );
- if ( $type eq 'ndef' ) {
- $false = !$false;
- }
- push( @if_false, $false ? 1 : 0 );
- }
- debug("$file: .if$type (! @if_false)\n");
- next;
- }
-
- if ( m#^\.\s*elif\s+(.*)# && @if_false ) {
- if ( $if_false[$#if_false] == 0 ) {
- $if_false[$#if_false] = 2;
- }
- elsif ( $if_false[$#if_false] == 1
- && !parse_eval_make_false( $1, \%vars ) )
- {
- $if_false[$#if_false] = 0;
- }
- debug("$file: .elif (! @if_false)\n");
- next;
- }
-
- if ( m#^\.\s*else\b# && @if_false ) {
- $if_false[$#if_false] = $if_false[$#if_false] == 1 ? 0 : 1;
- debug("$file: .else (! @if_false)\n");
- next;
- }
-
- if (m#^\.\s*endif\b#) {
- pop(@if_false);
- debug("$file: .endif (! @if_false)\n");
- next;
- }
-
- $if_false[$#if_false] && next;
-
- # Included files (just unshift onto @data)
- #
- if (m#^\.\s*include\s+"([^"]+)"#) {
- my ($incfile) = parse_expand_vars( $1, \%vars );
-
- # At this point just skip any includes which we were not able to
- # fully expand
- if ( $incfile =~ m#/mk/bsd#
- || $incfile =~ /$magic_undefined/
- || ( !$opt{d} && $incfile =~ m#/(buildlink[^/]*\.mk)# ) )
- {
- debug("$file: .include \"$incfile\" skipped\n");
- }
- else {
- debug("$file: .include \"$incfile\"\n");
-
- # Expand any simple vars in $incfile
- #
-
- if ( substr( $incfile, 0, 1 ) ne '/' ) {
- foreach my $dir ( keys %incdirs ) {
- if ( -f "$dir/$incfile" ) {
- $incfile = "$dir/$incfile";
- last;
- }
- }
- }
-
- # perl 5.6.1 realpath() cannot handle files, only directories
- # If the last component is a symlink this will give a false
- # negative, but that is not a problem as the duplicate check
- # is for performance
- $incfile =~ m#^(.+)(/[^/]+)$#;
-
- if ( !-f $incfile ) {
- if ( !$opt{L} ) {
- verbose("\n");
- }
-
- verbose("$file: Cannot locate $incfile in "
- . join( " ", sort keys %incdirs )
- . "\n" );
-
- }
- else {
- $incfile = realpath($1) . $2;
-
- if ( !$incfiles{$incfile} ) {
- if ( $opt{L} ) {
- print "inc $incfile\n";
- }
- $incfiles{$incfile} = 1;
-
- if ( !open( FILE, $incfile ) ) {
- verbose(
- "Cannot open '$incfile' (from $file): $_ $!\n");
- }
- else {
- my $NEWCURDIR = $incfile;
- $NEWCURDIR =~ s#/[^/]*$##;
- $incdirs{$NEWCURDIR} = 1;
- unshift( @data, ".CURDIR=$vars{'.CURDIR'}" );
- unshift( @data, map { chomp; $_ } <FILE> );
- unshift( @data, ".CURDIR=$NEWCURDIR" );
- close(FILE);
- }
- }
- }
- }
- next;
- }
-
- if (/^ *([-\w\.]+)\s*([:+?]?)=\s*(.*)/) {
- my ($key);
-
- $key = $1;
- $plus = $2;
- $value = $3;
-
- if ( $plus eq ':' ) {
- $vars{$key} = parse_expand_vars( $value, \%vars );
- }
- elsif ( $plus eq '+' && defined $vars{$key} ) {
- $vars{$key} .= " $value";
- }
- elsif ( $plus ne '?' || !defined $vars{$key} ) {
- $vars{$key} = $value;
- }
- debug("assignment: $key$plus=[$value] ($vars{$key})\n");
-
- # Give python a little hand (XXX - do we wanna consider actually
- # implementing make .for loops, etc?
- #
- if ( $key eq "PYTHON_VERSIONS_ACCEPTED" ) {
- my ($pv);
-
- foreach $pv ( split( /\s+/, $vars{PYTHON_VERSIONS_ACCEPTED} ) )
- {
- $vars{"_PYTHON_VERSION_FIRSTACCEPTED"} ||= $pv;
- $vars{"_PYTHON_VERSION_${pv}_OK"} = "yes";
- }
- }
- }
- }
-
- debug("$file: expand\n");
-
- # Handle variable substitutions FRED = a-${JIM:S/-/-b-/}
- #
- my ($loop);
-
- for ( $loop = 1 ; $loop ; ) {
- $loop = 0;
- foreach my $key ( keys %vars ) {
- if ( index( $vars{$key}, '$' ) == -1 ) {
- next;
- }
-
- $_ = parse_expand_vars( $vars{$key}, \%vars );
- if ( $_ ne $vars{$key} ) {
- $vars{$key} = $_;
- $loop = 1;
-
- }
- elsif ( $vars{$key} =~
- m#\${(\w+):([CS]([^{}])[^{}\3]+\3[^{}\3]*\3[g1]*(|:[^{}]+))}# )
- {
- my ( $left, $subvar, $right ) = ( $`, $1, $' );
- my (@patterns) = split( ':', $2 );
- my ($result);
-
- $result = $vars{$subvar};
- $result ||= '';
-
- # If $vars{$subvar} contains a $ skip it on this pass.
- # Hopefully it will get substituted and we can catch it
- # next time around.
- if ( index( $result, '${' ) != -1 ) {
- next;
- }
-
- debug(
- "$file: substitutelist $key ($result) $subvar (@patterns)\n"
- );
- foreach (@patterns) {
- if ( !m#([CS])(.)([^/]+)\2([^/]*)\2([1g]*)# ) {
- next;
- }
-
- my ( $how, $from, $to, $global ) = ( $1, $3, $4, $5 );
-
- debug(
-"$file: substituteglob $subvar, $how, $from, $to, $global\n"
- );
- if ( $how eq 'S' ) {
-
- # Limited substitution - keep ^ and $
- $from =~ s/([?.{}\]\[*+])/\\$1/g;
- }
- $to =~ s/\\(\d)/\$$1/g; # Change \1 etc to $1
- $to =~ s/\&/\$&/g; # Change & to $1
-
- my ($notfirst);
- if ( $global =~ s/1// ) {
- ( $from, $notfirst ) = split( '\s', $from, 2 );
- }
-
- debug("$file: substituteperl $subvar, $how, $from, $to\n");
- eval "\$result =~ s/$from/$to/$global";
- if ( defined $notfirst ) {
- $result .= " $notfirst";
- }
- }
-
- $vars{$key} = $left . $result . $right;
- $loop = 1;
- }
- }
- }
-
- foreach my $key ( keys %vars ) {
- $vars{$key} =~ s/$magic_undefined//;
- }
- \%vars;
-}
-
-sub parse_expand_vars($$) {
- my ( $line, $vars ) = @_;
-
- while ( $line =~ /\$\{([-\w.]+)\}/ ) {
- if ( defined( ${$vars}{$1} ) ) {
- $line = $` . ${$vars}{$1} . $';
- }
- else {
- $line = $` . $magic_undefined . $';
- }
- }
- $line;
-}
-
-sub parse_expand_vars_dumb($$) {
- my ( $line, $vars ) = @_;
-
- while ( $line =~ /\$\{([-\w.]+)\}/ ) {
- if ( defined( ${$vars}{$1} ) ) {
- $line = $` . ${$vars}{$1} . $';
- }
- else {
- $line = $` . $magic_undefined . $';
- }
- }
- $line;
-}
-
-sub parse_eval_make_false($$) {
- my ( $line, $vars ) = @_;
- my ( $false, $test );
-
- $false = 0;
- $test = parse_expand_vars_dumb( $line, $vars );
-
- # XXX This is _so_ wrong - need to parse this correctly
- $test =~ s/""/\r/g;
- $test =~ s/"//g; # "
- $test =~ s/\r/""/g;
-
- debug("conditional: $test\n");
-
- # XXX Could do something with target
- while ( $test =~ /(target|empty|make|defined|exists)\s*\(([^()]+)\)/ ) {
- my $var = $${vars}{$2};
-
- if ( defined $var && $var eq $magic_undefined ) {
- $var = undef;
- }
-
- if ( $1 eq 'exists' ) {
- $_ = ( -e $2 ) ? 1 : 0;
-
- }
- elsif ( $1 eq 'defined' ) {
- $_ = defined($var) ? 1 : 0;
-
- }
- elsif ( $1 eq 'empty' ) {
- $_ = ( ( not defined($var) or ( length($var) == 0 ) ) ? 1 : 0 );
-
- }
- else {
- $_ = 0;
- }
-
- $test =~ s/$1\s*\([^()]+\)/$_/;
- debug("conditional: update to $test\n");
- }
-
- while ( $test =~ /([^\s()\|\&]+)\s+(!=|==)\s+([^\s()]+)/ ) {
- if ( $2 eq '==' ) {
- $_ = ( $1 eq $3 ) ? 1 : 0;
- }
- else {
- $_ = ( $1 ne $3 ) ? 1 : 0;
- }
- $test =~ s/[^\s()\|\&]+\s+(!=|==)\s+[^\s()]+/$_/;
- }
-
- if ( $test !~ /[^<>\d()\s&|.!]/ ) {
- $false = eval "($test)?0:1";
- if ( !defined $false ) {
- fail("Eval failed $line - $test");
- }
- debug( "conditional: evaluated to " . ( $false ? 0 : 1 ) . "\n" );
-
- }
- else {
- $false = 0;
- debug("conditional: defaulting to 0\n");
- }
- $false;
-}
-
-# chdir() || fail()
-#
-sub safe_chdir($) {
- my ($dir) = @_;
-
- debug("chdir: $dir");
- if ( !chdir($dir) ) {
- fail("Unable to chdir($dir): $!");
- }
-}
-
-# Generate pkgname->category/pkg mapping, optionally check DEPENDS
-#
-sub scan_pkgsrc_makefiles($$) {
- my ( $pkgsrcdir, $check_depends ) = @_;
- my (@categories);
-
- if ($pkglist) {
-
- # Already done
- return;
- }
-
- if ( $opt{I} ) {
- load_pkgsrc_makefiles( $opt{I} );
- return;
- }
-
- $pkglist = new PkgList;
- @categories = list_pkgsrc_categories($pkgsrcdir);
- verbose('Scan Makefiles: ');
-
- if ( !$opt{L} ) {
- verbose( '_' x @categories . "\b" x @categories );
- }
- else {
- verbose("\n");
- }
-
- foreach my $cat ( sort @categories ) {
- foreach my $pkgdir ( list_pkgsrc_pkgdirs( $pkgsrcdir, $cat ) ) {
- my ( $pkg, $vars ) =
- parse_makefile_pkgsrc("$pkgsrcdir/$cat/$pkgdir/Makefile");
- }
-
- if ( !$opt{L} ) {
- verbose('.');
- }
- }
-
- if ( !$opt{L} ) {
- my ($len);
-
- $_ = $pkglist->numpkgver() . ' packages';
- $len = @categories - length($_);
- verbose( "\b" x @categories, $_, ' ' x $len, "\b" x $len, "\n" );
- }
-}
-
-# Cross reference all depends
-#
-sub pkgsrc_check_depends() {
-
- foreach my $pkgver ( $pkglist->pkgver ) {
- my ( $err, $msg );
-
- defined $pkgver->var('DEPENDS') || next;
- foreach my $depend ( split( " ", $pkgver->var('DEPENDS') ) ) {
-
- $depend =~ s/:.*// || next;
-
- # XXX: hack for python prefix support
- $depend =~ s/^py..pth-/py-/;
- $depend =~ s/^py..-/py-/;
- $depend =~ s/^ruby..-/ruby-/;
- if ( ( $msg = invalid_version($depend) ) ) {
- if ( !defined($err) ) {
- print $pkgver->pkgname . " DEPENDS errors:\n";
- }
- $err = 1;
- $msg =~ s/(\n)(.)/$1\t$2/g;
- print "\t$msg";
- }
- }
- }
-}
-
-# Extract all distinfo entries, then verify contents of distfiles
-#
-sub scan_pkgsrc_distfiles_vs_distinfo($$$$) {
- my ( $pkgsrcdir, $pkgdistdir, $check_unref, $check_distinfo ) = @_;
- my (@categories);
- my ( %distfiles, %sumfiles, @distwarn, $numpkg );
- my (%bad_distfiles);
-
- @categories = list_pkgsrc_categories($pkgsrcdir);
-
- verbose( 'Scan distinfo: ' . '_' x @categories . "\b" x @categories );
- $numpkg = 0;
- foreach my $cat ( sort @categories ) {
- foreach my $pkgdir ( list_pkgsrc_pkgdirs( $pkgsrcdir, $cat ) ) {
- if ( open( DISTINFO, "$pkgsrcdir/$cat/$pkgdir/distinfo" ) ) {
- ++$numpkg;
- while (<DISTINFO>) {
- if (m/^(\w+) ?\(([^\)]+)\) = (\S+)/) {
- my ( $dn, $ds, $dt );
- $dt = $1;
- $dn = $2;
- $ds = $3;
- if ( $dn =~ /^patch-[\w.\-]+$/ ) {
- next;
- }
-
- # Strip leading ./ which sometimes gets added
- # because of DISTSUBDIR=.
- $dn =~ s/^(\.\/)*//;
- if ( !defined $distfiles{$dn} ) {
- $distfiles{$dn}{sumtype} = $dt;
- $distfiles{$dn}{sum} = $ds;
- $distfiles{$dn}{path} = "$cat/$pkgdir";
-
- }
- elsif ($distfiles{$dn}{sumtype} eq $dt
- && $distfiles{$dn}{sum} ne $ds )
- {
- push( @distwarn,
- "checksum mismatch between '$dt' for '$dn' "
- . "in $cat/$pkgdir and $distfiles{$dn}{path}\n"
- );
- }
- }
- }
- close(DISTINFO);
- }
- }
- verbose('.');
- }
- verbose(" ($numpkg packages)\n");
-
- # Do not mark the vulnerabilities file as unknown
- $distfiles{'pkg-vulnerabilities'} = {
- path => 'pkg-vulnerabilities',
- sum => 'IGNORE'
- };
-
- foreach my $file ( listdir( "$pkgdistdir", undef ) ) {
- my ($dist);
-
- if ( !defined( $dist = $distfiles{$file} ) ) {
- $bad_distfiles{$file} = 1;
-
- }
- else {
- if ( $dist->{sum} ne 'IGNORE' ) {
- push( @{ $sumfiles{ $dist->{sumtype} } }, $file );
- }
- }
- }
-
- if ( $check_unref && %bad_distfiles ) {
- verbose( scalar( keys %bad_distfiles ),
- " unreferenced file(s) in '$pkgdistdir':\n" );
- print join( "\n", sort keys %bad_distfiles ), "\n";
- }
-
- if ($check_distinfo) {
- if (@distwarn) {
- verbose(@distwarn);
- }
-
- verbose("checksum mismatches\n");
- safe_chdir($pkgdistdir);
- foreach my $sum ( keys %sumfiles ) {
- if ( $sum eq 'Size' ) {
- foreach my $file ( @{ $sumfiles{$sum} } ) {
- if ( !-f $file || -S $file != $distfiles{$file}{sum} ) {
- print $file, " (Size)\n";
- $bad_distfiles{$file} = 1;
- }
- }
- next;
- }
-
- open( DIGEST, "digest $sum @{$sumfiles{$sum}}|" )
- || fail("Run digest: $!");
- while (<DIGEST>) {
- if (m/^$sum ?\(([^\)]+)\) = (\S+)/) {
- if ( $distfiles{$1}{sum} ne $2 ) {
- print $1, " ($sum)\n";
- $bad_distfiles{$1} = 1;
- }
- }
- }
- close(DIGEST);
- }
- safe_chdir('/'); # Do not want to stay in $pkgdistdir
- }
- ( sort keys %bad_distfiles );
-}
-
-sub load_pkgsrc_makefiles() {
-
- open( STORE, "<$_[0]" ) || die("Cannot read pkgsrc store from $_[0]: $!\n");
- my ($pkgver);
- our ( $pkgcnt, $pkgnum, $subpkgcnt, $subpkgnum );
- $pkglist = new PkgList;
- while (<STORE>) {
- eval $_;
- }
- close(STORE);
-}
-
-sub store_pkgsrc_makefiles() {
- open( STORE, ">$_[0]" ) || die("Cannot save pkgsrc store to $_[0]: $!\n");
- my $was = select(STORE);
- print(
- 'sub __pkgcount { $subpkgnum += $_[0]; ',
- 'verbose("\rReading pkgsrc database: ',
- '$pkgnum / $pkgcnt ($subpkgnum / $subpkgcnt) pkgs"); }',
- "\n"
- );
- $pkglist->store;
- print("verbose(\"...done\\n\");\n");
- select($was);
- close(STORE);
-}
-
-# Remember to update manual page when modifying option list
-#
-sub usage_and_exit() {
- print "Usage: lintpkgsrc [opts] [makefiles]
-opts:
- -h : This help. [see lintpkgsrc(1) for more information]
-
-Installed package options: Distfile options:
- -i : Check version against pkgsrc -m : List distinfo mismatches
- -u : As -i + fetch dist (may change) -o : List obsolete (no distinfo)
-
-Prebuilt package options: Makefile options:
- -p : List old/obsolete -B : List packages marked as 'BROKEN'
- -O : List OSVERSION_SPECIFIC -d : Check 'DEPENDS' up to date
- -R : List NO_BIN_ON_FTP/RESTRICTED -S : List packages not in 'SUBDIRS'
- -V : List known vulnerabilities
-
-Misc:
- -E file : Export the internal pkgsrc database to file
- -I file : Import the internal pkgsrc database to file (for use with -i)
- -g file : Generate 'pkgname pkgdir pkgver' map in file
- -r : Remove bad files (Without -m -o -p or -V implies all, can use -R)
-
-Modifiers:
- -K path : Set PACKAGES basedir (default PKGSRCDIR/packages)
- -M path : Set DISTDIR (default PKGSRCDIR/distfiles)
- -P path : Set PKGSRCDIR (default $conf_pkgsrcdir)
- -D : Debug makefile and glob parsing
- -L : List each Makefile when scanned
-";
- exit;
-}
-
-sub verbose(@) {
-
- if ( -t STDERR ) {
- print STDERR @_;
- }
-}
-
-sub debug(@) {
-
- ( $opt{D} ) && print STDERR 'DEBUG: ', @_;
-}
-
-# PkgList is the master list of all packages in pkgsrc.
-#
-package PkgList;
-
-sub add($@) {
- my $self = shift;
-
- if ( !$self->pkgs( $_[0] ) ) {
- $self->{_pkgs}{ $_[0] } = new Pkgs $_[0];
- }
- $self->pkgs( $_[0] )->add(@_);
-}
-
-sub new($) {
- my $class = shift;
- my $self = {};
- bless $self, $class;
- return $self;
-}
-
-sub numpkgver($) {
- my $self = shift;
- scalar( $self->pkgver );
-}
-
-sub pkgver($@) {
- my $self = shift;
-
- if ( @_ == 0 ) {
- my (@list);
- foreach my $pkg ( $self->pkgs ) {
- push( @list, $pkg->pkgver );
- }
- return (@list);
- }
-
- if ( defined $self->{_pkgs}{ $_[0] } ) {
- return ( @_ > 1 )
- ? $self->{_pkgs}{ $_[0] }->pkgver( $_[1] )
- : $self->{_pkgs}{ $_[0] }->pkgver();
- }
- return;
-}
-
-sub pkgs($@) {
- my $self = shift;
-
- if (@_) {
- return $self->{_pkgs}{ $_[0] };
- }
- else {
- return ( sort { $a->pkg cmp $b->pkg } values %{ $self->{_pkgs} } );
- }
- return;
-}
-
-sub store($) {
- my $self = shift;
- my @pkgs = keys %{ $self->{_pkgs} };
- my ( $cnt, $subcnt ) = $self->count;
-
- print("\$pkgcnt = $cnt;\n");
- print("\$subpkgcnt = $subcnt;\n");
- map( $self->{_pkgs}{$_}->store, keys %{ $self->{_pkgs} } );
-}
-
-sub count($) {
- my $self = shift;
- my ( $pkgcnt, $pkgsubcnt );
-
- map {
- $pkgcnt++;
- $pkgsubcnt += $self->{_pkgs}{$_}->count;
- } keys %{ $self->{_pkgs} };
- wantarray ? ( $pkgcnt, $pkgsubcnt ) : $pkgcnt;
-}
-
-# Pkgs is all versions of a given package (eg: apache-1.x and apache-2.x)
-#
-package Pkgs;
-
-sub add($@) {
- my $self = shift;
-
- $self->{_pkgver}{ $_[1] } = new PkgVer @_;
-}
-
-sub new($@) {
- my $class = shift;
- my $self = {};
-
- bless $self, $class;
- $self->{_pkg} = $_[0];
- return $self;
-}
-
-sub versions($) {
- my $self = shift;
-
- return sort { $b cmp $a } keys %{ $self->{_pkgver} };
-}
-
-sub pkg($) {
- my $self = shift;
- $self->{_pkg};
-}
-
-sub pkgver($@) {
- my $self = shift;
-
- if (@_) {
- if ( $self->{_pkgver}{ $_[0] } ) {
- return ( $self->{_pkgver}{ $_[0] } );
- }
- return;
- }
- return sort { $b->ver() cmp $a->ver() } values %{ $self->{_pkgver} };
-}
-
-sub latestver($) {
- my $self = shift;
-
- ( $self->pkgver() )[0];
-}
-
-sub store($) {
- my $self = shift;
-
- print("\$pkgnum++;\n");
- map( $self->{_pkgver}{$_}->store, keys %{ $self->{_pkgver} } );
-}
-
-sub count($) {
- my $self = shift;
-
- scalar( keys %{ $self->{_pkgver} } );
-}
-
-# PkgVer is a unique package+version
-#
-package PkgVer;
-
-sub new($$$) {
- my $class = shift;
- my $self = {};
-
- bless $self, $class;
- $self->{_pkg} = $_[0];
- $self->{_ver} = $_[1];
- return $self;
-}
-
-sub pkgname($) {
- my $self = shift;
-
- $self->pkg . '-' . $self->ver;
-}
-
-sub pkg($) {
- my $self = shift;
-
- $self->{_pkg};
-}
-
-sub var($$$) {
- my $self = shift;
- my ( $key, $val ) = @_;
-
- ( defined $val )
- ? ( $self->{$key} = $val )
- : $self->{$key};
-}
-
-sub ver($) {
- my $self = shift;
-
- $self->{_ver};
-}
-
-sub vars($) {
- my $self = shift;
-
- grep( !/^_(pkg|ver)$/, keys %{$self} );
-}
-
-sub store($) {
- my $self = shift;
- my $data;
-
- ( $data = $self->{_pkg} ) =~ s/([\\\$\@\%\"])/\\$1/g;
- print("\$pkgver = \$pkglist->add(\"$data\", \"");
-
- ( $data = $self->{_ver} ) =~ s/([\\\$\@\%\"])/\\$1/g;
- print("$data\"); __pkgcount(1);\n");
-
- foreach ( $self->vars ) {
- ( $data = $self->{$_} ) =~ s/([\\\$\@\%\"])/\\$1/g;
- print("\$pkgver->var(\"$_\", \"$data\");\n");
- }
-}
-
-package main;
-
-main();
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map
deleted file mode 100644
index e1b20b6645d..00000000000
--- a/pkgtools/pkglint/files/makevars.map
+++ /dev/null
@@ -1,697 +0,0 @@
-# $NetBSD: makevars.map,v 1.161 2007/03/18 23:09:53 rillig Exp $
-#
-
-# This file contains the guessed type of some variables, according to
-# their current use in pkgsrc.
-#
-# The type YesNo is used for variables that are checked using
-# .if defined(VAR) && !empty(VAR:M[Yy][Ee][Ss])
-#
-# The type Yes is used for variables that are checked using
-# .if defined(VAR)
-#
-# Type type List is used for lists of things. There are two types of lists,
-# InternalList and List, which are described in the pkgsrc guide, chapter
-# "Makefiles".
-
-#
-# Some commonly used ACLs. For further documentation, see the chapter
-# ``The pkglint type system'' in the pkglint developer documentation.
-#
-
-# A package-defined variable may be set in Makefile, Makefile.common or
-# options.mk, since these are commonly used in pkgsrc. Due to the
-# special nature of buildlink3.mk and builtin.mk files, these files may
-# not define those variables. All other .mk files may, allowing for
-# application.mk or similar helper files.
-acl package = [m:su, c:dsu, b:, builtin.mk:, *.mk:dsu]
-
-# A package_list may be appended to in all "normal" Makefile fragments.
-# This excludes buildlink3.mk and builtin.mk, since they are very
-# special-purpose. Because at the beginning, all lists are empty, in the
-# primary Makefile a direct assignment may be used instead of appending.
-# Since Makefile.common files are usually used by packages that know
-# what they are doing, they may set variables directly, too. This rule
-# can be removed to show a lot of possible problems in pkgsrc.
-acl package_list = [m:asu, c:asu, b:, builtin.mk:, *.mk:au]
-acl bl_list = [b:a, builtin.mk:a]
-
-# A user-defined or system-defined variable must not be set by any
-# package file. It also must not be used in buildlink3.mk and
-# builtin.mk files or at load-time, since the system/user preferences
-# may not have been loaded when these files are included.
-acl user = [b:, builtin.mk:, *:u]
-acl system = [b:, builtin.mk:u, *:u]
-acl cmdline = [b:, builtin.mk:, *:pu]
-
-# The following variables are taken from mk/defaults/mk.conf, 1.118
-
-ALLOW_VULNERABLE_PACKAGES Yes [$user]
-MANINSTALL List of { maninstall catinstall } [$user]
-MANZ Yes [$user]
-GZIP List of ShellWord [$user]
-MKCRYPTO YesNo [$user]
-OBJHOSTNAME Yes [$user]
-OBJMACHINE Yes [$user]
-PKG_SUFX Filename [$user]
-PKGSRC_LOCKTYPE { none sleep once } [$user]
-PKGSRC_SLEEPSECS Integer [$user]
-USETBL Yes [$user]
-ABI { 32 64 } [$user]
-PKG_DEVELOPER Yes [$user]
-USE_ABI_DEPENDS YesNo [$user]
-PKG_REGISTER_SHELLS { YES NO } [$user]
-PKGSRC_COMPILER List of { ccc ccache distcc f2c icc ido gcc mipspro mipspro-ucode sunpro xlc } [$user]
-PKGSRC_MESSAGE_RECIPIENTS List of Mail_Address [$user]
-PKGSRC_SHOW_BUILD_DEFS YesNo [$user]
-PKGSRC_SHOW_PATCH_ERRORMSG YesNo [$user]
-PKGSRC_RUN_TEST YesNo [$user]
-PREFER_PKGSRC List of Identifier [$user]
-PREFER_NATIVE List of Identifier [$user]
-PREFER_NATIVE_PTHREADS YesNo [$user]
-LOCALBASE Pathname [$user]
-CROSSBASE Pathname [$user]
-VARBASE Pathname [$user]
-X11_TYPE { native xorg } [$user]
-X11BASE Pathname [$user]
-MOTIFBASE Pathname [$user]
-PKGINFODIR Pathname [$user]
-PKGMANDIR Pathname [$user]
-USE_XPKGWEDGE YesNo [$user]
-BSDSRCDIR Pathname [$user]
-BSDXSRCDIR Pathname [$user]
-DISTDIR Pathname [$user]
-DIST_PATH Pathlist [$user]
-DEFAULT_VIEW Unchecked [$user]
-FETCH_CMD ShellCommand [$user]
-FETCH_RESUME_ARGS List of ShellWord [$user]
-FETCH_OUTPUT_ARGS List of ShellWord [$user]
-LIBTOOLIZE_PLIST YesNo [$user]
-PKG_INSTALLATION_PREFS List of { overwrite pkgviews } [$user]
-PKG_RESUME_TRANSFERS YesNo [$user]
-PKG_SYSCONFBASE Pathname [$user]
-RCD_SCRIPTS_DIR Pathname [$user]
-PACKAGES Pathname [$user]
-PKGVULNDIR Pathname [$user]
-PASSIVE_FETCH Yes [$user]
-PATCH_FUZZ_FACTOR { -F0 -F1 -F2 -F3 } [$user]
-ACCEPTABLE_LICENSES List of Identifier [$user]
-SPECIFIC_PKGS Yes [$user]
-SITE_SPECIFIC_PKGS List of PkgPath [$user]
-HOST_SPECIFIC_PKGS List of PkgPath [$user]
-GROUP_SPECIFIC_PKGS List of PkgPath [$user]
-USER_SPECIFIC_PKGS List of PkgPath [$user]
-FAILOVER_FETCH Yes [$user]
-MASTER_SORT List of Unchecked [$user]
-MASTER_SORT_REGEX List of Unchecked [$user]
-PATCH_DEBUG Yes [$user]
-PKG_FC ShellCommand [$user]
-IMAKE ShellCommand [$user]
-IMAKEOPTS List of ShellWord [$user]
-PRE_ROOT_CMD ShellCommand [$user]
-SETGIDGAME YesNo [$user]
-SU_CMD ShellCommand [$user]
-SU_CMD_PATH_APPEND Pathlist [$user]
-FATAL_OBJECT_FMT_SKEW YesNo [$user]
-WARN_NO_OBJECT_FMT YesNo [$user]
-SMART_MESSAGES Yes [$user]
-BINPKG_SITES List of URL [$user]
-BIN_INSTALL_FLAG List of ShellWord [$user]
-LOCALPATCHES Pathname [$user]
-
-# some other variables, sorted alphabetically
-
-.CURDIR Pathname [$system]
-.TARGET Pathname [$system]
-ALL_ENV List of ShellWord
-ALTERNATIVES_FILE Filename
-ALTERNATIVES_SRC List of Pathname
-APACHE_MODULE Yes [$package]
-AR ShellCommand [$system]
-AS ShellCommand [$system]
-AUTOCONF_REQD List of Version [$package_list]
-AUTOMAKE_OVERRIDE List of Pathmask
-AUTOMAKE_REQD List of Version [$package_list]
-BATCH Yes [$user]
-BDB185_DEFAULT Unchecked []
-BDBBASE Pathname [$system]
-BDB_ACCEPTED List of { db1 db2 db3 db4 } [$package]
-BDB_DEFAULT { db1 db2 db3 db4 } []
-BDB_LIBS List of LdFlag [$system]
-BDB_TYPE { db1 db2 db3 db4 } [$system]
-BINGRP UserGroupName [$system]
-BINMODE FileMode [$system]
-BINOWN UserGroupName [$system]
-BOOTSTRAP_DEPENDS InternalList of DependencyWithPath [c:a,m:a,o:a,*.mk:a]
-BROKEN Message []
-BROKEN_GETTEXT_DETECTION YesNo [$package]
-BROKEN_IN List of BrokenIn [m:s]
-BSD_MAKE_ENV List of ShellWord [$system]
-BUILDLINK_ABI_DEPENDS.* InternalList of Dependency [*:a]
-BUILDLINK_API_DEPENDS.* InternalList of Dependency [*:a]
-BUILDLINK_CONTENTS_FILTER List of ShellWord []
-# ^^ ShellCommand
-BUILDLINK_CFLAGS List of CFlag [$system]
-BUILDLINK_CFLAGS.* List of CFlag [$bl_list]
-BUILDLINK_CPPFLAGS List of CFlag [$system]
-BUILDLINK_CPPFLAGS.* List of CFlag [$bl_list]
-BUILDLINK_DEPENDS InternalList of Identifier [b:a]
-BUILDLINK_DEPMETHOD.* List of BuildlinkDepmethod [b:ad,m:as,c:a,*.mk:a]
-# ^^ FIXME: b:d may lead to unexpected behavior.
-BUILDLINK_DEPTH BuildlinkDepth [b:ps, builtin.mk:ps]
-BUILDLINK_DIR Pathname [$system]
-BUILDLINK_FILES.* List of Pathmask [$bl_list]
-BUILDLINK_FILES_CMD.* List of ShellWord []
-# ^^ ShellCommand
-BUILDLINK_INCDIRS.* List of Pathname [b:ad] # b:d?
-BUILDLINK_JAVA_PREFIX.* Pathname [b:s]
-BUILDLINK_LDADD.* List of LdFlag [builtin.mk:adsu, b:, m:u, c:u, *.mk:u]
-BUILDLINK_LDFLAGS List of LdFlag [$system]
-BUILDLINK_LDFLAGS.* List of LdFlag [$bl_list]
-BUILDLINK_LIBDIRS.* List of Pathname [$bl_list]
-BUILDLINK_LIBS.* List of LdFlag [b:a]
-BUILDLINK_PACKAGES BuildlinkPackages [b:aps]
-BUILDLINK_PASSTHRU_DIRS List of Pathname [m:a,c:a,b:a,h:a]
-BUILDLINK_PASSTHRU_RPATHDIRS List of Pathname [m:a,c:a,b:a,h:a]
-BUILDLINK_PKGSRCDIR.* RelativePkgDir [b:dp]
-BUILDLINK_PREFIX.* Pathname [builtin.mk:su, b:, m:u, c:u, *.mk:u]
-BUILDLINK_RPATHDIRS.* List of Pathname [b:a]
-BUILDLINK_TARGETS List of Identifier []
-BUILDLINK_FNAME_TRANSFORM.* SedCommands [m:a,builtin.mk:a,h:a,b:a]
-BUILDLINK_TRANSFORM List of WrapperTransform [*:a]
-BUILD_DEFS List of Varname [m:a,c:a,o:a]
-BUILD_DEPENDS InternalList of DependencyWithPath [c:a,m:a,o:a,*.mk:a]
-BUILD_DIRS List of WrksrcSubdirectory [$package_list]
-BUILD_ENV List of ShellWord [$package_list]
-BUILD_MAKE_FLAGS List of ShellWord [$package_list]
-BUILD_TARGET List of Identifier [$package]
-BUILD_USES_MSGFMT Yes [$package]
-BUILTIN_PKG Identifier [builtin.mk:psu]
-BUILTIN_PKG.* PkgName [builtin.mk:psu]
-BUILTIN_FIND_FILES_VAR List of Varname [builtin.mk:s]
-BUILTIN_FIND_FILES.* List of Pathname [builtin.mk:s]
-BUILTIN_FIND_GREP.* List of ShellWord [builtin.mk:s]
-BUILTIN_FIND_LIBS List of Pathname [builtin.mk:s]
-BUILTIN_IMAKE_CHECK List of Unchecked [builtin.mk:s]
-BUILTIN_IMAKE_CHECK.* YesNo []
-BUILTIN_X11_TYPE Unchecked [$system]
-BUILTIN_X11_VERSION Unchecked [$system]
-CATEGORIES List of Category [m:as,c:ads]
-CC_VERSION Message [$system]
-CC ShellCommand [$system]
-CFLAGS* List of CFlag [$package_list]
-# ^^ may also be changed by the user
-CHECK_BUILTIN YesNo [builtin.mk:d,m:s]
-CHECK_FILES_SKIP List of Pathmask [m:a,c:a]
-CHECK_FILES_SUPPORTED YesNo [$package]
-CHECK_HEADERS YesNo [$user]
-CHECK_HEADERS_SKIP List of Pathmask [$package_list]
-CHECK_INTERPRETER YesNo [$user]
-CHECK_INTERPRETER_SKIP List of Pathmask [$package_list]
-CHECK_PERMS YesNo [$user]
-CHECK_PERMS_SKIP List of Pathmask [$package_list]
-#CHECK_PERMS_AUTOFIX YesNo [$package]
-# ^^ experimental
-CHECK_PORTABILITY YesNo [$user]
-CHECK_PORTABILITY_SKIP List of Pathmask [$package_list]
-CHECK_SHLIBS YesNo [m:s]
-CHECK_SHLIBS_SUPPORTED YesNo [m:s]
-CHECK_WRKREF_SKIP List of Pathmask [$package_list]
-COMMENT Comment [m:as,c:as]
-COMPILER_RPATH_FLAG { -Wl,-rpath } [$system]
-CONFIGURE_ARGS List of ShellWord [$package_list]
-CONFIGURE_DIRS List of WrksrcSubdirectory [$package_list]
-CONFIGURE_ENV List of ShellWord [$package_list]
-CONFIGURE_HAS_INFODIR YesNo [$package]
-CONFIGURE_HAS_MANDIR YesNo [$package]
-CONFIGURE_SCRIPT Pathname [$package]
-CONFIG_GUESS_OVERRIDE List of Pathmask [m:as,c:as]
-CONFIG_STATUS_OVERRIDE List of Pathmask [m:as,c:as]
-CONFIG_SHELL Pathname [m:s,c:s]
-CONFIG_SUB_OVERRIDE List of Pathmask [m:as,c:as]
-CONFLICTS InternalList of Dependency [$package_list]
-CONF_FILES List of ShellWord [$package_list]
-CONF_FILES_MODE { 0644 0640 0600 0400 } [$package]
-CONF_FILES_PERMS List of ShellWord [$package_list]
-COPY { -c } [$system]
-# ^^ the flag that tells ${INSTALL} to copy a file
-CPP ShellCommand [$system]
-CPPFLAGS* List of CFlag [$package_list]
-CRYPTO Yes [m:s]
-CXX ShellCommand [$system]
-CXXFLAGS* List of CFlag [$package_list]
-DEINSTALL_FILE Pathname [m:s]
-DEINSTALL_SRC List of Pathname [m:s,c:ds]
-DEINSTALL_TEMPLATES List of Pathname [m:as,c:ads]
-DELAYED_ERROR_MSG ShellCommand [$system]
-DELAYED_WARNING_MSG ShellCommand [$system]
-DEPENDS InternalList of DependencyWithPath [$package_list]
-DEPENDS_TARGET List of Identifier [$user]
-DESCR_SRC List of Pathname [m:s,c:ds]
-DESTDIR Pathname [$system]
-DEVOSSAUDIO Pathname [$system]
-DEVOSSSOUND Pathname [$system]
-DISTFILES List of Filename [$package_list]
-DISTINFO_FILE RelativePkgPath [$package]
-DISTNAME Filename [$package]
-DIST_SUBDIR Filename [$package]
-DJB_BUILD_ARGS List of ShellWord
-DJB_BUILD_TARGETS List of Identifier
-DJB_CONFIG_CMDS List of ShellWord [o:s]
-# ^^ ShellCommand, terminated by a semicolon
-DJB_CONFIG_DIRS List of WrksrcSubdirectory
-DJB_CONFIG_HOME Filename
-DJB_CONFIG_PREFIX Pathname
-DJB_INSTALL_TARGETS List of Identifier
-DJB_MAKE_TARGETS YesNo
-DJB_RESTRICTED YesNo [m:s]
-DJB_SLASHPACKAGE YesNo
-DLOPEN_REQUIRE_PTHREADS YesNo
-DL_AUTO_VARS Yes [m:s,c:s,o:s]
-DL_LIBS List of LdFlag
-DOCOWN UserGroupName [$system]
-DOCGRP UserGroupName [$system]
-DOCMODE FileMode [$system]
-DOWNLOADED_DISTFILE Pathname [$system]
-DO_NADA ShellCommand [$system]
-DYNAMIC_SITES_CMD ShellCommand [$package]
-DYNAMIC_SITES_SCRIPT Pathname [$package]
-ECHO ShellCommand [$system]
-ECHO_MSG ShellCommand [$system]
-ECHO_N ShellCommand [$system]
-EGDIR Pathname [$package]
-# ^^ This variable is not defined by the system, but has been established
-# as a convention.
-EMACS_BIN Pathname [$system]
-EMACS_ETCPREFIX Pathname [$system]
-EMACS_FLAVOR { emacs xemacs } [$system]
-EMACS_INFOPREFIX Pathname [$system]
-EMACS_LISPPREFIX Pathname [$system]
-EMACS_MODULES List of Identifier [m:as,c:as]
-EMACS_PKGNAME_PREFIX Identifier [$system]
-# ^^ or the empty string.
-EMACS_TYPE { emacs xemacs } [$system]
-EMACS_USE_LEIM Yes
-EMACS_VERSIONS_ACCEPTED List of { emacs22 emacs22nox emacs21 emacs21nox emacs20 xemacs215 xemacs214 } [m:s]
-EMACS_VERSION_MAJOR Integer [$system]
-EMACS_VERSION_MINOR Integer [$system]
-EMACS_VERSION_REQD List of { emacs22 emacs22nox emacs21 emacs21nox emacs20 xemacs215 xemacs214 } [m:as]
-ERROR_CAT ShellCommand [$system]
-ERROR_MSG ShellCommand [$system]
-EVAL_PREFIX InternalList of ShellWord [m:a,c:a]
-# ^^ FIXME: Looks like a type mismatch.
-EXPORT_SYMBOLS_LDFLAGS List of LdFlag [$system]
-EXTRACT_CMD ShellCommand [$system]
-EXTRACT_ELEMENTS List of Pathmask [$package_list]
-EXTRACT_ONLY List of Pathname [$package_list]
-EXTRACT_OPTS List of ShellWord [m:as,c:as]
-EXTRACT_OPTS_BIN List of ShellWord [m:as,c:as]
-EXTRACT_OPTS_LHA List of ShellWord [m:as,c:as]
-EXTRACT_OPTS_PAX List of ShellWord [m:as,c:as]
-EXTRACT_OPTS_RAR List of ShellWord [m:as,c:as]
-EXTRACT_OPTS_TAR List of ShellWord [m:as,c:as]
-EXTRACT_OPTS_ZIP List of ShellWord [m:as,c:as]
-EXTRACT_OPTS_ZOO List of ShellWord [m:as,c:as]
-EXTRACT_SUFX DistSuffix [$package]
-EXTRACT_USING { gtar nbtar pax } [$package]
-FAMBASE Pathname [$system]
-FAM_ACCEPTED List of { fam gamin } [$package]
-FAM_DEFAULT { fam gamin } [$user]
-FAM_TYPE { fam gamin } [$system]
-FETCH_BEFORE_ARGS List of ShellWord [m:as]
-FETCH_MESSAGE List of ShellWord [$package_list]
-FILESDIR RelativePkgPath [$package]
-FILES_SUBST List of ShellWord [$package_list]
-FILES_SUBST_SED List of ShellWord
-FIX_RPATH List of Varname [$package_list]
-FONTS_DIRS.* List of Pathname [m:as,c:a]
-GAMEDATAMODE FileMode [$system]
-GAMEGRP UserGroupName [$system]
-GAMEMODE FileMode [$system]
-GAMEOWN UserGroupName [$system]
-GCC_REQD List of Version [$package_list]
-GENERATE_PLIST List of ShellWord [$package_list]
-# ^^ List of Shellcommand, terminated with a semicolon
-GNU_ARCH { mips }
-GNU_CONFIGURE Yes [c:s,m:s]
-GNU_CONFIGURE_MANDIR Pathname [m:s,c:s]
-GNU_CONFIGURE_PREFIX Pathname [m:s]
-GNU_PROGRAM_PREFIX Identifier [$user]
-HAS_CONFIGURE Yes [m:s,c:s]
-HEADER_TEMPLATES List of Pathname [$package_list]
-HOMEPAGE URL [$package]
-INCOMPAT_CURSES InternalList of PlatformTriple [m:as]
-INCOMPAT_ICONV InternalList of PlatformTriple
-INFO_DIR Pathname
-# ^^ relative to PREFIX
-INFO_FILES Yes [$package]
-INSTALL ShellCommand [$system]
-INSTALLATION_DIRS List of PrefixPathname [$package_list]
-INSTALLATION_DIRS_FROM_PLIST Yes [$package]
-INSTALL_DATA ShellCommand [$system]
-INSTALL_DATA_DIR ShellCommand [$system]
-INSTALL_DIRS List of WrksrcSubdirectory [$package_list]
-INSTALL_FILE Pathname [m:s]
-INSTALL_GAME ShellCommand [$system]
-INSTALL_GAME_DATA ShellCommand [$system]
-INSTALL_LIB ShellCommand [$system]
-INSTALL_LIB_DIR ShellCommand [$system]
-INSTALL_MAKE_FLAGS List of ShellWord [$package_list]
-INSTALL_MAN ShellCommand [$system]
-INSTALL_MAN_DIR ShellCommand [$system]
-INSTALL_PROGRAM ShellCommand [$system]
-INSTALL_PROGRAM_DIR ShellCommand [$system]
-INSTALL_SCRIPT ShellCommand [$system]
-INSTALL_SCRIPTS_ENV List of ShellWord
-INSTALL_SCRIPT_DIR ShellCommand [$system]
-INSTALL_SRC List of Pathname [m:s,c:ds]
-INSTALL_TARGET List of Identifier [$package]
-INSTALL_TEMPLATES List of Pathname [m:as,c:ads]
-INSTALL_UNSTRIPPED YesNo [m:s,c:s]
-INTERACTIVE_STAGE List of { fetch extract configure build install } [$package]
-IS_BUILTIN.* YesNo_Indirectly [builtin.mk:psu]
-JAVA_CLASSPATH ShellWord [$package]
-JAVA_HOME Pathname [$package]
-JAVA_NAME Filename [$package]
-JAVA_UNLIMIT List of { cmdsize datasize stacksize } [$package_list]
-JAVA_WRAPPERS InternalList of Filename [$package_list]
-JAVA_WRAPPER_BIN.* Pathname [$package]
-KRB5BASE Pathname [$system]
-KRB5_ACCEPTED List of { heimdal mit-krb5 }
-KRB5_DEFAULT { heimdal mit-krb5 } [$user]
-KRB5_TYPE Unchecked [$system]
-LD ShellCommand [$system]
-LDFLAGS* List of LdFlag [$package_list]
-LIBGRP UserGroupName [$system]
-LIBMODE FileMode [$system]
-LIBOWN UserGroupName [$system]
-LIBOSSAUDIO Pathname [$system]
-LIBS* List of LdFlag [$package_list]
-LIBTOOL ShellCommand [$system]
-LIBTOOL_OVERRIDE List of Pathmask [m:as]
-LICENCE License [m:s,c:s,o:s]
-LICENSE License [m:s,c:s,o:s]
-LINKER_RPATH_FLAG ShellWord [$system]
-LOWER_OPSYS Identifier [$system]
-LTCONFIG_OVERRIDE List of Pathmask [m:as,c:a]
-MACHINE_ARCH Identifier [$system]
-MACHINE_GNU_PLATFORM PlatformTriple [$system]
-MAINTAINER Mail_Address [m:s,c:ds]
-MAKE ShellCommand [$system]
-MAKEFLAGS List of ShellWord [$package_list]
-MAKEVARS List of Varname [builtin.mk:a,b:a,h:a]
-MAKE_DIRS List of Pathname [$package_list]
-MAKE_DIRS_PERMS List of ShellWord [$package_list]
-MAKE_ENV List of ShellWord [$package_list]
-MAKE_FILE Pathname [$package]
-MAKE_FLAGS List of ShellWord [$package_list]
-MAKE_JOBS Integer [$user]
-MAKE_JOBS_SAFE YesNo [$package]
-MAKE_PROGRAM ShellCommand [$system]
-MANCOMPRESSED YesNo [m:s,c:ds]
-MANCOMPRESSED_IF_MANZ Yes [m:s,c:ds]
-MANGRP UserGroupName [$system]
-MANMODE FileMode [$system]
-MANOWN UserGroupName [$system]
-MASTER_SITES List of URL [$package_list]
-MASTER_SITE_APACHE List of URL [$system]
-MASTER_SITE_BACKUP List of URL [$system]
-MASTER_SITE_CYGWIN List of URL [$system]
-MASTER_SITE_DEBIAN List of URL [$system]
-MASTER_SITE_FREEBSD List of URL [$system]
-MASTER_SITE_FREEBSD_LOCAL List of URL [$system]
-MASTER_SITE_GENTOO List of URL [$system]
-MASTER_SITE_GNOME List of URL [$system]
-MASTER_SITE_GNU List of URL [$system]
-MASTER_SITE_GNUSTEP List of URL [$system]
-MASTER_SITE_IFARCHIVE List of URL [$system]
-MASTER_SITE_KDE List of URL [$system]
-MASTER_SITE_LOCAL List of URL [$system]
-MASTER_SITE_MOZILLA List of URL [$system]
-MASTER_SITE_MYSQL List of URL [$system]
-MASTER_SITE_OPENOFFICE List of URL [$system]
-MASTER_SITE_PERL_CPAN List of URL [$system]
-MASTER_SITE_R_CRAN List of URL [$system]
-MASTER_SITE_SOURCEFORGE List of URL [$system]
-MASTER_SITE_SOURCEFORGE_JP List of URL [$system]
-MASTER_SITE_SUNSITE List of URL [$system]
-MASTER_SITE_SUSE List of URL [$system]
-MASTER_SITE_TEX_CTAN List of URL [$system]
-MASTER_SITE_XCONTRIB List of URL [$system]
-MASTER_SITE_XEMACS List of URL [$system]
-MESSAGE_SRC List of Pathname [$package_list]
-MESSAGE_SUBST List of ShellWord [c:a,m:a,o:a]
-MYSQL_VERSIONS_ACCEPTED List of { 40 41 50 } [m:s]
-MYSQL_VERSION_DEFAULT Version [$user]
-NM ShellCommand [$system]
-NONBINMODE FileMode [$system]
-NOT_FOR_COMPILER List of { ccc gcc icc ido mipspro mipspro-ucode sunpro xlc } [$package]
-NOT_FOR_PLATFORM InternalList of PlatformTriple [$package_list]
-NOT_FOR_UNPRIVILEGED YesNo [$package]
-NO_BIN_ON_CDROM Restricted [m:s,c:s]
-NO_BIN_ON_FTP Restricted [m:s,c:s]
-NO_BUILD Yes [m:s,c:s,Makefile.*:ds]
-NO_CHECKSUM Yes [$package]
-NO_CONFIGURE Yes [$package]
-NO_EXPORT_CPP Yes [m:s]
-NO_EXTRACT Yes [$package]
-NO_INSTALL_MANPAGES Yes [$package]
-# ^^ only has an effect for Imake packages.
-NO_MTREE Yes [$package]
-NO_PACKAGE Message [m:s]
-NO_PKGTOOLS_REQD_CHECK Yes [m:s]
-NO_SRC_ON_CDROM Restricted [m:s,c:s]
-NO_SRC_ON_FTP Restricted [m:s,c:s]
-ONLY_FOR_COMPILER List of { ccc gcc icc ido mipspro mipspro-ucode sunpro xlc } [$package_list]
-ONLY_FOR_PLATFORM InternalList of PlatformTriple [$package_list]
-ONLY_FOR_UNPRIVILEGED YesNo [$package]
-OPSYS Identifier [$system]
-OPSYSVARS List of Varname [m:a,c:a]
-OSVERSION_SPECIFIC Yes [m:s,c:s]
-OS_VERSION Version [$system]
-OVERRIDE_DIRDEPTH* Integer [$package]
-OVERRIDE_GNU_CONFIG_SCRIPTS Yes [$package]
-OWN_DIRS List of Pathname [$package_list]
-OWN_DIRS_PERMS List of ShellWord [$package_list]
-PAMBASE Pathname [$system]
-PAM_ACCEPTED List of { linux-pam openpam solaris-pam }
-PAM_DEFAULT { linux-pam openpam solaris-pam } [$user]
-PAM_TYPE { linux-pam openpam solaris-pam } [$system]
-PATCHDIR RelativePkgPath [m:s,c:ds]
-PATCHFILES List of Filename [$package_list]
-PATCH_ARGS List of ShellWord
-PATCH_DIST_ARGS List of ShellWord [m:as]
-PATCH_DIST_CAT ShellCommand
-PATCH_DIST_STRIP* ShellWord [m:s, c:s, b:, builtin.mk:, *.mk:s]
-PATCH_SITES List of URL [m:s,o:s,c:s]
-PATCH_STRIP ShellWord
-PERL5_USE_PACKLIST YesNo [$package]
-PERL5_PACKLIST List of Perl5Packlist [m:s,o:sa]
-PERL5_PACKLIST_DIR Pathname []
-PGSQL_PREFIX Pathname [$system]
-PGSQL_VERSIONS_ACCEPTED List of { 73 74 80 }
-PGSQL_VERSION_DEFAULT Version [$user]
-PG_LIB_EXT { dylib so } [$system]
-PGSQL_TYPE { postgresql81-client postgresql80-client } [$system]
-PGPKGSRCDIR Pathname [$system]
-PHASE_MSG ShellCommand [$system]
-PKGBASE Identifier [$system]
-PKGCONFIG_OVERRIDE List of Pathmask [m:as,c:a]
-PKGDIR RelativePkgDir [$package]
-PKGDIRMODE FileMode [$system]
-PKGLOCALEDIR Pathname [$system]
-PKGNAME PkgName [$package]
-PKGNAME_NOREV PkgName [$system]
-PKGPATH Pathname [$system]
-PKGREPOSITORY Unchecked []
-PKGREVISION PkgRevision [m:s]
-PKGSRCDIR Pathname [$system]
-PKGTOOLS_ENV List of ShellWord
-PKGVERSION Version [$system]
-PKGWILDCARD Filemask [$system]
-PKG_ADMIN ShellCommand [$system]
-PKG_APACHE { apache13 apache2 apache22 } [$system]
-PKG_APACHE_ACCEPTED List of { apache13 apache2 apache22 }
-PKG_APACHE_DEFAULT { apache13 apache2 apache22 } [$user]
-PKG_CONFIG Yes [$user]
-# ^^ No, this is not the popular command from GNOME, but the setting
-# whether the pkgsrc user wants configuration files automatically
-# installed or not.
-PKG_CREATE ShellCommand [$system]
-PKG_DBDIR Pathname [$system]
-PKG_DEBUG_LEVEL Integer [$cmdline]
-PKG_DEFAULT_OPTIONS List of Option [$user]
-PKG_DELETE ShellCommand [$system]
-PKG_DESTDIR_SUPPORT List of { destdir user-destdir } [m:s,c:s]
-PKG_FAIL_REASON List of ShellWord [$package_list]
-PKG_GECOS.* Message [m:s]
-PKG_GID.* Integer [m:s]
-PKG_GROUPS List of ShellWord [m:as]
-PKG_HOME.* Pathname [m:s]
-PKG_HACKS List of Identifier [h:a]
-PKG_INFO ShellCommand [$system]
-PKG_INSTALLATION_TYPES List of { overwrite pkgviews } [m:s,c:s]
-PKG_JAVA_HOME Pathname [$system]
-PKG_JVM { \
- blackdown-jdk13 \
- jdk jdk14 \
- kaffe \
- sun-jdk13 sun-jdk14 sun-jdk15 \
- } [$system]
-PKG_JVMS_ACCEPTED List of { \
- blackdown-jdk13 \
- jdk jdk14 \
- kaffe \
- sun-jdk13 sun-jdk14 sun-jdk15 \
- } [m:s,c:ds]
-PKG_JVM_DEFAULT { \
- blackdown-jdk13 \
- jdk jdk14 \
- kaffe \
- sun-jdk13 sun-jdk14 sun-jdk15 \
- } [$user]
-PKG_LEGACY_OPTIONS List of Option
-PKG_LIBTOOL Pathname [m:s]
-PKG_OPTIONS InternalList of Option [bsd.options.mk:s,*:pu]
-PKG_OPTIONS.* InternalList of Option [$user]
-PKG_OPTIONS_DEPRECATED_WARNINGS List of ShellWord
-PKG_OPTIONS_GROUP.* InternalList of Option [o:s,m:s]
-PKG_OPTIONS_LEGACY_OPTS InternalList of Unchecked [m:a,c:a,o:a]
-PKG_OPTIONS_LEGACY_VARS InternalList of Unchecked [m:a,c:a,o:a]
-PKG_OPTIONS_NONEMPTY_SETS InternalList of Identifier
-PKG_OPTIONS_OPTIONAL_GROUPS InternalList of Identifier [o:as]
-PKG_OPTIONS_REQUIRED_GROUPS InternalList of Identifier [o:s,m:s]
-PKG_OPTIONS_SET.* InternalList of Option
-PKG_OPTIONS_VAR PkgOptionsVar [o:s,m:s,c:s, bsd.options.mk:p]
-PKG_PRESERVE Yes [m:s]
-PKG_SHELL Pathname [m:s,c:s]
-PKG_SHELL.* Pathname [m:s,c:s]
-PKG_SHLIBTOOL Pathname
-PKG_SKIP_REASON List of ShellWord [$package_list]
-PKG_SUGGESTED_OPTIONS List of Option [o:as,m:as,c:s]
-PKG_SUPPORTED_OPTIONS List of Option [o:as,m:as,c:s]
-PKG_SYSCONFDIR* Pathname [$package]
-PKG_SYSCONFBASEDIR Pathname [$system]
-PKG_SYSCONFSUBDIR Pathname [$package]
-PKG_SYSCONFVAR Identifier
-# ^^ FIXME: name/type mismatch.
-PKG_UID Integer [m:s]
-PKG_USERS List of ShellWord [m:as]
-PKG_USE_KERBEROS Yes [m:s,c:s]
-PLIST_SRC List of RelativePkgPath [$package_list]
-PLIST_SUBST List of ShellWord [$package_list]
-PLIST_TYPE { dynamic static }
-PREPEND_PATH List of Pathname
-PREFIX Pathname [*:u] # ???
-PRINT_PLIST_AWK AwkCommand [*:a]
-PTHREAD_AUTO_VARS YesNo [m:s]
-PTHREAD_CFLAGS List of CFlag [$system]
-PTHREAD_LDFLAGS List of LdFlag [$system]
-PTHREAD_LIBS List of LdFlag [$system]
-PTHREAD_OPTS List of { native optional require } [m:as,c:a,b:a]
-PTHREAD_TYPE Identifier [$system]
-# ^^ or "native" or "none".
-PYPKGPREFIX { py15 py20 py21 py22 py23 py24 } [*:pu, pyversion.mk:s, *:]
-PYTHON_FOR_BUILD_ONLY Yes [$package]
-PYTHON_PATCH_SCRIPTS List of Pathmask [$package_list]
-PYTHON_VERSIONS_ACCEPTED List of Version [$package]
-PYTHON_VERSIONS_INCOMPATIBLE List of Version [$package]
-PYTHON_VERSION_DEFAULT Version [$user]
-RANLIB ShellCommand [$system]
-RCD_SCRIPTS List of Filename [$package_list]
-RCD_SCRIPT_SRC.* List of Pathname [m:s]
-REPLACE.* String [m:s]
-REPLACE_AWK List of Pathmask [$package_list]
-REPLACE_BASH List of Pathmask [$package_list]
-REPLACE_EMACS List of Pathmask
-REPLACE_FILES.* List of Pathmask [m:as,c:as]
-REPLACE_INTERPRETER List of Identifier [m:a,c:a]
-REPLACE_PERL List of Pathmask [$package_list]
-REPLACE_SH List of Pathmask [$package_list]
-REQD_DIRS List of Pathname [$package_list]
-REQD_DIRS_PERMS List of ShellWord [$package_list]
-REQD_FILES List of Pathname [$package_list]
-REQD_FILES_MODE { 0644 0640 0600 0400 } [$package]
-RESTRICTED Message [$package]
-ROOT_USER UserGroupName [$user]
-ROOT_GROUP UserGroupName [$user]
-RUN ShellCommand [$system]
-SCRIPTS_ENV List of ShellWord [m:a,c:a]
-SHAREGRP UserGroupName [$system]
-SHAREMODE FileMode [$system]
-SHAREOWN UserGroupName [$system]
-SHCOMMENT ShellCommand [$system]
-SHLIB_HANDLING { YES NO no }
-SHLIBTOOL ShellCommand []
-SHLIBTOOL_OVERRIDE List of Pathmask [m:as,c:a]
-SITES.* List of URL [m:asu,c:asu,o:asu]
-SPECIAL_PERMS List of ShellWord [$package_list]
-STEP_MSG ShellCommand [$system]
-SUBDIR List of Filename [Makefile:a,*:]
-SUBST_CLASSES List of Identifier [m:a,c:a,h:a,Makefile.*:a]
-SUBST_FILES.* List of Pathmask [m:as,c:as,h:as,o:as,Makefile.*:as]
-SUBST_FILTER_CMD.* ShellCommand [m:s,c:s,h:s,o:s,Makefile.*:s]
-SUBST_MESSAGE.* Message [m:s,c:s,h:s,o:s,Makefile.*:s]
-SUBST_SED.* SedCommands [m:as,c:as,h:as,o:as,Makefile.*:as]
-SUBST_STAGE.* Stage [$package]
-SVR4_PKGNAME SVR4PkgName [$package]
-TEST_DIRS List of WrksrcSubdirectory [$package_list]
-TEST_ENV List of ShellWord [$package_list]
-TEST_TARGET List of Identifier [m:s,c:ds]
-TEX_ACCEPTED List of { teTeX1 teTeX2 teTeX3 } [m:s,c:s]
-TEX_DEPMETHOD { build run } [m:s,c:s]
-TEXINFO_REQD List of Version [$package_list]
-TOOLS_ALIASES List of Filename [$system]
-TOOLS_BROKEN List of Tool [$system]
-TOOLS_CREATE List of Tool [$system]
-TOOLS_GNU_MISSING List of Tool [$system]
-TOOLS_NOOP List of Tool [$system]
-TOOLS_PATH.* Pathname [$system]
-TOOLS_PLATFORM.* ShellCommand [$system]
-TOUCH_FLAGS List of ShellWord [$system]
-UNLIMIT_RESOURCES List of { datasize stacksize memorysize } [m:as,c:a]
-UNPRIVILEGED_USER UserGroupName [$user]
-UNPRIVILEGED_GROUP UserGroupName [$user]
-UNWRAP_FILES List of Pathmask [$package_list]
-UPDATE_TARGET List of Identifier [$user]
-USE_BSD_MAKEFILE Yes [$package]
-USE_BUILTIN.* YesNo_Indirectly [builtin.mk:s]
-USE_CROSSBASE Yes [m:s]
-USE_DIRS List of { \
- gnome1-1.0 gnome1-1.5 \
- gnome2-1.3 gnome2-1.5 gnome2-1.6 \
- kde3-1.0 \
- texmf-1.0 texmf-1.1 texmf-1.2 \
- texmf-1.3 texmf-1.4 \
- theme-1.0 theme-1.1 \
- xdg-1.1 xdg-1.2 xdg-1.3 xdg-1.4 \
- xorg-1.0 \
- } [m:a,c:a]
-USE_GNU_CONFIGURE_HOST YesNo [$package]
-USE_GNU_ICONV Yes [m:s,c:s,o:s]
-USE_GNU_READLINE Yes [m:s,c:s,o:s]
-USE_IMAKE Yes [m:s]
-USE_JAVA { run yes } [$package]
-USE_JAVA2 { YES yes no 1.4 1.5 } [$package]
-USE_LANGUAGES List of { c c99 c++ fortran java objc } [m:s,c:s,o:s]
-USE_LIBTOOL Yes [$package]
-USE_MAKEINFO Yes [$package]
-USE_MSGFMT_PLURALS Yes [$package]
-USE_NCURSES Yes [$package]
-USE_OLD_DES_API YesNo [$package]
-USE_PKGINSTALL Yes [$package]
-USE_PKGLOCALEDIR YesNo [$package]
-USE_PKGSRC_GCC Yes [$user]
-USE_TOOLS List of Tool [*:a]
-USE_X11 Yes [$package]
-USE_X11BASE Yes [$package]
-WARNING_MSG ShellCommand [$system]
-WARNING_CAT ShellCommand [$system]
-WRAPPER_REORDER_CMDS List of WrapperReorder [b:a,c:a,m:a]
-WRAPPER_TRANSFORM_CMDS List of WrapperTransform [b:a,c:a,m:a]
-WRKDIR Pathname [$system]
-WRKSRC WrkdirSubdirectory [$package]
-X11_PKGSRCDIR.* Pathname [$system]
-X11PREFIX Pathname [$system]
-XAW_TYPE { 3d neXtaw standard xpm } [$user]
-XMKMF_FLAGS List of ShellWord
diff --git a/pkgtools/pkglint/files/pkglint.0 b/pkgtools/pkglint/files/pkglint.0
deleted file mode 100644
index 4fe7fa253b8..00000000000
--- a/pkgtools/pkglint/files/pkglint.0
+++ /dev/null
@@ -1,198 +0,0 @@
-PKGLINT(1) NetBSD General Commands Manual PKGLINT(1)
-
-NNAAMMEE
- ppkkgglliinntt -- static analyzer for pkgsrc packages
-
-SSYYNNOOPPSSIISS
- ppkkgglliinntt [--ooppttiioonnss] [_d_i_r _._._.]
-
-DDEESSCCRRIIPPTTIIOONN
- ppkkgglliinntt attempts to detect features of the named pkgsrc packages that are
- likely to be bugs, or that are simply deprecated.
-
- OOppttiioonnss
- --CC{{[[nnoo--]]cchheecckk,,......}} Enable or disable specific checks. For a list of
- checks, see below.
-
- --DD{{[[nnoo--]]ddeebbuugg,,......}} Enable or disable debugging categories. For a list
- of categories, see below.
-
- --FF|----aauuttooffiixx Repair trivial things automatically.
-
- --II Show the _M_a_k_e_f_i_l_e that is constructed by including
- all the files that are slurped in via `.include'
- directives. This flag is mainly for debugging.
-
- --RR|----rrccssiiddssttrriinngg Allow other RCS Id strings than NetBSD. Multiple
- strings may be concatenated with `|'.
-
- --VV|----vveerrssiioonn Print the current ppkkgglliinntt version number and exit.
-
- --WW{{[[nnoo--]]wwaarrnn,,......}} Enable or disable specific warnings. For a list of
- warnings, see below.
-
- --ee|----eexxppllaaiinn Print further explanations for diagnostics. Some-
- times the reasons for diagnostics are not obvious and
- need further explanation.
-
- --gg|----ggcccc--oouuttppuutt--ffoorrmmaatt
- Use a format for the diagnostics that is understood
- by most programs, especially editors, so they can
- provide a point-and-goto interface.
-
- --hh|----hheellpp Show the summary of command line options, then exit.
-
- --ii|----iimmppoorrtt Check if a package is ready to be imported into
- pkgsrc. This is especially useful for packages from
- the pkgsrc-wip project.
-
- --qq|----qquuiieett Don't print the errors and warnings summary before
- terminating.
-
- --rr|----rreeccuurrssiivvee Check subdirectories, too. The subdirectories are
- those that are mentioned in a `SUBDIR+=' line.
-
- --ss|----ssoouurrccee For all diagnostics having file and line number
- information, show the source code along with the
- diagnostics.
-
- CChheecckkss
- aallll Enable all checks.
-
- nnoonnee Disable all checks.
-
- [[nnoo--]]AALLTTEERRNNAATTIIVVEESS Check the alternatives file.
-
- [[nnoo--]]DDEESSCCRR Check the DESCR file.
-
- [[nnoo--]]IINNSSTTAALLLL Check the INSTALL and DEINSTALL scripts.
-
- [[nnoo--]]MMaakkeeffiillee Check the package Makefile, including all included
- files.
-
- [[nnoo--]]MMEESSSSAAGGEE Check MESSAGE files.
-
- [[nnoo--]]PPLLIISSTT Check PLIST files.
-
- [[nnoo--]]bbll33 Check buildlink3 Makefiles.
-
- [[nnoo--]]ddiissttiinnffoo Check the distinfo file.
-
- [[nnoo--]]eexxttrraa Check remaining files in the package directory.
-
- [[nnoo--]]mmkk Check Makefile fragments besides buildlink3.
-
- [[nnoo--]]ppaattcchheess Check the pkgsrc specific patch files.
-
- DDeebbuuggggiinngg OOppttiioonnss
- aallll Enable all debugging options.
-
- nnoonnee Disable all debugging options.
-
- [[nnoo--]]iinncclluuddee Show the pathnames of the included Makefiles.
-
- [[nnoo--]]mmiisscc Some debugging stuff that hasn't made it into its own
- category.
-
- [[nnoo--]]ppaattcchheess Print the states of the patch file parser.
-
- [[nnoo--]]qquuoottiinngg Additional information about why variables should be
- quoted or not.
-
- [[nnoo--]]sshheellll Parser information from the shell word and the shell
- command parsers.
-
- [[nnoo--]]ttoooollss Additional information about the tools from the tools
- framework.
-
- [[nnoo--]]ttrraaccee Print the names of subroutines and their arguments as
- they are entered.
-
- [[nnoo--]]uunncchheecckkeedd Show the things that pkglint cannot currently check.
- These are mostly due to unresolved make variables.
-
- [[nnoo--]]uunnuusseedd Show which variables are detected as used, and so
- will not generate an ``unused variable'' warning.
-
- [[nnoo--]]vvaarrttyyppeess Additional information about the variable types.
-
- [[nnoo--]]vvaarruussee Information about the contexts in which variables are
- used.
-
- WWaarrnniinnggss
- aallll Enable all warnings.
-
- nnoonnee Disable all warnings.
-
- [[nnoo--]]aabbssnnaammee Warn if a file contains an absolute pathname.
-
- [[nnoo--]]ddiirreeccttccmmdd Warn if a system command name is used instead of a
- variable (e.g. sed instead of ${SED}).
-
- [[nnoo--]]eexxttrraa Emit some additional warnings that are not enabled by
- default, for whatever reason.
-
- [[nnoo--]]oorrddeerr Warn if Makefile variables are not in the preferred
- order.
-
- [[nnoo--]]ppeerrmm Warn if a variable is used or defined outside its
- specified scope.
-
- [[nnoo--]]pplliisstt--ddeepprr Warn if deprecated pathnames are used in _P_L_I_S_T files.
- This warning is disabled by default.
-
- [[nnoo--]]pplliisstt--ssoorrtt Warn if items of a PLIST file are not sorted alpha-
- betically. This warning is disabled by default.
-
- [[nnoo--]]qquuoottiinngg Warn for possibly invalid quoting of make variables
- in shell programs and shell variables themselves.
-
- [[nnoo--]]ssppaaccee Emit notes for inconsistent use of white-space.
-
- [[nnoo--]]ssttyyllee Warn for stylistic issues that don't affect the build
- process.
-
- [[nnoo--]]ttyyppeess Warn for some _M_a_k_e_f_i_l_e variables if their assigned
- values do not match their type.
-
- [[nnoo--]]vvaarroorrddeerr Warn if the variables in a package _M_a_k_e_f_i_l_es are not
- ordered in the way it is described the pkgsrc guide.
-
- OOtthheerr aarrgguummeennttss
- _d_i_r _._._. The pkgsrc directories to be checked. If omit-
- ted, the current directory is checked.
-
-FFIILLEESS
- pkgsrc/mk/* Files from the pkgsrc infrastructure.
-
-EEXXAAMMPPLLEESS
- ppkkgglliinntt --CCnnoonnee,,ppaattcchheess ..
- Checks the patches of the package in the current directory.
-
- ppkkgglliinntt --WWaallll //uussrr//ppkkggssrrcc//ddeevveell
- Checks the category Makefile and reports any warnings it can
- find.
-
- ppkkgglliinntt --rr --RR ''NNeettBBSSDD||IIdd'' //uussrr//ppkkggssrrcc
- Check the whole pkgsrc tree while allowing `NetBSD' or `Id'
- as the RCS Id.
-
-DDIIAAGGNNOOSSTTIICCSS
- Diagnostics are written to the standard output.
-
- ERROR: ... Errors should be fixed before a package is committed to
- pkgsrc.
-
- WARN: ... Warnings generally should be fixed, but they are not as
- critical as errors.
-
-AAUUTTHHOORRSS
- Roland Illig <rillig@NetBSD.org>
-
-BBUUGGSS
- Many more checks could be added.
-
- If you don't understand the messages, feel free to ask on the
- <tech-pkg@NetBSD.org> mailing list.
-
-NetBSD 3.0 July 27, 2006 NetBSD 3.0
diff --git a/pkgtools/pkglint/files/pkglint.1 b/pkgtools/pkglint/files/pkglint.1
deleted file mode 100644
index 6381987b995..00000000000
--- a/pkgtools/pkglint/files/pkglint.1
+++ /dev/null
@@ -1,229 +0,0 @@
-.\" $NetBSD: pkglint.1,v 1.43 2006/10/22 05:26:41 rillig Exp $
-.\" From FreeBSD: portlint.1,v 1.8 1997/11/25 14:53:14 itojun Exp
-.\"
-.\" Copyright (c) 1997 by Jun-ichiro Itoh <itojun@itojun.org>.
-.\" All Rights Reserved. Absolutely no warranty.
-.\"
-.\" Roland Illig <roland.illig@gmx.de>, 2004, 2005.
-.\" Roland Illig <rillig@NetBSD.org>, 2005, 2006.
-.\"
-.Dd July 27, 2006
-.Dt PKGLINT 1
-.Sh NAME
-.Nm pkglint
-.Nd static analyzer for pkgsrc packages
-.Sh SYNOPSIS
-.Nm pkglint
-.Op Fl options
-.Op Ar dir ...
-.Sh DESCRIPTION
-.Nm
-attempts to detect features of the named pkgsrc packages that are likely
-to be bugs, or that are simply deprecated.
-.Pp
-.\" =======================================================================
-.Ss Options
-.Bl -tag -width 18n
-.It Fl C{[no-]check,...}
-Enable or disable specific checks.
-For a list of checks, see below.
-.It Fl D{[no-]debug,...}
-Enable or disable debugging categories.
-For a list of categories, see below.
-.It Fl F Ns | Ns Fl -autofix
-Repair trivial things automatically.
-.It Fl I
-Show the
-.Pa Makefile
-that is constructed by including all the files that
-are slurped in via
-.Ql .include
-directives.
-This flag is mainly for debugging.
-.It Fl R Ns | Ns Fl -rcsidstring
-Allow other RCS Id strings than NetBSD.
-Multiple strings may be concatenated with
-.Ql | .
-.It Fl V Ns | Ns Fl -version
-Print the current
-.Nm
-version number and exit.
-.It Fl W{[no-]warn,...}
-Enable or disable specific warnings.
-For a list of warnings, see below.
-.It Fl e Ns | Ns Fl -explain
-Print further explanations for diagnostics.
-Sometimes the reasons for diagnostics are not obvious and need further
-explanation.
-.It Fl g Ns | Ns Fl -gcc-output-format
-Use a format for the diagnostics that is understood by most programs,
-especially editors, so they can provide a point-and-goto interface.
-.It Fl h Ns | Ns Fl -help
-Show the summary of command line options, then exit.
-.It Fl i Ns | Ns Fl -import
-Check if a package is ready to be imported into pkgsrc.
-This is especially useful for packages from the pkgsrc-wip project.
-.It Fl q Ns | Ns Fl -quiet
-Don't print the errors and warnings summary before terminating.
-.It Fl r Ns | Ns Fl -recursive
-Check subdirectories, too.
-The subdirectories are those that are mentioned in a
-.Ql SUBDIR+=
-line.
-.It Fl s Ns | Ns Fl -source
-For all diagnostics having file and line number information, show the
-source code along with the diagnostics.
-.El
-.Pp
-.\" =======================================================================
-.Ss Checks
-.Bl -tag -width 18n
-.It Cm all
-Enable all checks.
-.It Cm none
-Disable all checks.
-.It Cm [no-]ALTERNATIVES
-Check the alternatives file.
-.It Cm [no-]DESCR
-Check the DESCR file.
-.It Cm [no-]INSTALL
-Check the INSTALL and DEINSTALL scripts.
-.It Cm [no-]Makefile
-Check the package Makefile, including all included files.
-.It Cm [no-]MESSAGE
-Check MESSAGE files.
-.It Cm [no-]PLIST
-Check PLIST files.
-.It Cm [no-]bl3
-Check buildlink3 Makefiles.
-.It Cm [no-]distinfo
-Check the distinfo file.
-.It Cm [no-]extra
-Check remaining files in the package directory.
-.It Cm [no-]mk
-Check Makefile fragments besides buildlink3.
-.It Cm [no-]patches
-Check the pkgsrc specific patch files.
-.El
-.Pp
-.\" =======================================================================
-.Ss Debugging Options
-.Bl -tag -width 18n
-.It Cm all
-Enable all debugging options.
-.It Cm none
-Disable all debugging options.
-.It Cm [no-]include
-Show the pathnames of the included Makefiles.
-.It Cm [no-]misc
-Some debugging stuff that hasn't made it into its own category.
-.It Cm [no-]patches
-Print the states of the patch file parser.
-.It Cm [no-]quoting
-Additional information about why variables should be quoted or not.
-.It Cm [no-]shell
-Parser information from the shell word and the shell command parsers.
-.It Cm [no-]tools
-Additional information about the tools from the tools framework.
-.It Cm [no-]trace
-Print the names of subroutines and their arguments as they are entered.
-.It Cm [no-]unchecked
-Show the things that pkglint cannot currently check.
-These are mostly due to unresolved make variables.
-.It Cm [no-]unused
-Show which variables are detected as used, and so will not generate an
-.Dq unused variable
-warning.
-.It Cm [no-]vartypes
-Additional information about the variable types.
-.It Cm [no-]varuse
-Information about the contexts in which variables are used.
-.El
-.Pp
-.\" =======================================================================
-.Ss Warnings
-.Bl -tag -width 18n
-.It Cm all
-Enable all warnings.
-.It Cm none
-Disable all warnings.
-.It Cm [no-]absname
-Warn if a file contains an absolute pathname.
-.It Cm [no-]directcmd
-Warn if a system command name is used instead of a variable (e.g. sed
-instead of ${SED}).
-.It Cm [no-]extra
-Emit some additional warnings that are not enabled by default,
-for whatever reason.
-.It Cm [no-]order
-Warn if Makefile variables are not in the preferred order.
-.It Cm [no-]perm
-Warn if a variable is used or defined outside its specified scope.
-.It Cm [no-]plist-depr
-Warn if deprecated pathnames are used in
-.Pa PLIST
-files.
-This warning is disabled by default.
-.It Cm [no-]plist-sort
-Warn if items of a PLIST file are not sorted alphabetically.
-This warning is disabled by default.
-.It Cm [no-]quoting
-Warn for possibly invalid quoting of make variables in shell programs
-and shell variables themselves.
-.It Cm [no-]space
-Emit notes for inconsistent use of white-space.
-.It Cm [no-]style
-Warn for stylistic issues that don't affect the build process.
-.It Cm [no-]types
-Warn for some
-.Pa Makefile
-variables if their assigned values do not match
-their type.
-.It Cm [no-]varorder
-Warn if the variables in a package
-.Pa Makefile Ns
-s are not ordered in the way it is described the pkgsrc guide.
-.El
-.Pp
-.\" =======================================================================
-.Ss Other arguments
-.Bl -tag -width 18n -offset indent
-.It Ar dir ...
-The pkgsrc directories to be checked.
-If omitted, the current directory is checked.
-.El
-.Sh FILES
-.Bl -tag -width pkgsrc/mk/* -compact
-.It Pa pkgsrc/mk/*
-Files from the pkgsrc infrastructure.
-.El
-.Sh EXAMPLES
-.Bl -tag -width Fl
-.It Ic pkglint \-Cnone,patches \&.
-Checks the patches of the package in the current directory.
-.It Ic pkglint \-Wall /usr/pkgsrc/devel
-Checks the category Makefile and reports any warnings it can find.
-.It Ic pkglint -r \-R 'NetBSD|Id' /usr/pkgsrc
-Check the whole pkgsrc tree while allowing
-.Ql NetBSD
-or
-.Ql Id
-as the RCS Id.
-.El
-.Sh DIAGNOSTICS
-Diagnostics are written to the standard output.
-.Bl -tag -width "WARN: foobaa"
-.It ERROR: ...
-Errors should be fixed before a package is committed to pkgsrc.
-.It WARN: ...
-Warnings generally should be fixed, but they are not as critical as
-errors.
-.El
-.Sh AUTHORS
-.An Roland Illig Aq rillig@NetBSD.org
-.Sh BUGS
-Many more checks could be added.
-.Pp
-If you don't understand the messages, feel free to ask on the
-.Aq tech-pkg@NetBSD.org
-mailing list.
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
deleted file mode 100644
index f25cd349b34..00000000000
--- a/pkgtools/pkglint/files/pkglint.pl
+++ /dev/null
@@ -1,7936 +0,0 @@
-#! @PERL@
-# $NetBSD: pkglint.pl,v 1.703 2007/03/08 17:42:56 rillig Exp $
-#
-
-# pkglint - static analyzer and checker for pkgsrc packages
-#
-# Written by:
-# Roland Illig <rillig@NetBSD.org>
-#
-# Based on work by:
-# Hubert Feyrer <hubertf@NetBSD.org>
-# Thorsten Frueauf <frueauf@NetBSD.org>
-# Thomas Klausner <wiz@NetBSD.org>
-# and others.
-#
-# Based on FreeBSD's portlint by:
-# Jun-ichiro itojun Hagino <itojun@itojun.org>
-# Yoshishige Arai <ryo2@on.rim.or.jp>
-#
-# FreeBSD Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# Copyright(c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>.
-# All rights reserved.
-# Freely redistributable. Absolutely no warranty.
-
-#==========================================================================
-# Note: The @EXPORT clauses in the packages must be in a BEGIN block,
-# because otherwise the names starting with an uppercase letter are not
-# recognized as subroutines but as file handles.
-#==========================================================================
-
-use strict;
-use warnings;
-
-package PkgLint::Util;
-#==========================================================================
-# This package is a catch-all for subroutines that are not application-spe-
-# cific. Currently it contains the boolean constants C<false> and C<true>,
-# as well as a function to print text in a table format, and a function
-# that converts an array into a hash. The latter is just for convenience
-# because I don't know of a Perl operator similar to qw() that can be used
-# for creating a hash.
-#==========================================================================
-BEGIN {
- use Exporter;
- use vars qw(@ISA @EXPORT_OK);
- @ISA = qw(Exporter);
- @EXPORT_OK = qw(
- assert
- false true dont_know doesnt_matter
- min max
- array_to_hash normalize_pathname print_table
- );
-}
-
-use enum qw(false true dont_know doesnt_matter);
-
-sub assert($$) {
- my ($cond, $msg) = @_;
- my (@callers, $n);
-
- if (!$cond) {
- print STDERR ("FATAL: Assertion failed: ${msg}.\n");
-
- for ($n = 0; my @info = caller($n); $n++) {
- push(@callers, [$info[2], $info[3]]);
- }
-
- for (my $i = $#callers; $i >= 0; $i--) {
- my $info = $callers[$i];
- printf STDERR (" line %4d called %s\n", $info->[0], $info->[1]);
- }
- exit(1);
- }
-}
-
-sub min($$) {
- my ($a, $b) = @_;
-
- return ($a < $b) ? $a : $b;
-}
-
-sub max($$) {
- my ($a, $b) = @_;
-
- return ($a > $b) ? $a : $b;
-}
-
-# Prints the C<$table> on the C<$out> stream. The C<$table> shall be an
-# array of rows, each row shall be an array of cells, and each cell shall
-# be a string.
-sub print_table($$) {
- my ($out, $table) = @_;
- my (@width) = ();
- foreach my $row (@{$table}) {
- foreach my $i (0..$#{$row}) {
- if (!defined($width[$i]) || length($row->[$i]) > $width[$i]) {
- $width[$i] = length($row->[$i]);
- }
- }
- }
- foreach my $row (@{$table}) {
- my ($max) = ($#{$row});
- foreach my $i (0..$max) {
- if ($i != 0) {
- print $out (" ");
- }
- print $out ($row->[$i]);
- if ($i != $max) {
- print $out (" " x ($width[$i] - length($row->[$i])));
- }
- }
- print $out ("\n");
- }
-}
-
-sub array_to_hash(@) {
- my ($result) = {};
-
- foreach my $arg (@_) {
- $result->{$arg} = 1;
- }
- return $result;
-}
-
-sub normalize_pathname($) {
- my ($fname) = @_;
-
- # strip "." path components
- $fname =~ s,^(?:\./)+,,;
- $fname =~ s,/(?:\./)+,/,g;
- $fname =~ s,/+,/,g;
-
- # strip intermediate "../.." path components
- while ($fname =~ s,/[^.][^/]*/[^.][^/]*/\.\./\.\./,/,) {
- }
-
- return $fname;
-}
-#== End of PkgLint::Util ==================================================
-
-package PkgLint::Logging;
-#==========================================================================
-# This package provides subroutines for printing messages to the user in a
-# common format. The subroutines all have the parameters C<$fname>,
-# C<$lineno> and C<$message>. In case there's no appropriate filename for
-# the message, NO_FILE may be passed, likewise for C<$lineno> and
-# NO_LINES. Before printing, the filename is normalized, that is,
-# "/foo/bar/../../" components are removed, as well as "." components.
-# At the end of the program, the subroutine print_summary_and_exit should
-# be called.
-#
-# Examples:
-# log_error(NO_FILE, NO_LINES, "Invalid command line.");
-# log_warning($fname, NO_LINES, "Not found.");
-# log_debug($fname, $lineno, sprintf("invalid character (0x%02x).", $c));
-#==========================================================================
-
-use strict;
-use warnings;
-BEGIN {
- use Exporter;
- use vars qw(@ISA @EXPORT_OK);
- @ISA = qw(Exporter);
- @EXPORT_OK = qw(
- NO_FILE NO_LINE_NUMBER NO_LINES
- log_fatal log_error log_warning log_note log_debug
- explain_error explain_warning explain_info
- print_summary_and_exit
- set_explain set_gcc_output_format
- get_show_source_flag set_show_source_flag
- get_klickibunti_flag set_klickibunti_flag
- );
- import PkgLint::Util qw(
- false true
- normalize_pathname
- );
-}
-
-use constant NO_FILE => undef;
-use constant NO_LINE_NUMBER => undef;
-use constant NO_LINES => undef;
-
-use enum qw(:LL_ FATAL ERROR WARNING NOTE DEBUG);
-
-use constant traditional_type => ["FATAL", "ERROR", "WARN", "NOTE", "DEBUG"];
-use constant gcc_type => ["fatal", "error", "warning", "note", "debug"];
-
-my $errors = 0;
-my $warnings = 0;
-my $gcc_output_format = false;
-my $klickibunti_flag = false;
-my $explain_flag = false;
-my $show_source_flag = false;
-
-sub strxvis($) {
- my ($s) = @_;
-
- $s =~ s/([^\x09\x20-\x7e])/"\\x" . unpack("H*", $1)/eg;
- return $s;
-}
-
-sub log_message { # no prototype due to Perl weirdness
- my ($level, $fname, $lineno, $message) = @_;
- my ($text, $sep);
-
- if (defined($fname)) {
- $fname = normalize_pathname($fname);
- }
-
- $text = "";
- $sep = "";
- if (!$gcc_output_format) {
- $text .= "${sep}" . traditional_type->[$level] . ":";
- $sep = " ";
- }
- if (defined($fname)) {
- $text .= defined($lineno)
- ? "${sep}${fname}:${lineno}"
- : "${sep}${fname}";
- $sep = ": ";
- }
- if ($gcc_output_format) {
- $text .= "${sep}" . gcc_type->[$level] . ":";
- $sep = " ";
- }
- if (defined($message)) {
- $text .= $sep . strxvis($message);
- $sep = "";
- }
-
- if ($level == LL_FATAL) {
- print STDERR ("${text}\n");
- } else {
- print STDOUT ("${text}\n");
- }
-}
-
-sub log_fatal($$$) { log_message(LL_FATAL, @_); exit(1); }
-sub log_error($$$) { log_message(LL_ERROR, @_); $errors++; }
-sub log_warning($$$) { log_message(LL_WARNING, @_); $warnings++; }
-sub log_note($$$) { log_message(LL_NOTE, @_); }
-sub log_debug($$$) { log_message(LL_DEBUG, @_); }
-
-sub explain { # no prototype due to Perl weirdness
- my ($loglevel, $fname, $lines, @texts) = @_;
- my $out = ($loglevel == LL_FATAL) ? *STDERR : *STDOUT;
-
- if ($explain_flag) {
- foreach my $text ("", @texts, "") {
- print $out ("\t${text}\n");
- }
- }
-}
-sub explain_error($$@) { explain(LL_ERROR, @_); }
-sub explain_warning($$@) { explain(LL_WARNING, @_); }
-sub explain_note($$@) { explain(LL_NOTE, @_); }
-
-sub print_summary_and_exit($) {
- my ($quiet) = @_;
-
- if (!$quiet) {
- if ($errors != 0 || $warnings != 0) {
- print("$errors errors and $warnings warnings found.\n");
- } else {
- print "looks fine.\n";
- }
- }
- exit($errors != 0);
-}
-
-sub set_explain() { $explain_flag = true; }
-sub set_gcc_output_format() { $gcc_output_format = true; }
-sub get_klickibunti_flag() { return $klickibunti_flag; }
-sub set_klickibunti_flag() { $klickibunti_flag = true; }
-sub get_show_source_flag() { return $show_source_flag; }
-sub set_show_source_flag() { $show_source_flag = true; }
-
-#== End of PkgLint::Logging ===============================================
-
-#==========================================================================
-# A File is a structure containing the contents of a file:
-# name: string The name of the file.
-# lines: array of string The physical lines in the file.
-#==========================================================================
-package PkgLint::File;
-
-use enum qw(NAME LINES);
-
-sub new($$$) {
- my ($class, $name, $lines) = @_;
- my $self = [$name, $lines];
- bless($self, $class);
- return $self;
-}
-
-sub name($) { return shift(@_)->[NAME]; }
-sub lines($) { return shift(@_)->[LINES]; }
-
-sub load($$) {
- my ($self, $fname) = @_;
- my ($lines);
-
- $lines = [];
- open(F, "<", $fname) or return undef;
- while (defined(my $line = <F>)) {
- push(@{$lines}, $line);
- }
- close(F) or return undef;
-
- $self->[NAME] = $fname;
- $self->[LINES] = $lines;
- return $self;
-}
-
-#==========================================================================
-# A Location is a structure containing a location in a file:
-# lineno: int The line number in the file
-# colno: int The column number in the file
-#==========================================================================
-package PkgLint::Location;
-
-use enum qw(LINENO COLNO);
-
-sub new($$$$) {
- my ($class, $lineno, $colno) = @_;
- my ($self) = ([$lineno, $colno]);
- bless($self, $class);
- return $self;
-}
-
-sub lineno($) { return shift(@_)->[LINENO]; }
-sub colno($) { return shift(@_)->[COLNO]; }
-
-#==========================================================================
-# A SimpleMatch is the result of applying a regular expression to a Perl
-# scalar value. It can return the range and the text of the captured
-# groups.
-#==========================================================================
-package PkgLint::SimpleMatch;
-
-use enum qw(STRING STARTS ENDS N);
-
-sub new($$) {
- my ($class, $string, $starts, $ends) = @_;
- my ($self) = ([$string, [@{$starts}], [@{$ends}], $#{$ends}]);
- bless($self, $class);
- return $self;
-}
-
-sub string($) { return shift(@_)->[STRING]; }
-sub n($) { return shift(@_)->[N]; }
-
-sub has($$) {
- my ($self, $n) = @_;
-
- return 0 <= $n && $n <= $self->n
- && defined($self->[STARTS]->[$n])
- && defined($self->[ENDS]->[$n]);
-}
-
-sub text($$) {
- my ($self, $n) = @_;
-
- my $start = $self->[STARTS]->[$n];
- my $end = $self->[ENDS]->[$n];
- return substr($self->string, $start, $end - $start);
-}
-
-sub range($$) {
- my ($self, $n) = @_;
-
- return ($self->[STARTS]->[$n], $self->[ENDS]->[$n]);
-}
-
-#==========================================================================
-# A StringMatch is the result of applying a regular expression to a String.
-# It can return the range and the text of the captured groups.
-#==========================================================================
-package PkgLint::StringMatch;
-
-use enum qw(STRING STARTS ENDS);
-
-sub new($$) {
- my ($class, $string, $starts, $ends) = @_;
- my ($self) = ([$string, [@{$starts}], [@{$ends}]]);
- bless($self, $class);
- return $self;
-}
-
-sub string($) { return shift(@_)->[STRING]; }
-
-sub text($$) {
- my ($self, $n) = @_;
-
- my $start = $self->[STARTS]->[$n];
- my $end = $self->[ENDS]->[$n];
- return $self->string->substring($start, $end - $start)->text;
-}
-
-sub range($$) {
- my ($self, $n) = @_;
-
- return ($self->[STARTS]->[$n], $self->[ENDS]->[$n]);
-}
-
-sub highlight($$) {
- my ($self, $n) = @_;
-
- $self->string->highlight(0, $self->[STARTS]->[$n], $self->[ENDS]->[$n]);
-}
-
-#==========================================================================
-# When files are read in by pkglint, they are interpreted in terms of
-# lines. For Makefiles, line continuations are handled properly, allowing
-# multiple physical lines to end in a single logical line. For other files
-# there is a 1:1 translation.
-#
-# A difference between the physical and the logical lines is that the
-# physical lines include the line end sequence, whereas the logical lines
-# do not.
-#
-# A logical line is a class having the read-only fields C<file>,
-# C<lines>, C<text>, C<physlines> and C<is_changed>, as well as some
-# methods for printing diagnostics easily.
-#
-# Some other methods allow modification of the physical lines, but leave
-# the logical line (the C<text>) untouched. These methods are used in the
-# --autofix mode.
-#
-# A line can have some "extra" fields that allow the results of parsing to
-# be saved under a name.
-#==========================================================================
-package PkgLint::Line;
-
-BEGIN {
- import PkgLint::Util qw(
- false true
- assert
- );
-}
-
-use enum qw(FNAME LINES TEXT PHYSLINES CHANGED BEFORE AFTER EXTRA);
-
-sub new($$$$) {
- my ($class, $fname, $lines, $text, $physlines) = @_;
- my ($self) = ([$fname, $lines, $text, $physlines, false, [], [], {}]);
- bless($self, $class);
- return $self;
-}
-
-sub fname($) { return shift(@_)->[FNAME]; }
-sub lines($) { return shift(@_)->[LINES]; }
-sub text($) { return shift(@_)->[TEXT]; }
-# Note: physlines is _not_ a usual getter method.
-sub is_changed($) { return shift(@_)->[CHANGED]; }
-
-# querying, getting and setting the extra values.
-sub has($$) {
- my ($self, $name) = @_;
- return exists($self->[EXTRA]->{$name});
-}
-sub get($$) {
- my ($self, $name) = @_;
- assert(exists($self->[EXTRA]->{$name}), "Field ${name} does not exist.");
- return $self->[EXTRA]->{$name};
-}
-sub set($$$) {
- my ($self, $name, $value) = @_;
- assert(!exists($self->[EXTRA]->{$name}), "Field ${name} already exists.");
-
- # Make sure that the line does not become a cyclic data structure.
- my $type = ref($value);
- if ($type eq "") {
- # ok
- } elsif ($type eq "ARRAY") {
- foreach my $element (@{$value}) {
- my $element_type = ref($element);
- assert($element_type eq "" || $element_type eq "PkgLint::SimpleMatch",
- "Invalid array data type: name=${name}, type=${element_type}.");
- }
- } else {
- assert(false, "Invalid data: name=${name}, value=${value}.");
- }
-
- $self->[EXTRA]->{$name} = $value;
-}
-
-sub physlines($) {
- my ($self) = @_;
- return [@{$self->[BEFORE]}, @{$self->[PHYSLINES]}, @{$self->[AFTER]}];
-}
-
-# Only for PkgLint::String support
-sub substring($$$$) {
- my ($self, $line, $start, $end) = @_;
- my ($text, $physlines);
-
- return substr($self->[PHYSLINES]->[$line]->[1], $start, $end);
-}
-
-sub show_source($$) {
- my ($self, $out) = @_;
-
- if (PkgLint::Logging::get_show_source_flag()) {
- foreach my $line (@{$self->physlines}) {
- print $out ("> " . $line->[1]);
- }
- }
-}
-
-sub log_fatal($$) {
- my ($self, $text) = @_;
-
- $self->show_source(*STDERR);
- PkgLint::Logging::log_fatal($self->fname, $self->[LINES], $text);
-}
-sub log_error($$) {
- my ($self, $text) = @_;
-
- $self->show_source(*STDOUT);
- PkgLint::Logging::log_error($self->fname, $self->[LINES], $text);
-}
-sub log_warning($$) {
- my ($self, $text) = @_;
-
- $self->show_source(*STDOUT);
- PkgLint::Logging::log_warning($self->fname, $self->[LINES], $text);
-}
-sub log_note($$) {
- my ($self, $text) = @_;
-
- $self->show_source(*STDOUT);
- PkgLint::Logging::log_note($self->fname, $self->[LINES], $text);
-}
-sub log_debug($$) {
- my ($self, $text) = @_;
-
- $self->show_source(*STDOUT);
- PkgLint::Logging::log_debug($self->fname, $self->[LINES], $text);
-}
-sub explain_error($@) {
- my ($self, @texts) = @_;
-
- PkgLint::Logging::explain_error($self->fname, $self->[LINES], @texts);
-}
-sub explain_warning($@) {
- my ($self, @texts) = @_;
-
- PkgLint::Logging::explain_warning($self->fname, $self->[LINES], @texts);
-}
-sub explain_note($@) {
- my ($self, @texts) = @_;
-
- PkgLint::Logging::explain_note($self->fname, $self->[LINES], @texts);
-}
-sub explain_info($@) {
- my ($self, @texts) = @_;
-
- PkgLint::Logging::explain_info($self->fname, $self->[LINES], @texts);
-}
-
-sub to_string($) {
- my ($self) = @_;
-
- return $self->fname . ":" . $self->[LINES] . ": " . $self->[TEXT];
-}
-
-sub prepend_before($$) {
- my ($self, $text) = @_;
-
- unshift(@{$self->[BEFORE]}, [0, "$text\n"]);
- $self->[CHANGED] = true;
-}
-sub append_before($$) {
- my ($self, $text) = @_;
-
- push(@{$self->[BEFORE]}, [0, "$text\n"]);
- $self->[CHANGED] = true;
-}
-sub prepend_after($$) {
- my ($self, $text) = @_;
-
- unshift(@{$self->[AFTER]}, [0, "$text\n"]);
- $self->[CHANGED] = true;
-}
-sub append_after($$) {
- my ($self, $text) = @_;
-
- push(@{$self->[AFTER]}, [0, "$text\n"]);
- $self->[CHANGED] = true;
-}
-sub delete($) {
- my ($self) = @_;
-
- $self->[PHYSLINES] = [];
- $self->[CHANGED] = true;
-}
-sub replace($$$) {
- my ($self, $from, $to) = @_;
- my $phys = $self->[PHYSLINES];
-
- foreach my $i (0..$#{$phys}) {
- if ($phys->[$i]->[0] != 0 && $phys->[$i]->[1] =~ s/\Q$from\E/$to/g) {
- $self->[CHANGED] = true;
- }
- }
-}
-sub replace_regex($$$) {
- my ($self, $from_re, $to) = @_;
- my $phys = $self->[PHYSLINES];
-
- foreach my $i (0..$#{$phys}) {
- if ($phys->[$i]->[0] != 0 && $phys->[$i]->[1] =~ s/$from_re/$to/) {
- $self->[CHANGED] = true;
- }
- }
-}
-sub set_text($$) {
- my ($self, $text) = @_;
- $self->[PHYSLINES] = [[0, "$text\n"]];
- $self->[CHANGED] = true;
-}
-
-#== End of PkgLint::Line ==================================================
-
-package PkgLint::String;
-#==========================================================================
-# In pkglint, a String is a part of a Line that contains exact references
-# to the locations of its substrings in the physical lines of the file from
-# which it has been read. This makes it possible for diagnostics to be
-# marked at character level instead of logical line level.
-#
-# Implementation notes:
-#
-# A String consists of three components:
-# * a reference to a logical line,
-# * a list of Parts, which, when concatenated, form the text of the String.
-# A Part is either a literal string or an array of the form [$lineno,
-# $startcol, $endcol], which is used as a reference into the physical
-# lines array (without and local additions) of the logical line.
-# * a list of highlighting intervals, which are used in the
-# show_highlighted() method to mark up certain parts of the string.
-#==========================================================================
-
-BEGIN {
- import PkgLint::Util qw(
- false true
- min max
- );
-}
-
-use enum qw(LINE PARTS MARKUPS);
-
-# The structure fields of a Part of a String
-use enum qw(:P_ LINENO STARTCOL ENDCOL);
-
-# The structure fields of a MarkupPoint of a String
-use enum qw(:MP_ LINENO COLNO TEXT);
-
-sub new($$@) {
- my ($class, $line, @parts) = @_;
- my ($self) = ([$line, \@parts]);
- bless($self, $class);
- $self->compress();
- return $self;
-}
-
-sub line($) { return shift(@_)->[LINE]; }
-sub parts($) { return shift(@_)->[PARTS]; }
-
-sub text($) {
- my ($self) = @_;
- my ($text);
-
- $text = "";
- foreach my $part (@{$self->[PARTS]}) {
- if (ref($part) eq "") {
- $text .= $part;
- } else {
- $text .= $self->line->substring($part->[P_LINENO], $part->[P_STARTCOL], $part->[P_ENDCOL] - $part->[P_STARTCOL]);
- }
- }
- return $text;
-}
-
-sub substring($$$) {
- my ($self, $from, $len) = @_;
- my (@nparts, $skip, $take, $physlines);
-
- # XXX: This code is slow, but simple.
-
- $physlines = $self->[LINE]->[PkgLint::Line::PHYSLINES];
-
- $skip = $from;
- $take = defined($len) ? $len : 0x7fff_ffff;
- foreach my $part (@{$self->[PARTS]}) {
- if (ref($part) eq "") {
- my $p = "";
-
- my $nskipped = min($skip, strlen($part));
- $skip -= $nskipped;
- $part = substr($part, $nskipped);
-
- my $ntaken = min($take, strlen($part));
- $take -= $ntaken;
- $p .= substr($part, 0, $ntaken);
- $part = substr($part, $ntaken);
-
- push(@nparts, $p);
- } else {
- my $line = $part->[P_LINENO];
- my $col = $part->[P_STARTCOL];
- my $tocol = $part->[P_ENDCOL];
- my $linelen = length($physlines->[$line]->[1]);
-
- my $nskipped = max(0, min($skip, min($tocol - $col, $linelen - $col)));
- $skip -= $nskipped;
- $col += $nskipped;
-
- my $start = $col;
-
- my $ntaken = max(0, min($take, min($tocol - $col, $linelen - $col)));
- $take -= $ntaken;
- $col += $ntaken;
-
- my $end = $col;
- push(@nparts, [$line, $start, $end]);
- }
- }
- return PkgLint::String->new($self->[LINE], @nparts);
-}
-
-sub match($$) {
- my ($self, $re) = @_;
- my ($m);
-
- if ($self->text !~ $re) {
- return false;
- }
-
- # @- and @+ are very special arrays, so we better copy them
- # before doing anything with them.
- my @starts = @-;
- my @ends = @+;
- return PkgLint::StringMatch->new($self, \@starts, \@ends);
-}
-
-sub match_all($$) {
- my ($self, $re) = @_;
- my ($mm, $rest, $lastpos);
-
- $mm = [];
- $rest = $self->text;
- $lastpos = 0;
- pos(undef);
- while ($rest =~ m/$re/gc) {
- my @starts = @-;
- my @ends = @+;
-
- $lastpos = $ends[0];
-
- push(@{$mm}, PkgLint::StringMatch->new($self, \@starts, \@ends));
- }
- return ($mm, substr($rest, $lastpos));
-}
-
-sub compress($) {
- my ($self) = @_;
- my ($parts, @nparts);
-
- $parts = $self->[PARTS];
-
- # Copy all but empty parts into nparts.
- foreach my $part (@{$parts}) {
- if (ref($part) eq "") {
- if ($part ne "") {
- push(@nparts, $part);
- }
- } else {
- if ($part->[P_STARTCOL] != $part->[P_ENDCOL]) {
- push(@nparts, $part);
- }
- }
- }
- $self->[PARTS] = \@nparts;
-
- # TODO: Merge adjacent parts
-}
-
-# FIXME: lineno should not be needed here.
-sub highlight($$$$) {
- my ($self, $lineno, $startcol, $endcol) = @_;
-
- push(@{$self->[MARKUPS]}, [$lineno, $startcol, $endcol]);
-}
-
-sub show_highlighted($$) {
- my ($self) = @_;
- my ($physlines, @points, $curpoint, $maxpoint, $text, $physline, $col);
-
- return unless (PkgLint::Logging::get_show_source_flag() && PkgLint::Logging::get_klickibunti_flag());
-
- foreach my $m (@{$self->[MARKUPS]}) {
- push(@points, [$m->[P_LINENO], $m->[P_STARTCOL], "\x1B[33m\x1B[1m"]);
- push(@points, [$m->[P_LINENO], $m->[P_ENDCOL], "\x1B[0m"]);
- }
-
- @points = sort {
- $a->[MP_LINENO] <=> $b->[MP_LINENO]
- || $a->[MP_COLNO] <=> $b->[MP_COLNO];
- } (@points);
-
- $physlines = $self->line->[PkgLint::Line::PHYSLINES];
- $curpoint = 0;
- $maxpoint = $#points + 1;
- foreach my $lineno (0..$#{$physlines}) {
- while ($curpoint < $maxpoint && $points[$curpoint]->[MP_LINENO] < $lineno) {
- $curpoint++;
- }
-
- $text = "";
- $col = 0;
- $physline = $physlines->[$lineno];
- while ($curpoint < $maxpoint && $points[$curpoint]->[MP_LINENO] == $lineno) {
- $text .= substr($physline->[1], $col, $points[$curpoint]->[MP_COLNO] - $col);
- $text .= $points[$curpoint]->[MP_TEXT];
- $col = $points[$curpoint]->[MP_COLNO];
- $curpoint++;
- }
- $text .= substr($physline->[1], $col);
- print("> $text");
- }
-}
-
-# TODO: Rewrite the code of log_warning to be shorter. After that is
-# done, add the other log_* methods.
-
-sub log_warning($$) {
- my ($self, $msg) = @_;
-
- if (PkgLint::Logging::get_show_source_flag()) {
- if (PkgLint::Logging::get_klickibunti_flag()) {
- $self->show_highlighted();
- } else {
- $self->line->show_source(*STDOUT);
- }
- }
- PkgLint::Logging::log_warning($self->line->fname, $self->line->lines, $msg);
-}
-
-#== End of PkgLint::String ================================================
-
-package PkgLint::FileUtil;
-#==========================================================================
-# This package provides subroutines for loading and saving line-oriented
-# files. The load_file() subroutine loads a file completely into memory,
-# optionally handling continuation line folding. The load_lines() subrou-
-# tine is an abbreviation for the common case of loading files without
-# continuation lines. The save_autofix_changes() subroutine examines an
-# array of lines if some of them have changed. It then saves the modified
-# files.
-#==========================================================================
-use strict;
-use warnings;
-
-BEGIN {
- use Exporter;
- use vars qw(@ISA @EXPORT_OK);
- @ISA = qw(Exporter);
- @EXPORT_OK = qw(
- load_file load_lines
- save_autofix_changes
- );
-
- import PkgLint::Util qw(
- false true
- );
- import PkgLint::Logging qw(
- NO_LINE_NUMBER
- log_error log_note
- );
-}
-
-sub load_physical_lines($) {
- my ($fname) = @_;
- my ($physlines, $line, $lineno);
-
- $physlines = [];
- open(F, "< $fname") or return undef;
- $lineno = 0;
- while (defined($line = <F>)) {
- $lineno++;
- push(@{$physlines}, [$lineno, $line]);
- }
- close(F) or return undef;
- return $physlines;
-}
-
-sub get_logical_line($$$) {
- my ($fname, $lines, $ref_lineno) = @_;
- my ($value, $lineno, $first, $firstlineno, $lastlineno, $physlines);
-
- $value = "";
- $first = true;
- $lineno = ${$ref_lineno};
- $firstlineno = $lines->[$lineno]->[0];
- $physlines = [];
-
- for (; $lineno <= $#{$lines}; $lineno++) {
- if ($lines->[$lineno]->[1] =~ qr"^([ \t]*)(.*?)([ \t]*)(\\?)\n?$") {
- my ($indent, $text, $outdent, $cont) = ($1, $2, $3, $4);
-
- if ($first) {
- $value .= $indent;
- $first = false;
- }
-
- $value .= $text;
- push(@{$physlines}, $lines->[$lineno]);
-
- if ($cont eq "\\") {
- $value .= " ";
- } else {
- $value .= $outdent;
- last;
- }
- }
- }
-
- if ($lineno > $#{$lines}) {
- # The last line in the file is a continuation line
- $lineno--;
- }
- $lastlineno = $lines->[$lineno]->[0];
- ${$ref_lineno} = $lineno + 1;
-
- return PkgLint::Line->new($fname,
- $firstlineno == $lastlineno
- ? $firstlineno
- : "$firstlineno--$lastlineno",
- $value,
- $physlines);
-}
-
-sub load_lines($$) {
- my ($fname, $fold_backslash_lines) = @_;
- my ($physlines, $seen_newline, $loglines);
-
- $physlines = load_physical_lines($fname);
- if (!$physlines) {
- return false;
- }
-
- $seen_newline = true;
- $loglines = [];
- if ($fold_backslash_lines) {
- for (my $lineno = 0; $lineno <= $#{$physlines}; ) {
- push(@{$loglines}, get_logical_line($fname, $physlines, \$lineno));
- }
- } else {
- foreach my $physline (@{$physlines}) {
- my $text = $physline->[1];
-
- $text =~ s/\n$//;
- push(@{$loglines}, PkgLint::Line->new($fname, $physline->[0], $text, [$physline]));
- }
- }
-
- if (0 <= $#{$physlines} && $physlines->[-1]->[1] !~ qr"\n$") {
- log_error($fname, $physlines->[-1]->[0], "File must end with a newline.");
- }
-
- return $loglines;
-}
-
-sub load_file($) {
- my ($fname) = @_;
-
- return load_lines($fname, false);
-}
-
-sub get_folded_string($$$) {
- my ($fname, $lines, $ref_lineno) = @_;
- my ($value, $lineno, $first, $firstlineno, $lastlineno, $physline, $physlines, @parts);
-
- $value = "";
- $first = true;
- $lineno = ${$ref_lineno};
- $firstlineno = $lines->[$lineno]->[0];
- $physlines = [];
- $physline = 0;
-
- for (; $lineno <= $#{$lines}; $lineno++) {
- if ($lines->[$lineno]->[1] =~ qr"^([ \t]*)(.*?)([ \t]*)(\\?)\n?$") {
- my ($indent, $text, $outdent, $cont) = ($1, $2, $3, $4);
- my (@start) = (@-);
- my (@end) = (@+);
-
- if ($first) {
- $value .= $indent;
- push(@parts, [$physline, $start[1], $end[1]]);
- $first = false;
- }
-
- $value .= $text;
- push(@parts, [$physline, $start[2], $end[2]]);
-
- push(@{$physlines}, $lines->[$lineno]);
- $physline++;
-
- if ($cont eq "\\") {
- $value .= " ";
- push(@parts, " ");
- } else {
- $value .= $outdent;
- push(@parts, [$physline, $start[3], $end[3]]);
- last;
- }
- }
- }
-
- if ($lineno > $#{$lines}) {
- # The last line in the file is a continuation line
- $lineno--;
- }
- $lastlineno = $lines->[$lineno]->[0];
- ${$ref_lineno} = $lineno + 1;
-
- my $line = PkgLint::Line->new($fname,
- $firstlineno == $lastlineno
- ? $firstlineno
- : "$firstlineno--$lastlineno",
- $value,
- $physlines);
- return PkgLint::String->new($line, @parts);
-}
-
-sub load_strings($$) {
- my ($fname, $fold_backslash_lines) = @_;
- my ($physlines, $seen_newline, $strings);
-
- $physlines = load_physical_lines($fname);
- if (!$physlines) {
- return false;
- }
-
- $seen_newline = true;
- $strings = [];
- if ($fold_backslash_lines) {
- for (my $lineno = 0; $lineno <= $#{$physlines}; ) {
- push(@{$strings}, get_folded_string($fname, $physlines, \$lineno));
- }
- } else {
- foreach my $physline (@{$physlines}) {
- my ($text, $line);
-
- ($text = $physline->[1]) =~ s/\n$//;
- $line = PkgLint::Line->new($fname, $physline->[0], $text, [$physline]);
- push(@{$strings}, PkgLint::String->new($line, [0, 0, length($text)]));
- }
- }
-
- if (0 <= $#{$physlines} && $physlines->[-1]->[1] !~ qr"\n$") {
- log_error($fname, $physlines->[-1]->[0], "File must end with a newline.");
- }
-
- return $strings;
-}
-
-sub save_autofix_changes($) {
- my ($lines) = @_;
-
- my (%changed, %physlines);
-
- foreach my $line (@{$lines}) {
- if ($line->is_changed) {
- $changed{$line->fname}++;
- }
- push(@{$physlines{$line->fname}}, @{$line->physlines});
- }
-
- foreach my $fname (sort(keys(%changed))) {
- my $new = "${fname}.pkglint.tmp";
-
- if (!open(F, ">", $new)) {
- log_error($new, NO_LINE_NUMBER, "$!");
- next;
- }
- foreach my $physline (@{$physlines{$fname}}) {
- print F ($physline->[1]);
- }
- if (!close(F)) {
- log_error($new, NO_LINE_NUMBER, "$!");
- next;
- }
-
- if (!rename($new, $fname)) {
- log_error($fname, NO_LINE_NUMBER, "$!");
- next;
- }
- log_note($fname, NO_LINE_NUMBER, "Has been autofixed. Please re-run pkglint.");
- }
-}
-
-#== End of PkgLint::FileUtil ==============================================
-
-package PkgLint::Type;
-#==========================================================================
-# A Type in pkglint is a combination of a data type and a permission
-# specification. Further details can be found in the chapter ``The pkglint
-# type system'' of the pkglint book.
-#==========================================================================
-
-BEGIN {
- import PkgLint::Util qw(
- false true
- );
- import PkgLint::Logging qw(
- log_warning NO_LINES
- );
- use Exporter;
- use vars qw(@ISA @EXPORT_OK);
- @ISA = qw(Exporter);
- @EXPORT_OK = qw(
- LK_NONE LK_INTERNAL LK_EXTERNAL
- GUESSED NOT_GUESSED
- );
-}
-
-use enum qw(KIND_OF_LIST BASIC_TYPE ACLS IS_GUESSED);
-use enum qw(:LK_ NONE INTERNAL EXTERNAL);
-use enum qw(:ACLE_ SUBJECT_RE PERMS);
-use enum qw(NOT_GUESSED GUESSED);
-
-sub new($$$) {
- my ($class, $kind_of_list, $basic_type, $acls, $guessed) = @_;
- my ($self) = ([$kind_of_list, $basic_type, $acls, $guessed]);
- bless($self, $class);
- return $self;
-}
-
-sub kind_of_list($) { return shift(@_)->[KIND_OF_LIST]; }
-sub basic_type($) { return shift(@_)->[BASIC_TYPE]; }
-# no getter method for acls
-sub is_guessed($) { return shift(@_)->[IS_GUESSED]; }
-
-sub perms($$) {
- my ($self, $fname) = @_;
- my ($perms);
-
- foreach my $acl_entry (@{$self->[ACLS]}) {
- if ($fname =~ $acl_entry->[ACLE_SUBJECT_RE]) {
- return $acl_entry->[ACLE_PERMS];
- }
- }
- return undef;
-}
-
-# Returns the union of all possible permissions. This can be used to
-# check whether a variable may be defined or used at all, or if it is
-# read-only.
-sub perms_union($) {
- my ($self) = @_;
- my ($perms);
-
- $perms = "";
- foreach my $acl_entry(@{$self->[ACLS]}) {
- $perms .= $acl_entry->[ACLE_PERMS];
- }
- return $perms;
-}
-
-# Returns whether the type is considered an external list. All external
-# lists are, of course, as well as some other data types that are not
-# defined as lists to make the implementation of checkline_mk_vartype
-# easier.
-sub is_practically_a_list($) {
- my ($self) = @_;
-
- return ($self->kind_of_list == LK_EXTERNAL) ? true
- : ($self->kind_of_list == LK_INTERNAL) ? false
- : ($self->basic_type eq "BuildlinkPackages") ? true
- : ($self->basic_type eq "SedCommands") ? true
- : ($self->basic_type eq "ShellCommand") ? true
- : false;
-}
-
-# Returns whether variables of this type may be extended using the "+="
-# operator.
-sub may_use_plus_eq($) {
- my ($self) = @_;
-
- return ($self->kind_of_list != LK_NONE) ? true
- : ($self->basic_type eq "AwkCommand") ? true
- : ($self->basic_type eq "BuildlinkPackages") ? true
- : ($self->basic_type eq "SedCommands") ? true
- : false;
-}
-
-sub to_string($) {
- my ($self) = @_;
-
- return (["", "InternalList of ", "List of "]->[$self->kind_of_list]) . $self->basic_type;
-}
-
-#== End of PkgLint::Type ==================================================
-
-package PkgLint::VarUseContext;
-#==========================================================================
-# This class represents the various contexts in which make(1) variables can
-# appear in pkgsrc. Further details can be found in the chapter ``The
-# pkglint type system'' of the pkglint book.
-#==========================================================================
-
-BEGIN {
- import PkgLint::Util qw(
- false true
- );
- import PkgLint::Logging qw(
- log_warning NO_LINES
- );
- use Exporter;
- use vars qw(@ISA @EXPORT_OK);
- @ISA = qw(Exporter);
- @EXPORT_OK = qw(
- VUC_TIME_UNKNOWN VUC_TIME_LOAD VUC_TIME_RUN
- VUC_TYPE_UNKNOWN
- VUC_SHELLWORD_UNKNOWN VUC_SHELLWORD_PLAIN VUC_SHELLWORD_DQUOT
- VUC_SHELLWORD_SQUOT VUC_SHELLWORD_BACKT VUC_SHELLWORD_FOR
- VUC_EXTENT_UNKNOWN VUC_EXTENT_FULL VUC_EXTENT_WORD
- VUC_EXTENT_WORD_PART
- );
-}
-
-use enum qw(TIME TYPE SHELLWORD EXTENT);
-use enum qw(:VUC_TIME_ UNKNOWN LOAD RUN);
-use constant VUC_TYPE_UNKNOWN => undef;
-use enum qw(:VUC_SHELLWORD_ UNKNOWN PLAIN DQUOT SQUOT BACKT FOR);
-use enum qw(:VUC_EXTENT_ UNKNOWN FULL WORD WORD_PART);
-
-my $pool = {};
-
-sub new($$$$$) {
- my ($class, $time, $type, $shellword, $extent) = @_;
- my ($self) = ([$time, $type, $shellword, $extent]);
- bless($self, $class);
- return $self;
-}
-sub new_from_pool($$$$$) {
- my ($class, $time, $type, $shellword, $extent) = @_;
- my $key = "${time}-${type}-${shellword}-${extent}";
-
- if (!exists($pool->{$key})) {
- $pool->{$key} = $class->new($time, $type, $shellword, $extent);
- }
- return $pool->{$key};
-}
-
-sub time($) { return shift(@_)->[TIME]; }
-sub type($) { return shift(@_)->[TYPE]; }
-sub shellword($) { return shift(@_)->[SHELLWORD]; }
-sub extent($) { return shift(@_)->[EXTENT]; }
-
-sub to_string($) {
- my ($self) = @_;
-
- return sprintf("(%s %s %s %s)",
- ["unknown-time", "load-time", "run-time"]->[$self->time],
- (defined($self->type) ? $self->type->to_string() : "no-type"),
- ["none", "plain", "squot", "dquot", "backt", "for"]->[$self->shellword],
- ["unknown", "full", "word", "word-part"]->[$self->extent]);
-}
-
-#== End of PkgLint::VarUseContext =========================================
-
-package PkgLint::SubstContext;
-#==========================================================================
-# This class records the state of a block of variable assignments that make
-# up a SUBST class. As these variable assignments are not easy to get right
-# unless you do it every day, and the possibility of typos is high, pkglint
-# provides additional checks for them.
-#==========================================================================
-
-BEGIN {
- import PkgLint::Util qw(
- false true
- );
- import PkgLint::Logging qw(
- log_warning
- );
-}
-
-use enum qw(:SUBST_ ID CLASS STAGE MESSAGE FILES SED VARS FILTER_CMD);
-
-sub new($) {
- my ($class) = @_;
- my ($self) = ([undef, undef, undef, undef, [], [], undef, undef]);
- bless($self, $class);
- return $self;
-}
-
-sub subst_class($) { return shift(@_)->[SUBST_CLASS]; }
-sub subst_stage($) { return shift(@_)->[SUBST_STAGE]; }
-sub subst_message($) { return shift(@_)->[SUBST_MESSAGE]; }
-sub subst_files($) { return shift(@_)->[SUBST_FILES]; }
-sub subst_sed($) { return shift(@_)->[SUBST_SED]; }
-sub subst_filter_cmd($) { return shift(@_)->[SUBST_FILTER_CMD]; }
-sub subst_id($) { return shift(@_)->[SUBST_ID]; }
-
-sub init($) {
- my ($self) = @_;
-
- $self->[SUBST_CLASS] = undef;
- $self->[SUBST_STAGE] = undef;
- $self->[SUBST_MESSAGE] = undef;
- $self->[SUBST_FILES] = [];
- $self->[SUBST_SED] = [];
- $self->[SUBST_FILTER_CMD] = undef;
- $self->[SUBST_ID] = undef;
-}
-
-sub check_end($$) {
- my ($self, $line) = @_;
-
- return unless defined($self->subst_id);
-
- if (!defined($self->subst_class)) {
- $line->log_warning("Incomplete SUBST block: SUBST_CLASSES missing.");
- }
- if (!defined($self->subst_stage)) {
- $line->log_warning("Incomplete SUBST block: SUBST_STAGE missing.");
- }
- if (@{$self->subst_files} == 0) {
- $line->log_warning("Incomplete SUBST block: SUBST_FILES missing.");
- }
- if (@{$self->subst_sed} == 0 && !defined($self->subst_filter_cmd)) {
- $line->log_warning("Incomplete SUBST block: SUBST_SED missing.");
- }
- $self->init();
-}
-
-sub is_complete($) {
- my ($self) = @_;
-
- return false unless defined($self->subst_id);
- return false unless defined($self->subst_class);
- return false unless defined($self->subst_files);
- return false unless defined($self->subst_sed);
- return true;
-}
-
-sub check_varassign($$$$$) {
- my ($self, $line, $varname, $op, $value) = @_;
- my ($varbase, $varparam, $id);
-
- if ($varname eq "SUBST_CLASSES") {
-
- if ($value =~ qr"^(\S+)\s") {
- $line->log_warning("Please add only one class at a time to SUBST_CLASSES.");
- $self->[SUBST_CLASS] = $1;
- $self->[SUBST_ID] = $1;
-
- } else {
- if (defined($self->subst_class)) {
- $line->log_warning("SUBST_CLASSES should only appear once in a SUBST block.");
- }
- $self->[SUBST_CLASS] = $value;
- $self->[SUBST_ID] = $value;
- }
- return;
- }
-
- $id = $self->subst_id;
-
- if ($varname =~ qr"^(SUBST_(?:STAGE|MESSAGE|FILES|SED|FILTER_CMD))\.([\-\w_]+)$") {
- ($varbase, $varparam) = ($1, $2);
-
- if (!defined($id)) {
- $line->log_note("SUBST_CLASSES should precede the definition of ${varbase}.${varparam}.");
-
- $id = $self->[SUBST_ID] = $varparam;
- }
- } else {
- if (defined($id)) {
- $line->log_warning("Foreign variable in SUBST block.");
- }
- return;
- }
-
- if ($varparam ne $id) {
-
- # XXX: This code sometimes produces weird warnings. See
- # meta-pkgs/xorg/Makefile.common 1.41 for an example.
- if ($self->is_complete()) {
- $self->check_end($line);
-
- # The following assignment prevents an additional warning,
- # but from a technically viewpoint, it is incorrect.
- $self->[SUBST_CLASS] = $varparam;
- $self->[SUBST_ID] = $varparam;
- $id = $varparam;
- } else {
- $line->log_warning("Variable parameter \"${varparam}\" does not match SUBST class \"${id}\".");
- }
- }
-
- if ($varbase eq "SUBST_STAGE") {
- if (defined($self->subst_stage)) {
- $line->log_warning("Duplicate definition of SUBST_STAGE.${id}.");
- } else {
- $self->[SUBST_STAGE] = $value;
- }
-
- } elsif ($varbase eq "SUBST_MESSAGE") {
- if (defined($self->subst_message)) {
- $line->log_warning("Duplicate definition of SUBST_MESSAGE.${id}.");
- } else {
- $self->[SUBST_MESSAGE] = $value;
- }
-
- } elsif ($varbase eq "SUBST_FILES") {
- if (@{$self->subst_files} > 0) {
- if ($op ne "+=") {
- $line->log_warning("All but the first SUBST_FILES line should use the \"+=\" operator.");
- }
- }
- push(@{$self->subst_files}, $value);
-
- } elsif ($varbase eq "SUBST_SED") {
- if (@{$self->subst_sed} > 0) {
- if ($op ne "+=") {
- $line->log_warning("All but the first SUBST_SED line should use the \"+=\" operator.");
- }
- }
- push(@{$self->subst_sed}, $value);
-
- } elsif ($varbase eq "SUBST_FILTER_CMD") {
- if (defined($self->subst_filter_cmd)) {
- $line->log_warning("Duplicate definition of SUBST_FILTER_CMD.${id}.");
- } else {
- $self->[SUBST_FILTER_CMD] = $value;
- }
-
- } else {
- $line->log_warning("Foreign variable in SUBST block.");
- }
-}
-
-sub to_string($) {
- my ($self) = @_;
-
- return sprintf("SubstContext(%s %s %s %s %s %s)",
- (defined($self->subst_class) ? $self->subst_class : "(undef)"),
- (defined($self->subst_stage) ? $self->subst_stage : "(undef)"),
- (defined($self->subst_message) ? $self->subst_message : "(undef)"),
- scalar(@{$self->subst_files}),
- scalar(@{$self->subst_sed}),
- (defined($self->subst_id) ? $self->subst_id : "(undef)"));
-}
-#== End of PkgLint::SubstContext ==========================================
-
-package CVS_Entry;
-#==========================================================================
-# A CVS_Entry represents one line from a CVS/Entries file.
-#==========================================================================
-
-BEGIN {
- import PkgLint::Util qw(
- false true
- );
- import PkgLint::Logging qw(
- log_warning
- );
-}
-
-use enum qw(FNAME REVISION MTIME TAG);
-
-sub new($$$$$) {
- my ($class, $fname, $revision, $date, $tag) = @_;
- my $self = [ $fname, $revision, $date, $tag ];
- bless($self, $class);
- return $self;
-}
-sub fname($) { return shift()->[FNAME]; }
-sub revision($) { return shift()->[REVISION]; }
-sub mtime($) { return shift()->[MTIME]; }
-sub tag($) { return shift()->[TAG]; }
-#== End of CVS_Entry ======================================================
-
-
-package main;
-#==========================================================================
-# This package contains the application-specific code of pkglint.
-# Most subroutines in this package follow a strict naming convention:
-#
-# The get_*() functions provide easy access to important non-trivial data
-# structures that are loaded from external files and are therefore cached.
-#
-# The is_*() functions return a boolean value and have no side effects.
-#
-# The checkline_*() procedures check a single line for compliance with some
-# rules.
-#
-# The checklines_*() procedures check an array of lines for compliance.
-# Usually they make use of several checkline_*() procedures.
-#
-# The checkfile_*() procedures load a file and check the lines of that
-# file. Usually they make use of several checklines_*() and checkline_*()
-# procedures.
-#
-# The checkdir_*() procedures check the files of a directory and call
-# checkfile_*() on them.
-#
-# Note: I have tried to order the subroutines so that there are no
-# back-references, that is, if you start reading the code from the top to
-# the bottom you should not find a call to a subroutine you haven't yet
-# seen.
-#==========================================================================
-use strict;
-use warnings;
-
-use Digest::SHA1;
-use Getopt::Long qw(:config no_ignore_case bundling require_order);
-use Fcntl qw(:mode);
-use File::Basename;
-use File::stat;
-use Cwd;
-use pkgsrc::Dewey;
-
-BEGIN {
- import PkgLint::Util qw(
- array_to_hash assert
- false true dont_know doesnt_matter
- normalize_pathname
- );
- import PkgLint::Logging qw(
- NO_FILE NO_LINE_NUMBER NO_LINES
- log_fatal log_error log_warning log_note log_debug
- explain_error explain_warning explain_info
- );
- import PkgLint::FileUtil qw(
- load_file load_lines
- save_autofix_changes
- );
- import PkgLint::Type qw(
- LK_NONE LK_INTERNAL LK_EXTERNAL
- GUESSED NOT_GUESSED
- );
- import PkgLint::VarUseContext qw(
- VUC_TIME_UNKNOWN VUC_TIME_LOAD VUC_TIME_RUN
- VUC_TYPE_UNKNOWN
- VUC_SHELLWORD_UNKNOWN VUC_SHELLWORD_PLAIN VUC_SHELLWORD_DQUOT
- VUC_SHELLWORD_SQUOT VUC_SHELLWORD_BACKT VUC_SHELLWORD_FOR
- VUC_EXTENT_UNKNOWN VUC_EXTENT_FULL VUC_EXTENT_WORD
- VUC_EXTENT_WORD_PART
- );
-}
-
-#
-# Buildtime configuration
-#
-
-use constant conf_distver => '@DISTVER@';
-use constant conf_make => '@MAKE@';
-use constant conf_datadir => '@DATADIR@';
-
-#
-# Global variables that can be modified via command line options.
-#
-
-# The pkgsrc directory, relative to the current working directory of
-# pkglint.
-my $cwd_pkgsrcdir = undef;
-
-# The pkgsrc directory, relative to the directory that is currently
-# checked.
-my $cur_pkgsrcdir = undef;
-
-#
-# Command Line Options
-#
-
-my $opt_check_ALTERNATIVES = true;
-my $opt_check_bl3 = true;
-my $opt_check_DESCR = true;
-my $opt_check_distinfo = true;
-my $opt_check_extra = false;
-my $opt_check_global = false;
-my $opt_check_INSTALL = true;
-my $opt_check_Makefile = true;
-my $opt_check_MESSAGE = true;
-my $opt_check_mk = true;
-my $opt_check_patches = true;
-my $opt_check_PLIST = true;
-my (%checks) = (
- "ALTERNATIVES" => [\$opt_check_ALTERNATIVES, "check ALTERNATIVES files"],
- "bl3" => [\$opt_check_bl3, "check buildlink3 files"],
- "DESCR" => [\$opt_check_DESCR, "check DESCR file"],
- "distinfo" => [\$opt_check_distinfo, "check distinfo file"],
- "extra" => [\$opt_check_extra, "check various additional files"],
- "global" => [\$opt_check_global, "inter-package checks"],
- "INSTALL" => [\$opt_check_INSTALL, "check INSTALL and DEINSTALL scripts"],
- "Makefile" => [\$opt_check_Makefile, "check Makefiles"],
- "MESSAGE" => [\$opt_check_MESSAGE, "check MESSAGE files"],
- "mk" => [\$opt_check_mk, "check other .mk files"],
- "patches" => [\$opt_check_patches, "check patches"],
- "PLIST" => [\$opt_check_PLIST, "check PLIST files"],
-);
-
-my $opt_debug_include = false;
-my $opt_debug_misc = false;
-my $opt_debug_patches = false;
-my $opt_debug_quoting = false;
-my $opt_debug_shell = false;
-my $opt_debug_tools = false;
-my $opt_debug_trace = false;
-my $opt_debug_unchecked = false;
-my $opt_debug_unused = false;
-my $opt_debug_vartypes = false;
-my $opt_debug_varuse = false;
-my (%debug) = (
- "include" => [\$opt_debug_include, "included files"],
- "misc" => [\$opt_debug_misc, "all things that didn't fit elsewhere"],
- "patches" => [\$opt_debug_patches, "the states of the patch parser"],
- "quoting" => [\$opt_debug_quoting, "additional information about quoting"],
- "shell" => [\$opt_debug_shell, "the parsers for shell words and shell commands"],
- "tools" => [\$opt_debug_tools, "the tools framework"],
- "trace" => [\$opt_debug_trace, "follow subroutine calls"],
- "unchecked" => [\$opt_debug_unchecked, "show the current limitations of pkglint"],
- "unused" => [\$opt_debug_unused, "unused variables"],
- "vartypes" => [\$opt_debug_vartypes, "additional type information"],
- "varuse" => [\$opt_debug_varuse, "contexts where variables are used"],
-);
-
-my $opt_warn_absname = true;
-my $opt_warn_directcmd = true;
-my $opt_warn_extra = false;
-my $opt_warn_order = true;
-my $opt_warn_perm = false;
-my $opt_warn_plist_depr = false;
-my $opt_warn_plist_sort = false;
-my $opt_warn_quoting = false;
-my $opt_warn_space = false;
-my $opt_warn_style = false;
-my $opt_warn_types = true;
-my $opt_warn_varorder = false;
-my (%warnings) = (
- "absname" => [\$opt_warn_absname, "warn about use of absolute file names"],
- "directcmd" => [\$opt_warn_directcmd, "warn about use of direct command names instead of Make variables"],
- "extra" => [\$opt_warn_extra, "enable some extra warnings"],
- "order" => [\$opt_warn_order, "warn if Makefile entries are unordered"],
- "perm" => [\$opt_warn_perm, "warn about unforeseen variable definition and use"],
- "plist-depr" => [\$opt_warn_plist_depr, "warn about deprecated paths in PLISTs"],
- "plist-sort" => [\$opt_warn_plist_sort, "warn about unsorted entries in PLISTs"],
- "quoting" => [\$opt_warn_quoting, "warn about quoting issues"],
- "space" => [\$opt_warn_space, "warn about inconsistent use of white-space"],
- "style" => [\$opt_warn_style, "warn about stylistic issues"],
- "types" => [\$opt_warn_types, "do some simple type checking in Makefiles"],
- "varorder" => [\$opt_warn_varorder, "warn about the ordering of variables"],
-);
-
-my $opt_autofix = false;
-my $opt_dumpmakefile = false;
-my $opt_import = false;
-my $opt_klickibunti = false; # experimental
-my $opt_quiet = false;
-my $opt_recursive = false;
-my $opt_rcsidstring = "NetBSD";
-my (@options) = (
- # [ usage-opt, usage-message, getopt-opt, getopt-action ]
- [ "-C{check,...}", "Enable or disable specific checks",
- "check|C=s",
- sub {
- my ($opt, $val) = @_;
- parse_multioption($val, \%checks);
- } ],
- [ "-D{debug,...}", "Enable or disable debugging categories",
- "debugging|D=s",
- sub ($$) {
- my ($opt, $val) = @_;
- parse_multioption($val, \%debug);
- } ],
- [ "-F|--autofix", "Try to automatically fix some errors (experimental)",
- "autofix|F", \$opt_autofix ],
- [ "-I|--dumpmakefile", "Dump the Makefile after parsing",
- "dumpmakefile|I", \$opt_dumpmakefile ],
- [ "-R|--rcsidstring", "Set the allowed RCS Id strings",
- "rcsidstring|R=s", \$opt_rcsidstring ],
- [ "-V|--version", "print the version number of pkglint",
- "version|V",
- sub {
- print(conf_distver . "\n");
- exit(0);
- } ],
- [ "-W{warn,...}", "enable or disable specific warnings",
- "warning|W=s",
- sub {
- my ($opt, $val) = @_;
- parse_multioption($val, \%warnings);
- } ],
- [ "-e|--explain", "Explain the diagnostics or give further help",
- "explain|e", sub {
- PkgLint::Logging::set_explain();
- } ],
- [ "-g|--gcc-output-format", "Mimic the gcc output format",
- "gcc-output-format|g",
- sub {
- PkgLint::Logging::set_gcc_output_format();
- } ],
- [ "-h|--help", "print a detailed help message",
- "help|h",
- sub {
- help(*STDOUT, 0, 1);
- } ],
- [ "-i|--import", "Prepare the import of a wip package",
- "import|i", \$opt_import ],
- # Note: This is intentionally undocumented.
- [ "--pkgsrcdir", "Set the root directory of pkgsrc explicitly.",
- "pkgsrcdir=s", \$cwd_pkgsrcdir ],
- [ "-q|--quiet", "Don't print a summary line when finishing",
- "quiet|q", \$opt_quiet ],
- [ "-r|--recursive", "Recursive---check subdirectories, too",
- "recursive|r", \$opt_recursive ],
- [ "-s|--source", "Show the source lines together with diagnostics",
- "source|s",
- sub {
- PkgLint::Logging::set_show_source_flag();
- } ],
- [ "--klickibunti", "Enable colored and precise diagnostics",
- "klickibunti",
- sub {
- PkgLint::Logging::set_klickibunti_flag();
- } ],
-);
-
-#
-# Commonly used regular expressions.
-#
-
-use constant regex_dependency_gt => qr"^((?:\$\{[\w_]+\}|[\w_]|-[^\d])+)>=(.*)$";
-use constant regex_dependency_wildcard
- => qr"^((?:\$\{[\w_]+\}|[\w_]|-[^\d\[])+)-(?:\[0-9\]|\d.*)$";
-use constant regex_gnu_configure_volatile_vars
- => qr"^(?:.*_)?(?:CFLAGS||CPPFLAGS|CXXFLAGS|FFLAGS|LDFLAGS|LIBS)$";
-use constant regex_mk_comment => qr"^ *\s*#(.*)$";
-use constant regex_mk_cond => qr"^\.(\s*)(if|ifdef|ifndef|else|elif|endif|for|endfor|undef)(?:\s+([^\s#][^#]*?))?\s*(?:#.*)?$";
-use constant regex_mk_dependency=> qr"^([^\s:]+(?:\s*[^\s:]+)*):\s*([^#]*?)(?:\s*#.*)?$";
-use constant regex_mk_include => qr"^\.\s*s?include\s+\"([^\"]+)\"\s*(?:#.*)?$";
-use constant regex_mk_sysinclude=> qr"^\.\s*s?include\s+<([^>]+)>\s*(?:#.*)?$";
-use constant regex_mk_shellvaruse => qr"(?:^|[^\$])\$\$\{?(\w+)\}?"; # XXX: not perfect
-use constant regex_pkgname => qr"^((?:[\w.+]|-[^\d])+)-(\d(?:\w|\.\d)*)$";
-use constant regex_mk_shellcmd => qr"^\t(.*)$";
-use constant regex_rcs_conflict => qr"^(<<<<<<<|=======|>>>>>>>)";
-use constant regex_unresolved => qr"\$\{";
-use constant regex_validchars => qr"[\011\040-\176]";
-# Note: the following regular expression looks more complicated than
-# necessary to avoid a stack overflow in the Perl interpreter.
-# The leading white-space may only consist of \040 characters, otherwise
-# the order of regex_varassign and regex_mk_shellcmd becomes important.
-use constant regex_varassign => qr"^ *([-*+A-Z_a-z0-9.\${}\[]+?)\s*(=|\?=|\+=|:=|!=)\s*((?:[^\\#\s]+|\s+?|(?:\\#)+|\\)*?)(?:\s*(#.*))?$";
-use constant regex_sh_varassign => qr"^([A-Z_a-z][0-9A-Z_a-z]*)=";
-
-# The following "constants" are often used in contexts where
-# interpolation comes handy, so they are variables. Nevertheless they
-# are not modified.
-
-# This regular expression cannot parse all kinds of shell programs, but
-# it will catch almost all shell programs that are portable enough to be
-# used in pkgsrc.
-my $regex_shellword = qr"\s*(
- \#.* # shell comment
- |
- (?: '[^']*' # single quoted string
- | \"(?:\\.|[^\"\\])*\" # double quoted string
- | \`[^\`]*\` # backticks string
- | \\\$\$ # an escaped dollar sign
- | \\[^\$] # other escaped characters
- | \$\{[^{}]+\} # make(1) variable
- | \$\([^()]+\) # make(1) variable, $(...)
- | \$[/\@<^] # special make(1) variables
- | \$\$[0-9A-Z_a-z]+ # shell variable
- | \$\$[?@] # special shell variables
- | \$\$\{[0-9A-Z_a-z]+\} # shell variable in braces
- | \$\$\( # POSIX-style backticks replacement
- | [^\(\)'\"\\\s;&\|<>\`\$] # non-special character
- | \$\{[^\s\"'`]+ # HACK: nested make(1) variables
- )+ | ;;? | &&? | \|\|? | \( | \) | >& | <<? | >>? | \#.*)"sx;
-my $regex_varname = qr"(?:[-*+.0-9A-Z_a-z{}\[]+|\$\{[\w_]+\})+";
-my $regex_pkgbase = qr"(?:[+.0-9A-Z_a-z]|-[A-Z_a-z])+";
-my $regex_pkgversion = qr"\d(?:\w|\.\d)*";
-
-#
-# Commonly used explanations for diagnostics.
-#
-
-use constant expl_relative_dirs => (
- "Directories in the form \"../../category/package\" make it easier to",
- "move a package around in pkgsrc, for example from pkgsrc-wip to the",
- "main pkgsrc repository.");
-
-#
-# Global variables.
-#
-
-my $current_dir; # The currently checked directory.
-my $is_wip; # Is the current directory from pkgsrc-wip?
-my $is_internal; # Is the current item from the infrastructure?
-
-#
-# Variables for inter-package checks.
-#
-
-my $ipc_distinfo; # Maps "$alg:$fname" => "checksum".
-
-# Context of the package that is currently checked.
-my $pkgdir; # PKGDIR from the package Makefile
-my $filesdir; # FILESDIR from the package Makefile
-my $patchdir; # PATCHDIR from the package Makefile
-my $distinfo_file; # DISTINFO_FILE from the package Makefile
-my $effective_pkgname; # PKGNAME or DISTNAME from the package Makefile
-my $effective_pkgbase; # The effective PKGNAME without the version
-my $effective_pkgversion; # The version part of the effective PKGNAME
-my $effective_pkgname_line; # The origin of the three effective_* values
-my $hack_php_patches; # Ignore non-existing patches in distinfo
-my $seen_bsd_prefs_mk; # Has bsd.prefs.mk already been included?
-
-my $pkgctx_vardef; # variable name => line of definition
-my $pkgctx_varuse; # variable name => Boolean
-my $pkgctx_bl3; # buildlink3.mk name => line of inclusion
-my $seen_Makefile_common; # Does the package have any .includes?
-
-# Context of the Makefile that is currently checked.
-my $mkctx_for_variables; # The variables currently used in .for loops
-my $mkctx_indentations; # Indentation depth of preprocessing directives
-my $mkctx_target; # Current make(1) target
-my $mkctx_vardef; # { varname => line } for all variables that
- # are defined in the current file
-my $mkctx_build_defs; # Set of variables that are registered in
- # BUILD_DEFS, to assure that all user-defined
- # variables are added to it.
-my $mkctx_tools; # Set of tools that are declared to be used.
-
-my @todo_items; # The list of directory entries that still need
- # to be checked. Mostly relevant with
- # --recursive.
-
-#
-# Command line parsing and handling.
-#
-
-sub help($$$) {
- my ($out, $exitval, $show_all) = @_;
- my ($prog) = (basename($0));
- print $out ("usage: $prog [options] [package_directory]\n\n");
-
- my (@option_table) = ();
- foreach my $opt (@options) {
- push(@option_table, [" ", $opt->[0], $opt->[1]]);
- }
- print $out ("options:\n");
- PkgLint::Util::print_table($out, \@option_table);
- print $out ("\n");
-
- if (!$show_all) {
- exit($exitval);
- }
-
- my $categories = [
- # options, leading text,
- [ \%checks, "checks", "check" ],
- [ \%debug, "debugging options", "debug" ],
- [ \%warnings, "warnings", "warning" ],
- ];
- foreach my $category (@{$categories}) {
- my ($options, $leading, $name) = (@{$category});
- my $table = [
- [" ", "all", "", "enable all ".$category->[1]],
- [" ", "none", "", "disable all ".$category->[1]],
- ];
-
- foreach my $opt (sort keys %{$options}) {
- push(@{$table}, [ " ", $opt,
- (${$options->{$opt}->[0]} ? "(enabled)" : "(disabled)"),
- $options->{$opt}->[1]]);
- }
-
- print $out ("${leading}: (use \"${name}\" to enable, \"no-${name}\" to disable)\n");
- PkgLint::Util::print_table($out, $table);
- print $out ("\n");
- }
-
- exit($exitval);
-}
-
-sub parse_multioption($$) {
- my ($value, $optdefs) = @_;
- foreach my $opt (split(qr",", $value)) {
- if ($opt eq "none") {
- foreach my $key (keys %{$optdefs}) {
- ${$optdefs->{$key}->[0]} = false;
- }
-
- } elsif ($opt eq "all") {
- foreach my $key (keys %{$optdefs}) {
- ${$optdefs->{$key}->[0]} = true;
- }
-
- } else {
- my ($value) = (($opt =~ s/^no-//) ? false : true);
- if (exists($optdefs->{$opt})) {
- ${$optdefs->{$opt}->[0]} = $value;
- } else {
- print STDERR ("Invalid option: ${opt}\n");
- help(*STDERR, 1, 0);
- }
- }
- }
-}
-
-sub parse_command_line() {
- my (%options);
-
- foreach my $opt (@options) {
- $options{$opt->[2]} = $opt->[3];
- }
-
- {
- local $SIG{__WARN__} = sub {};
- if (!GetOptions(%options)) {
- help(*STDERR, 1, false);
- }
- }
-}
-
-#
-# Caching subroutines.
-#
-
-# The get_regex_plurals() function returns a regular expression that
-# matches for all make(1) variable names that are considered lists
-# of something.
-#
-# Rationale:
-#
-# The pkglint author thinks that variables containing lists of things
-# should have a name indicating some plural form. Sadly, there are other
-# reasons like backwards compatibility and other developer's
-# expectations that make changes to most of the following variables
-# highly unlikely.
-my $get_regex_plurals_value = undef;
-sub get_regex_plurals() {
-
- if (defined($get_regex_plurals_value)) {
- return $get_regex_plurals_value;
- }
-
- my @plurals_ok = qw(
- .*S
- .*LIST
- .*_AWK
- .*_ENV
- .*_REQD
- .*_SED
- .*_SKIP
- BUILDLINK_LDADD
- COMMENT
- EXTRACT_ONLY
- FETCH_MESSAGE
- GENERATE_PLIST
- PLIST_CAT
- PLIST_PRE
- PREPEND_PATH
- );
- my @plurals_missing_an_s = qw(
- .*_OVERRIDE
- .*_PREREQ
- .*_SRC
- .*_SUBST
- .*_TARGET
- .*_TMPL
- BUILDLINK_DEPMETHOD
- BUILDLINK_TRANSFORM
- EVAL_PREFIX
- INTERACTIVE_STAGE
- LICENSE
- MASTER_SITE_.*
- MASTER_SORT_REGEX
- NOT_FOR_COMPILER
- NOT_FOR_PLATFORM
- ONLY_FOR_COMPILER
- ONLY_FOR_PLATFORM
- PERL5_PACKLIST
- PKG_FAIL_REASON
- PKG_SKIP_REASON
- );
- my @plurals_reluctantly_accepted = qw(
- CRYPTO
- DEINSTALL_TEMPLATE
- FIX_RPATH
- INSTALL_TEMPLATE
- PYTHON_VERSIONS_INCOMPATIBLE
- REPLACE_INTERPRETER
- REPLACE_PERL
- REPLACE_RUBY
- RESTRICTED
- SITES_.*
- TOOLS_ALIASES\.*
- TOOLS_BROKEN
- TOOLS_CREATE
- TOOLS_GNU_MISSING
- TOOLS_NOOP
- );
- my $plurals = join("|",
- @plurals_ok,
- @plurals_missing_an_s,
- @plurals_reluctantly_accepted
- );
-
- $get_regex_plurals_value = qr"^(?:${plurals})$";
- return $get_regex_plurals_value;
-}
-
-#
-# Loading pkglint-specific data from files.
-#
-
-# The symbol table for ACL definitions maps ACL names to ACLs.
-my $acl_definitions = {};
-
-sub parse_acls($$) {
- my ($line, $acltext) = @_;
- my ($acls);
-
- use constant ACL_shortcuts => {
- "b" => qr"(?:^|/)buildlink3\.mk$",
- "c" => qr"(?:^|/)Makefile\.common$",
- "h" => qr"(?:^|/)hacks\.mk$",
- "m" => qr"(?:^|/)Makefile$",
- "o" => qr"(?:^|/)options\.mk$",
- };
-
- my $regex_acl_entry = qr"^(?:
- \$([\w_]+) # $acl_name
- | ([\w.*]+|_):([adpsu]*) # file*mask:perms
- ) (?:\,\s*|$)"x;
-
- if (!defined($acltext)) {
- return undef;
- }
-
- $acls = [];
- while ($acltext =~ s,$regex_acl_entry,,) {
- my ($acldef, $subject, $perms) = ($1, $2, $3);
-
- if (defined($acldef)) {
- if (!exists($acl_definitions->{$acldef})) {
- $line->log_fatal("ACL definition ${acldef} not found.");
- } else {
- push(@{$acls}, @{$acl_definitions->{$acldef}});
- }
-
- } else {
- # Transform $subject to a regular expression.
- $subject =~ s/\./[.]/g;
- $subject =~ s/\*/.*/g;
-
- push(@{$acls}, [exists(ACL_shortcuts->{$subject}) ? ACL_shortcuts->{$subject} : qr"(?:^|/)${subject}$", $perms]);
- }
- }
- if ($acltext ne "") {
- $line->log_fatal("Invalid ACL: ${acltext}.");
- }
-
- return $acls;
-}
-
-my $get_vartypes_map_result = undef;
-sub get_vartypes_map() {
- my ($fname, $vartypes);
-
- if (defined($get_vartypes_map_result)) {
- return $get_vartypes_map_result;
- }
-
- use constant re_acl_def => qr"^
- acl \s+
- (\w+) \s+ # ACL name
- = \s+
- \[ ([^\]]*) \] # ACL value
- (?:\s*\#.*)? # optional comment
- $"x;
-
- use constant re_vartypedef => qr"^
- ([\w\d_.]+?) # variable name
- (\*|\.\*|) \s+ # parameterized?
- (?:(InternalList|List) \s+ of \s+)? # kind of list
- (?:([\w\d_]+) | \{\s*([\w\d_+,\-.\s]+?)\s*\}) # basic type
- (?:\s+ \[ ([^\]]*) \])? # optional ACL
- (?:\s*\#.*)? # optional comment
- $"x;
-
- $fname = conf_datadir."/makevars.map";
- $vartypes = {};
-
- if ((my $lines = load_lines($fname, true))) {
- foreach my $line (@{$lines}) {
- if ($line->text =~ qr"^(?:#.*|\s*)$") {
- # ignore empty and comment lines
-
- } elsif ($line->text =~ re_acl_def) {
- my ($aclname, $aclvalue) = ($1, $2);
-
- $acl_definitions->{$aclname} = parse_acls($line, $aclvalue);
-
- } elsif ($line->text =~ re_vartypedef) {
- my ($varname, $par, $kind_of_list_text, $typename, $enums, $acltext) = ($1, $2, $3, $4, $5, $6);
- my $kind_of_list = !defined($kind_of_list_text) ? LK_NONE
- : ($kind_of_list_text eq "List") ? LK_EXTERNAL
- : LK_INTERNAL;
-
- my $basic_type = defined($enums)
- ? array_to_hash(split(qr"\s+", $enums))
- : $typename;
- my $type = PkgLint::Type->new($kind_of_list, $basic_type, parse_acls($line, $acltext), NOT_GUESSED);
- if ($par eq "" || $par eq "*") {
- $vartypes->{$varname} = $type;
- }
- if ($par eq "*" || $par eq ".*") {
- $vartypes->{"${varname}.*"} = $type;
- }
-
- } else {
- $line->log_fatal("Unknown line format.");
- }
- }
- } else {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-
-# TODO: Enable when the time is ripe.
-if (false) {
- # Additionally, scan mk/defaults/mk.conf for variable
- # definitions. All these variables are reserved for the user and
- # must not be set within packages.
- $fname = "${cwd_pkgsrcdir}/mk/defaults/mk.conf";
- if ((my $lines = load_file($fname))) {
- foreach my $line (@{$lines}) {
- if ($line->text =~ qr"^#?([\w_]+)\?=") {
- my ($varname) = ($1);
- $opt_debug_misc and $line->log_debug("Found user-definable variable ${varname}.");
- $vartypes->{$varname} = "Userdefined"; # FIXME: type error
- }
- }
- } else {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-}
-
- return ($get_vartypes_map_result = $vartypes);
-}
-
-my $get_deprecated_map_result = undef;
-sub get_deprecated_map() {
- my ($fname, $lines, $vars);
-
- if (defined($get_deprecated_map_result)) {
- return $get_deprecated_map_result;
- }
-
- $fname = conf_datadir."/deprecated.map";
- if (!($lines = load_file($fname))) {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-
- $vars = {};
- foreach my $line (@{$lines}) {
- if ($line->text =~ qr"^#" || $line->text =~ qr"^\s*$") {
- # Ignore empty and comment lines.
-
- } elsif ($line->text =~ qr"^(\S+)\s+(.*)$") {
- $vars->{$1} = $2;
-
- } else {
- $line->log_fatal("Unknown line format.");
- }
- }
- return ($get_deprecated_map_result = $vars);
-}
-
-my $load_dist_sites_url2name = undef;
-my $load_dist_sites_names = undef;
-sub load_dist_sites() {
- my ($fname) = ("${cwd_pkgsrcdir}/mk/fetch/sites.mk");
- my ($lines) = load_file($fname);
- my ($varname) = undef;
- my ($ignoring) = false;
- my ($url2name) = {};
- my ($names) = {};
-
- if (!$lines) {
- log_error($fname, NO_LINE_NUMBER, "Could not be read.");
- $load_dist_sites_url2name = $url2name;
- $load_dist_sites_names = $names;
- return;
- }
- foreach my $line (@{$lines}) {
- my $text = $line->text;
-
- if ($text =~ qr"^(MASTER_SITE_\w+)\+=\s*\\$"o) {
- $varname = $1;
- $names->{$varname} = true;
- $ignoring = false;
-
- } elsif ($text eq "MASTER_SITE_BACKUP?=\t\\") {
- $ignoring = true;
-
- } elsif ($text =~ qr"^\t((?:http://|ftp://)\S+/)(?:|\s*\\)$"o) {
- if (!$ignoring) {
- if (defined($varname)) {
- $url2name->{$1} = $varname;
- } else {
- $line->log_error("Lonely URL found.");
- }
- }
-
- } elsif ($text =~ qr"^(?:#.*|\s*)$") {
- # ignore empty and comment lines
-
- } elsif ($text =~ qr"BSD_SITES_MK") {
- # ignore multiple inclusion guards
-
- } else {
- $line->log_fatal("Unknown line type.");
- }
- }
-
- # Explicitly allowed, although not defined in mk/fetch/sites.mk.
- $names->{"MASTER_SITE_SUSE_UPD"} = true;
- $names->{"MASTER_SITE_LOCAL"} = true;
-
- $opt_debug_misc and log_debug($fname, NO_LINES, "Loaded " . scalar(keys(%{$url2name})) . " MASTER_SITE_* definitions.");
- $load_dist_sites_url2name = $url2name;
- $load_dist_sites_names = $names;
-}
-
-sub get_dist_sites() {
- if (!defined($load_dist_sites_url2name)) {
- load_dist_sites();
- }
- return $load_dist_sites_url2name;
-}
-
-sub get_dist_sites_names() {
- if (!defined($load_dist_sites_names)) {
- load_dist_sites();
- }
- return $load_dist_sites_names;
-}
-
-my $get_pkg_options_result = undef;
-sub get_pkg_options() {
-
- if (defined($get_pkg_options_result)) {
- return $get_pkg_options_result;
- }
-
- my ($fname) = ("${cwd_pkgsrcdir}/mk/defaults/options.description");
- my ($lines, $options);
-
- if (!($lines = load_file($fname))) {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-
- $options = {};
- foreach my $line (@{$lines}) {
- if ($line->text =~ qr"^([-0-9a-z_]+)(?:\s+(.*))?$") {
- my ($optname, $optdescr) = ($1, $2);
-
- $options->{$optname} = defined($optdescr)
- ? $optdescr
- : "";
- } else {
- $line->log_error("Unknown line format.");
- }
- }
-
- return ($get_pkg_options_result = $options);
-}
-
-my $load_tool_names_system_build_defs = undef; # XXX: misplaced, but works
-my $load_tool_names_tools = undef;
-my $load_tool_names_vartools = undef;
-my $load_tool_names_varname_to_toolname = undef;
-my $load_tool_names_predefined_tools = undef;
-sub load_tool_names() {
- my ($tools, $vartools, $predefined_tools, $varname_to_toolname, @tool_files);
- my ($system_build_defs);
-
- #
- # Get the list of files that define the tools from bsd.tools.mk.
- #
-
- @tool_files = ("defaults.mk");
- {
- my $fname = "${cwd_pkgsrcdir}/mk/tools/bsd.tools.mk";
- my $lines = load_lines($fname, true);
- if (!$lines) {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-
- foreach my $line (@{$lines}) {
- if ($line->text =~ regex_mk_include) {
- my ($includefile) = ($1);
- if ($includefile =~ qr"^\$\{PKGSRCDIR\}/mk/tools/(.*)$") {
- push(@tool_files, $1);
- }
- }
- }
- }
- assert(scalar(@tool_files) > 1, "Too few tool files. Maybe the files have been renamed again?");
-
- #
- # Scan the tool files for the actual definitions of the tools.
- #
-
- $tools = {};
- $vartools = {};
- $predefined_tools = {};
- $varname_to_toolname = {};
- $system_build_defs = {};
- foreach my $basename (@tool_files) {
- my $fname = "${cwd_pkgsrcdir}/mk/tools/${basename}";
- my $lines = load_lines($fname, true);
-
- if (!$lines) {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-
- foreach my $line (@{$lines}) {
- if ($line->text =~ regex_varassign) {
- my ($varname, undef, $value, undef) = ($1, $2, $3, $4);
- if ($varname eq "TOOLS_CREATE" && $value =~ qr"^([-\w.]+|\[)$") {
- $tools->{$value} = true;
-
- } elsif ($varname =~ qr"^(?:_TOOLS_VARNAME)\.([-\w.]+|\[)$") {
- $tools->{$1} = true;
- $vartools->{$1} = $value;
- $varname_to_toolname->{$value} = $1;
-
- } elsif ($varname =~ qr"^(?:TOOLS_PATH|_TOOLS_DEPMETHOD)\.([-\w.]+|\[)$") {
- $tools->{$1} = true;
-
- } elsif ($varname =~ qr"^_TOOLS\.(.*)") {
- $tools->{$1} = true;
- foreach my $tool (split(qr"\s+", $value)) {
- $tools->{$tool} = true;
- }
- }
- }
- }
- }
-
- foreach my $basename ("bsd.pkg.mk") {
- my $fname = "${cwd_pkgsrcdir}/mk/${basename}";
- my $lines = load_lines($fname, true);
- my $cond_depth = 0;
-
- if (!$lines) {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-
- foreach my $line (@{$lines}) {
- my $text = $line->text;
-
- if ($text =~ regex_varassign) {
- my ($varname, undef, $value, undef) = ($1, $2, $3, $4);
-
- if ($varname eq "USE_TOOLS") {
- $opt_debug_tools and $line->log_debug("[cond_depth=${cond_depth}] $value");
- if ($cond_depth == 0) {
- foreach my $tool (split(qr"\s+", $value)) {
- if ($tool !~ regex_unresolved && exists($tools->{$tool})) {
- $predefined_tools->{$tool} = true;
- # The path (without arguments) to the tool
- $predefined_tools->{"TOOLS_${tool}"} = true;
- }
- }
- }
- } elsif ($varname eq "_BUILD_DEFS") {
- foreach my $bdvar (split(qr"\s+", $value)) {
- $system_build_defs->{$bdvar} = true;
- }
- }
-
- } elsif ($text =~ regex_mk_cond) {
- my ($indent, $cond, $args, $comment) = ($1, $2, $3, $4);
-
- if ($cond =~ qr"^(?:if|ifdef|ifndef|for)$") {
- $cond_depth++;
- } elsif ($cond =~ qr"^(?:endif|endfor)$") {
- $cond_depth--;
- }
- }
- }
- }
-
- $opt_debug_tools and log_debug(NO_FILE, NO_LINE_NUMBER, "Known tools: ".join(" ", sort(keys(%{$tools}))));
- $opt_debug_tools and log_debug(NO_FILE, NO_LINE_NUMBER, "Known vartools: ".join(" ", sort(keys(%{$vartools}))));
- $opt_debug_tools and log_debug(NO_FILE, NO_LINE_NUMBER, "Predefined tools: " . join(" ", sort(keys(%{$predefined_tools}))));
- $opt_debug_tools and log_debug(NO_FILE, NO_LINE_NUMBER, "Known varnames: " . join(" ", sort(keys(%{$varname_to_toolname}))));
- $opt_debug_misc and log_debug(NO_FILE, NO_LINES, "System-provided BUILD_DEFS: " . join(" ", sort(keys(%{$system_build_defs}))));
-
- # Some user-defined variables do not influence the binary
- # package at all and therefore do not have to be added to
- # BUILD_DEFS.
- foreach my $bdvar (qw(DISTDIR FETCH_CMD FETCH_OUTPUT_ARGS GAMEOWN GAMEGRP GAMEDIRMODE)) {
- $system_build_defs->{$bdvar} = true;
- }
- #$system_build_defs->{"PACKAGES"} = true;
-
- $load_tool_names_tools = $tools;
- $load_tool_names_vartools = $vartools;
- $load_tool_names_predefined_tools = $predefined_tools;
- $load_tool_names_varname_to_toolname = $varname_to_toolname;
- $load_tool_names_system_build_defs = $system_build_defs;
-}
-
-# Returns the set of known tool names and contains for example "sed" and
-# "gm4".
-sub get_tool_names() {
-
- if (!defined($load_tool_names_tools)) {
- load_tool_names();
- }
- return $load_tool_names_tools;
-}
-
-# Returns the mapping from tool names to their respective variable. For
-# example, "sed" => "SED", "gzip" => "GZIP_CMD".
-sub get_vartool_names() {
-
- if (!defined($load_tool_names_vartools)) {
- load_tool_names();
- }
- return $load_tool_names_vartools;
-}
-
-# Returns the set of those tools with associated variables that a
-# package does not need to add to USE_TOOLS explicitly because they
-# are used by the pkgsrc infrastructure, too.
-sub get_predefined_tool_names() {
- if (!defined($load_tool_names_predefined_tools)) {
- load_tool_names();
- }
- return $load_tool_names_predefined_tools;
-}
-
-# Returns a mapping from tool variable names to the tool name they use.
-# For example, "GZIP_CMD" => "gzip" and "SED" => "sed".
-sub get_varname_to_toolname() {
- if (!defined($load_tool_names_varname_to_toolname)) {
- load_tool_names();
- }
- return $load_tool_names_varname_to_toolname;
-}
-
-# Returns the set of tool variable names that may not be converted to
-# their "direct" form, that is: ${CP} => cp.
-sub get_required_vartool_varnames() {
- use constant required_vartool_varnames => array_to_hash(qw(ECHO ECHO_N FALSE TEST TRUE));
-
- return required_vartool_varnames;
-}
-
-# Returns the set of tools that must be used by their variable name.
-sub get_required_vartools() {
- use constant required_vartools => array_to_hash(qw(echo false test true));
-
- return required_vartools;
-}
-
-
-# Returns the set of user-defined variables that are added to BUILD_DEFS
-# within the bsd.pkg.mk file.
-sub get_system_build_defs() {
- if (!defined($load_tool_names_system_build_defs)) {
- load_tool_names();
- }
- return $load_tool_names_system_build_defs;
-}
-
-sub load_doc_TODO_updates($) {
- my ($fname) = @_;
- my ($lines, $updates, $state, $re_suggested_update);
-
- if (!($lines = load_file($fname))) {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- }
-
- $updates = [];
- $state = 0;
- foreach my $line (@{$lines}) {
- my $text = $line->text;
-
- if ($state == 0 && $text eq "Suggested package updates") {
- $state = 1;
- } elsif ($state == 1 && $text eq "") {
- $state = 2;
- } elsif ($state == 2) {
- $state = 3;
- } elsif ($state == 3 && $text eq "") {
- $state = 4;
- }
-
- if ($state == 3) {
- if ($text =~ qr"^\to\s(\S+)(?:\s*(.+))?$") {
- my ($spuname, $comment) = ($1, $2);
- if ($spuname =~ regex_pkgname) {
- push(@{$updates}, [$line, $1, $2, $comment]);
- } else {
- $line->log_warning("Invalid package name $spuname");
- }
- } else {
- $line->log_warning("Invalid line format $text");
- }
- }
- }
-
- return $updates;
-}
-
-my $get_doc_TODO_updates_result = undef;
-sub get_doc_TODO_updates() {
-
- if (!defined($get_doc_TODO_updates_result)) {
- $get_doc_TODO_updates_result = load_doc_TODO_updates("${cwd_pkgsrcdir}/doc/TODO");
- }
- return $get_doc_TODO_updates_result;
-}
-
-my $get_wip_TODO_updates_result = undef;
-sub get_wip_TODO_updates() {
-
- if (!defined($get_wip_TODO_updates_result)) {
- $get_wip_TODO_updates_result = load_doc_TODO_updates("${cwd_pkgsrcdir}/wip/TODO");
- }
- return $get_wip_TODO_updates_result;
-}
-
-sub get_suggested_package_updates() {
-
- return ($is_wip)
- ? get_wip_TODO_updates()
- : get_doc_TODO_updates();
-}
-
-# Load all variables from mk/defaults/mk.conf. Since pkglint does not
-# load the infrastructure files during normal operation, these
-# definitions have to be added explicitly.
-sub load_userdefined_variables() {
- my $fname = "${cwd_pkgsrcdir}/mk/defaults/mk.conf";
- my ($lines, $vars);
-
- $vars = {};
- $lines = load_lines($fname, true);
- if (!$lines) {
- log_fatal($fname, NO_LINES, "Cannot be read.");
- }
-
- foreach my $line (@{$lines}) {
- if ($line->text =~ regex_varassign) {
- my ($varname, $op, $value, $comment) = ($1, $2, $3, $4);
-
- $vars->{$varname} = $line;
- }
- }
-
- return $vars;
-}
-
-my $get_userdefined_variables_result = undef;
-sub get_userdefined_variables() {
-
- if (!defined($get_userdefined_variables_result)) {
- $get_userdefined_variables_result = load_userdefined_variables();
- }
- return $get_userdefined_variables_result;
-}
-
-sub match_all($$); # needed by load_shared_dirs()
-
-my $load_shared_dirs_dir_to_varname = undef;
-my $load_shared_dirs_varname_to_dirs = undef;
-my $load_shared_dirs_dir_to_id = undef;
-sub load_shared_dirs() {
- return if defined($load_shared_dirs_dir_to_varname);
-
- $opt_debug_trace and log_debug(NO_FILE, NO_LINES, "load_shared_dirs()");
-
- my $dir_to_varname = {};
- my $varname_to_dirs = {};
- my $dir_to_id = {};
-
- foreach my $pkg qw(
- misc/gnome-dirs misc/gnome1-dirs misc/gnome2-dirs
- misc/theme-dirs
- misc/xdg-dirs misc/xdg-x11-dirs
- misc/xorg-dirs
- print/texmf-dirs) {
-
- $opt_debug_trace and log_debug(NO_FILE, NO_LINES, "pkg=$pkg");
- my $dirs_mk = load_lines("$cwd_pkgsrcdir/$pkg/dirs.mk", true);
- assert(defined($dirs_mk), "$pkg/dirs.mk is not readable.");
-
- foreach my $line (@$dirs_mk) {
- parseline_mk($line);
- if ($line->has("is_varassign")) {
- my $varname = $line->get("varname");
- my $value = $line->get("value");
-
- if ($varname =~ qr"^[A-Z]\w*_DIRS$" && $value ne "") {
- if (exists($dir_to_varname->{$value})) {
- # FIXME: misc/xdg-x11-dirs and misc/xdg-dirs conflict.
- #$line->log_warning("Duplicate directory, also appears in " . $dir_to_varname->{$value} . ".");
- } else {
- $dir_to_varname->{$value} = $varname;
- }
- }
-
- } elsif ($line->has("is_cond") && $line->get("directive") eq "for") {
- my $args = $line->get("args");
- while ($args =~ /\$\{(\w+_DIRS)\}/gc) {
- push(@{$varname_to_dirs->{$1}}, $pkg);
- }
- }
- }
-
- my $makefile = load_lines("$cwd_pkgsrcdir/$pkg/Makefile", true);
- assert(defined($makefile), "$pkg/Makefile is not readable.");
- foreach my $line (@$makefile) {
- my $pkgname = undef;
-
- parseline_mk($line);
- if ($line->has("is_varassign") && $line->get("varname") eq "DISTNAME") {
- if ($line->get("value") =~ qr"^(.*)-dirs-(.*)$") {
- $dir_to_id->{$pkg} = "$1-$2";
- } else {
- assert(false, "$pkg/Makefile does not define a proper DISTNAME.");
- }
- }
- }
- }
- $load_shared_dirs_dir_to_varname = $dir_to_varname;
- $load_shared_dirs_varname_to_dirs = $varname_to_dirs;
- $load_shared_dirs_dir_to_id = $dir_to_id;
-}
-
-# Given a directory name, returns a list of possible identifiers to be
-# used in USE_DIRS.
-sub get_shared_dir_ids($$) {
- my ($line, $dir) = @_;
- my @ids;
-
- $opt_debug_trace and $line->log_debug("get_shared_dir_ids(\"$dir\")");
-
- load_shared_dirs();
- my $varname = $load_shared_dirs_dir_to_varname->{$dir};
- return () unless $varname;
- #print "varname=$varname\n";
- foreach my $dir2 (@{$load_shared_dirs_varname_to_dirs->{$varname}}) {
- #print "dir2=$dir2\n";
- my $id = $load_shared_dirs_dir_to_id->{$dir2};
- #print "id=$id\n";
- push(@ids, $id);
- }
- return @ids;
-}
-
-#
-# Miscellaneous functions
-#
-
-sub match_all($$) {
- my ($text, $re) = @_;
- my ($mm, $rest, $lastpos);
-
- $mm = [];
- $rest = $text;
- $lastpos = 0;
- pos(undef);
- while ($rest =~ m/$re/gc) {
- my @starts = @-;
- my @ends = @+;
-
- $lastpos = $ends[0];
-
- push(@{$mm}, PkgLint::SimpleMatch->new($text, \@starts, \@ends));
- }
- return ($mm, substr($rest, $lastpos));
-}
-
-sub autofix($) {
- my ($lines) = @_;
-
- if ($opt_autofix) {
- save_autofix_changes($lines);
- }
-}
-
-# Checks whether a file is already committed to the CVS repository or not.
-sub is_committed($) {
- my ($fname) = @_;
- my ($basename, $entries);
-
- $basename = basename($fname);
- $entries = load_file(dirname($fname) . "/CVS/Entries");
- if (!$entries) {
- return false;
- }
- foreach my $entry (@{$entries}) {
- if ($entry->text =~ qr"^/\Q${basename}\E/") {
- return true;
- }
- }
- return false;
-}
-
-# Checks whether a directory is practically empty, that is, all it
-# contains are ".", ".." and "CVS", recursively.
-sub is_emptydir($);
-sub is_emptydir($) {
- my ($dir) = @_;
- my ($rv);
-
- if (!opendir(DIR, $dir)) {
- return true;
- }
-
- $rv = true;
- foreach my $subdir (readdir(DIR)) {
- next if $subdir eq "." || $subdir eq ".." || $subdir eq "CVS";
- next if -d "${dir}/${subdir}" && is_emptydir("${dir}/${subdir}");
-
- $rv = false;
- last;
- }
-
- closedir(DIR);
- return $rv;
-}
-
-# Guess the type of file based on the filename. This is used to select
-# the proper subroutine for detecting absolute pathnames.
-#
-# Returns one of "source", "shell", "make", "text", "configure",
-# "ignore", "unknown".
-#
-sub get_filetype($$) {
- my ($line, $fname) = @_;
- my $basename = basename($fname);
-
- # The trailig .in part is not needed, since it does not
- # influence the type of contents.
- $basename =~ s,\.in$,,;
-
- # Let's assume that everything else that looks like a Makefile
- # is indeed a Makefile.
- if ($basename =~ qr"^I?[Mm]akefile(?:\..*|)?|.*\.ma?k$") {
- return "make";
- }
-
- # Too many false positives for shell scripts, so configure
- # scripts get their own category.
- if ($basename =~ qr"^configure(?:|\.ac)$") {
- $opt_debug_unchecked and $line->log_debug("Skipped check for absolute pathnames.");
- return "configure";
- }
-
- if ($basename =~ qr"\.(?:sh|m4)$"i) {
- return "shell";
- }
-
- if ($basename =~ qr"\.(?:cc?|cpp|cxx|el|hh?|hpp|l|pl|pm|py|s|t|y)$"i) {
- return "source";
- }
-
- if ($basename =~ qr"^.+\.(?:\d+|conf|html|info|man|po|tex|texi|texinfo|txt|xml)$"i) {
- return "text";
- }
-
- # Filenames without extension are hard to guess right. :(
- if ($basename !~ qr"\.") {
- return "unknown";
- }
-
- $opt_debug_misc and $line->log_debug("Don't know the file type of ${fname}.");
-
- return "unknown";
-}
-
-# Returns the list of subdirectories of a directory, except "CVS".
-sub get_subdirs($) {
- my ($dir) = @_;
- my (@result) = ();
-
- if (opendir(DIR, $dir)) {
- foreach my $subdir (readdir(DIR)) {
- if ($subdir ne "." && $subdir ne ".." && $subdir ne "CVS" && -d "${dir}/${subdir}" && !is_emptydir("${dir}/${subdir}")) {
- push(@result, $subdir);
- }
- }
- closedir(DIR);
- }
- return @result;
-}
-
-# No package file should ever be executable. Even the INSTALL and
-# DEINSTALL scripts are usually not usable in the form they have in the
-# package, as the pathnames get adjusted during installation. So there is
-# no need to have any file executable.
-sub checkperms($) {
- my ($fname) = @_;
-
- if (-f $fname && -x $fname && !is_committed($fname)) {
- log_warning($fname, NO_LINE_NUMBER, "Should not be executable.");
- }
-}
-
-sub resolve_relative_path($$) {
- my ($relpath, $adjust_depth) = @_;
-
- $relpath =~ s,\$\{PKGSRCDIR\},$cur_pkgsrcdir,;
- $relpath =~ s,\$\{\.CURDIR\},.,;
- $relpath =~ s,\$\{\.PARSEDIR\},.,;
- $relpath =~ s,\$\{PHPPKGSRCDIR\},../../lang/php5,;
- $relpath =~ s,\$\{SUSE_DIR_PREFIX\},suse91,;
- $relpath =~ s,\$\{PYPKGSRCDIR\},../../lang/python23,;
- if ($adjust_depth && $relpath =~ qr"^\.\./\.\./([^.].*)$") {
- $relpath = "${cur_pkgsrcdir}/$1";
- }
- if (defined($pkgdir)) {
- $relpath =~ s,\$\{PKGDIR\},$pkgdir,g;
- }
-
- return $relpath;
-}
-
-sub expand_variable($$) {
- my ($whole, $varname) = @_;
- my ($value, $re);
-
- $re = qr"\n\Q${varname}\E([+:?]?)=[ \t]*([^\n#]*)";
- $value = undef;
- while ($whole =~ m/$re/g) {
- my ($op, $val) = ($1, $2);
- if ($op ne "?" || !defined($value)) {
- $value = $val;
- }
- }
- if (!defined($value)) {
- return undef;
- }
-
- $value = resolve_relative_path($value, true);
- if ($value =~ regex_unresolved) {
- $opt_debug_misc and log_debug(NO_FILE, NO_LINES, "[expand_variable] The variable ${varname} could not be resolved completely. Its value is \"${value}\".");
- }
- return $value;
-}
-
-sub set_default_value($$) {
- my ($varref, $value) = @_;
-
- if (!defined(${$varref}) || ${$varref} =~ regex_unresolved) {
- ${$varref} = $value;
- }
-}
-
-sub strip_mk_comment($) {
- my ($text) = @_;
-
- $text =~ s/(^|[^\\])#.*/$1/;
- $text =~ s/\\#/#/g;
- return $text;
-}
-
-# Returns the value of a shell word, with one level of quoting removed.
-# This makes pattern matching easier when the interesting part is not
-# what make(1) or sh(1) sees, but the command that is called by the
-# shell. This function does not resolve or replace any variables.
-sub unescape_shellword($) {
- my ($text) = @_;
-
- # TODO: implement this.
- assert(false, "unescape_shellword is not yet implemented.");
-}
-
-# Removes all uses of make variables from a string.
-sub remove_variables($) {
- my ($text) = @_;
-
- while ($text =~ s/\$\{([^{}]*)\}//g) {
- }
- return $text;
-}
-
-# Converts an array of PkgLint::String to an array of PkgLint::Line.
-sub strings_to_lines($) {
- my ($strings) = @_;
- my ($retval);
-
- $retval = [];
- foreach my $s (@{$strings}) {
- push(@{$retval}, $s->line);
- }
- return $retval;
-}
-
-sub backtrace($) {
- my $msg = shift();
- my (@callers);
-
- my $n = 0;
- while (my @info = caller($n)) {
- push(@callers, [$info[2], $info[3]]);
- $n++;
- }
-
- log_debug(NO_FILE, NO_LINE_NUMBER, $msg);
- for (my $i = $#callers; $i >= 0; $i--) {
- my $info = $callers[$i];
- log_debug(NO_FILE, NO_LINE_NUMBER, sprintf(" line %4d called %s", $info->[0], $info->[1]));
- }
-}
-
-# Returns the number of columns that a string occupies when printed with
-# a tabulator size of 8.
-sub tablen($) {
- my ($s) = @_;
- my ($len);
-
- $len = 0;
- foreach my $c (split(qr"", $s)) {
- if ($c eq "\t") {
- $len = ($len + 7) & ~7;
- } else {
- $len++;
- }
- }
- return $len;
-}
-
-sub shell_split($) {
- my ($text) = @_;
- my ($words);
-
- $words = [];
- while ($text =~ s/^$regex_shellword//) {
- push(@{$words}, $1);
- }
- return (($text =~ qr"^\s*$") ? $words : false);
-}
-
-sub varname_base($) {
- my ($varname) = @_;
-
- return ($varname =~ qr"^(.*?)\..*$") ? $1 : $varname;
-}
-
-sub varname_canon($) {
- my ($varname) = @_;
-
- return ($varname =~ qr"^(.*?)\..*$") ? "$1.*" : $varname;
-}
-
-sub varname_param($) {
- my ($varname) = @_;
-
- return ($varname =~ qr"^.*?\.(.*)$") ? $2 : undef;
-}
-
-sub determine_used_variables($) {
- my ($lines) = @_;
- my ($rest);
-
- foreach my $line (@{$lines}) {
- $rest = $line->text;
- while ($rest =~ s/(?:\$\{|defined\(|empty\()([0-9+.A-Z_a-z]+)[:})]//) {
- my ($varname) = ($1);
- $pkgctx_varuse->{$varname} = $line;
- $pkgctx_varuse->{varname_canon($varname)} = $line;
- $opt_debug_unused and $line->log_debug("Variable ${varname} is used.");
- }
- }
-}
-
-sub extract_used_variables($$) {
- my ($line, $text) = @_;
- my ($rest, $result);
-
- $rest = $text;
- $result = [];
- while ($rest =~ s/^(?:[^\$]+|\$[\$*<>?\@]|\$\{([.0-9A-Z_a-z]+)(?::(?:[^\${}]|\$[^{])+)?\})//) {
- my ($varname) = ($1);
-
- if (defined($varname)) {
- push(@{$result}, $varname);
- }
- }
-
- if ($rest ne "") {
- $opt_debug_misc and $line->log_warning("Could not extract variables: ${rest}");
- }
-
- return $result;
-}
-
-my $check_pkglint_version_done = false;
-sub check_pkglint_version() {
-
- return if $check_pkglint_version_done;
- $check_pkglint_version_done = true;
-
- my $lines = load_lines("${cwd_pkgsrcdir}/pkgtools/pkglint/Makefile", true);
- return unless $lines;
-
- my $pkglint_version = undef;
- foreach my $line (@{$lines}) {
- if ($line->text =~ regex_varassign) {
- my ($varname, undef, $value, undef) = ($1, $2, $3, $4);
-
- if ($varname eq "DISTNAME" || $varname eq "PKGNAME") {
- if ($value =~ regex_pkgname) {
- $pkglint_version = $2;
- }
- }
- }
- }
- return unless defined($pkglint_version);
-
- if (dewey_cmp($pkglint_version, ">", conf_distver)) {
- log_note(NO_FILE, NO_LINE_NUMBER, "A newer version of pkglint is available.");
- } elsif (dewey_cmp($pkglint_version, "<", conf_distver)) {
- log_error(NO_FILE, NO_LINE_NUMBER, "The pkglint version is newer than the tree to check.");
- }
-}
-
-# When processing a file using the expect* subroutines below, it may
-# happen that $lineno points past the end of the file. In that case,
-# print the warning without associated source code.
-sub lines_log_warning($$$) {
- my ($lines, $lineno, $msg) = @_;
-
- assert(0 <= $lineno, "The line number is negative (${lineno}).");
- assert(@{$lines} != 0, "The lines may not be empty.");
-
- if ($lineno <= $#{$lines}) {
- $lines->[$lineno]->log_warning($msg);
- } else {
- log_warning($lines->[0]->fname, "EOF", $msg);
- }
-}
-
-sub expect($$$) {
- my ($lines, $lineno_ref, $regex) = @_;
- my $lineno = ${$lineno_ref};
-
- if ($lineno <= $#{$lines} && $lines->[$lineno]->text =~ $regex) {
- ${$lineno_ref}++;
- return new PkgLint::SimpleMatch($lines->[$lineno]->text, \@-, \@+);
- } else {
- return false;
- }
-}
-
-sub expect_empty_line($$) {
- my ($lines, $lineno_ref) = @_;
-
- if (expect($lines, $lineno_ref, qr"^$")) {
- return true;
- } else {
- $opt_warn_space and $lines->[${$lineno_ref}]->log_note("Empty line expected.");
- return false;
- }
-}
-
-sub expect_text($$$) {
- my ($lines, $lineno_ref, $text) = @_;
-
- if (expect($lines, $lineno_ref, qr"^\Q${text}\E$")) {
- return true;
- } else {
- lines_log_warning($lines, ${$lineno_ref}, "Expected \"${text}\".");
- return false;
- }
-}
-
-sub get_variable_type($$) {
- my ($line, $varname) = @_;
- my ($type);
-
- assert(defined($varname), "The varname parameter must be defined.");
-
- if (exists(get_vartypes_map()->{$varname})) {
- return get_vartypes_map()->{$varname};
- }
-
- my $varcanon = varname_canon($varname);
- if (exists(get_vartypes_map()->{$varcanon})) {
- return get_vartypes_map()->{$varcanon};
- }
-
- if (exists(get_varname_to_toolname()->{$varname})) {
- return PkgLint::Type->new(LK_NONE, "ShellCommand", [[ qr".*", "u" ]], NOT_GUESSED);
- }
-
- if ($varname =~ qr"^TOOLS_(.*)" && exists(get_varname_to_toolname()->{$1})) {
- return PkgLint::Type->new(LK_NONE, "Pathname", [[ qr".*", "u" ]], NOT_GUESSED);
- }
-
- use constant allow_all => [[ qr".*", "adpsu" ]];
- use constant allow_runtime => [[ qr".*", "adsu" ]];
-
- # Guess the datatype of the variable based on
- # naming conventions.
- $type = ($varname =~ qr"DIRS$") ? PkgLint::Type->new(LK_EXTERNAL, "Pathmask", allow_runtime, GUESSED)
- : ($varname =~ qr"(?:DIR|_HOME)$") ? PkgLint::Type->new(LK_NONE, "Pathname", allow_runtime, GUESSED)
- : ($varname =~ qr"FILES$") ? PkgLint::Type->new(LK_EXTERNAL, "Pathmask", allow_runtime, GUESSED)
- : ($varname =~ qr"FILE$") ? PkgLint::Type->new(LK_NONE, "Pathname", allow_runtime, GUESSED)
- : ($varname =~ qr"PATH$") ? PkgLint::Type->new(LK_NONE, "Pathlist", allow_runtime, GUESSED)
- : ($varname =~ qr"PATHS$") ? PkgLint::Type->new(LK_EXTERNAL, "List of Pathname", allow_runtime, GUESSED)
- : ($varname =~ qr"_USER$") ? PkgLint::Type->new(LK_NONE, "UserGroupName", allow_all, GUESSED)
- : ($varname =~ qr"_GROUP$") ? PkgLint::Type->new(LK_NONE, "UserGroupName", allow_all, GUESSED)
- : ($varname =~ qr"_ENV$") ? PkgLint::Type->new(LK_EXTERNAL, "ShellWord", allow_runtime, GUESSED)
- : ($varname =~ qr"_CMD$") ? PkgLint::Type->new(LK_NONE, "ShellCommand", allow_runtime, GUESSED)
- : ($varname =~ qr"_ARGS$") ? PkgLint::Type->new(LK_EXTERNAL, "ShellWord", allow_runtime, GUESSED)
- : ($varname =~ qr"_(?:C|CPP|CXX|LD|)FLAGS$") ? PkgLint::Type->new(LK_EXTERNAL, "ShellWord", allow_runtime, GUESSED)
- : ($varname =~ qr"_MK$") ? PkgLint::Type->new(LK_NONE, "Unchecked", allow_all, GUESSED)
- : undef;
-
- if (defined($type)) {
- $opt_debug_vartypes and $line->log_debug("The guessed type of ${varname} is \"" . $type->to_string . "\".");
- return $type;
- }
-
- $opt_debug_vartypes and $line->log_debug("No type definition found for ${varcanon}.");
- return undef;
-}
-
-sub get_variable_perms($$) {
- my ($line, $varname) = @_;
-
- my $type = get_variable_type($line, $varname);
- if (!defined($type)) {
- $opt_debug_misc and $line->log_debug("No type definition found for ${varname}.");
- return "adpsu";
- }
-
- my $perms = $type->perms($line->fname, $varname);
- if (!defined($perms)) {
- $opt_debug_misc and $line->log_debug("No permissions specified for ${varname}.");
- return "?";
- }
- return $perms;
-}
-
-# This function returns whether a variable needs the :Q operator in a
-# certain context. There are four possible outcomes:
-#
-# false: The variable should not be quoted.
-# true: The variable should be quoted.
-# doesnt_matter:
-# Since the values of the variable usually don't contain
-# special characters, it does not matter whether the
-# variable is quoted or not.
-# dont_know: pkglint cannot say whether the variable should be quoted
-# or not, most likely because type information is missing.
-#
-sub variable_needs_quoting($$$) {
- my ($line, $varname, $context) = @_;
- my $type = get_variable_type($line, $varname);
- my ($want_list, $have_list);
-
- use constant safe_types => array_to_hash(qw(
- DistSuffix
- Filemask FileMode Filename
- Identifier
- Option
- Pathmask Pathname PkgName PkgOptionsVar PkgRevision
- RelativePkgDir RelativePkgPath
- URL UserGroupName
- Varname Version
- WrkdirSubdirectory
- ));
-
- if (!defined($type) || !defined($context->type)) {
- return dont_know;
- }
-
- # Variables of certain predefined types, as well as all
- # enumerations, are expected to not require the :Q operator.
- if (ref($type->basic_type) eq "HASH" || exists(safe_types->{$type->basic_type})) {
- if ($type->kind_of_list == LK_NONE) {
- return doesnt_matter;
-
- } elsif ($type->kind_of_list == LK_EXTERNAL && $context->extent != VUC_EXTENT_WORD_PART) {
- return doesnt_matter;
- }
- }
-
- # In .for loops, the :Q operator is always misplaced, since
- # the items are broken up at white-space, not as shell words
- # like in all other parts of make(1).
- if ($context->shellword == VUC_SHELLWORD_FOR) {
- return false;
- }
-
- # Determine whether the context expects a list of shell words or
- # not.
- $want_list = $context->type->is_practically_a_list() && ($context->shellword == VUC_SHELLWORD_BACKT || $context->extent != VUC_EXTENT_WORD_PART);
- $have_list = $type->is_practically_a_list();
-
- $opt_debug_quoting and $line->log_debug("[variable_needs_quoting]"
- . " varname=$varname"
- . " context=" . $context->to_string()
- . " type=" . $type->to_string()
- . " want_list=" . ($want_list ? "yes" : "no")
- . " have_list=" . ($have_list ? "yes" : "no")
- . ".");
-
- # A shell word may appear as part of a shell word, for example
- # COMPILER_RPATH_FLAG.
- if ($context->extent == VUC_EXTENT_WORD_PART && $context->shellword == VUC_SHELLWORD_PLAIN) {
- if ($type->kind_of_list == LK_NONE && $type->basic_type eq "ShellWord") {
- return false;
- }
- }
-
- # Assume that the tool definitions don't include very special
- # characters, so they can safely be used inside any quotes.
- if (exists(get_varname_to_toolname()->{$varname})) {
- my $sw = $context->shellword;
-
- if ($sw == VUC_SHELLWORD_PLAIN && $context->extent != VUC_EXTENT_WORD_PART) {
- return false;
-
- } elsif ($sw == VUC_SHELLWORD_BACKT) {
- return false;
-
- } elsif ($sw == VUC_SHELLWORD_DQUOT || $sw == VUC_SHELLWORD_SQUOT) {
- return doesnt_matter;
-
- } else {
- # Let the other rules decide.
- }
- }
-
- # Variables that appear as parts of shell words generally need
- # to be quoted. An exception is in the case of backticks,
- # because the whole backticks expression is parsed as a single
- # shell word by pkglint.
- #
- # XXX: When the shell word parser gets rewritten the next time,
- # this test can be refined.
- if ($context->extent == VUC_EXTENT_WORD_PART && $context->shellword != VUC_SHELLWORD_BACKT) {
- return true;
- }
-
- # Assigning lists to lists does not require any quoting, though
- # there may be cases like "CONFIGURE_ARGS+= -libs ${LDFLAGS:Q}"
- # where quoting is necessary. So let's hope that no developer
- # ever makes the mistake of using :Q when appending a list to
- # a list.
- if ($want_list && $have_list) {
- return doesnt_matter;
- }
-
- # Appending elements to a list requires quoting, as well as
- # assigning a list value to a non-list variable.
- if ($want_list != $have_list) {
- return true;
- }
-
- $opt_debug_quoting and $line->log_debug("Don't know whether :Q is needed for ${varname}.");
- return dont_know;
-}
-
-#
-# Parsing.
-#
-
-# This procedure fills in the extra fields of a line, depending on the
-# line type. These fields can later be queried without having to parse
-# them again and again.
-#
-sub parseline_mk($) {
- my ($line) = @_;
- my $text = $line->text;
-
- if ($text =~ regex_varassign) {
- my ($varname, $op, $value, $comment) = ($1, $2, $3, $4);
-
- # In variable assignments, a '#' character is preceded
- # by a backslash. In shell commands, it is interpreted
- # literally.
- $value =~ s/\\\#/\#/g;
-
- $line->set("is_varassign", true);
- $line->set("varname", $varname);
- $line->set("varcanon", varname_canon($varname));
- my $varparam = varname_param($varname);
- defined($varparam) and $line->set("varparam", $varparam);
- $line->set("op", $op);
- $line->set("value", $value);
- defined($comment) and $line->set("comment", $comment);
-
- } elsif ($text =~ regex_mk_shellcmd) {
- my ($shellcmd) = ($1);
-
- # Shell command lines cannot have embedded comments.
- $line->set("is_shellcmd", true);
- $line->set("shellcmd", $shellcmd);
-
- my ($shellwords, $rest) = match_all($shellcmd, $regex_shellword);
- $line->set("shellwords", $shellwords);
- if ($rest !~ qr"^\s*$") {
- $line->set("shellwords_rest", $rest);
- }
-
- } elsif ($text =~ regex_mk_comment) {
- my ($comment) = ($1);
-
- $line->set("is_comment", true);
- $line->set("comment", $comment);
-
- } elsif ($text =~ qr"^\s*$") {
-
- $line->set("is_empty", true);
-
- } elsif ($text =~ regex_mk_cond) {
- my ($indent, $directive, $args, $comment) = ($1, $2, $3, $4);
-
- $line->set("is_cond", true);
- $line->set("indent", $indent);
- $line->set("directive", $directive);
- defined($args) and $line->set("args", $args);
- defined($comment) and $line->set("comment", $comment);
-
- } elsif ($text =~ regex_mk_include) {
- my ($includefile, $comment) = ($1, $2);
-
- $line->set("is_include", true);
- $line->set("includefile", $includefile);
- defined($comment) and $line->set("comment", $comment);
-
- } elsif ($text =~ regex_mk_sysinclude) {
- my ($includefile, $comment) = ($1, $2);
-
- $line->set("is_sysinclude", true);
- $line->set("includefile", $includefile);
- defined($comment) and $line->set("comment", $comment);
-
- } elsif ($text =~ regex_mk_dependency) {
- my ($targets, $sources, $comment) = ($1, $2, $3);
-
- $line->set("is_dependency", true);
- $line->set("targets", $targets);
- $line->set("sources", $sources);
- defined($comment) and $line->set("comment", $comment);
-
- } elsif ($text =~ regex_rcs_conflict) {
- # This line is useless
-
- } else {
- assert(false, "Unknown line format: " . $line->to_string());
- }
-}
-
-sub parselines_mk($) {
- my ($lines) = @_;
-
- foreach my $line (@{$lines}) {
- parseline_mk($line);
- }
-}
-
-#
-# Loading package-specific data from files.
-#
-
-sub readmakefile($$$$);
-sub readmakefile($$$$) {
- my ($fname, $main_lines, $all_lines, $seen_Makefile_include) = @_;
- my $contents = "";
- my ($includefile, $dirname, $lines, $is_main_Makefile);
-
- $lines = load_lines($fname, true);
- if (!$lines) {
- return false;
- }
- parselines_mk($lines);
-
- $is_main_Makefile = (@{$main_lines} == 0);
-
- foreach my $line (@{$lines}) {
- my $text = $line->text;
-
- if ($is_main_Makefile) {
- push(@{$main_lines}, $line);
- }
- push(@{$all_lines}, $line);
-
- # try to get any included file
- my $is_include_line = false;
- if ($text =~ qr"^\.\s*include\s+\"(.*)\"$") {
- $includefile = resolve_relative_path($1, true);
- if ($includefile =~ regex_unresolved) {
- if ($fname !~ qr"/mk/") {
- $line->log_note("Skipping include file \"${includefile}\". This may result in false warnings.");
- }
-
- } else {
- $is_include_line = true;
- }
- }
-
- if ($is_include_line) {
- if ($fname !~ qr"buildlink3\.mk$" && $includefile =~ qr"^\.\./\.\./(.*)/buildlink3\.mk$") {
- my ($bl3_file) = ($1);
-
- $pkgctx_bl3->{$bl3_file} = $line;
- $opt_debug_misc and $line->log_debug("Buildlink3 file in package: ${bl3_file}");
- }
- }
-
- if ($is_include_line && !exists($seen_Makefile_include->{$includefile})) {
- $seen_Makefile_include->{$includefile} = true;
-
- if ($includefile =~ qr"^\.\./[^./][^/]*/[^/]+") {
- $line->log_warning("Relative directories should look like \"../../category/package\", not \"../package\".");
- $line->explain_warning(expl_relative_dirs);
- }
- if ($includefile =~ qr"(?:^|/)Makefile.common$"
- || ($includefile =~ qr"^(?:\.\./(\.\./[^/]+/)?[^/]+/)?([^/]+)$"
- && (!defined($1) || $1 ne "../mk")
- && $2 ne "buildlink3.mk"
- && $2 ne "options.mk")) {
- $opt_debug_include and $line->log_debug("including ${includefile} sets seen_Makefile_common.");
- $seen_Makefile_common = true;
- }
- if ($includefile =~ qr"/mk/") {
- # skip these files
- $contents .= $text . "\n";
- } else {
- $dirname = dirname($fname);
- # Only look in the directory relative to the
- # current file and in the current working directory.
- # We don't have an include dir list, like make(1) does.
- if (!-f "$dirname/$includefile") {
- $dirname = $current_dir;
- }
- if (!-f "$dirname/$includefile") {
- $line->log_error("Cannot read $dirname/$includefile.");
- } else {
- $opt_debug_include and $line->log_debug("Including \"$dirname/$includefile\".");
- $contents .= readmakefile("$dirname/$includefile", $main_lines, $all_lines, $seen_Makefile_include);
- }
- }
-
- } elsif ($line->has("is_varassign")) {
- my ($varname, $op, $value) = ($line->get("varname"), $line->get("op"), $line->get("value"));
-
- # Record all variables that are defined in these lines, so that they
- # are not reported as "used but not defined".
- if ($op ne "?=" || !exists($pkgctx_vardef->{$varname})) {
- $opt_debug_misc and $line->log_debug("varassign(${varname}, ${op}, ${value})");
- $pkgctx_vardef->{$varname} = $line;
- }
- $contents .= $text . "\n";
-
- } else {
- $contents .= $text . "\n";
- }
- }
-
- return $contents;
-}
-
-sub load_package_Makefile($$$) {
- my ($fname, $ref_whole, $ref_lines) = @_;
- my ($subr) = "load_package_Makefile";
- my ($whole, $lines, $all_lines);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "load_package_Makefile()");
-
- $whole = readmakefile($fname, $lines = [], $all_lines = [], {});
- if (!$whole) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return false;
- }
-
- if ($opt_dumpmakefile) {
- log_debug(NO_FILE, NO_LINES, "Whole Makefile (with all included files) follows:");
- foreach my $line (@{$all_lines}) {
- print($line->to_string() . "\n");
- }
- }
-
- determine_used_variables($all_lines);
-
- # HACK
- if ($whole =~ qr"\nPHPEXT_MK" && $whole !~ qr"\nUSE_PHP_EXT_PATCHES") {
- $opt_debug_misc and log_debug($fname, NO_LINES, "[hack] USE_PHP_EXT_PATCHES");
- $whole =~ s,\nPATCHDIR=.*PHPPKGSRCDIR.*,,;
- $hack_php_patches = true;
- }
- # HACK
- if ($whole =~ qr"\nPECL_VERSION") {
- $opt_debug_misc and log_debug($fname, NO_LINES, "[hack] PECL_VERSION");
- $whole =~ s,\nDISTINFO_FILE=.*PHPPKGSRCDIR.*,,;
- }
-
- $pkgdir = expand_variable($whole, "PKGDIR");
- set_default_value(\$pkgdir, ".");
- $distinfo_file = expand_variable($whole, "DISTINFO_FILE");
- set_default_value(\$distinfo_file, "distinfo");
- $filesdir = expand_variable($whole, "FILESDIR");
- set_default_value(\$filesdir, "files");
- $patchdir = expand_variable($whole, "PATCHDIR");
- set_default_value(\$patchdir, "patches");
-
- $opt_debug_misc and log_debug(NO_FILE, NO_LINE_NUMBER, "[${subr}] DISTINFO_FILE=$distinfo_file");
- $opt_debug_misc and log_debug(NO_FILE, NO_LINE_NUMBER, "[${subr}] FILESDIR=$filesdir");
- $opt_debug_misc and log_debug(NO_FILE, NO_LINE_NUMBER, "[${subr}] PATCHDIR=$patchdir");
- $opt_debug_misc and log_debug(NO_FILE, NO_LINE_NUMBER, "[${subr}] PKGDIR=$pkgdir");
-
- ${$ref_whole} = $whole;
- ${$ref_lines} = $lines;
- return true;
-}
-
-#
-# Subroutines to check part of a single line.
-#
-
-sub checkword_absolute_pathname($$) {
- my ($line, $word) = @_;
-
- $opt_debug_trace and $line->log_debug("checkword_absolute_pathname(\"${word}\")");
-
- if ($word =~ qr"^/dev/(?:null|tty|zero)$") {
- # These are defined by POSIX.
-
- } elsif ($word eq "/bin/sh") {
- # This is usually correct, although on Solaris, it's pretty
- # feature-crippled.
-
- } elsif ($word !~ qr"/(?:[a-z]|\$[({])") {
- # Assume that all pathnames start with a lowercase letter.
-
- } else {
- $line->log_warning("Found absolute pathname: ${word}");
- $line->explain_warning(
- "Absolute pathnames are often an indicator for unportable code. As",
- "pkgsrc aims to be a portable system, absolute pathnames should be",
- "avoided whenever possible.",
- "",
- "A special variable in this context is \${DESTDIR}, which is used in GNU",
- "projects to specify a different directory for installation than what",
- "the programs see later when they are executed. Usually it is empty, so",
- "if anything after that variable starts with a slash, it is considered",
- "an absolute pathname.");
- }
-}
-
-#
-# Subroutines to check a single line.
-#
-
-sub checkline_length($$) {
- my ($line, $maxlength) = @_;
-
- if (length($line->text) > $maxlength) {
- $line->log_warning("Line too long (should be no more than $maxlength characters).");
- $line->explain_warning(
- "Back in the old time, terminals with 80x25 characters were common.",
- "And this is still the default size of many terminal emulators.",
- "Moderately short lines also make reading easier.");
- }
-}
-
-sub checkline_valid_characters($$) {
- my ($line, $re_validchars) = @_;
- my ($rest);
-
- ($rest = $line->text) =~ s/$re_validchars//g;
- if ($rest ne "") {
- my @chars = map { $_ = sprintf("0x%02x", ord($_)); } split(//, $rest);
- $line->log_warning("Line contains invalid characters (" . join(", ", @chars) . ").");
- }
-}
-
-sub checkline_valid_characters_in_variable($$) {
- my ($line, $re_validchars) = @_;
- my ($varname, $rest);
-
- $varname = $line->get("varname");
- $rest = $line->get("value");
-
- $rest =~ s/$re_validchars//g;
- if ($rest ne "") {
- my @chars = map { $_ = sprintf("0x%02x", ord($_)); } split(//, $rest);
- $line->log_warning("${varname} contains invalid characters (" . join(", ", @chars) . ").");
- }
-}
-
-sub checkline_trailing_whitespace($) {
- my ($line) = @_;
-
- $opt_debug_trace and $line->log_debug("checkline_trailing_whitespace()");
-
- if ($line->text =~ /\s+$/) {
- $line->log_note("Trailing white-space.");
- $line->replace_regex(qr"\s+\n$", "\n");
- }
-}
-
-sub checkline_rcsid_regex($$$) {
- my ($line, $prefix_regex, $prefix) = @_;
- my ($id) = ($opt_rcsidstring . ($is_wip ? "|Id" : ""));
-
- $opt_debug_trace and $line->log_debug("checkline_rcsid_regex(${prefix_regex}, ${prefix})");
-
- if ($line->text !~ qr"^${prefix_regex}\$(${id})(?::[^\$]*|)\$$") {
- $line->log_error("\"${prefix}\$${opt_rcsidstring}\$\" expected.");
- return false;
- }
- return true;
-}
-
-sub checkline_rcsid($$) {
- my ($line, $prefix) = @_;
-
- checkline_rcsid_regex($line, quotemeta($prefix), $prefix);
-}
-
-# Checks whether the line contains text that looks like absolute
-# pathnames, assuming that the file uses the common syntax with
-# single or double quotes to represent strings.
-#
-sub checkline_source_absolute_pathname($$) {
- my ($line, $text) = @_;
- my ($abspath);
-
- $opt_debug_trace and $line->log_debug("checkline_source_absolute_pathname(${text})");
-
- if ($text =~ qr"(.*)([\"'])(/[^\"']*)\2") {
- my ($before, $delim, $string) = ($1, $2, $3);
-
- $opt_debug_misc and $line->log_debug("checkline_source_absolute_pathname(before=${before}, string=${string})");
- if ($before =~ qr"[A-Z_]+\s*$") {
- # allowed: PREFIX "/bin/foo"
-
- } elsif ($string =~ qr"^/[*/]") {
- # This is more likely to be a C or C++ comment.
-
- } elsif ($string !~ qr"^/\w") {
- # Assume that pathnames start with a letter or digit.
-
- } elsif ($before =~ qr"\+\s*$") {
- # Something like foodir + '/lib'
-
- } else {
- $abspath = $string;
- }
- }
-
- if (defined($abspath)) {
- checkword_absolute_pathname($line, $abspath);
- }
-}
-
-sub checkline_mk_absolute_pathname($$) {
- my ($line, $text) = @_;
- my $abspath;
-
- $opt_debug_trace and $line->log_debug("checkline_mk_absolute_pathname(${text})");
-
- # In the GNU coding standards, DESTDIR is defined as a (usually
- # empty) prefix that can be used to install files to a different
- # location from what they have been built for. Therefore
- # everything following it is considered an absolute pathname.
- # Another commonly used context is in assignments like
- # "bindir=/bin".
- if ($text =~ qr"(?:^|\$\{DESTDIR\}|\$\(DESTDIR\)|[\w_]+\s*=\s*)(/(?:[^\"'\`\s]|\"[^\"*]\"|'[^']*'|\`[^\`]*\`)*)") {
- my $path = $1;
-
- if ($path =~ qr"^/\w") {
- $abspath = $path;
- }
- }
-
- if (defined($abspath)) {
- checkword_absolute_pathname($line, $abspath);
- }
-}
-
-# Last resort if the file does not look like a Makefile or typical
-# source code. All strings that look like pathnames and start with
-# one of the typical Unix prefixes are found.
-#
-sub checkline_other_absolute_pathname($$) {
- my ($line, $text) = @_;
-
- $opt_debug_trace and $line->log_debug("checkline_other_absolute_pathname(\"${text}\")");
-
- if ($text =~ qr"^#[^!]") {
- # Don't warn for absolute pathnames in comments,
- # except for shell interpreters.
-
- } elsif ($text =~ qr"^(.*?)((?:/[\w.]+)*/(?:bin|dev|etc|home|lib|mnt|opt|proc|sbin|tmp|usr|var)\b[\w./\-]*)(.*)$") {
- my ($before, $path, $after) = ($1, $2, $3);
-
- if ($before =~ qr"\@$") {
- # Something like @PREFIX@/bin
-
- } elsif ($before =~ qr"[)}]$") {
- # Something like ${prefix}/bin or $(PREFIX)/bin
-
- } elsif ($before =~ qr"\+\s*[\"']$") {
- # Something like foodir + '/lib'
-
- } elsif ($before =~ qr"\w$") {
- # Something like $dir/lib
-
- } elsif ($before =~ qr"\.$") {
- # ../foo is not an absolute pathname.
-
- } else {
- $opt_debug_misc and $line->log_debug("before=${before}");
- checkword_absolute_pathname($line, $path);
- }
- }
-}
-
-sub checkline_relative_path($$) {
- my ($line, $path) = @_;
- my ($res_path);
-
- if (!$is_wip && $path =~ qr"/wip/") {
- $line->log_error("A pkgsrc package must not depend on any outside package.");
- }
- $res_path = resolve_relative_path($path, true);
- if ($res_path =~ regex_unresolved) {
- $opt_debug_unchecked and $line->log_debug("Unchecked path: \"${path}\".");
- } elsif (!-e ((($res_path =~ qr"^/") ? "" : "${current_dir}/") . $res_path)) {
- $line->log_error("\"${res_path}\" does not exist.");
- } elsif ($path =~ qr"^\.\./\.\./([^/]+)/([^/]+)(.*)") {
- my ($cat, $pkg, $rest) = ($1, $2, $3);
- } elsif ($path =~ qr"^\.\./\.\./mk/") {
- # There need not be two directory levels for mk/ files.
- } elsif ($path =~ qr"^\.\./mk/" && $cur_pkgsrcdir eq "..") {
- # That's fine for category Makefiles.
- } elsif ($path =~ qr"^\.\.") {
- $line->log_warning("Invalid relative path \"${path}\".");
- }
-}
-
-sub checkline_relative_pkgdir($$) {
- my ($line, $path) = @_;
-
- checkline_relative_path($line, $path);
- $path = resolve_relative_path($path, false);
-
- if ($path !~ qr"^(?:\./)?\.\./\.\./[^/]+/[^/]+$") {
- $line->log_warning("\"${path}\" is not a valid relative package directory.");
- $line->explain_warning(
- "A relative pathname always starts with \"../../\", followed",
- "by a category, a slash and a the directory name of the package.",
- "For example, \"../../misc/screen\" is a valid relative pathname.");
- }
-}
-
-sub checkline_spellcheck($) {
- my ($line) = @_;
-
- if ($line->text =~ qr"existant") {
- $line->log_warning("The word \"existant\" is nonexistent in the m-w dictionary.");
- $line->explain_warning("Please use \"existent\" instead.");
- }
-}
-
-sub checkline_cpp_macro_names($$) {
- my ($line, $text) = @_;
- my ($rest);
-
- use constant good_macros => PkgLint::Util::array_to_hash(qw(
- __STDC__
-
- __GNUC__ __GNUC_MINOR__
- __SUNPRO_C
-
- __i386
- __mips
- __sparc
-
- __APPLE__
- __bsdi__
- __CYGWIN__
- __DragonFly__
- __FreeBSD__ __FreeBSD_version
- __INTERIX
- __linux__
- __MINGW32__
- __NetBSD__ __NetBSD_Version__
- __OpenBSD__
- __SVR4
- __sgi
- __sun
-
- __GLIBC__
- ));
- use constant bad_macros => {
- "__sgi__" => "__sgi",
- "__sparc__" => "__sparc",
- "__sparc_v9__" => "__sparcv9",
- "__sun__" => "__sun",
- "__svr4__" => "__SVR4",
- };
-
- $rest = $text;
- while ($rest =~ s/defined\((__[\w_]+)\)//) {
- my ($macro) = ($1);
-
- if (exists(good_macros->{$macro})) {
- $opt_debug_misc and $line->log_debug("Found good macro \"${macro}\".");
- } elsif (exists(bad_macros->{$macro})) {
- $line->log_warning("The macro \"${macro}\" is not portable enough. Please use \"".bad_macros->{$macro}."\" instead.");
- $line->explain_warning("See the pkgsrc guide, section \"CPP defines\" for details.");
- } else {
- $opt_debug_unchecked and $line->log_debug("Unchecked macro \"${macro}\".");
- }
- }
-}
-
-sub checkline_mk_varuse($$$$) {
- my ($line, $varname, $mod, $context) = @_;
-
- assert(defined($varname), "The varname parameter must be defined");
- assert(defined($context), "The context parameter must be defined");
- $opt_debug_trace and $line->log_debug("checkline_mk_varuse(\"${varname}\", \"${mod}\", ".$context->to_string().")");
-
- # Check for spelling mistakes.
- my $type = get_variable_type($line, $varname);
- if (defined($type) && !($type->is_guessed)) {
- # Great.
-
- } elsif (defined($pkgctx_vardef) && exists($pkgctx_vardef->{$varname})) {
- # A variable that is defined somewhere may also be used.
-
- } elsif (exists($mkctx_vardef->{$varname})) {
- # A variable that has been defined in the current file
- # may also be used.
-
- } elsif (defined($mkctx_for_variables) && exists($mkctx_for_variables->{$varname})) {
- # Variables defined in .for loops are also ok.
-
- } else {
- $opt_warn_extra and $line->log_warning("${varname} is used but not defined. Spelling mistake?");
- }
-
- if ($opt_warn_perm) {
- my $perms = get_variable_perms($line, $varname);
- my $is_load_time; # Will the variable be used at load time?
- my $is_indirect; # Might the variable be used indirectly at load time,
- # for example by assigning it to another variable
- # which then gets evaluated?
-
- # Don't warn about variables that are not recorded in the
- # pkglint variable definition.
- if (defined($context->type) && $context->type->is_guessed()) {
- $is_load_time = false;
-
- } elsif ($context->time == VUC_TIME_LOAD && $perms !~ qr"p") {
- $is_load_time = true;
- $is_indirect = false;
-
- } elsif (defined($context->type) && $context->type->perms_union() =~ qr"p" && $perms !~ qr"p") {
- $is_load_time = true;
- $is_indirect = true;
-
- } else {
- $is_load_time = false;
- }
-
- if ($is_load_time && !$is_indirect) {
- $line->log_warning("${varname} should not be evaluated at load time.");
- $line->explain_warning(
- "Many variables, especially lists of something, get their values",
- "incrementally. Therefore it is generally unsafe to rely on their value",
- "until it is clear that it will never change again. This point is",
- "reached when the whole package Makefile is loaded and execution of the",
- "shell commands starts, in some cases earlier.",
- "",
- "Additionally, when using the \":=\" operator, each \$\$ is replaced",
- "with a single \$, so variables that have references to shell variables",
- "or regular expressions are modified in a subtle way.");
- }
- if ($is_load_time && $is_indirect) {
- $line->log_warning("${varname} should not be evaluated indirectly at load time.");
- $line->explain_warning(
- "The variable on the left-hand side may be evaluated at load time, but",
- "the variable on the right-hand side may not. Due to this assignment, it",
- "might be used indirectly at load-time, when it is not guaranteed to be",
- "properly defined.");
- }
-
- if ($perms !~ qr"p" && $perms !~ qr"u") {
- $line->log_warning("${varname} may not be used in this file.");
- }
- }
-
- my $needs_quoting = variable_needs_quoting($line, $varname, $context);
-
- if ($context->shellword == VUC_SHELLWORD_FOR) {
- if (!defined($type)) {
- # Cannot check anything here.
-
- } elsif ($type->kind_of_list == LK_INTERNAL) {
- # Fine.
-
- } elsif ($needs_quoting == doesnt_matter) {
- # Fine, these variables are assumed to not
- # contain special characters.
-
- } else {
- $line->log_warning("The variable ${varname} should not be used in .for loops.");
- $line->explain_warning(
- "The .for loop splits its argument at sequences of white-space, as",
- "opposed to all other places in make(1), which act like the shell.",
- "Therefore only variables that are specifically designed to match this",
- "requirement should be used here.");
- }
- }
-
- if ($context->shellword != VUC_SHELLWORD_UNKNOWN && $needs_quoting != dont_know) {
-
- # In GNU configure scripts, a few variables need to be
- # passed through the :M* operator before they reach the
- # configure scripts.
- my $need_mstar = false;
- if ($varname =~ regex_gnu_configure_volatile_vars) {
- # When we are not checking a package, but some other file,
- # the :M* operator is needed for safety.
- if (!defined($pkgctx_vardef) || exists($pkgctx_vardef->{"GNU_CONFIGURE"})) {
- $need_mstar = true;
- }
- }
-
- my $stripped_mod = ($mod =~ qr"(.*?)(?::M\*)?(?::Q)?$") ? $1 : $mod;
- my $correct_mod = $stripped_mod . ($need_mstar ? ":M*:Q" : ":Q");
-
- if ($mod eq ":M*:Q" && !$need_mstar) {
- $line->log_note("The :M* modifier is not needed here.");
-
- } elsif ($mod ne $correct_mod && $needs_quoting == true) {
- if ($context->shellword == VUC_SHELLWORD_PLAIN) {
- $line->log_warning("Please use \${${varname}${correct_mod}} instead of \${${varname}${mod}}.");
- #$line->replace("\${${varname}}", "\${${varname}:Q}");
- } else {
- $line->log_warning("Please use \${${varname}${correct_mod}} instead of \${${varname}${mod}} and make sure the variable appears outside of any quoting characters.");
- }
- $line->explain_warning("See the pkgsrc guide, section \"quoting guideline\", for details.");
- }
-
- if ($needs_quoting == false && $mod =~ qr":Q$") {
- $line->log_warning("The :Q operator should not be used for \${${varname}} here.");
- $line->explain_warning(
-"When a variable of type ShellWord appears in a context that expects",
-"a shell word, it does not need to have a :Q operator. Even when it",
-"is concatenated with another variable, it still stays _one_ word.",
-"",
-"Example:",
-"\tWORD1= Have\\ fun # 1 word",
-"\tWORD2= \"with BSD Make\" # 1 word, too",
-"",
-"\tdemo:",
-"\t\techo \${WORD1}\${WORD2} # still 1 word");
-
- }
- }
-
- assert(defined($mkctx_build_defs), "The build_defs variable must be defined here.");
- if (exists(get_userdefined_variables()->{$varname}) && !exists(get_system_build_defs()->{$varname}) && !exists($mkctx_build_defs->{$varname})) {
- $line->log_warning("The user-defined variable ${varname} is used but not added to BUILD_DEFS.");
- }
-}
-
-sub checkline_mk_text($$) {
- my ($line, $text) = @_;
- my ($rest, $state, $vartools, $depr_map);
-
- if ($text =~ qr"^(?:[^#]*[^\$])?\$(\w+)") {
- my ($varname) = ($1);
- $line->log_warning("\$$varname is ambiguous. Use \${$varname} if you mean a Makefile variable or \$\$$varname if you mean a shell variable.");
- }
-
- if ($line->lines eq "1") {
- checkline_rcsid_regex($line, qr"#\s+", "# ");
- }
-
- if ($text =~ qr"\$\{WRKSRC\}/\.\./") {
- $line->log_warning("Using \"\${WRKSRC}/..\" is conceptually wrong. Please use a combination of WRKSRC, CONFIGURE_DIRS and BUILD_DIRS instead.");
- $line->explain_warning(
- "You should define WRKSRC such that all of CONFIGURE_DIRS, BUILD_DIRS",
- "and INSTALL_DIRS are subdirectories of it.");
- }
-
- if ($text =~ qr"\b(-Wl,--rpath,|-Wl,-rpath-link,|-Wl,-rpath,|-Wl,-R)\b") {
- $line->log_warning("Please use \${COMPILER_RPATH_FLAG} instead of $1.");
- }
- # Note: A simple -R is not detected, as the rate of false
- # positives is too high.
-
- $rest = $text;
- $depr_map = get_deprecated_map();
- while ($rest =~ s/(?:^|[^\$])\$\{([-A-Z0-9a-z_]+)(\.[\-0-9A-Z_a-z]+)?(?::[^\}]+)?\}//) {
- my ($varbase, $varext) = ($1, $2);
- my $varname = $varbase . (defined($varext) ? $varext : "");
- my $varcanon = varname_canon($varname);
- my $instead =
- (exists($depr_map->{$varname})) ? $depr_map->{$varname}
- : (exists($depr_map->{$varcanon})) ? $depr_map->{$varcanon}
- : undef;
-
- if (defined($instead)) {
- $line->log_warning("Use of ${varname} is deprecated. ${instead}");
- }
- }
-
- $rest = $text;
- while ($rest =~ s/(?:^|[^\$])\$\(([-A-Z0-9a-z_]+)(?::[^\}]+)?\)//) {
- my ($varname) = ($1);
-
- $line->log_warning("Please use \${${varname}\} instead of \$(${varname}).");
- }
-
-}
-
-sub checkline_mk_shellword($$$) {
- my ($line, $shellword, $check_quoting) = @_;
- my ($rest, $state, $value);
-
- $opt_debug_trace and $line->log_debug("checkline_mk_shellword(\"${shellword}\", ${check_quoting}).");
- use constant shellcommand_context_type => PkgLint::Type->new(
- LK_NONE, "ShellCommand", [[ qr".*", "adsu" ]], NOT_GUESSED
- );
- use constant shellword_vuc => PkgLint::VarUseContext->new(
- VUC_TIME_UNKNOWN,
- shellcommand_context_type,
- VUC_SHELLWORD_PLAIN,
- VUC_EXTENT_WORD
- );
-
- if ($shellword =~ qr"^\$\{(${regex_varname})(:[^{}]+)?\}$") {
- my ($varname, $mod) = ($1, $2);
-
- checkline_mk_varuse($line, $varname, defined($mod) ? $mod : "", shellword_vuc);
- return;
- }
-
- if ($shellword =~ qr"\$\{PREFIX\}/man(?:$|/)") {
- $line->log_warning("Please use \${PKGMANDIR} instead of \"man\".");
- }
-
- # Note: SWST means [S]hell[W]ord [ST]ate
- use enum qw(:SWST_ PLAIN SQUOT DQUOT DQUOT_BACKT BACKT);
- use constant statename => [
- "SWST_PLAIN", "SWST_SQUOT", "SWST_DQUOT",
- "SWST_DQUOT_BACKT", "SWST_BACKT",
- ];
- use constant user_statename => [
- "unquoted string", "single quoted string",
- "double quoted string", "backticks inside double quoted string",
- "backticks",
- ];
-
- $rest = ($shellword =~ qr"^#") ? "" : $shellword;
- $state = SWST_PLAIN;
- while ($rest ne "") {
-
- $opt_debug_shell and $line->log_debug(statename->[$state] . ": ${rest}");
-
- # When we are parsing inside backticks, it is more
- # reasonable to check the whole shell command
- # recursively, instead of splitting off the first
- # make(1) variable (see the elsif below).
- if ($state == SWST_BACKT) {
-
- # Scan for the end of the backticks, checking
- # for single backslashes and removing one level
- # of backslashes. Backslashes are only removed
- # before a dollar, a backslash or a backtick.
- #
- # References:
- # * http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03
- my $stripped = "";
- while ($rest ne "") {
- if ($rest =~ s/^\`//) {
- last;
- } elsif ($rest =~ s/^\\([\\\`\$])//) {
- $stripped .= $1;
- } elsif ($rest =~ s/^(\\)//) {
- $line->log_warning("Backslashes should be doubled inside backticks.");
- $stripped .= $1;
- } elsif ($rest =~ s/^([^\\\`]+)//) {
- $stripped .= $1;
- } else {
- assert(false, "rest=$rest");
- }
- }
-
- # Check the resulting command.
- checkline_mk_shelltext($line, $stripped);
-
- # make(1) variables have the same syntax, no matter in
- # which state we are currently.
- } elsif ($rest =~ s/^\$\{(${regex_varname}|[\@])(:[^\{]+)?\}//
- || $rest =~ s/^\$\((${regex_varname}|[\@])(:[^\)]+)?\)//
- || $rest =~ s/^\$(\@)//) {
- my ($varname, $mod) = ($1, $2);
-
- if ($varname eq "\@") {
- $line->log_warning("Please use \"\${.TARGET}\" instead of \"\$\@\".");
- $line->explain_warning(
- "The variable \$\@ can easily be confused with the shell variable of the",
- "same name, which has a completely different meaning.");
- $varname = ".TARGET";
- }
-
- if ($state == SWST_PLAIN && defined($mod) && $mod =~ qr":Q$") {
- # Fine.
-
- } elsif ($state == SWST_BACKT) {
- # Don't check here, to avoid false positives
- # for tool names.
-
- } elsif (($state == SWST_SQUOT || $state == SWST_DQUOT) && $varname =~ qr"^(?:.*DIR|.*FILE|.*PATH|.*_VAR|PREFIX|.*BASE|PKGNAME)$") {
- # This is ok if we don't allow these
- # variables to have embedded [\$\\\"\'\`].
-
- } elsif ($state == SWST_DQUOT && defined($mod) && $mod =~ qr":Q$") {
- $line->log_warning("Please don't use the :Q operator in double quotes.");
- $line->explain_warning(
- "Either remove the :Q or the double quotes. In most cases, it is more",
- "appropriate to remove the double quotes.");
-
- }
-
- my $ctx = PkgLint::VarUseContext->new_from_pool(
- VUC_TIME_UNKNOWN,
- shellcommand_context_type,
- ($state == SWST_PLAIN) ? VUC_SHELLWORD_PLAIN
- : ($state == SWST_DQUOT) ? VUC_SHELLWORD_DQUOT
- : ($state == SWST_SQUOT) ? VUC_SHELLWORD_SQUOT
- : ($state == SWST_BACKT) ? VUC_SHELLWORD_BACKT
- : VUC_SHELLWORD_UNKNOWN,
- VUC_EXTENT_WORD_PART
- );
- if ($varname ne "\@") {
- checkline_mk_varuse($line, $varname, defined($mod) ? $mod : "", $ctx);
- }
-
- } elsif ($state == SWST_PLAIN) {
- if ($rest =~ s/^[!#\%&\(\)*+,\-.\/0-9:;<=>?\@A-Z\[\]^_a-z{|}~]+//) {
- } elsif ($rest =~ s/^\'//) {
- $state = SWST_SQUOT;
- } elsif ($rest =~ s/^\"//) {
- $state = SWST_DQUOT;
- } elsif ($rest =~ s/^\`//) {
- $state = SWST_BACKT;
- } elsif ($rest =~ s/^\\(?:[ !"#'\(\)*;?\\^{|}]|\$\$)//) {
- } elsif ($rest =~ s/^\$\$([0-9A-Z_a-z]+)//
- || $rest =~ s/^\$\$\{([0-9A-Z_a-z]+)\}//) {
- my ($shvarname) = ($1);
- if ($opt_warn_quoting && $check_quoting) {
- $line->log_warning("Unquoted shell variable \"${shvarname}\".");
- }
-
- } elsif ($rest =~ s/^\$\@//) {
- $line->log_warning("Please use \"\${.TARGET}\" instead of \"\$@\".");
- $line->explain_warning(
- "It is more readable and prevents confusion with the shell variable of",
- "the same name.");
-
- } elsif ($rest =~ s/^\$\$\@//) {
- $line->log_warning("The \$@ shell variable should only be used in double quotes.");
-
- } elsif ($rest =~ s/^\$\$\?//) {
- $line->log_warning("The \$? shell variable is often not available in \"set -e\" mode.");
-
- } elsif ($rest =~ s/^\$\$\(/(/) {
- $line->log_warning("Invoking subshells via \$(...) is not portable enough.");
- $line->explain_warning(
- "The Solaris /bin/sh does not know this way to execute a command in a",
- "subshell. Please use backticks (\`...\`) as a replacement.");
-
- } else {
- last;
- }
-
- } elsif ($state == SWST_SQUOT) {
- if ($rest =~ s/^\'//) {
- $state = SWST_PLAIN;
- } elsif ($rest =~ s/^[^\$\']+//) {
- } elsif ($rest =~ s/^\$\$//) {
- } else {
- last;
- }
-
- } elsif ($state == SWST_DQUOT) {
- if ($rest =~ s/^\"//) {
- $state = SWST_PLAIN;
- } elsif ($rest =~ s/^[^\$"\\\`]+//) {
- } elsif ($rest =~ s/^\\(?:[\\\"\`]|\$\$)//) {
- } elsif ($rest =~ s/^\$\$\{([0-9A-Za-z_]+)\}//
- || $rest =~ s/^\$\$([0-9A-Z_a-z]+|[\$!#?\@])//) {
- my ($shvarname) = ($1);
- $opt_debug_shell and $line->log_debug("[checkline_mk_shellword] Found double-quoted variable ${shvarname}.");
- } elsif ($rest =~ s/^\$\$//) {
- $line->log_warning("Unquoted \$ or strange shell variable found.");
- } elsif ($rest =~ s/^\\(.)//) {
- my ($char) = ($1);
- $line->log_warning("Please use \"\\\\${char}\" instead of \"\\${char}\".");
- $line->explain_warning(
- "Although the current code may work, it is not good style to rely on",
- "the shell passing \"\\${char}\" exactly as is, and not discarding the",
- "backslash. Alternatively you can use single quotes instead of double",
- "quotes.");
- } else {
- last;
- }
-
- } else {
- last;
- }
- }
- if ($rest !~ qr"^\s*$") {
- $line->log_error("Internal pkglint error: " . statename->[$state] . ": rest=${rest}");
- }
-}
-
-# Some shell commands should not be used in the install phase.
-#
-sub checkline_mk_shellcmd_use($$) {
- my ($line, $shellcmd) = @_;
-
- use constant allowed_install_commands => array_to_hash(qw(
- ${INSTALL}
- ${INSTALL_DATA} ${INSTALL_DATA_DIR}
- ${INSTALL_LIB} ${INSTALL_LIB_DIR}
- ${INSTALL_MAN} ${INSTALL_MAN_DIR}
- ${INSTALL_PROGRAM} ${INSTALL_PROGRAM_DIR}
- ${INSTALL_SCRIPT}
- ${LIBTOOL}
- ${LN}
- ${PAX}
- ));
- use constant discouraged_install_commands => array_to_hash(qw(
- sed ${SED}
- tr ${TR}
- ));
-
- if (defined($mkctx_target) && $mkctx_target =~ qr"^(?:pre|do|post)-install") {
-
- if (exists(allowed_install_commands->{$shellcmd})) {
- # Fine.
-
- } elsif (exists(discouraged_install_commands->{$shellcmd})) {
- $line->log_warning("The shell command \"${shellcmd}\" should not be used in the install phase.");
- $line->explain_warning(
- "In the install phase, the only thing that should be done is to install",
- "the prepared files to their final location. The file's contents should",
- "not be changed anymore.");
-
- } elsif ($shellcmd eq "\${CP}") {
- $line->log_warning("\${CP} should not be used to install files.");
- $line->explain_warning(
- "The \${CP} command is highly platform dependent and cannot overwrite",
- "files that don't have write permission. Please use \${PAX} instead.",
- "",
- "For example, instead of",
- "\t\${CP} -R \${WRKSRC}/* \${PREFIX}/foodir",
- "you should use",
- "\tcd \${WRKSRC} && \${PAX} -wr * \${PREFIX}/foodir");
-
- } else {
- $opt_debug_misc and $line->log_debug("May \"${shellcmd}\" be used in the install phase?");
- }
- }
-}
-
-sub checkline_mk_shelltext($$) {
- my ($line, $text) = @_;
- my ($vartools, $state, $rest, $set_e_mode);
-
- $opt_debug_trace and $line->log_debug("checkline_mk_shelltext(\"$text\")");
-
- # Note: SCST is the abbreviation for [S]hell [C]ommand [ST]ate.
- use constant scst => qw(
- START CONT
- INSTALL INSTALL_D
- MKDIR
- PAX PAX_S
- SED SED_E
- SET SET_CONT
- COND COND_CONT
- CASE CASE_IN CASE_LABEL CASE_LABEL_CONT CASE_PAREN
- FOR FOR_IN FOR_CONT
- ECHO
- INSTALL_DIR INSTALL_DIR2
- );
- use enum (":SCST_", scst);
- use constant scst_statename => [ map { $_ = "SCST_$_"; } scst ];
-
- use constant forbidden_commands => array_to_hash(qw(
- ktrace
- strace
- truss
- ));
-
- if ($text =~ qr"\$\{SED\}" && $text =~ qr"\$\{MV\}") {
- $line->log_note("Please use the SUBST framework instead of \${SED} and \${MV}.");
- $line->explain_note(
- "When converting things, pay attention to \"#\" characters. In shell",
- "commands make(1) does not interpret them as comment character, but",
- "in other lines it does. Therefore, instead of the shell command",
- "",
- "\tsed -e 's,#define foo,,'",
- "",
- "you need to write",
- "",
- "\tSUBST_SED.foo+=\t's,\\#define foo,,'");
- }
-
- if ($text =~ qr"^\@*-(.*(MKDIR|INSTALL.*-d|INSTALL_.*_DIR).*)") {
- my ($mkdir_cmd) = ($1);
-
- $line->log_note("You don't need to use \"-\" before ${mkdir_cmd}.");
- }
-
- $vartools = get_vartool_names();
- $rest = $text;
-
- use constant hidden_shell_commands => array_to_hash(qw(
- ${DELAYED_ERROR_MSG} ${DELAYED_WARNING_MSG}
- ${DO_NADA}
- ${ECHO} ${ECHO_MSG} ${ECHO_N} ${ERROR_CAT} ${ERROR_MSG}
- ${PHASE_MSG} ${PRINTF}
- ${SHCOMMENT} ${STEP_MSG}
- ${WARNING_CAT} ${WARNING_MSG}
- ));
-
- if ($rest =~ s/^\s*([-@]*)(?:\$\{_PKG_SILENT\}\$\{_PKG_DEBUG\})?//) {
- my ($hidden) = ($1);
-
- if ($hidden !~ qr"\@") {
- # Nothing is hidden at all.
-
- } elsif (defined($mkctx_target) && $mkctx_target =~ qr"^(?:show-.*|.*-message)$") {
- # In some targets commands may be hidden.
-
- } elsif ($rest =~ $regex_shellword) {
- my ($cmd) = ($1);
-
- if (!exists(hidden_shell_commands->{$cmd})) {
- $line->log_warning("The shell command \"${cmd}\" should not be hidden.");
- $line->explain_warning(
- "Hidden shell commands do not appear on the terminal or in the log file",
- "when they are executed. When they fail, the error message cannot be",
- "assigned to the command, which is very difficult to debug.");
- }
- }
-
- if ($hidden =~ qr"-") {
- $line->log_warning("The use of a leading \"-\" to suppress errors is deprecated.");
- $line->explain_warning(
- "If you really want to ignore any errors from this command (including",
- "all errors you never thought of), append \"|| \${TRUE}\" to the",
- "command.");
- }
- }
-
- $state = SCST_START;
- $set_e_mode = false;
- while ($rest =~ s/^$regex_shellword//) {
- my ($shellword) = ($1);
-
- $opt_debug_shell and $line->log_debug(scst_statename->[$state] . ": ${shellword}");
-
- checkline_mk_shellword($line, $shellword, !(
- $state == SCST_CASE
- || $state == SCST_FOR_CONT
- || $state == SCST_SET_CONT
- || ($state == SCST_START && $shellword =~ regex_sh_varassign)));
-
- #
- # Actions associated with the current state
- # and the symbol on the "input tape".
- #
-
- if ($state == SCST_START || $state == SCST_COND) {
- my ($type);
-
- if ($shellword eq "\${RUN}") {
- # Just skip this one.
-
- } elsif (exists(forbidden_commands->{$shellword})) {
- $line->log_error("${shellword} is forbidden and must not be used.");
-
- } elsif (exists(get_tool_names()->{$shellword})) {
- if (!exists($mkctx_tools->{$shellword})) {
- $line->log_warning("The \"${shellword}\" tool is used but not added to USE_TOOLS.");
- }
-
- if (exists(get_required_vartools()->{$shellword})) {
- $line->log_warning("Please use \"\${" . get_vartool_names()->{$shellword} . "}\" instead of \"${shellword}\".");
- }
-
- checkline_mk_shellcmd_use($line, $shellword);
-
- } elsif ($shellword =~ qr"^\$\{([\w_]+)\}$" && exists(get_varname_to_toolname()->{$1})) {
- my ($vartool) = ($1);
- my $plain_tool = get_varname_to_toolname()->{$vartool};
-
- if (!exists($mkctx_tools->{$plain_tool})) {
- $line->log_warning("The \"${plain_tool}\" tool is used but not added to USE_TOOLS.");
- }
-
- if (defined($mkctx_target) && $mkctx_target =~ qr"^(?:pre|do|post)-") {
- if (!exists(get_required_vartool_varnames()->{$vartool})) {
- $opt_warn_extra and $line->log_note("You can write \"${plain_tool}\" instead of \"${shellword}\".");
- $opt_warn_extra and $line->explain_note(
- "The wrapper framework from pkgsrc takes care that a sufficiently",
- "capable implementation of that tool will be selected.");
- }
- }
-
- checkline_mk_shellcmd_use($line, $shellword);
-
- } elsif ($shellword =~ qr"^\$\{([\w_]+)\}$" && defined($type = get_variable_type($line, $1)) && $type->basic_type eq "ShellCommand") {
- checkline_mk_shellcmd_use($line, $shellword);
-
- } elsif ($shellword =~ qr"^(?:\(|\)|:|;|;;|&&|\|\||\{|\}|break|case|cd|continue|do|done|elif|else|esac|eval|exec|exit|export|fi|for|if|read|set|shift|then|umask|unset|while)$") {
- # Shell builtins are fine.
-
- } elsif ($shellword =~ qr"^[\w_]+=.*$") {
- # Variable assignment.
-
- } elsif ($shellword =~ qr"^\./.*$") {
- # All commands from the current directory are fine.
-
- } elsif ($shellword =~ qr"^#") {
- my $semicolon = ($shellword =~ qr";");
- my $multiline = ($line->lines =~ qr"--");
-
- if ($semicolon) {
- $line->log_warning("A shell comment should not contain semicolons.");
- }
- if ($multiline) {
- $line->log_warning("A shell comment does not stop at the end of line.");
- }
-
- if ($semicolon || $multiline) {
- $line->explain_warning(
- "When you split a shell command into multiple lines that are continued",
- "with a backslash, they will nevertheless be converted to a single line",
- "before the shell sees them. That means that even if it _looks_ like that",
- "the comment only spans one line in the Makefile, in fact it spans until",
- "the end of the whole shell command. To insert a comment into shell code,",
- "you can pass it as an argument to the \${SHCOMMENT} macro, which expands",
- "to a command doing nothing. Note that any special characters are",
- "nevertheless interpreted by the shell.");
- }
-
- } else {
- $opt_warn_extra and $line->log_warning("Unknown shell command \"${shellword}\".");
- $opt_warn_extra and $line->explain_warning(
- "If you want your package to be portable to all platforms that pkgsrc",
- "supports, you should only use shell commands that are covered by the",
- "tools framework.");
-
- }
- }
-
- if ($state == SCST_COND && $shellword eq "cd") {
- $line->log_error("The Solaris /bin/sh cannot handle \"cd\" inside conditionals.");
- $line->explain_error(
- "When the Solaris shell is in \"set -e\" mode and \"cd\" fails, the",
- "shell will exit, no matter if it is protected by an \"if\" or the",
- "\"||\" operator.");
- }
-
- if (($state != SCST_PAX_S && $state != SCST_SED_E && $state != SCST_CASE_LABEL)) {
- checkline_mk_absolute_pathname($line, $shellword);
- }
-
- if (($state == SCST_INSTALL_D || $state == SCST_MKDIR) && $shellword =~ qr"^\$\{PREFIX(?:|:Q)\}/") {
- $line->log_warning("Please use one of the INSTALL_*_DIR commands instead of "
- . (($state == SCST_MKDIR) ? "\${MKDIR}" : "\${INSTALL} -d")
- . ".");
- $line->explain_warning(
- "Choose one of INSTALL_PROGRAM_DIR, INSTALL_SCRIPT_DIR, INSTALL_LIB_DIR,",
- "INSTALL_MAN_DIR, INSTALL_DATA_DIR.");
- }
-
- if (($state == SCST_INSTALL_DIR || $state == SCST_INSTALL_DIR2) && $shellword !~ regex_mk_shellvaruse && $shellword =~ qr"^\$\{PREFIX(?:|:Q)\}/(.*)") {
- my ($dirname) = ($1);
-
- $opt_warn_extra and $line->log_note("You can use INSTALLATION_DIRS+= ${dirname} instead of this command.");
- $opt_warn_extra and $line->explain_note(
- "This saves you some typing. You also don't have to think about which of",
- "the many INSTALL_*_DIR macros is appropriate, since INSTALLATION_DIRS",
- "takes care of that.",
- "",
- "Note that you should only do this if the package creates _all_",
- "directories it needs before trying to install files into them.");
- }
-
- if ($state == SCST_INSTALL_DIR2 && $shellword =~ qr"^\$") {
- $line->log_warning("The INSTALL_*_DIR commands can only handle one directory at a time.");
- $line->explain_warning(
- "Many implementations of install(1) can handle more, but pkgsrc aims at",
- "maximum portability.");
- }
-
- if ($state == SCST_PAX && $shellword eq "-pe") {
- $line->log_warning("Please use the -pp option to pax(1) instead of -pe.");
- $line->explain_warning(
- "The -pe option tells pax to preserve the ownership of the files, which",
- "means that the installed files will belong to the user that has built",
- "the package. That's a Bad Thing.");
- }
-
- if ($state == SCST_PAX_S || $state == SCST_SED_E) {
- if (false && $shellword !~ qr"^[\"\'].*[\"\']$") {
- $line->log_warning("Substitution commands like \"${shellword}\" should always be quoted.");
- $line->explain_warning(
- "Usually these substitution commands contain characters like '*' or",
- "other shell metacharacters that might lead to lookup of matching",
- "filenames and then expand to more than one word.");
- }
- }
-
- if ($state == SCST_ECHO && $shellword eq "-n") {
- $line->log_warning("Please use \${ECHO_N} instead of \"echo -n\".");
- }
-
- if ($opt_warn_extra && $state != SCST_CASE_LABEL_CONT && $shellword eq "|") {
- $line->log_warning("The exitcode of the left-hand-side command of the pipe operator is ignored.");
- $line->explain_warning(
- "If you need to detect the failure of the left-hand-side command, use",
- "temporary files to save the output of the command.");
- }
-
- if ($opt_warn_extra && $shellword eq ";" && $state != SCST_COND_CONT && $state != SCST_FOR_CONT && !$set_e_mode) {
- $line->log_warning("Please switch to \"set -e\" mode before using a semicolon to separate commands.");
- $line->explain_warning(
- "Older versions of the NetBSD make(1) had run the shell commands using",
- "the \"-e\" option of /bin/sh. In 2004, this behavior has been changed to",
- "follow the POSIX conventions, which is to not use the \"-e\" option.",
- "The consequence of this change is that shell programs don't terminate",
- "as soon as an error occurs, but try to continue with the next command.",
- "Imagine what would happen for these commands:",
- " cd \"\$HOME\"; cd /nonexistent; rm -rf *",
- "To fix this warning, either insert \"set -e\" at the beginning of this",
- "line or use the \"&&\" operator instead of the semicolon.");
- }
-
- #
- # State transition.
- #
-
- if ($state == SCST_SET && $shellword =~ qr"^-.*e") {
- $set_e_mode = true;
- }
- if ($state == SCST_START && $shellword eq "\${RUN}") {
- $set_e_mode = true;
- }
-
- $state = ($shellword eq ";;") ? SCST_CASE_LABEL
- # Note: The order of the following two lines is important.
- : ($state == SCST_CASE_LABEL_CONT && $shellword eq "|") ? SCST_CASE_LABEL
- : ($shellword =~ qr"^[;&\|]+$") ? SCST_START
- : ($state == SCST_START) ? (
- ($shellword eq "\${INSTALL}") ? SCST_INSTALL
- : ($shellword eq "\${MKDIR}") ? SCST_MKDIR
- : ($shellword eq "\${PAX}") ? SCST_PAX
- : ($shellword eq "\${SED}") ? SCST_SED
- : ($shellword eq "\${ECHO}") ? SCST_ECHO
- : ($shellword eq "\${RUN}") ? SCST_START
- : ($shellword eq "echo") ? SCST_ECHO
- : ($shellword eq "set") ? SCST_SET
- : ($shellword =~ qr"^(?:if|elif|while)$") ? SCST_COND
- : ($shellword =~ qr"^(?:then|else|do)$") ? SCST_START
- : ($shellword eq "case") ? SCST_CASE
- : ($shellword eq "for") ? SCST_FOR
- : ($shellword eq "(") ? SCST_START
- : ($shellword =~ qr"^\$\{INSTALL_[A-Z]+_DIR\}$") ? SCST_INSTALL_DIR
- : ($shellword =~ regex_sh_varassign) ? SCST_START
- : SCST_CONT)
- : ($state == SCST_MKDIR) ? SCST_MKDIR
- : ($state == SCST_INSTALL && $shellword eq "-d") ? SCST_INSTALL_D
- : ($state == SCST_INSTALL || $state == SCST_INSTALL_D) ? (
- ($shellword =~ qr"^-[ogm]$") ? SCST_CONT
- : $state)
- : ($state == SCST_INSTALL_DIR) ? (
- ($shellword =~ qr"^-") ? SCST_CONT
- : ($shellword =~ qr"^\$") ? SCST_INSTALL_DIR2
- : $state)
- : ($state == SCST_INSTALL_DIR2) ? $state
- : ($state == SCST_PAX) ? (
- ($shellword eq "-s") ? SCST_PAX_S
- : ($shellword =~ qr"^-") ? SCST_PAX
- : SCST_CONT)
- : ($state == SCST_PAX_S) ? SCST_PAX
- : ($state == SCST_SED) ? (
- ($shellword eq "-e") ? SCST_SED_E
- : ($shellword =~ qr"^-") ? SCST_SED
- : SCST_CONT)
- : ($state == SCST_SED_E) ? SCST_SED
- : ($state == SCST_SET) ? SCST_SET_CONT
- : ($state == SCST_SET_CONT) ? SCST_SET_CONT
- : ($state == SCST_CASE) ? SCST_CASE_IN
- : ($state == SCST_CASE_IN && $shellword eq "in") ? SCST_CASE_LABEL
- : ($state == SCST_CASE_LABEL && $shellword eq "esac") ? SCST_CONT
- : ($state == SCST_CASE_LABEL) ? SCST_CASE_LABEL_CONT
- : ($state == SCST_CASE_LABEL_CONT && $shellword eq ")") ? SCST_START
- : ($state == SCST_CONT) ? SCST_CONT
- : ($state == SCST_COND) ? SCST_COND_CONT
- : ($state == SCST_COND_CONT) ? SCST_COND_CONT
- : ($state == SCST_FOR) ? SCST_FOR_IN
- : ($state == SCST_FOR_IN && $shellword eq "in") ? SCST_FOR_CONT
- : ($state == SCST_FOR_CONT) ? SCST_FOR_CONT
- : ($state == SCST_ECHO) ? SCST_CONT
- : do {
- $line->log_warning("[" . scst_statename->[$state] . " ${shellword}] Keeping the current state.");
- $state;
- };
- }
-
- if ($rest !~ qr"^\s*$") {
- $line->log_error("Internal pkglint error: " . scst_statename->[$state] . ": rest=${rest}");
- }
-}
-
-sub checkline_mk_shellcmd($$) {
- my ($line, $shellcmd) = @_;
-
- checkline_mk_text($line, $shellcmd);
- checkline_mk_shelltext($line, $shellcmd);
-}
-
-sub checkline_mk_vardef($$$) {
- my ($line, $varname, $op) = @_;
-
- $opt_debug_trace and $line->log_debug("checkline_mk_vardef(${varname}, ${op})");
-
- # If we are checking a whole package, add it to the package-wide
- # list of defined variables.
- if (defined($pkgctx_vardef) && !exists($pkgctx_vardef->{$varname})) {
- $pkgctx_vardef->{$varname} = $line;
- }
-
- # Add it to the file-wide list of defined variables.
- if (!exists($mkctx_vardef->{$varname})) {
- $mkctx_vardef->{$varname} = $line;
- }
-
- return unless $opt_warn_perm;
-
- my $perms = get_variable_perms($line, $varname);
- my $needed = { "=" => "s", "!=" => "s", "?=" => "d", "+=" => "a", ":=" => "s" }->{$op};
-
- if (index($perms, $needed) == -1) {
- $line->log_warning("Permission [${needed}] requested for ${varname}, but only [${perms}] is allowed.");
- $line->explain_warning(
- "The available permissions are:",
- "\ta\tappend something using +=",
- "\td\tset a default value using ?=",
- "\ts\tset a variable using :=, =, !=",
- "\tp\tuse a variable during preprocessing",
- "\tu\tuse a variable at runtime",
- "",
- "A \"?\" means that it is not yet clear which permissions are allowed",
- "and which aren't.");
- }
-}
-
-sub checkline_mk_vartype_basic($$$$$$$$);
-sub checkline_mk_vartype_basic($$$$$$$$) {
- my ($line, $varname, $type, $op, $value, $comment, $list_context, $is_guessed) = @_;
- my ($value_novar);
-
- $opt_debug_trace and $line->log_debug(sprintf("checkline_mk_vartype_basic(%s, %s, %s, %s, %s, %s, %s)",
- $varname, $type, $op, $value, defined($comment) ? $comment : "<undef>", $list_context, $is_guessed));
-
- $value_novar = $value;
- while ($value_novar =~ s/\$\{([^{}]*)\}//g) {
- my ($pkgctx_varuse) = ($1);
- if (!$list_context && $pkgctx_varuse =~ qr":Q$") {
- $line->log_warning("The :Q operator should only be used in lists and shell commands.");
- }
- }
-
- if (ref($type) eq "HASH") {
- if (!exists($type->{$value})) {
- $line->log_warning("\"${value}\" is not valid for ${varname}. Use one of ".join(" ", sort(keys(%{$type})))." instead.");
- }
-
- } elsif ($type eq "AwkCommand") {
- $opt_debug_unchecked and $line->log_debug("Unchecked AWK command: ${value}");
-
- } elsif ($type eq "BrokenIn") {
- if ($value ne $value_novar) {
- $line->log_error("${varname} must not refer to other variables.");
-
- } elsif ($value =~ qr"^pkgsrc-(\d\d\d\d)Q(\d)$") {
- my ($year, $quarter) = ($1, $2);
-
- # Fine.
-
- } else {
- $line->log_warning("Invalid value \"${value}\" for ${varname}.");
- }
- $line->log_note("Please remove this line if the package builds for you.");
-
- } elsif ($type eq "BuildlinkDepmethod") {
- # Note: this cannot be replaced with { build full } because
- # enumerations may not contain references to other variables.
- if ($value ne $value_novar) {
- # No checks yet.
- } elsif ($value ne "build" && $value ne "full") {
- $line->log_warning("Invalid dependency method \"${value}\". Valid methods are \"build\" or \"full\".");
- }
-
- } elsif ($type eq "BuildlinkDepth") {
- if ($value ne "\${BUILDLINK_DEPTH}+"
- && $value ne "\${BUILDLINK_DEPTH:S/+\$//}") {
- $line->log_warning("Invalid value for ${varname}.");
- }
-
- } elsif ($type eq "BuildlinkPackages") {
- my $re_del = qr"\$\{BUILDLINK_PACKAGES:N(?:[+\-.0-9A-Z_a-z]|\$\{[^\}]+\})+\}";
- my $re_add = qr"(?:[+\-.0-9A-Z_a-z]|\$\{[^\}]+\})+";
-
- if (($op eq ":=" && $value =~ qr"^${re_del}$") ||
- ($op eq ":=" && $value =~ qr"^${re_del}\s+${re_add}$") ||
- ($op eq "+=" && $value =~ qr"^${re_add}$")) {
- # Fine.
-
- } else {
- $line->log_warning("Invalid value for ${varname}.");
- }
-
- } elsif ($type eq "Category") {
- my $allowed_categories = join("|", qw(
- archivers audio
- benchmarks biology
- cad chat chinese comms converters cross crosspkgtools
- databases devel
- editors emulators
- filesystems finance fonts
- games geography gnome gnustep graphics
- ham
- inputmethod
- japanese java
- kde korean
- lang linux
- mail math mbone meta-pkgs misc multimedia
- net news
- packages parallel perl5 pkgtools plan9 print python
- ruby
- security shells sysutils
- tcl textproc time tk
- windowmaker wm www
- x11 xmms
- ));
- if ($value !~ qr"^(?:${allowed_categories})$") {
- $line->log_error("Invalid category \"${value}\".");
- }
-
- } elsif ($type eq "CFlag") {
- if ($value =~ qr"^-D([0-9A-Z_a-z]+)=(.*)") {
- my ($macname, $macval) = ($1, $2);
-
- # No checks needed, since the macro definitions
- # are usually directory names, which don't need
- # any quoting.
-
- } elsif ($value =~ qr"^-[DU]([0-9A-Z_a-z]+)") {
- my ($macname) = ($1);
-
- $opt_debug_unchecked and $line->log_debug("Unchecked macro ${macname} in ${varname}.");
-
- } elsif ($value =~ qr"^-I(.*)") {
- my ($dirname) = ($1);
-
- $opt_debug_unchecked and $line->log_debug("Unchecked directory ${dirname} in ${varname}.");
-
- } elsif ($value eq "-c99") {
- # Only works on IRIX, but is usually enclosed with
- # the proper preprocessor conditional.
-
- } elsif ($value =~ qr"^-[OWfgm]") {
- $opt_debug_unchecked and $line->log_debug("Unchecked compiler flag ${value} in ${varname}.");
-
- } elsif ($value =~ qr"^-.*") {
- $line->log_warning("Unknown compiler flag \"${value}\".");
-
- } elsif ($value =~ regex_unresolved) {
- $opt_debug_unchecked and $line->log_debug("Unchecked CFLAG: ${value}");
-
- } else {
- $line->log_warning("Compiler flag \"${value}\" does not start with a dash.");
- }
-
- } elsif ($type eq "Comment") {
- if ($value eq "SHORT_DESCRIPTION_OF_THE_PACKAGE") {
- $line->log_error("COMMENT must be set.");
- }
- if ($value =~ qr"^(a|an)\s+"i) {
- $line->log_warning("COMMENT should not begin with '$1'.");
- }
- if ($value =~ qr"^[a-z]") {
- $line->log_warning("COMMENT should start with a capital letter.");
- }
- if ($value =~ qr"\.$") {
- $line->log_warning("COMMENT should not end with a period.");
- }
- if (length($value) > 70) {
- $line->log_warning("COMMENT should not be longer than 70 characters.");
- }
-
- } elsif ($type eq "Dependency") {
- if ($value =~ qr"^(${regex_pkgbase})(<|=|>|<=|>=|!=)(${regex_pkgversion})$") {
- my ($depbase, $op, $depversion) = ($1, $2, $3);
-
- } elsif ($value =~ qr"^(${regex_pkgbase})-(\[.*\]\*|\d.*|\*)$") {
- my ($depbase, $depversion) = ($1, $2);
-
- if ($depversion eq "*") {
- $line->log_warning("Please use ${depbase}-[0-9]* instead of ${depbase}-*.");
- $line->explain_warning(
- "If you use a * alone, the package specification may match other",
- "packages that have the same prefix, but a longer name. For example,",
- "foo-* matches foo-1.2, but also foo-client-1.2 and foo-server-1.2.");
-
- } elsif ($depversion =~ qr"^\[.*\]$") {
- if ($depversion ne "[0-9]*") {
- $line->log_warning("Only [0-9]* is allowed in the numeric part of a dependency.");
- }
-
- } elsif ($depversion !~ qr"\[" && $depversion !~ qr"\.\*$") {
- $line->log_warning("Error-prone dependency pattern \"${depversion}\".");
- $line->explain_warning(
- "Instead of 3*, you should either write write 3{,nb*} or 3.* if you",
- "meant that. Otherwise, maybe you meant \"package>=3\"?");
-
- } else {
- # Great.
- }
-
- } elsif ($value =~ qr"\{") {
- # Dependency patterns containing alternatives
- # are just too hard to check.
- $opt_debug_unchecked and $line->log_debug("Unchecked dependency pattern: ${value}");
-
- } elsif ($value ne $value_novar) {
- $opt_debug_unchecked and $line->log_debug("Unchecked dependency: ${value}");
-
- } else {
- $line->log_warning("Unknown dependency format: ${value}");
- $line->explain_warning(
- "Typical dependencies have the form \"package>=2.5\", \"package-[0-9]*\"",
- "or \"package-3.141\".");
- }
-
- } elsif ($type eq "DependencyWithPath") {
- if ($value =~ regex_unresolved) {
- # don't even try to check anything
- } elsif ($value =~ qr":(\.\./\.\./([^/]+)/([^/]+))$") {
- my ($relpath, $cat, $pkg) = ($1, $2, $3);
-
- checkline_relative_pkgdir($line, $relpath);
-
- if ($pkg eq "msgfmt" || $pkg eq "gettext") {
- $line->log_warning("Please use BUILD_USES_MSGFMT=yes instead of this dependency.");
-
- } elsif ($pkg =~ qr"^perl\d+") {
- $line->log_warning("Please use USE_TOOLS+=perl:run instead of this dependency.");
-
- } elsif ($pkg eq "gmake") {
- $line->log_warning("Please use USE_TOOLS+=gmake instead of this dependency.");
-
- } elsif ($pkg =~ qr"^([-a-zA-Z0-9]+)-dirs[-><=]+(.*)$") {
- my ($dirs, $version) = ($1, $2);
-
- $line->log_warning("Please use USE_DIRS+=${dirs}-${version} instead of this dependency.");
- }
-
- } elsif ($value =~ qr":\.\./[^/]+$") {
- $line->log_warning("Dependencies should have the form \"../../category/package\".");
- $line->explain_warning(expl_relative_dirs);
-
- } else {
- $line->log_warning("Unknown dependency format.");
- $line->explain_warning(
- "Examples for valid dependencies are:",
- " package-[0-9]*:../../category/package",
- " package>=3.41:../../category/package",
- " package-2.718:../../category/package");
- }
-
- } elsif ($type eq "DistSuffix") {
- if ($value eq ".tar.gz") {
- $line->log_note("${varname} is \".tar.gz\" by default, so this definition may be redundant.");
- }
-
- } elsif ($type eq "Filename") {
- if ($value_novar =~ qr"/") {
- $line->log_warning("A filename should not contain a slash.");
-
- } elsif ($value_novar !~ qr"^[-0-9\@A-Za-z.,_~+%]*$") {
- $line->log_warning("\"${value}\" is not a valid filename.");
- }
-
- } elsif ($type eq "Filemask") {
- if ($value_novar !~ qr"^[-0-9A-Za-z._~+%*?]*$") {
- $line->log_warning("\"${value}\" is not a valid filename mask.");
- }
-
- } elsif ($type eq "FileMode") {
- if ($value ne "" && $value_novar eq "") {
- # Fine.
- } elsif ($value =~ qr"^[0-7]{3,4}") {
- # Fine.
- } else {
- $line->log_warning("Invalid file mode ${value}.");
- }
-
- } elsif ($type eq "Identifier") {
- if ($value ne $value_novar) {
- #$line->log_warning("Identifiers should be given directly.");
- }
- if ($value_novar =~ qr"^[+\-.0-9A-Z_a-z]+$") {
- # Fine.
- } elsif ($value ne "" && $value_novar eq "") {
- # Don't warn here.
- } else {
- $line->log_warning("Invalid identifier \"${value}\".");
- }
-
- } elsif ($type eq "Integer") {
- if ($value !~ qr"^\d+$") {
- $line->log_warning("${varname} must be a valid integer.");
- }
-
- } elsif ($type eq "LdFlag") {
- if ($value =~ qr"^-L(.*)") {
- my ($dirname) = ($1);
-
- $opt_debug_unchecked and $line->log_debug("Unchecked directory ${dirname} in ${varname}.");
-
- } elsif ($value =~ qr"^-l(.*)") {
- my ($libname) = ($1);
-
- $opt_debug_unchecked and $line->log_debug("Unchecked library name ${libname} in ${varname}.");
-
- } elsif ($value =~ qr"^(?:-static)$") {
- # Assume that the wrapper framework catches these.
-
- } elsif ($value =~ qr"^(-Wl,(?:-R|-rpath|--rpath))") {
- my ($rpath_flag) = ($1);
- $line->log_warning("Please use \${COMPILER_RPATH_FLAG} instead of ${rpath_flag}.");
-
- } elsif ($value =~ qr"^-.*") {
- $line->log_warning("Unknown linker flag \"${value}\".");
-
- } elsif ($value =~ regex_unresolved) {
- $opt_debug_unchecked and $line->log_debug("Unchecked LDFLAG: ${value}");
-
- } else {
- $line->log_warning("Linker flag \"${value}\" does not start with a dash.");
- }
-
- } elsif ($type eq "License") {
-
- use constant deprecated_licenses => array_to_hash(qw(
- fee-based-commercial-use
- no-commercial-use no-profit no-redistribution
- shareware
- ));
-
- my $license_file = "${cwd_pkgsrcdir}/licenses/${value}";
- if (defined($pkgctx_vardef) && exists($pkgctx_vardef->{"LICENSE_FILE"})) {
- my $license_file_line = $pkgctx_vardef->{"LICENSE_FILE"};
-
- $license_file = "${current_dir}/" . resolve_relative_path($license_file_line->get("value"), false);
- }
- if (!-f $license_file) {
- $line->log_warning("License file ".normalize_pathname($license_file)." does not exist.");
- }
-
- if (exists(deprecated_licenses->{$value})) {
- $line->log_warning("License ${value} is deprecated.");
- }
-
- } elsif ($type eq "Mail_Address") {
- if ($value =~ qr"^([+\-.0-9A-Z_a-z]+)\@([-\w\d.]+)$") {
- my ($localpart, $domain) = ($1, $2);
- if ($domain =~ qr"^NetBSD.org"i && $domain ne "NetBSD.org") {
- $line->log_warning("Please write NetBSD.org instead of ${domain}.");
- }
- if ("${localpart}\@${domain}" =~ qr"^(tech-pkg|packages)\@NetBSD\.org$"i) {
- $line->log_warning("${localpart}\@${domain} is deprecated. Use pkgsrc-users\@NetBSD.org instead.");
- }
-
- } else {
- $line->log_warning("\"${value}\" is not a valid mail address.");
- }
-
- } elsif ($type eq "Message") {
- if ($value =~ qr"^[\"'].*[\"']$") {
- $line->log_warning("${varname} should not be quoted.");
- }
-
- } elsif ($type eq "Option") {
- if ($value ne $value_novar) {
- $opt_debug_unchecked and $line->log_debug("Unchecked option name \"${value}\".");
-
- } elsif ($value_novar =~ qr"^-?([a-z][-0-9a-z]*)$") {
- my ($optname) = ($1);
-
- if (!exists(get_pkg_options()->{$optname})) {
- $line->log_warning("Unknown option \"${value}\".");
- $line->explain_warning(
- "This option is not documented in the mk/defaults/options.description",
- "file. If this is not a typo, please think of a brief but precise",
- "description and ask on the tech-pkg\@NetBSD.org for inclusion in the",
- "database.");
- }
-
- } elsif ($value_novar =~ qr"^-?([a-z][-0-9a-z_]*)$") {
- my ($optname) = ($1);
-
- $line->log_warning("Use of the underscore character in option names is deprecated.");
-
- } else {
- $line->log_error("\"${value}\" is not a valid option name.");
- }
-
- } elsif ($type eq "Pathlist") {
-
- if ($value !~ qr":" && $is_guessed) {
- checkline_mk_vartype_basic($line, $varname, "Pathname", $op, $value, $comment, $list_context, $is_guessed);
-
- } else {
-
- # XXX: The splitting will fail if $value contains any
- # variables with modifiers, for example :Q or :S/././.
- foreach my $p (split(qr":", $value)) {
- my $p_novar = remove_variables($p);
-
- if ($p_novar !~ qr"^[-0-9A-Za-z._~+%/]*$") {
- $line->log_warning("\"${p}\" is not a valid pathname.");
- }
-
- if ($p !~ qr"^[\$/]") {
- $line->log_warning("All components of ${varname} (in this case \"${p}\") should be an absolute path.");
- }
- }
- }
-
- } elsif ($type eq "Pathmask") {
- if ($value_novar !~ qr"^[#\-0-9A-Za-z._~+%*?/\[\]]*$") {
- $line->log_warning("\"${value}\" is not a valid pathname mask.");
- }
- checkline_mk_absolute_pathname($line, $value);
-
- } elsif ($type eq "Pathname") {
- if ($value_novar !~ qr"^[#\-0-9A-Za-z._~+%/]*$") {
- $line->log_warning("\"${value}\" is not a valid pathname.");
- }
- checkline_mk_absolute_pathname($line, $value);
-
- } elsif ($type eq "Perl5Packlist") {
- if ($value ne $value_novar) {
- $line->log_warning("${varname} should not depend on other variables.");
- }
-
- } elsif ($type eq "PkgName") {
- if ($value eq $value_novar && $value !~ regex_pkgname) {
- $line->log_warning("\"${value}\" is not a valid package name. A valid package name has the form packagename-version, where version consists only of digits, letters and dots.");
- }
-
- } elsif ($type eq "PkgOptionsVar") {
- checkline_mk_vartype_basic($line, $varname, "Varname", $op, $value, $comment, false, $is_guessed);
- if ($value =~ qr"\$\{PKGBASE[:\}]") {
- $line->log_error("PKGBASE must not be used in PKG_OPTIONS_VAR.");
- $line->explain_error(
- "PKGBASE is defined in bsd.pkg.mk, which is included as the",
- "very last file, but PKG_OPTIONS_VAR is evaluated earlier.",
- "Use \${PKGNAME:C/-[0-9].*//} instead.");
- }
-
- } elsif ($type eq "PkgRevision") {
- if ($value !~ qr"^[1-9]\d*$") {
- $line->log_warning("${varname} must be a positive integer number.");
- }
- if ($line->fname !~ qr"(?:^|/)Makefile$") {
- $line->log_error("${varname} must not be set outside the package Makefile.");
- }
-
- } elsif ($type eq "PlatformTriple") {
- my $part = qr"(?:\[[^\]]+\]|[^-\[])+";
- if ($value =~ qr"^(${part})-(${part})-(${part})$") {
- my ($opsys, $os_version, $arch) = ($1, $2, $3);
-
- if ($opsys !~ qr"^(?:\*|Darwin|DragonFly|FreeBSD|Interix|Linux|NetBSD|OpenBSD|SunOS|IRIX)$") {
- $line->log_warning("Unknown operating system: ${opsys}");
- }
- # no check for $os_version
- if ($arch !~ qr"^(?:\*|i386|alpha|amd64|arc|arm|arm32|cobalt|convex|dreamcast|hpcmips|hpcsh|hppa|ia64|m68k|m88k|mips|mips64|mipsel|mipseb|mipsn32|ns32k|pc532|pmax|powerpc|rs6000|s390|sparc|sparc64|vax|x86_64)$") {
- $line->log_warning("Unknown hardware architecture: ${arch}");
- }
-
- } else {
- $line->log_warning("\"${value}\" is not a valid platform triple.");
- $line->explain_warning(
- "A platform triple has the form <OPSYS>-<OS_VERSION>-<MACHINE_ARCH>.",
- "Each of these components may be a shell globbing expression.",
- "Examples: NetBSD-*-i386, *-*-*, Linux-*-*.");
- }
-
- } elsif ($type eq "PrefixPathname") {
- if ($value =~ qr"^man/(.*)") {
- my ($mansubdir) = ($1);
-
- $line->log_warning("Please use \"\${PKGMANDIR}/${mansubdir}\" instead of \"${value}\".");
- }
-
- } elsif ($type eq "RelativePkgDir") {
- checkline_relative_pkgdir($line, $value);
-
- } elsif ($type eq "RelativePkgPath") {
- checkline_relative_path($line, $value);
-
- } elsif ($type eq "Restricted") {
- if ($value ne "\${RESTRICTED}") {
- $line->log_warning("The only valid value for this variable is \${RESTRICTED}.");
- }
-
- } elsif ($type eq "SVR4PkgName") {
- if ($value =~ regex_unresolved) {
- $line->log_error("SVR4_PKGNAME must not contain references to other variables.");
- } elsif (length($value) > 5) {
- $line->log_error("SVR4_PKGNAME must not be longer than 5 characters.");
- }
-
- } elsif ($type eq "SedCommand") {
-
-
- } elsif ($type eq "SedCommands") {
- my $words = shell_split($value);
- if (!$words) {
- $line->log_error("Invalid shell words in sed commands.");
- $line->explain_error(
- "If your sed commands have embedded \"#\" characters, you need to escape",
- "them with a backslash, otherwise make(1) will interpret them as a",
- "comment, no matter if they occur in single or double quotes or",
- "whatever.");
-
- } else {
- my $nwords = scalar(@{$words});
- my $ncommands = 0;
-
- for (my $i = 0; $i < $nwords; $i++) {
- my $word = $words->[$i];
- checkline_mk_shellword($line, $word, true);
-
- if ($word eq "-e") {
- if ($i + 1 < $nwords) {
- # Check the real sed command here.
- $i++;
- $ncommands++;
- if ($ncommands > 1) {
- $line->log_warning("Each sed command should appear in an assignment of its own.");
- $line->explain_warning(
- "For example, instead of",
- " SUBST_SED.foo+= -e s,command1,, -e s,command2,,",
- "use",
- " SUBST_SED.foo+= -e s,command1,,",
- " SUBST_SED.foo+= -e s,command2,,",
- "",
- "This way, short sed commands cannot be hidden at the end of a line.");
- }
- checkline_mk_shellword($line, $words->[$i - 1], true);
- checkline_mk_shellword($line, $words->[$i], true);
- checkline_mk_vartype_basic($line, $varname, "SedCommand", $op, $words->[$i], $comment, $list_context, $is_guessed);
- } else {
- $line->log_error("The -e option to sed requires an argument.");
- }
- } elsif ($word eq "-E") {
- # Switch to extended regular expressions mode.
-
- } elsif ($word eq "-n") {
- # Don't print lines per default.
-
- } elsif ($i == 0 && $word =~ qr"^([\"']?)(?:\d*|/.*/)s(.).*\2g?\1$") {
- $line->log_warning("Please always use \"-e\" in sed commands, even if there is only one substitution.");
-
- } else {
- $line->log_warning("Unknown sed command ${word}.");
- }
- }
- }
-
- } elsif ($type eq "ShellCommand") {
- checkline_mk_shelltext($line, $value);
-
- } elsif ($type eq "ShellWord") {
- if (!$list_context) {
- checkline_mk_shellword($line, $value, true);
- }
-
- } elsif ($type eq "Stage") {
- if ($value !~ qr"^(?:pre|do|post)-(?:extract|patch|configure|build|install)$") {
- $line->log_warning("Invalid stage name. Use one of {pre,do,post}-{extract,patch,configure,build,install}.");
- }
-
- } elsif ($type eq "String") {
- # No further checks possible.
-
- } elsif ($type eq "Tool") {
- if ($value =~ qr"^([-\w]+|\[)(?::(\w+))?$") {
- my ($toolname, $tooldep) = ($1, $2);
- if (!exists(get_tool_names()->{$toolname})) {
- $line->log_error("Unknown tool \"${toolname}\".");
- }
- if (defined($tooldep) && $tooldep !~ qr"^(?:bootstrap|build|pkgsrc|run)$") {
- $line->log_error("Unknown tool dependency \"${tooldep}\". Use one of \"build\", \"pkgsrc\" or \"run\".");
- }
- } else {
- $line->log_error("Invalid tool syntax: \"${value}\".");
- }
-
- } elsif ($type eq "Unchecked") {
- # Do nothing, as the name says.
-
- } elsif ($type eq "URL") {
- if ($value eq "" && defined($comment) && $comment =~ qr"^#") {
- # Ok
-
- } elsif ($value =~ qr"\$\{(MASTER_SITE_[^:]*).*:=(.*)\}$") {
- my ($name, $subdir) = ($1, $2);
-
- if (!exists(get_dist_sites_names()->{$name})) {
- $line->log_error("${name} does not exist.");
- }
- if ($subdir !~ qr"/$") {
- $line->log_error("The subdirectory in ${name} must end with a slash.");
- }
-
- } elsif ($value =~ regex_unresolved) {
- # No further checks
-
- } elsif ($value =~ qr"^(https?|ftp|gopher)://([-0-9A-Za-z.]+)(?::(\d+))?/([-%&+,./0-9:=?\@A-Z_a-z~]|#)*$") {
- my ($proto, $host, $port, $path) = ($1, $2, $3, $4);
- my $sites = get_dist_sites();
-
- if ($host =~ qr"\.NetBSD\.org$"i && $host !~ qr"\.NetBSD\.org$") {
- $line->log_warning("Please write NetBSD.org instead of ${host}.");
- }
-
- foreach my $site (keys(%{$sites})) {
- if (index($value, $site) == 0) {
- my $subdir = substr($value, length($site));
- $line->log_warning(sprintf("Please use \${%s:=%s} instead of \"%s\".", $sites->{$site}, $subdir, $value));
- last;
- }
- }
-
- } elsif ($value =~ qr"^([0-9A-Za-z]+)://([^/]+)(.*)$") {
- my ($scheme, $host, $abs_path) = ($1, $2, $3);
-
- if ($scheme ne "ftp" && $scheme ne "http" && $scheme ne "gopher") {
- $line->log_warning("\"${value}\" is not a valid URL. Only http, ftp and gopher URLs are allowed here.");
-
- } elsif ($abs_path eq "") {
- $line->log_note("For consistency, please add a trailing slash to \"${value}\".");
-
- } else {
- $line->log_warning("\"${value}\" is not a valid URL.");
- }
-
- } else {
- $line->log_warning("\"${value}\" is not a valid URL.");
- }
-
- } elsif ($type eq "UserGroupName") {
- if ($value ne $value_novar) {
- # No checks for now.
- } elsif ($value !~ qr"^[0-9_a-z]+$") {
- $line->log_warning("Invalid user or group name \"${value}\".");
- }
-
- } elsif ($type eq "Varname") {
- if ($value ne "" && $value_novar eq "") {
- # The value of another variable
-
- } elsif ($value_novar !~ qr"^[A-Z_][0-9A-Z_]*(?:[.].*)?$") {
- $line->log_warning("\"${value}\" is not a valid variable name.");
- }
-
- } elsif ($type eq "Version") {
- if ($value !~ qr"^([\d.])+$") {
- $line->log_warning("Invalid version number \"${value}\".");
- }
-
- } elsif ($type eq "WrapperReorder") {
- if ($value =~ qr"^reorder:l:([\w\-]+):([\w\-]+)$") {
- my ($lib1, $lib2) = ($1, $2);
- # Fine.
- } else {
- $line->log_warning("Unknown wrapper reorder command \"${value}\".");
- }
-
- } elsif ($type eq "WrapperTransform") {
- if ($value =~ qr"^rm:(?:-[DILOUWflm].*|-std=.*)$") {
- # Fine.
-
- } elsif ($value =~ qr"^l:([^:]+):(.+)$") {
- my ($lib, $replacement_libs) = ($1, $2);
- # Fine.
-
- } elsif ($value =~ qr"^'?(?:opt|rename|rm-optarg|rmdir):.*$") {
- # FIXME: This is cheated.
- # Fine.
-
- } elsif ($value eq "-e" || $value =~ qr"^\"?'?s[|:,]") {
- # FIXME: This is cheated.
- # Fine.
-
- } else {
- $line->log_warning("Unknown wrapper transform command \"${value}\".");
- }
-
- } elsif ($type eq "WrkdirSubdirectory") {
- checkline_mk_vartype_basic($line, $varname, "Pathname", $op, $value, $comment, $list_context, $is_guessed);
- if ($value eq "\${WRKDIR}") {
- # Fine.
- } else {
- $opt_debug_unchecked and $line->log_debug("Unchecked subdirectory \"${value}\" of \${WRKDIR}.");
- }
-
- } elsif ($type eq "WrksrcSubdirectory") {
- if ($value =~ qr"^(\$\{WRKSRC\})(?:/(.*))?") {
- my ($prefix, $rest) = ($1, $2);
- $line->log_note("You can use \"" . (defined($rest) ? $rest : ".") . "\" instead of \"${value}\".");
-
- } elsif ($value ne "" && $value_novar eq "") {
- # The value of another variable
-
- } elsif ($value_novar !~ qr"^(?:\.|[0-9A-Za-z][-0-9A-Za-z._/+]*)$") {
- $line->log_warning("\"${value}\" is not a valid subdirectory of \${WRKSRC}.");
- }
-
- } elsif ($type eq "Yes") {
- if ($value !~ qr"^(?:YES|yes)(?:\s+#.*)?$") {
- $line->log_warning("${varname} should be set to YES or yes.");
- $line->explain_warning(
- "This variable means \"yes\" if it is defined, and \"no\" if it is",
- "undefined. Even when it has the value \"no\", this means \"yes\".",
- "Therefore when it is defined, its value should correspond to its",
- "meaning.");
- }
-
- } elsif ($type eq "YesNo") {
- if ($value !~ qr"^(?:YES|yes|NO|no)(?:\s+#.*)?$") {
- $line->log_warning("${varname} should be set to YES, yes, NO, or no.");
- }
-
- } elsif ($type eq "YesNo_Indirectly") {
- if ($value_novar ne "" && $value !~ qr"^(?:YES|yes|NO|no)(?:\s+#.*)?$") {
- $line->log_warning("${varname} should be set to YES, yes, NO, or no.");
- }
-
- } else {
- $line->log_fatal("Type ${type} unknown.");
- }
-}
-
-# Checks whether the list of version numbers that are given as the
-# C<value> of the variable C<varname> are in decreasing order.
-sub checkline_decreasing_order($$$) {
- my ($line, $varname, $value) = @_;
-
- my @pyver = split(qr"\s+", $value);
- if (!@pyver) {
- $line->log_error("There must be at least one value for ${varname}.");
- return;
- }
-
- my $ver = shift(@pyver);
- if ($ver !~ qr"^\d+$") {
- $line->log_error("All values for ${varname} must be numeric.");
- return;
- }
-
- while (@pyver) {
- my $nextver = shift(@pyver);
- if ($nextver !~ qr"^\d+$") {
- $line->log_error("All values for ${varname} must be numeric.");
- return;
- }
-
- if ($nextver >= $ver) {
- $line->log_warning("The values for ${varname} should be in decreasing order.");
- $line->explain_warning(
- "If they aren't, it may be possible that needless versions of packages",
- "are installed.");
- }
- $ver = $nextver;
- }
-}
-
-sub checkline_mk_vartype($$$$$) {
- my ($line, $varname, $op, $value, $comment) = @_;
-
- return unless $opt_warn_types;
-
- my $vartypes = get_vartypes_map();
- my $varbase = varname_base($varname);
- my $varcanon = varname_canon($varname);
-
- my $type = get_variable_type($line, $varname);
-
- if ($op eq "+=") {
- if (defined($type)) {
- if (!$type->may_use_plus_eq()) {
- $line->log_warning("The \"+=\" operator should only be used with lists.");
- }
- } elsif ($varbase !~ qr"^_" && $varbase !~ get_regex_plurals()) {
- $line->log_warning("As ${varname} is modified using \"+=\", its name should indicate plural.");
- }
- }
-
- if (!defined($type)) {
- # Cannot check anything if the type is not known.
- $opt_debug_unchecked and $line->log_debug("Unchecked variable assignment for ${varname}.");
-
- } elsif ($op eq "!=") {
- $opt_debug_misc and $line->log_debug("Use of !=: ${value}");
-
- } elsif ($type->kind_of_list != LK_NONE) {
- my (@words, $rest);
-
- if ($type->kind_of_list == LK_INTERNAL) {
- @words = split(qr"\s+", $value);
- $rest = "";
- } else {
- @words = ();
- $rest = $value;
- while ($rest =~ s/^$regex_shellword//) {
- my ($word) = ($1);
- last if ($word =~ qr"^#");
- push(@words, $1);
- }
- }
-
- foreach my $word (@words) {
- checkline_mk_vartype_basic($line, $varname, $type->basic_type, $op, $word, $comment, true, $type->is_guessed);
- if ($type->kind_of_list != LK_INTERNAL) {
- checkline_mk_shellword($line, $word, true);
- }
- }
-
- if ($rest !~ qr"^\s*$") {
- $line->log_error("Internal pkglint error: rest=${rest}");
- }
-
- } else {
- checkline_mk_vartype_basic($line, $varname, $type->basic_type, $op, $value, $comment, $type->is_practically_a_list(), $type->is_guessed);
- }
-}
-
-sub checkline_mk_varassign($$$$$) {
- my ($line, $varname, $op, $value, $comment) = @_;
- my ($used_vars);
- my $varbase = varname_base($varname);
- my $varcanon = varname_canon($varname);
-
- $opt_debug_trace and $line->log_debug("checkline_mk_varassign($varname, $op, $value)");
-
- checkline_mk_vardef($line, $varname, $op);
-
- if ($op eq "?=" && defined($seen_bsd_prefs_mk) && !$seen_bsd_prefs_mk) {
- if ($varbase eq "BUILDLINK_PKGSRCDIR"
- || $varbase eq "BUILDLINK_DEPMETHOD"
- || $varbase eq "BUILDLINK_ABI_DEPENDS") {
- # FIXME: What about these ones? They occur quite often.
- } else {
- $opt_warn_extra and $line->log_warning("Please include \"../../mk/bsd.prefs.mk\" before using \"?=\".");
- }
- }
-
- checkline_mk_text($line, $value);
- checkline_mk_vartype($line, $varname, $op, $value, $comment);
-
- # If the variable is not used and is untyped, it may be a
- # spelling mistake.
- if (defined($pkgctx_varuse)) {
- my $vartypes = get_vartypes_map();
- my $deprecated = get_deprecated_map();
-
- if (exists($pkgctx_varuse->{$varname}) || exists($pkgctx_varuse->{$varcanon})) {
- # Ok
- } elsif (exists($vartypes->{$varname}) || exists($vartypes->{$varcanon})) {
- # Ok
- } elsif (exists($deprecated->{$varname}) || exists($deprecated->{$varcanon})) {
- # Ok
- } else {
- $line->log_warning("${varname} is defined but not used. Spelling mistake?");
- }
- }
-
- if (!$is_internal && $varname =~ qr"^_") {
- $line->log_warning("Variable names starting with an underscore are reserved for internal pkgsrc use.");
- }
-
- if ($varname eq "PERL5_PACKLIST" && defined($effective_pkgbase) && $effective_pkgbase =~ qr"^p5-(.*)") {
- my ($guess) = ($1);
- $guess =~ s/-/\//g;
- $guess = "auto/${guess}/.packlist";
-
- my ($ucvalue, $ucguess) = (uc($value), uc($guess));
- if ($ucvalue ne $ucguess && $ucvalue ne "\${PERL5_SITEARCH\}/${ucguess}") {
- $line->log_warning("Unusual value for PERL5_PACKLIST -- \"${guess}\" expected.");
- }
- }
-
- if ($varname eq "CONFIGURE_ARGS" && $value =~ qr"=\$\{PREFIX\}/share/kde") {
- $line->log_note("Please .include \"../../meta-pkgs/kde3/kde3.mk\" instead of this line.");
- $line->explain_note(
- "That file probably does many things automatically and consistently that",
- "this package also does. When using kde3.mk, you can probably also leave",
- "out some explicit dependencies.");
- }
-
- if ($varname eq "EVAL_PREFIX" && $value =~ qr"^([\w_]+)=") {
- my ($eval_varname) = ($1);
-
- # This assignment will define the variable named
- # $eval_varname. It is marked as known in the current
- # file.
- $mkctx_vardef->{$eval_varname} = $line;
- }
-
- if ($varname eq "PYTHON_VERSIONS_ACCEPTED") {
- checkline_decreasing_order($line, $varname, $value);
- }
-
- if (defined($comment) && $comment eq "# defined" && $varname !~ qr".*(?:_MK|_COMMON)$") {
- $line->log_note("Please use \"# empty\", \"# none\" or \"yes\" instead of \"# defined\".");
- $line->explain_note(
- "The value #defined says something about the state of the variable, but",
- "not what that _means_. In some cases a variable that is defined means",
- "\"yes\", in other cases it is an empty list (which is also only the",
- "state of the variable), whose meaning could be described with \"none\".",
- "It is this meaning that should be described.");
- }
-
- if ($value =~ qr"\$\{(PKGNAME|PKGVERSION)[:\}]") {
- my ($pkgvarname) = ($1);
- if ($varname =~ qr"^PKG_.*_REASON$") {
- # ok
- } elsif ($varname =~ qr"^(?:DIST_SUBDIR|WRKSRC)$") {
- $line->log_warning("${pkgvarname} should not be used in ${varname}, as it sometimes includes the PKGREVISION. Please use ${pkgvarname}_NOREV instead.");
- } else {
- $opt_debug_misc and $line->log_debug("Use of PKGNAME in ${varname}.");
- }
- }
-
- if (exists(get_deprecated_map()->{$varname})) {
- $line->log_warning("Definition of ${varname} is deprecated. ".get_deprecated_map()->{$varname});
- } elsif (exists(get_deprecated_map()->{$varcanon})) {
- $line->log_warning("Definition of ${varname} is deprecated. ".get_deprecated_map()->{$varcanon});
- }
-
- if ($varname =~ qr"^SITES_") {
- $line->log_warning("SITES_* is deprecated. Please use SITES.* instead.");
- }
-
- if ($value =~ qr"^[^=]\@comment") {
- $line->log_warning("Please don't use \@comment in ${varname}.");
- $line->explain_warning(
- "Here you are defining a variable containing \@comment. As this value",
- "typically includes a space as the last character you probably also used",
- "quotes around the variable. This can lead to confusion when adding this",
- "variable to PLIST_SUBST, as all other variables are quoted using the :Q",
- "operator when they are appended. As it is hard to check whether a",
- "variable that is appended to PLIST_SUBST is already quoted or not, you",
- "should not have pre-quoted variables at all. To solve this, you should",
- "directly use PLIST_SUBST+= ${varname}=${value} or use any other",
- "variable for collecting the list of PLIST substitutions and later",
- "append that variable with PLIST_SUBST+= \${MY_PLIST_SUBST}.");
- }
-
- use constant op_to_use_time => {
- ":=" => VUC_TIME_LOAD,
- "!=" => VUC_TIME_LOAD,
- "=" => VUC_TIME_RUN,
- "+=" => VUC_TIME_RUN,
- "?=" => VUC_TIME_RUN
- };
-
- $used_vars = extract_used_variables($line, $value);
- my $vuc = PkgLint::VarUseContext->new(
- op_to_use_time->{$op},
- get_variable_type($line, $varname),
- VUC_SHELLWORD_UNKNOWN, # XXX: maybe PLAIN?
- VUC_EXTENT_UNKNOWN
- );
- foreach my $used_var (@{$used_vars}) {
- checkline_mk_varuse($line, $used_var, "", $vuc);
- }
-}
-
-#
-# Procedures to check an array of lines.
-#
-
-sub checklines_trailing_empty_lines($) {
- my ($lines) = @_;
- my ($last, $max);
-
- $max = $#{$lines} + 1;
- for ($last = $max; $last > 1 && $lines->[$last - 1]->text eq ""; ) {
- $last--;
- }
- if ($last != $max) {
- $lines->[$last]->log_note("Trailing empty lines.");
- }
-}
-
-sub checklines_package_Makefile_varorder($) {
- my ($lines) = @_;
-
- return unless $opt_warn_varorder;
-
- use enum qw(once optional many);
- my (@sections) = (
- [ "Initial comments", once,
- [
- ]
- ],
- [ "Unsorted stuff, part 1", once,
- [
- [ "DISTNAME", once ],
- [ "PKGNAME", optional ],
- [ "PKGREVISION", optional ],
- [ "SVR4_PKGNAME", optional ],
- [ "CATEGORIES", once ],
- [ "MASTER_SITES", once ],
- [ "DIST_SUBDIR", optional ],
- [ "EXTRACT_SUFX", optional ],
- [ "DISTFILES", many ],
- [ "SITES.*", many ],
- ]
- ],
- [ "Distribution patches", optional,
- [
- [ "PATCH_SITES", optional ], # or once?
- [ "PATCH_SITE_SUBDIR", optional ],
- [ "PATCHFILES", optional ], # or once?
- [ "PATCH_DIST_ARGS", optional ],
- [ "PATCH_DIST_STRIP", optional ],
- [ "PATCH_DIST_CAT", optional ],
- ]
- ],
- [ "Unsorted stuff, part 2", once,
- [
- [ "MAINTAINER", once ],
- [ "HOMEPAGE", optional ],
- [ "COMMENT", once ],
- ]
- ],
- [ "Legal issues", optional,
- [
- [ "LICENSE", once ],
- [ "RESTRICTED", optional ],
- [ "NO_BIN_ON_CDROM", optional ],
- [ "NO_BIN_ON_FTP", optional ],
- [ "NO_SRC_ON_CDROM", optional ],
- [ "NO_SRC_ON_FTP", optional ],
- ]
- ],
- [ "Technical restrictions", optional,
- [
- [ "NOT_FOR_PLATFORM", many ],
- [ "ONLY_FOR_PLATFORM", many ],
- [ "NOT_FOR_COMPILER", many ],
- [ "ONLY_FOR_COMPILER", many ],
- [ "NOT_FOR_UNPRIVILEGED", optional ],
- [ "ONLY_FOR_UNPRIVILEGED", optional ],
- ]
- ],
- [ "Dependencies", optional,
- [
- [ "BUILD_DEPENDS", many ],
- [ "DEPENDS", many ],
- ]
- ]
- );
-
- if (!defined($seen_Makefile_common) || $seen_Makefile_common) {
- return;
- }
-
- my ($lineno, $sectindex, $varindex) = (0, -1, 0);
- my ($next_section, $vars, $below, $below_what) = (true, undef, {}, undef);
-
- # If the current section is optional but contains non-optional
- # fields, the complete section may be skipped as long as there
- # has not been a non-optional variable.
- my $may_skip_section = false;
-
- # In each iteration, one of the following becomes true:
- # - new.lineno > old.lineno
- # - new.sectindex > old.sectindex
- # - new.sectindex == old.sectindex && new.varindex > old.varindex
- # - new.next_section == true && old.next_section == false
- while ($lineno <= $#{$lines}) {
- my $line = $lines->[$lineno];
- my $text = $line->text;
-
- $opt_debug_misc and $line->log_debug("[varorder] section ${sectindex} variable ${varindex}.");
-
- if ($next_section) {
- $next_section = false;
- $sectindex++;
- last if ($sectindex > $#sections);
- $vars = $sections[$sectindex]->[2];
- $may_skip_section = ($sections[$sectindex]->[1] == optional);
- $varindex = 0;
- }
-
- if ($text =~ qr"^#") {
- $lineno++;
-
- } elsif ($line->has("varcanon")) {
- my $varcanon = $line->get("varcanon");
-
- if (exists($below->{$varcanon})) {
- if (defined($below->{$varcanon})) {
- $line->log_warning("${varcanon} appears too late. Please put it below $below->{$varcanon}.");
- } else {
- $line->log_warning("${varcanon} appears too late. It should be the very first definition.");
- }
- $lineno++;
- next;
- }
-
- while ($varindex <= $#{$vars} && $varcanon ne $vars->[$varindex]->[0] && ($vars->[$varindex]->[1] != once || $may_skip_section)) {
- if ($vars->[$varindex]->[1] == once) {
- $may_skip_section = false;
- }
- $below->{$vars->[$varindex]->[0]} = $below_what;
- $varindex++;
- }
- if ($varindex > $#{$vars}) {
- if ($sections[$sectindex]->[1] != optional) {
- $line->log_warning("Empty line expected.");
- }
- $next_section = true;
-
- } elsif ($varcanon ne $vars->[$varindex]->[0]) {
- $line->log_warning("Expected " . $vars->[$varindex]->[0] . ", but found " . $varcanon . ".");
- $lineno++;
-
- } else {
- if ($vars->[$varindex]->[1] != many) {
- $below->{$vars->[$varindex]->[0]} = $below_what;
- $varindex++;
- }
- $lineno++;
- }
- $below_what = $varcanon;
-
- } else {
- while ($varindex <= $#{$vars}) {
- if ($vars->[$varindex]->[1] == once && !$may_skip_section) {
- $line->log_warning($vars->[$varindex]->[0] . " should be set here.");
- }
- $below->{$vars->[$varindex]->[0]} = $below_what;
- $varindex++;
- }
- $next_section = true;
- if ($text eq "") {
- $below_what = "the previous empty line";
- $lineno++;
- }
- }
- }
-}
-
-sub checklines_mk($) {
- my ($lines) = @_;
- my ($allowed_targets) = ({});
- my ($substcontext) = PkgLint::SubstContext->new();
-
- assert(@{$lines} != 0, "checklines_mk may only be called with non-empty lines.");
- $opt_debug_trace and log_debug($lines->[0]->fname, NO_LINES, "checklines_mk()");
-
- # Define global variables for the Makefile context.
- $mkctx_indentations = [0];
- $mkctx_target = undef;
- $mkctx_for_variables = {};
- $mkctx_vardef = {};
- $mkctx_build_defs = {};
- $mkctx_tools = {%{get_predefined_tool_names()}};
-
- foreach my $prefix (qw(pre do post)) {
- foreach my $action (qw(fetch extract patch tools wrapper configure build test install package clean)) {
- $allowed_targets->{"${prefix}-${action}"} = true;
- }
- }
-
- #
- # In the first pass, all additions to BUILD_DEFS and USE_TOOLS
- # are collected to make the order of the definitions irrelevant.
- #
-
- foreach my $line (@{$lines}) {
- if ($line->has("is_varassign") && $line->get("varname") eq "BUILD_DEFS") {
- foreach my $varname (split(qr"\s+", $line->get("value"))) {
- $mkctx_build_defs->{$varname} = true;
- $opt_debug_misc and $line->log_debug("${varname} is added to BUILD_DEFS.");
- }
- }
- if ($line->has("is_varassign") && $line->get("varname") eq "USE_TOOLS") {
- foreach my $tool (split(qr"\s+", $line->get("value"))) {
- $mkctx_tools->{$tool} = true;
- $opt_debug_misc and $line->log_debug("${tool} is added to USE_TOOLS.");
- }
- }
- }
-
- #
- # In the second pass, all "normal" checks are done.
- #
-
- if (0 <= $#{$lines}) {
- checkline_rcsid_regex($lines->[0], qr"^#\s+", "# ");
- }
-
- foreach my $line (@{$lines}) {
- my $text = $line->text;
-
- checkline_trailing_whitespace($line);
- checkline_spellcheck($line);
-
- if ($line->has("is_empty")) {
- $substcontext->check_end($line);
-
- } elsif ($line->has("is_comment")) {
- # No further checks.
-
- } elsif ($text =~ regex_varassign) {
- my ($varname, $op, undef, $comment) = ($1, $2, $3, $4);
- my $space1 = substr($text, $+[1], $-[2] - $+[1]);
- my $align = substr($text, $+[2], $-[3] - $+[2]);
- my $value = $line->get("value");
-
- if ($align !~ qr"^(\t*|[ ])$") {
- $opt_warn_space && $line->log_note("Alignment of variable values should be done with tabs, not spaces.");
- my $prefix = "${varname}${space1}${op}";
- my $aligned_len = tablen("${prefix}${align}");
- if ($aligned_len % 8 == 0) {
- my $tabalign = ("\t" x (($aligned_len - tablen($prefix) + 7) / 8));
- $line->replace("${prefix}${align}", "${prefix}${tabalign}");
- }
- }
- checkline_mk_varassign($line, $varname, $op, $value, $comment);
- $substcontext->check_varassign($line, $varname, $op, $value);
-
- } elsif ($text =~ regex_mk_shellcmd) {
- my ($shellcmd) = ($1);
- checkline_mk_shellcmd($line, $shellcmd);
-
- } elsif ($text =~ regex_mk_include) {
- my ($includefile) = ($1);
-
- $opt_debug_include and $line->log_debug("includefile=${includefile}");
- checkline_relative_path($line, $includefile);
-
- if ($includefile =~ qr"../Makefile$") {
- $line->log_error("Other Makefiles must not be included.");
- $line->explain_warning(
- "If you want to include portions of another Makefile, extract",
- "the common parts and put them into a Makefile.common. After",
- "that, both this one and the other package should include the",
- "Makefile.common.");
- }
-
- if ($includefile eq "../../mk/bsd.prefs.mk") {
- if ($line->fname =~ qr"buildlink3\.mk$") {
- $line->log_note("For efficiency reasons, please include bsd.fast.prefs.mk instead of bsd.prefs.mk.");
- }
- $seen_bsd_prefs_mk = true;
- } elsif ($includefile eq "../../mk/bsd.fast.prefs.mk") {
- $seen_bsd_prefs_mk = true;
- }
-
- if ($includefile =~ qr"/x11-links/buildlink3\.mk$") {
- $line->log_error("${includefile} must not be included directly. Include \"../../mk/x11.buildlink3.mk\" instead.");
- }
- if ($includefile =~ qr"/intltool/buildlink3\.mk$") {
- $line->log_warning("Please say \"USE_TOOLS+= intltool\" instead of this line.");
- }
- if ($includefile =~ qr"(.*)/builtin\.mk$") {
- my ($dir) = ($1);
- $line->log_error("${includefile} must not be included directly. Include \"${dir}/buildlink3.mk\" instead.");
- }
-
- } elsif ($text =~ regex_mk_sysinclude) {
- my ($includefile, $comment) = ($1, $2);
-
- # No further action.
-
- } elsif ($text =~ regex_mk_cond) {
- my ($indent, $directive, $args, $comment) = ($1, $2, $3, $4);
-
- use constant regex_directives_with_args => qr"^(?:if|ifdef|ifndef|elif|for|undef)$";
-
- if ($directive =~ qr"^(?:endif|endfor|elif|else)$") {
- if ($#{$mkctx_indentations} >= 1) {
- pop(@{$mkctx_indentations});
- } else {
- $line->log_error("Unmatched .${directive}.");
- }
- }
-
- # Check the indentation
- if ($indent ne " " x $mkctx_indentations->[-1]) {
- $opt_warn_space and $line->log_note("This directive should be indented by ".$mkctx_indentations->[-1]." spaces.");
- }
-
- if ($directive eq "if" && $args =~ qr"^!defined\([\w]+_MK\)$") {
- push(@{$mkctx_indentations}, $mkctx_indentations->[-1]);
-
- } elsif ($directive =~ qr"^(?:if|ifdef|ifndef|for|elif|else)$") {
- push(@{$mkctx_indentations}, $mkctx_indentations->[-1] + 2);
- }
-
- if ($directive =~ regex_directives_with_args && !defined($args)) {
- $line->log_error("\".${directive}\" must be given some arguments.");
-
- } elsif ($directive !~ regex_directives_with_args && defined($args)) {
- $line->log_error("\".${directive}\" does not take arguments.");
-
- if ($directive eq "else") {
- $line->log_note("If you meant \"else if\", use \".elif\".");
- }
-
- } elsif ($directive eq "if" || $directive eq "elif") {
- $opt_debug_unchecked and $line->log_debug("Unchecked conditional \"${args}\".");
-
- } elsif ($directive eq "ifdef" || $directive eq "ifndef") {
- if ($args =~ qr"\s") {
- $line->log_error("The \".${directive}\" directive can only handle _one_ argument.");
- } else {
- $line->log_warning("The \".${directive}\" directive is deprecated. Please use \".if "
- . (($directive eq "ifdef" ? "" : "!"))
- . "defined(${args})\" instead.");
- }
-
- } elsif ($directive eq "for") {
- if ($args =~ qr"^(\S+(?:\s*\S+)*?)\s+in\s+(.*)$") {
- my ($vars, $values) = ($1, $2);
-
- foreach my $var (split(qr"\s+", $vars)) {
- if (!$is_internal && $var =~ qr"^_") {
- $line->log_warning("Variable names starting with an underscore are reserved for internal pkgsrc use.");
- }
-
- if ($var =~ qr"^[_a-z][_a-z0-9]*$") {
- # Fine.
- } elsif ($var =~ qr"[A-Z]") {
- $line->log_warning(".for variable names should not contain uppercase letters.");
- } else {
- $line->log_error("Invalid variable name \"${var}\".");
- }
-
- $mkctx_for_variables->{$var} = true;
- }
-
- # Check if any of the value's types is not guessed.
- my $guessed = true;
- foreach my $value (split(qr"\s+", $values)) { # XXX: too simple
- if ($value =~ qr"^\$\{(.*)\}") {
- my $type = get_variable_type($line, $1);
- if (defined($type) && !$type->is_guessed()) {
- $guessed = false;
- }
- }
- }
-
- my $for_loop_type = PkgLint::Type->new(
- LK_INTERNAL,
- "Unchecked",
- [[qr".*", "pu"]],
- $guessed
- );
- my $for_loop_context = PkgLint::VarUseContext->new(
- VUC_TIME_LOAD,
- $for_loop_type,
- VUC_SHELLWORD_FOR,
- VUC_EXTENT_WORD
- );
- foreach my $var (@{extract_used_variables($line, $values)}) {
- checkline_mk_varuse($line, $var, "", $for_loop_context);
- }
-
- }
-
- } elsif ($directive eq "undef" && defined($args)) {
- foreach my $var (split(qr"\s+", $args)) {
- if (exists($mkctx_for_variables->{$var})) {
- $line->log_note("Using \".undef\" after a \".for\" loop is unnecessary.");
- }
- }
- }
-
- } elsif ($text =~ regex_mk_dependency) {
- my ($targets, $dependencies) = ($1, $2);
-
- $opt_debug_misc and $line->log_debug("targets=${targets}, dependencies=${dependencies}");
- $mkctx_target = $targets;
-
- foreach my $source (split(/\s+/, $dependencies)) {
- if ($source eq ".PHONY") {
- foreach my $target (split(/\s+/, $targets)) {
- $allowed_targets->{$target} = true;
- }
- }
- }
-
- foreach my $target (split(/\s+/, $targets)) {
- if ($target eq ".PHONY") {
- foreach my $dep (split(qr"\s+", $dependencies)) {
- $allowed_targets->{$dep} = true;
- }
-
- } elsif ($target eq ".ORDER") {
- # TODO: Check for spelling mistakes.
-
- } elsif (!exists($allowed_targets->{$target})) {
- $line->log_warning("Unusual target \"${target}\".");
- $line->explain_warning(
- "If you really want to define your own targets, you can \"declare\"",
- "them by inserting a \".PHONY: my-target\" line before this line. This",
- "will tell make(1) to not interpret this target's name as a filename.");
- }
- }
-
- } elsif ($text =~ qr"^\.\s*(\S*)") {
- my ($directive) = ($1);
-
- $line->log_error("Unknown directive \".${directive}\".");
-
- } elsif ($text =~ qr"^ ") {
- $line->log_warning("Makefile lines should not start with space characters.");
- $line->explain_warning(
- "If you want this line to contain a shell program, use a tab",
- "character for indentation. Otherwise please remove the leading",
- "white-space.");
-
- } else {
- $line->log_error("[Internal] Unknown line format: $text");
- }
- }
- if (@{$lines} > 0) {
- $substcontext->check_end($lines->[-1]);
- }
-
- checklines_trailing_empty_lines($lines);
-
- if ($#{$mkctx_indentations} != 0) {
- $lines->[-1]->log_error("Directive indentation is not 0, but ".$mkctx_indentations->[-1]." at EOF.");
- }
-
- # Clean up global variables.
- $mkctx_for_variables = undef;
- $mkctx_indentations = undef;
- $mkctx_target = undef;
- $mkctx_vardef = undef;
- $mkctx_build_defs = undef;
- $mkctx_tools = undef;
-}
-
-sub checklines_buildlink3_inclusion($) {
- my ($lines) = @_;
- my ($included_files);
-
- assert(@{$lines} != 0, "The lines array must be non-empty.");
- $opt_debug_trace and log_debug($lines->[0]->fname, NO_LINES, "checklines_buildlink3_inclusion()");
-
- if (!defined($pkgctx_bl3)) {
- return;
- }
-
- # Collect all the included buildlink3.mk files from the file.
- $included_files = {};
- foreach my $line (@{$lines}) {
- if ($line->text =~ regex_mk_include) {
- my ($file, $comment) = ($1, $2);
-
- if ($file =~ qr"^\.\./\.\./(.*)/buildlink3\.mk") {
- my ($bl3) = ($1);
-
- $included_files->{$bl3} = $line;
- if (!exists($pkgctx_bl3->{$bl3})) {
- $line->log_warning("${bl3}/buildlink3.mk is included by this file but not by the package.");
- }
- }
- }
- }
-
- # Print debugging messages for all buildlink3.mk files that are
- # included by the package but not by this buildlink3.mk file.
- foreach my $package_bl3 (sort(keys(%{$pkgctx_bl3}))) {
- if (!exists($included_files->{$package_bl3})) {
- $opt_debug_misc and $pkgctx_bl3->{$package_bl3}->log_debug("${package_bl3}/buildlink3.mk is included by the package but not by the buildlink3.mk file.");
- }
- }
-}
-
-#
-# Procedures to check a single file.
-#
-
-sub checkfile_ALTERNATIVES($) {
- my ($fname) = @_;
- my ($lines);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_ALTERNATIVES()");
-
- checkperms($fname);
- if (!($lines = load_file($fname))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
-}
-
-sub checkfile_buildlink3_mk($) {
- my ($fname) = @_;
- my ($lines, $lineno, $m);
- my ($bl_PKGBASE_line, $bl_PKGBASE);
- my ($bl_pkgbase_line, $bl_pkgbase);
- my ($abi_line, $abi_pkg, $abi_version);
- my ($api_line, $api_pkg, $api_version);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_buildlink3_mk()");
-
- checkperms($fname);
- if (!($lines = load_lines($fname, true))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
- if (@{$lines} == 0) {
- log_error($fname, NO_LINES, "Must not be empty.");
- return;
- }
-
- parselines_mk($lines);
- checklines_mk($lines);
-
- $lineno = 0;
-
- # Header comments
- while ($lineno <= $#{$lines} && (my $text = $lines->[$lineno]->text) =~ qr"^#") {
- if ($text =~ qr"^# XXX") {
- $lines->[$lineno]->log_note("Please read this comment and remove it if appropriate.");
- }
- $lineno++;
- }
- expect_empty_line($lines, \$lineno);
-
- # This line does not belong here, but appears often.
- if (expect($lines, \$lineno, qr"^BUILDLINK_DEPMETHOD\.(\S+)\?=.*$")) {
- $lines->[$lineno - 1]->log_warning("This line belongs in the fourth paragraph.");
- while ($lines->[$lineno]->text eq "") {
- $lineno++;
- }
- }
-
- # First paragraph: Reference counters.
- if (!expect($lines, \$lineno, qr"^BUILDLINK_DEPTH:=\t+\$\{BUILDLINK_DEPTH\}\+$")) {
- lines_log_warning($lines, $lineno, "Expected BUILDLINK_DEPTH:= \${BUILDLINK_DEPTH}+.");
- return;
- }
- if (($m = expect($lines, \$lineno, qr"^(.*)_BUILDLINK3_MK:=\t+\$\{\1_BUILDLINK3_MK\}\+$"))) {
- $bl_PKGBASE_line = $lines->[$lineno - 1];
- $bl_PKGBASE = $m->text(1);
- $opt_debug_misc and $bl_PKGBASE_line->log_debug("bl_PKGBASE=${bl_PKGBASE}");
- } else {
- lines_log_warning($lines, $lineno, "Expected {PKGNAME}_BUILDLINK3_MK:= \${{PKGNAME}_BUILDLINK3_MK}+.");
- return;
- }
- expect_empty_line($lines, \$lineno);
-
- # Second paragraph: Adding the dependency.
- if (!expect($lines, \$lineno, qr"^\.if !empty\(BUILDLINK_DEPTH:M\+\)$")) {
- if (!expect_text($lines, \$lineno, ".if \${BUILDLINK_DEPTH} == \"+\"")) {
- return;
- }
- }
- if (($m = expect($lines, \$lineno, qr"^BUILDLINK_DEPENDS\+=\t+(\S+)$"))) {
- $bl_pkgbase_line = $lines->[$lineno - 1];
- $bl_pkgbase = $m->text(1);
- $opt_debug_misc and $bl_pkgbase_line->log_debug("bl_pkgbase=${bl_pkgbase}");
- } else {
- lines_log_warning($lines, $lineno, "BUILDLINK_DEPENDS line expected.");
- return;
- }
-
- my $norm_bl_pkgbase = $bl_pkgbase;
- $norm_bl_pkgbase =~ s/-/_/g;
- $norm_bl_pkgbase = uc($norm_bl_pkgbase);
- if ($norm_bl_pkgbase ne $bl_PKGBASE) {
- $bl_PKGBASE_line->log_error("Package name mismatch between ${bl_PKGBASE} ...");
- $bl_pkgbase_line->log_error("... and ${bl_pkgbase}.");
- }
- if (defined($effective_pkgbase) && $effective_pkgbase ne $bl_pkgbase) {
- $bl_pkgbase_line->log_error("Package name mismatch between ${bl_pkgbase} ...");
- $effective_pkgname_line->log_error("... and ${effective_pkgbase}.");
- }
-
- if (!expect_text($lines, \$lineno, ".endif")) {
- return;
- }
- expect_empty_line($lines, \$lineno);
-
- # Third paragraph: Duplicate elimination.
- if (expect($lines, \$lineno, qr"^BUILDLINK_PACKAGES:=\t+\$\{BUILDLINK_PACKAGES:N\Q${bl_pkgbase}\E\}\s+\Q${bl_pkgbase}\E$")) {
- # The compressed form of duplicate elimination.
-
- } else {
- if (!expect($lines, \$lineno, qr"^BUILDLINK_PACKAGES:=\t+\$\{BUILDLINK_PACKAGES:N\Q${bl_pkgbase}\E\}$")) {
- lines_log_warning($lines, $lineno, "Expected BUILDLINK_PACKAGES:= \${BUILDLINK_PACKAGES:N${bl_pkgbase}} line.");
- return;
- }
- if (!expect($lines, \$lineno, qr"^BUILDLINK_PACKAGES\+=\t+\Q${bl_pkgbase}\E$")) {
- lines_log_warning($lines, $lineno, "Expected BUILDLINK_PACKAGES+= ${bl_pkgbase} line.");
- return;
- }
- }
- expect_text($lines, \$lineno, "BUILDLINK_ORDER:=\t\${BUILDLINK_ORDER} \${BUILDLINK_DEPTH}${bl_pkgbase}");
- expect_empty_line($lines, \$lineno);
-
- # Fourth paragraph: Package information.
- if (!expect($lines, \$lineno, qr"^\.if !empty\(\Q${bl_PKGBASE}\E_BUILDLINK3_MK:M\+\)$")) {
- if (!expect_text($lines, \$lineno, ".if \${${bl_PKGBASE}_BUILDLINK3_MK} == \"+\"")) {
- return;
- }
- }
- while (!expect($lines, \$lineno, qr"^\.endif.*$")) {
-
- if ($lineno > $#{$lines}) {
- lines_log_warning($lines, $lineno, "Expected .endif");
- return;
- }
-
- my $line = $lines->[$lineno];
-
- if (($m = expect($lines, \$lineno, regex_varassign))) {
- my ($varname, $value) = ($m->text(1), $m->text(3));
- my $do_check = false;
-
- if ($varname eq "BUILDLINK_ABI_DEPENDS.${bl_pkgbase}") {
- $abi_line = $line;
- if ($value =~ regex_dependency_gt) {
- ($abi_pkg, $abi_version) = ($1, $2);
- } elsif ($value =~ regex_dependency_wildcard) {
- ($abi_pkg) = ($1);
- } else {
- $opt_debug_unchecked and $line->log_debug("Unchecked dependency pattern \"${value}\".");
- }
- $do_check = true;
- }
- if ($varname eq "BUILDLINK_API_DEPENDS.${bl_pkgbase}") {
- $api_line = $line;
- if ($value =~ regex_dependency_gt) {
- ($api_pkg, $api_version) = ($1, $2);
- } elsif ($value =~ regex_dependency_wildcard) {
- ($api_pkg) = ($1);
- } else {
- $opt_debug_unchecked and $line->log_debug("Unchecked dependency pattern \"${value}\".");
- }
- $do_check = true;
- }
- if ($do_check && defined($abi_pkg) && defined($api_pkg)) {
- if ($abi_pkg ne $api_pkg) {
- $abi_line->log_warning("Package name mismatch between ${abi_pkg} ...");
- $api_line->log_warning("... and ${api_pkg}.");
- }
- }
- if ($do_check && defined($abi_version) && defined($api_version)) {
- if (!dewey_cmp($abi_version, ">=", $api_version)) {
- $abi_line->log_warning("ABI version (${abi_version}) should be at least ...");
- $api_line->log_warning("... API version (${api_version}).");
- }
- }
-
- if ($varname =~ qr"^BUILDLINK_[\w_]+\.(.*)$") {
- my ($varparam) = ($1);
-
- if ($varparam ne $bl_pkgbase) {
- $line->log_warning("Only buildlink variables for ${bl_pkgbase}, not ${varparam} may be set in this file.");
- }
- }
-
- # TODO: More checks.
-
- } elsif (expect($lines, \$lineno, qr"^(?:#.*)?$")) {
- # Comments and empty lines are fine here.
-
- } else {
- $opt_debug_unchecked and lines_log_warning($lines, $lineno, "Unchecked line in fourth paragraph.");
- $lineno++;
- }
- }
- if (!defined($api_line)) {
- $lines->[$lineno - 1]->log_warning("Definition of BUILDLINK_API_DEPENDS is missing.");
- }
- expect_empty_line($lines, \$lineno);
-
- # Fifth paragraph (optional): Dependencies.
- my $have_dependencies = false;
- my $need_empty_line = false;
- while (true) {
- if (expect($lines, \$lineno, qr"^\.\s*include \"\.\./\.\./([^/]+/[^/]+)/buildlink3\.mk\"$")
- || expect($lines, \$lineno, qr"^\.\s*include \"\.\./\.\./mk/(\S+)\.buildlink3\.mk\"$")
- || expect($lines, \$lineno, qr"^\.if !empty\(PKG_BUILD_OPTIONS\.\Q${bl_pkgbase}\E:M\S+\)$")
- || expect($lines, \$lineno, qr"^\.endif$")) {
- $have_dependencies = true;
- $need_empty_line = true;
- } elsif ($have_dependencies && expect($lines, \$lineno, qr"^$")) {
- $need_empty_line = false;
- } else {
- last;
- }
- }
- if ($need_empty_line) {
- expect_empty_line($lines, \$lineno);
- }
-
- # Sixth paragraph: Reference counter.
- if (!expect($lines, \$lineno, qr"^BUILDLINK_DEPTH:=\t+\$\{BUILDLINK_DEPTH:S/\+\$//\}$")) {
- lines_log_warning($lines, $lineno, "Expected BUILDLINK_DEPTH:= \${BUILDLINK_DEPTH:S/+\$//}.");
- explain_warning($lines, $lineno,
- "Everything besides the .include lines for the buildlink3.mk files of",
- "dependencies should go between the .if !empty({PKGNAME}_BUILDLINK3_MK)",
- "and the corresponding .endif.");
- return;
- }
-
- if ($lineno <= $#{$lines}) {
- $lines->[$lineno]->log_warning("The file should end here.");
- }
-
- checklines_buildlink3_inclusion($lines);
-}
-
-sub checkfile_DESCR($) {
- my ($fname) = @_;
- my ($maxchars, $maxlines) = (80, 24);
- my ($lines);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_DESCR()");
-
- checkperms($fname);
- if (!($lines = load_file($fname))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
- if (@{$lines} == 0) {
- log_error($fname, NO_LINE_NUMBER, "Must not be empty.");
- return;
- }
-
- foreach my $line (@{$lines}) {
- checkline_length($line, $maxchars);
- checkline_trailing_whitespace($line);
- checkline_valid_characters($line, regex_validchars);
- checkline_spellcheck($line);
- if ($line->text =~ qr"\$\{") {
- $line->log_warning("Variables are not expanded in the DESCR file.");
- }
- }
- checklines_trailing_empty_lines($lines);
-
- if (@{$lines} > $maxlines) {
- my $line = $lines->[$maxlines];
-
- $line->log_warning("File too long (should be no more than $maxlines lines).");
- $line->explain_warning(
- "A common terminal size is 80x25 characters. The DESCR file should",
- "fit on one screen. It is also intended to give a _brief_ summary",
- "about the package's contents.");
- }
- autofix($lines);
-}
-
-sub checkfile_distinfo($) {
- my ($fname) = @_;
- my ($lines, %in_distinfo, $current_fname, $state, $patches_dir);
- my ($di_is_committed);
-
- use enum qw(:DIS_ start=0 SHA1=0 RMD160 Size);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_distinfo()");
-
- $di_is_committed = is_committed($fname);
-
- checkperms($fname);
- if (!($lines = load_file($fname))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
-
- if (@{$lines} == 0) {
- log_error($fname, NO_LINE_NUMBER, "Must not be empty.");
- return;
- }
-
- checkline_rcsid($lines->[0], "");
- if (1 <= $#{$lines} && $lines->[1]->text ne "") {
- $lines->[1]->log_note("Empty line expected.");
- $lines->[1]->explain_note("This is merely for aesthetical purposes.");
- }
-
- $patches_dir = $patchdir;
- if (!defined($patches_dir) && -d "${current_dir}/patches") {
- $patches_dir = "patches";
- } else {
- # it stays undefined.
- }
-
- $current_fname = undef;
- $state = DIS_start;
- foreach my $line (@{$lines}[2..$#{$lines}]) {
- if ($line->text !~ qr"^(\w+) \(([^)]+)\) = (.*)(?: bytes)?$") {
- $line->log_error("Unknown line type.");
- next;
- }
- my ($alg, $chksum_fname, $sum) = ($1, $2, $3);
- my $is_patch = (($chksum_fname =~ qr"^patch-[A-Za-z0-9]+$") ? true : false);
-
- if ($chksum_fname !~ qr"^\w") {
- $line->log_error("All file names should start with a letter.");
- }
-
- # Inter-package check for differing distfile checksums.
- if ($opt_check_global && !$is_patch) {
- # Note: Perl-specific auto-population.
- if (exists($ipc_distinfo->{$alg}->{$chksum_fname})) {
- my $other = $ipc_distinfo->{$alg}->{$chksum_fname};
-
- if ($other->[1] eq $sum) {
- # Fine.
- } else {
- $line->log_error("The ${alg} checksum for ${chksum_fname} differs ...");
- $other->[0]->log_error("... from this one.");
- }
- } else {
- $ipc_distinfo->{$alg}->{$chksum_fname} = [$line, $sum];
- }
- }
-
- if ($alg eq "MD5") {
- $line->log_error("MD5 checksums are obsolete.");
- $line->explain_error(
- "Run \"".conf_make." makedistinfo\" to regenerate the distinfo file.");
- next;
- }
-
- if ($state == DIS_SHA1) {
- if ($alg eq "SHA1") {
- $state = ($is_patch ? DIS_start : DIS_RMD160);
- $current_fname = $chksum_fname;
- } else {
- $line->log_warning("Expected an SHA1 checksum.");
- }
-
- } elsif ($state == DIS_RMD160) {
- $state = DIS_start;
- if ($alg eq "RMD160") {
- if ($chksum_fname eq $current_fname) {
- $state = DIS_Size;
- } else {
- $line->log_warning("Expected an RMD160 checksum for ${current_fname}, not for ${chksum_fname}.");
- }
- } else {
- if ($chksum_fname eq $current_fname) {
- # This is an error because this really should be fixed.
- $line->log_error("Expected an RMD160 checksum, not ${alg} for ${chksum_fname}.");
- } else {
- $line->log_warning("Expected an RMD160 checksum for ${current_fname}, not ${alg} for ${chksum_fname}.");
- }
- }
-
- } elsif ($state == DIS_Size) {
- $state = DIS_start;
- if ($alg eq "Size") {
- if ($chksum_fname ne $current_fname) {
- $line->log_warning("Expected a Size checksum for ${current_fname}, not for ${chksum_fname}.");
- }
- } else {
- if ($chksum_fname eq $current_fname) {
- $line->log_warning("Expected a Size checksum, not ${alg} for ${chksum_fname}.");
- } else {
- $line->log_warning("Expected a Size checksum for ${current_fname}, not ${alg} for ${chksum_fname}.");
- }
- }
- }
-
- if ($is_patch && defined($patches_dir)) {
- my $fname = "${current_dir}/${patches_dir}/${chksum_fname}";
- if ($di_is_committed && !is_committed($fname)) {
- $line->log_warning("${patches_dir}/${chksum_fname} is registered in distinfo but not added to CVS.");
- }
-
- if (open(PATCH, "<", $fname)) {
- my $data = "";
- foreach my $patchline (<PATCH>) {
- $data .= $patchline unless $patchline =~ qr"\$NetBSD";
- }
- close(PATCH);
- my $chksum = Digest::SHA1::sha1_hex($data);
- if ($sum ne $chksum) {
- $line->log_error("${alg} checksum of ${chksum_fname} differs (expected ${sum}, got ${chksum}). Rerun '".conf_make." makepatchsum'.");
- }
- } elsif (!$hack_php_patches) {
- $line->log_warning("${chksum_fname} does not exist.");
- $line->explain_warning(
- "All patches that are mentioned in a distinfo file should actually exist.",
- "What's the use of a checksum if there is no file to check?");
- }
- }
- $in_distinfo{$chksum_fname} = true;
- }
- checklines_trailing_empty_lines($lines);
-
- if (defined($patches_dir)) {
- foreach my $patch (<${current_dir}/${patches_dir}/patch-*>) {
- $patch = basename($patch);
- if (!exists($in_distinfo{$patch})) {
- log_error($fname, NO_LINE_NUMBER, "$patch is not recorded. Rerun '".conf_make." makepatchsum'.");
- }
- }
- }
-}
-
-sub checkfile_extra($) {
- my ($fname) = @_;
- my ($lines);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_extra()");
-
- $lines = load_file($fname);
- if (!$lines) {
- log_error($fname, NO_LINE_NUMBER, "Could not be read.");
- return;
- }
- checklines_trailing_empty_lines($lines);
- checkperms($fname);
-}
-
-sub checkfile_INSTALL($) {
- my ($fname) = @_;
- my ($lines);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_INSTALL()");
-
- checkperms($fname);
- if (!($lines = load_file($fname))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
-}
-
-sub checkfile_MESSAGE($) {
- my ($fname) = @_;
- my ($lines);
-
- my @explanation = (
- "A MESSAGE file should consist of a header line, having 75 \"=\"",
- "characters, followed by a line containing only the RCS Id, then an",
- "empty line, your text and finally the footer line, which is the",
- "same as the header line.");
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_MESSAGE()");
-
- checkperms($fname);
- if (!($lines = load_file($fname))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
-
- if (@{$lines} < 3) {
- log_warning($fname, NO_LINE_NUMBER, "File too short.");
- explain_warning($fname, NO_LINE_NUMBER, @explanation);
- return;
- }
- if ($lines->[0]->text ne "=" x 75) {
- $lines->[0]->log_warning("Expected a line of exactly 75 \"=\" characters.");
- explain_warning($fname, NO_LINE_NUMBER, @explanation);
- }
- checkline_rcsid($lines->[1], "");
- foreach my $line (@{$lines}) {
- checkline_length($line, 80);
- checkline_trailing_whitespace($line);
- checkline_valid_characters($line, regex_validchars);
- checkline_spellcheck($line);
- }
- if ($lines->[-1]->text ne "=" x 75) {
- $lines->[-1]->log_warning("Expected a line of exactly 75 \"=\" characters.");
- explain_warning($fname, NO_LINE_NUMBER, @explanation);
- }
- checklines_trailing_empty_lines($lines);
-}
-
-sub checkfile_mk($) {
- my ($fname) = @_;
- my ($lines);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_mk()");
-
- checkperms($fname);
- if (!($lines = load_lines($fname, true))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
-
- parselines_mk($lines);
- checklines_mk($lines);
- autofix($lines);
-}
-
-sub checkfile_package_Makefile($$$) {
- my ($fname, $whole, $lines) = @_;
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_package_Makefile(..., ...)");
-
- checkperms($fname);
-
- if (!exists($pkgctx_vardef->{"PLIST_SRC"})
- && defined($pkgdir)
- && !-f "${current_dir}/$pkgdir/PLIST"
- && !-f "${current_dir}/$pkgdir/PLIST.common") {
- log_warning($fname, NO_LINE_NUMBER, "Neither PLIST nor PLIST.common exist, and PLIST_SRC is unset. Are you sure PLIST handling is ok?");
- }
-
- if (exists($pkgctx_vardef->{"NO_CHECKSUM"}) && is_emptydir("${current_dir}/${patchdir}")) {
- if (-f "${current_dir}/${distinfo_file}") {
- log_warning("${current_dir}/${distinfo_file}", NO_LINE_NUMBER, "This file should not exist if NO_CHECKSUM is set.");
- }
- } else {
- if (!-f "${current_dir}/${distinfo_file}") {
- log_warning("${current_dir}/${distinfo_file}", NO_LINE_NUMBER, "File not found. Please run '".conf_make." makesum'.");
- }
- }
-
- if ($whole =~ /etc\/rc\.d/) {
- log_warning($fname, NO_LINE_NUMBER, "Please use the RCD_SCRIPTS mechanism to install rc.d scripts automatically to \${RCD_SCRIPTS_EXAMPLEDIR}.");
- }
-
- if (exists($pkgctx_vardef->{"REPLACE_PERL"}) && exists($pkgctx_vardef->{"NO_CONFIGURE"})) {
- $pkgctx_vardef->{"REPLACE_PERL"}->log_warning("REPLACE_PERL is ignored when ...");
- $pkgctx_vardef->{"NO_CONFIGURE"}->log_warning("... NO_CONFIGURE is set.");
- }
-
- if (exists($pkgctx_vardef->{"RESTRICTED"}) && !exists($pkgctx_vardef->{"LICENSE"})) {
- $pkgctx_vardef->{"RESTRICTED"}->log_error("Restricted packages must have a LICENSE.");
- }
-
- if (exists($pkgctx_vardef->{"GNU_CONFIGURE"}) && exists($pkgctx_vardef->{"USE_LANGUAGES"})) {
- my $languages_line = $pkgctx_vardef->{"USE_LANGUAGES"};
- my $value = $languages_line->get("value");
-
- if ($languages_line->has("comment") && $languages_line->get("comment") =~ qr"(?:^|\s+)c(?:\s+|$)"i) {
- # Don't emit a warning, since the comment
- # probably contains a statement that C is
- # really not needed.
-
- } elsif ($value !~ qr"(?:^|\s+)(?:c|c99|objc)(?:\s+|$)") {
- $pkgctx_vardef->{"GNU_CONFIGURE"}->log_warning("GNU_CONFIGURE almost always needs a C compiler, ...");
- $languages_line->log_warning("... but \"c\" is not added to USE_LANGUAGES.");
- }
- }
-
- my $distname_line = $pkgctx_vardef->{"DISTNAME"};
- my $pkgname_line = $pkgctx_vardef->{"PKGNAME"};
-
- my $distname = defined($distname_line) ? $distname_line->get("value") : undef;
- my $pkgname = defined($pkgname_line) ? $pkgname_line->get("value") : undef;
-
- # Let's do some tricks to get the proper value of the package
- # name more often.
- if (defined($distname) && defined($pkgname)) {
- $pkgname =~ s/\$\{DISTNAME\}/$distname/;
- }
-
- if (defined($pkgname) && defined($distname) && ($pkgname eq $distname || $pkgname eq "\${DISTNAME}")) {
- $pkgname_line->log_note("PKGNAME is \${DISTNAME} by default. You don't need to define PKGNAME.");
- }
-
- if (!defined($pkgname) && defined($distname) && $distname !~ regex_unresolved && $distname !~ regex_pkgname) {
- $distname_line->log_warning("As DISTNAME is not a valid package name, please define the PKGNAME explicitly.");
- }
-
- ($effective_pkgname, $effective_pkgname_line, $effective_pkgbase, $effective_pkgversion)
- = (defined($pkgname) && $pkgname !~ regex_unresolved && $pkgname =~ regex_pkgname) ? ($pkgname, $pkgname_line, $1, $2)
- : (defined($distname) && $distname !~ regex_unresolved && $distname =~ regex_pkgname) ? ($distname, $distname_line, $1, $2)
- : (undef, undef, undef, undef);
- if (defined($effective_pkgname_line)) {
- $opt_debug_misc and $effective_pkgname_line->log_debug("Effective name=${effective_pkgname} base=${effective_pkgbase} version=${effective_pkgversion}.");
- }
-
- if (!exists($pkgctx_vardef->{"COMMENT"})) {
- log_warning($fname, NO_LINE_NUMBER, "No COMMENT given.");
- }
-
- if (exists($pkgctx_vardef->{"USE_IMAKE"}) && exists($pkgctx_vardef->{"USE_X11"})) {
- $pkgctx_vardef->{"USE_IMAKE"}->log_note("USE_IMAKE makes ...");
- $pkgctx_vardef->{"USE_X11"}->log_note("... USE_X11 superfluous.");
- }
-
- if (defined($effective_pkgbase)) {
-
- foreach my $suggested_update (@{get_suggested_package_updates()}) {
- my ($line, $suggbase, $suggver, $suggcomm) = @{$suggested_update};
- my $comment = (defined($suggcomm) ? " (${suggcomm})" : "");
-
- next unless $effective_pkgbase eq $suggbase;
-
- if (dewey_cmp($effective_pkgversion, "<", $suggver)) {
- $effective_pkgname_line->log_warning("This package should be updated to ${suggver}${comment}.");
- }
- if (dewey_cmp($effective_pkgversion, "==", $suggver)) {
- $effective_pkgname_line->log_note("The update request to ${suggver} from doc/TODO${comment} has been done.");
- }
- if (dewey_cmp($effective_pkgversion, ">", $suggver)) {
- $effective_pkgname_line->log_note("This package is newer than the update request to ${suggver}${comment}.");
- }
- }
- }
-
- checklines_mk($lines);
- checklines_package_Makefile_varorder($lines);
- autofix($lines);
-}
-
-sub checkfile_patch($) {
- my ($fname) = @_;
- my ($strings);
- my ($state, $redostate, $nextstate, $dellines, $addlines, $hunks);
- my ($seen_comment, $current_fname, $current_ftype, $patched_files);
- my ($leading_context_lines, $trailing_context_lines, $context_scanning_leading);
-
- # Abbreviations used:
- # style: [c] = context diff, [u] = unified diff
- # scope: [f] = file, [h] = hunk, [l] = line
- # action: [d] = delete, [m] = modify, [a] = add, [c] = context
- use constant re_patch_rcsid => qr"^\$.*\$$";
- use constant re_patch_text => qr"^(.+)$";
- use constant re_patch_empty => qr"^$";
- use constant re_patch_cfd => qr"^\*\*\*\s(\S+)(.*)$";
- use constant re_patch_cfa => qr"^---\s(\S+)(.*)$";
- use constant re_patch_ch => qr"^\*{15}(.*)$";
- use constant re_patch_chd => qr"^\*{3}\s(\d+)(?:,(\d+))?\s\*{4}$";
- use constant re_patch_cha => qr"^-{3}\s(\d+)(?:,(\d+))?\s-{4}$";
- use constant re_patch_cld => qr"^(?:-\s(.*))?$";
- use constant re_patch_clm => qr"^(?:!\s(.*))?$";
- use constant re_patch_cla => qr"^(?:\+\s(.*))?$";
- use constant re_patch_clc => qr"^(?:\s\s(.*))?$";
- use constant re_patch_ufd => qr"^---\s(\S+)(?:\s+(.*))?$";
- use constant re_patch_ufa => qr"^\+{3}\s(\S+)(?:\s+(.*))?$";
- use constant re_patch_uh => qr"^\@\@\s-(?:(\d+),)?(\d+)\s\+(?:(\d+),)?(\d+)\s\@\@(.*)$";
- use constant re_patch_uld => qr"^-(.*)$";
- use constant re_patch_ula => qr"^\+(.*)$";
- use constant re_patch_ulc => qr"^\s(.*)$";
- use constant re_patch_ulnonl => qr"^\\ No newline at end of file$";
-
- use enum qw(:PST_
- START CENTER TEXT
- CFA CH CHD CLD0 CLD CLA0 CLA
- UFA UH UL
- );
-
- my ($s, $line, $m);
-
- my $check_text = sub($) {
- my ($text) = @_;
-
- if ($text =~ qr"(\$(Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State|$opt_rcsidstring)(?::[^\$]*|\$))") {
- my ($tag) = ($2);
-
- if ($text =~ re_patch_uh) {
- $line->log_warning("Found RCS tag \"\$${tag}\$\". Please remove it.");
- $line->set_text($1);
- } else {
- $line->log_warning("Found RCS tag \"\$${tag}\$\". Please remove it by reducing the number of context lines using pkgdiff or \"diff -U[210]\".");
- }
- }
- };
-
- my $check_contents = sub() {
-
- if ($m->has(1)) {
- $check_text->($m->text(1));
- }
- };
-
- my $check_added_contents = sub() {
- my $text;
-
- return unless $m->has(1);
- $text = $m->text(1);
- checkline_cpp_macro_names($line, $text);
- checkline_spellcheck($line);
-
- # XXX: This check is not as accurate as the similar one in
- # checkline_mk_shelltext().
- if (defined($current_fname)) {
- if ($current_ftype eq "shell" || $current_ftype eq "make") {
- my ($mm, $rest) = match_all($text, $regex_shellword);
-
- foreach my $m (@{$mm}) {
- my $shellword = $m->text(1);
-
- if ($shellword =~ qr"^#") {
- last;
- }
- checkline_mk_absolute_pathname($line, $shellword);
- }
-
- } elsif ($current_ftype eq "source") {
- checkline_source_absolute_pathname($line, $text);
-
- } elsif ($current_ftype eq "configure") {
- if ($text =~ qr": Avoid regenerating within pkgsrc$") {
- $line->log_error("This code must not be included in patches.");
- $line->explain_error(
- "It is generated automatically by pkgsrc after the patch phase.");
- }
-
- } elsif ($current_ftype eq "ignore") {
- # Ignore it.
-
- } else {
- checkline_other_absolute_pathname($line, $text);
- }
- }
- };
-
- my $check_hunk_end = sub($$$) {
- my ($deldelta, $adddelta, $newstate) = @_;
-
- if ($deldelta > 0 && $dellines == 0) {
- $redostate = $newstate;
- if (defined($addlines) && $addlines > 0) {
- $line->log_error("Expected ${addlines} more lines to be added.");
- }
- } elsif ($adddelta > 0 && $addlines == 0) {
- $redostate = $newstate;
- if (defined($dellines) && $dellines > 0) {
- $line->log_error("Expected ${dellines} more lines to be deleted.");
- }
- } else {
- if (defined($context_scanning_leading)) {
- if ($deldelta != 0 && $adddelta != 0) {
- if ($context_scanning_leading) {
- $leading_context_lines++;
- } else {
- $trailing_context_lines++;
- }
- } else {
- if ($context_scanning_leading) {
- $context_scanning_leading = false;
- } else {
- $trailing_context_lines = 0;
- }
- }
- }
-
- if ($deldelta != 0) {
- $dellines -= $deldelta;
- }
- if ($adddelta != 0) {
- $addlines -= $adddelta;
- }
- if (!((defined($dellines) && $dellines > 0) ||
- (defined($addlines) && $addlines > 0))) {
- if (defined($context_scanning_leading)) {
- if ($leading_context_lines != $trailing_context_lines) {
- $opt_debug_patches and $line->log_warning("The hunk that ends here does not have as many leading (${leading_context_lines}) as trailing (${trailing_context_lines}) lines of context.");
- }
- }
- $nextstate = $newstate;
- }
- }
- };
-
- my $check_hunk_line = sub($$$$) {
- my ($deldelta, $adddelta, $newstate, $check_added) = @_;
-
- $check_contents->();
- $check_hunk_end->($deldelta, $adddelta, $newstate);
- if ($check_added) {
- $check_added_contents->();
- }
- };
-
- my $transitions =
- [ [PST_START, re_patch_rcsid, PST_CENTER, sub() {
- checkline_rcsid($line, "");
- }], [PST_START, undef, PST_CENTER, sub() {
- checkline_rcsid($line, "");
- }], [PST_CENTER, re_patch_empty, PST_TEXT, sub() {
- #
- }], [PST_TEXT, re_patch_cfd, PST_CFA, sub() {
- if (!$seen_comment) {
- #$opt_warn_style and $line->log_warning("Comment expected.");
- }
- $line->log_warning("Please use unified diffs (diff -u) for patches.");
- }], [PST_TEXT, re_patch_ufd, PST_UFA, sub() {
- if (!$seen_comment) {
- #$opt_warn_style and $line->log_warning("Comment expected.");
- }
- }], [PST_TEXT, re_patch_text, PST_TEXT, sub() {
- $seen_comment = true;
- }], [PST_TEXT, re_patch_empty, PST_TEXT, sub() {
- #
- }], [PST_TEXT, undef, PST_TEXT, sub() {
- #
- }], [PST_CENTER, re_patch_cfd, PST_CFA, sub() {
- if ($seen_comment) {
- $opt_warn_space and $line->log_note("Empty line expected.");
- } else {
- #$opt_warn_style and $line->log_warning("Comment expected.");
- }
- $line->log_warning("Please use unified diffs (diff -u) for patches.");
- }], [PST_CENTER, re_patch_ufd, PST_UFA, sub() {
- if ($seen_comment) {
- $opt_warn_space and $line->log_note("Empty line expected.");
- } else {
- #$opt_warn_style and $line->log_warning("Comment expected.");
- }
- }], [PST_CENTER, undef, PST_TEXT, sub() {
- $opt_warn_space and $line->log_note("Empty line expected.");
- }], [PST_CFA, re_patch_cfa, PST_CH, sub() {
- $current_fname = $m->text(1);
- $current_ftype = get_filetype($line, $current_fname);
- $opt_debug_patches and $line->log_debug("fname=$current_fname ftype=$current_ftype");
- $patched_files++;
- $hunks = 0;
- }], [PST_CH, re_patch_ch, PST_CHD, sub() {
- $hunks++;
- }], [PST_CHD, re_patch_chd, PST_CLD0, sub() {
- $dellines = ($m->has(2))
- ? (1 + $m->text(2) - $m->text(1))
- : ($m->text(1));
- }], [PST_CLD0, re_patch_clc, PST_CLD, sub() {
- $check_hunk_line->(1, 0, PST_CLD0, false);
- }], [PST_CLD0, re_patch_cld, PST_CLD, sub() {
- $check_hunk_line->(1, 0, PST_CLD0, false);
- }], [PST_CLD0, re_patch_clm, PST_CLD, sub() {
- $check_hunk_line->(1, 0, PST_CLD0, false);
- }], [PST_CLD, re_patch_clc, PST_CLD, sub() {
- $check_hunk_line->(1, 0, PST_CLD0, false);
- }], [PST_CLD, re_patch_cld, PST_CLD, sub() {
- $check_hunk_line->(1, 0, PST_CLD0, false);
- }], [PST_CLD, re_patch_clm, PST_CLD, sub() {
- $check_hunk_line->(1, 0, PST_CLD0, false);
- }], [PST_CLD, undef, PST_CLD0, sub() {
- if ($dellines != 0) {
- $line->log_warning("Invalid number of deleted lines (${dellines} missing).");
- }
- }], [PST_CLD0, re_patch_cha, PST_CLA0, sub() {
- $dellines = undef;
- $addlines = ($m->has(2))
- ? (1 + $m->text(2) - $m->text(1))
- : ($m->text(1));
- }], [PST_CLA0, re_patch_clc, PST_CLA, sub() {
- $check_hunk_line->(0, 1, PST_CH, true);
- }], [PST_CLA0, re_patch_clm, PST_CLA, sub() {
- $check_hunk_line->(0, 1, PST_CH, true);
- }], [PST_CLA0, re_patch_cla, PST_CLA, sub() {
- $check_hunk_line->(0, 1, PST_CH, true);
- }], [PST_CLA, re_patch_clc, PST_CLA, sub() {
- $check_hunk_line->(0, 1, PST_CH, true);
- }], [PST_CLA, re_patch_clm, PST_CLA, sub() {
- $check_hunk_line->(0, 1, PST_CH, true);
- }], [PST_CLA, re_patch_cla, PST_CLA, sub() {
- $check_hunk_line->(0, 1, PST_CH, true);
- }], [PST_CLA, undef, PST_CLA0, sub() {
- if ($addlines != 0) {
- $line->log_warning("Invalid number of added lines (${addlines} missing).");
- }
- }], [PST_CLA0, undef, PST_CH, sub() {
- #
- }], [PST_CH, undef, PST_TEXT, sub() {
- #
- }], [PST_UFA, re_patch_ufa, PST_UH, sub() {
- $current_fname = $m->text(1);
- $current_ftype = get_filetype($line, $current_fname);
- $opt_debug_patches and $line->log_debug("fname=$current_fname ftype=$current_ftype");
- $patched_files++;
- $hunks = 0;
- }], [PST_UH, re_patch_uh, PST_UL, sub() {
- $dellines = ($m->has(1) ? $m->text(2) : 1);
- $addlines = ($m->has(3) ? $m->text(4) : 1);
- $check_text->($line->text);
- if ($line->text =~ qr"\r$") {
- $line->log_error("The hunk header must not end with a CR character.");
- $line->explain_error(
- "The MacOS X patch utility cannot handle these.");
- }
- $hunks++;
- $context_scanning_leading = (($m->has(1) && $m->text(1) ne "1") ? true : undef);
- $leading_context_lines = 0;
- $trailing_context_lines = 0;
- }], [PST_UL, re_patch_uld, PST_UL, sub() {
- $check_hunk_line->(1, 0, PST_UH, false);
- }], [PST_UL, re_patch_ula, PST_UL, sub() {
- $check_hunk_line->(0, 1, PST_UH, true);
- }], [PST_UL, re_patch_ulc, PST_UL, sub() {
- $check_hunk_line->(1, 1, PST_UH, true);
- }], [PST_UL, re_patch_ulnonl, PST_UL, sub() {
- #
- }], [PST_UL, re_patch_empty, PST_UL, sub() {
- $opt_warn_space and $line->log_note("Leading white-space missing in hunk.");
- $check_hunk_line->(1, 1, PST_UH, false);
- }], [PST_UL, undef, PST_UH, sub() {
- if ($dellines != 0 || $addlines != 0) {
- $line->log_warning("Unexpected end of hunk (-${dellines},+${addlines} expected).");
- }
- }], [PST_UH, undef, PST_TEXT, sub() {
- ($hunks != 0) || $line->log_warning("No hunks for file ${current_fname}.");
- }]];
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_patch()");
-
- checkperms($fname);
- if (!($strings = PkgLint::FileUtil::load_strings($fname, false))) {
- log_error($fname, NO_LINE_NUMBER, "Could not be read.");
- return;
- }
- if (@{$strings} == 0) {
- log_error($fname, NO_LINE_NUMBER, "Must not be empty.");
- return;
- }
-
- $state = PST_START;
- $dellines = undef;
- $addlines = undef;
- $patched_files = 0;
- $seen_comment = false;
- $current_fname = undef;
- $current_ftype = undef;
- $hunks = undef;
-
- for (my $lineno = 0; $lineno <= $#{$strings}; ) {
- $s = $strings->[$lineno];
- $line = $s->line;
- my $text = $line->text;
-
- $opt_debug_patches and $line->log_debug("[${state} ${patched_files}/".($hunks||0)."/-".($dellines||0)."+".($addlines||0)."] $text");
-
- my $found = false;
- foreach my $t (@{$transitions}) {
- if ($state == $t->[0]) {
- if (!defined($t->[1])) {
- $m = undef;
- } elsif ($text =~ $t->[1]) {
- $opt_debug_patches and $line->log_debug($t->[1]);
- $m = PkgLint::SimpleMatch->new($text, \@-, \@+);
- } else {
- next;
- }
- $redostate = undef;
- $nextstate = $t->[2];
- $t->[3]->();
- if (defined($redostate)) {
- $state = $redostate;
- } else {
- $state = $nextstate;
- if (defined($t->[1])) {
- $lineno++;
- }
- }
- $found = true;
- last;
- }
- }
-
- if (!$found) {
- $line->log_error("Parse error: state=${state}");
- $state = PST_TEXT;
- $lineno++;
- }
- }
-
- while ($state != PST_TEXT) {
- $opt_debug_patches and log_debug($fname, "EOF", "[${state} ${patched_files}/".($hunks||0)."/-".($dellines||0)."+".($addlines||0)."]");
-
- my $found = false;
- foreach my $t (@{$transitions}) {
- if ($state == $t->[0] && !defined($t->[1])) {
- my $newstate;
-
- $m = undef;
- $redostate = undef;
- $nextstate = $t->[2];
- $t->[3]->();
- $newstate = (defined($redostate)) ? $redostate : $nextstate;
- if ($newstate == $state) {
- log_fatal($fname, "EOF", "Internal error in the patch transition table.");
- }
- $state = $newstate;
- $found = true;
- last;
- }
- }
-
- if (!$found) {
- log_error($fname, "EOF", "Parse error: state=${state}");
- $state = PST_TEXT;
- }
- }
-
- if ($patched_files > 1) {
- log_warning($fname, NO_LINE_NUMBER, "Contains patches for $patched_files files, should be only one.");
-
- } elsif ($patched_files == 0) {
- log_error($fname, NO_LINE_NUMBER, "Contains no patch.");
- }
-
- checklines_trailing_empty_lines(strings_to_lines($strings));
-}
-
-sub checkfile_PLIST($) {
- my ($fname) = @_;
- my ($lines, $last_file_seen, $all_files);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile_PLIST()");
-
- checkperms($fname);
- if (!($lines = load_file($fname))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
- if (@{$lines} == 0) {
- log_error($fname, NO_LINE_NUMBER, "Must not be empty.");
- return;
- }
- checkline_rcsid($lines->[0], "\@comment ");
-
- # Get the list of all files from the PLIST.
- $all_files = {};
- foreach my $line (@{$lines}) {
- my $text = $line->text;
-
- if ($text =~ qr"^[\w\$]") {
- $all_files->{$text} = $line;
- }
- }
-
- foreach my $line (@{$lines}) {
- my $text = $line->text;
-
- checkline_trailing_whitespace($line);
-
- # @foo directives.
- if ($text =~ /^(?:\$\{[\w_]+\})?\@([a-z]+)\s+(.*)/) {
- my ($cmd, $arg) = ($1, $2);
-
- if ($cmd eq "unexec" && $arg =~ qr"^(rmdir|\$\{RMDIR\} \%D/)(.*)") {
- my ($rmdir, $rest) = ($1, $2);
- if ($rest !~ qr"(?:true|\$\{TRUE\})") {
- $line->log_warning("Please use \"\@dirrm\" instead of \"\@unexec rmdir\".");
- }
-
- } elsif (($cmd eq "exec" || $cmd eq "unexec")) {
- if ($arg =~ /(?:install-info|\$\{INSTALL_INFO\})/) {
- $line->log_warning("\@exec/unexec install-info is deprecated.");
-
- } elsif ($arg =~ /ldconfig/ && $arg !~ qr"/usr/bin/true") {
- $line->log_error("ldconfig must be used with \"||/usr/bin/true\".");
- }
-
- } elsif ($cmd eq "comment") {
- # nothing to do
-
- } elsif ($cmd eq "dirrm") {
- my @ids = get_shared_dir_ids($line, $arg);
- if (@ids == 0) {
- # Nothing to do
- } elsif (@ids == 1) {
- $line->log_warning("Please add \"USE_DIRS+= $ids[0]\" to the package Makefile and remove this line.");
- } else {
- my $s = join(" or ", map { "\"USE_DIRS+= $_\"" } @ids);
- $line->log_warning("Please add $s to the package Makefile and remove this line.");
- }
- } else {
- $line->log_warning("Unknown PLIST directive \"\@$cmd\".");
- }
-
- # Pathnames.
- } elsif ($text =~ qr"^([A-Za-z0-9\$].*)/([^/]+)$") {
- my ($dirname, $basename) = ($1, $2);
-
- if ($opt_warn_plist_sort && $text =~ qr"^\w" && $text !~ regex_unresolved) {
- if (defined($last_file_seen)) {
- if ($last_file_seen gt $text) {
- $line->log_warning("${text} should be sorted before ${last_file_seen}.");
- }
- }
- $last_file_seen = $text;
- }
-
- if ($dirname =~ qr"^bin/") {
- $line->log_warning("The bin/ directory should not have subdirectories.");
-
- } elsif ($dirname eq "bin") {
-
- if (exists($all_files->{"man/man1/${basename}.1"})) {
- # Fine.
- } elsif (exists($all_files->{"man/man6/${basename}.6"})) {
- # Fine.
- } elsif (exists($all_files->{"\${IMAKE_MAN_DIR}/${basename}.\${IMAKE_MANNEWSUFFIX}"})) {
- # Fine.
- } else {
- $opt_warn_extra and $line->log_warning("Manual page missing for bin/${basename}.");
- }
-
- } elsif ($text =~ qr"^doc/") {
- $line->log_error("Documentation must be installed under share/doc, not doc.");
-
- } elsif ($text =~ qr"^etc/rc\.d/") {
- $line->log_error("RCD_SCRIPTS must not be registered in the PLIST. Please use the RCD_SCRIPTS framework.");
-
- } elsif ($text =~ qr"^etc/") {
- my $f = "mk/pkginstall/bsd.pkginstall.mk";
-
- assert(-f "${cwd_pkgsrcdir}/${f}", "${cwd_pkgsrcdir}/${f} is not a regular file.");
- $line->log_error("Configuration files must not be registered in the PLIST. Please use the CONF_FILES framework, which is described in ${f}.");
-
- } elsif ($text =~ qr"^include/.*\.(?:h|hpp)$") {
- # Fine.
-
- } elsif ($text eq "info/dir") {
- $line->log_error("\"info/dir\" must not be listed. Use install-info to add/remove an entry.");
-
- } elsif ($text =~ qr"^info/.+$") {
- if (defined($pkgctx_vardef) && !exists($pkgctx_vardef->{"INFO_FILES"})) {
- $line->log_warning("Packages that install info files should set INFO_FILES.");
- }
-
- } elsif (defined($effective_pkgbase) && $text =~ qr"^lib/\Q${effective_pkgbase}\E/") {
- # Fine.
-
- } elsif ($text =~ qr"^lib/locale/") {
- $line->log_error("\"lib/locale\" must not be listed. Use \${PKGLOCALEDIR}/locale and set USE_PKGLOCALEDIR instead.");
-
- } elsif ($text =~ qr"^(lib/(?:.*/)*)([^/]+)\.(so|a|la)$") {
- my ($dir, $lib, $ext) = ($1, $2, $3);
-
- if ($dir eq "lib/" && $lib !~ qr"^lib") {
- $opt_warn_extra and $line->log_warning("Library filename does not start with \"lib\".");
- }
- if ($ext eq "la") {
- if (defined($pkgctx_vardef) && !exists($pkgctx_vardef->{"USE_LIBTOOL"})) {
- $line->log_warning("Packages that install libtool libraries should define USE_LIBTOOL.");
- }
- }
-
- } elsif ($text =~ qr"^man/(cat|man)(\w+)/(.*?)\.(\w+)(\.gz)?$") {
- my ($cat_or_man, $section, $manpage, $ext, $gz) = ($1, $2, $3, $4, $5);
-
- if ($section !~ qr"^[\dln]$") {
- $line->log_warning("Unknown section \"${section}\" for manual page.");
- }
-
- if ($cat_or_man eq "cat" && !exists($all_files->{"man/man${section}/${manpage}.${section}"})) {
- $line->log_warning("Preformatted manual page without unformatted one.");
- }
-
- if ($cat_or_man eq "cat") {
- if ($ext ne "0") {
- $line->log_warning("Preformatted manual pages should end in \".0\".");
- }
- } else {
- if ($section ne $ext) {
- $line->log_warning("Mismatch between the section (${section}) and extension (${ext}) of the manual page.");
- }
- }
-
- if (defined($gz)) {
- $line->log_note("The .gz extension is unnecessary for manual pages.");
- $line->explain_note(
- "Whether the manual pages are installed in compressed form or not is",
- "configured by the pkgsrc user. Compression and decompression takes place",
- "automatically, no matter if the .gz extension is mentioned in the PLIST",
- "or not.");
- }
-
- } elsif ($text =~ qr"^man/cat") {
- $line->log_warning("Invalid filename \"${text}\" for preformatted manual page.");
-
- } elsif ($text =~ qr"^man/man") {
- $line->log_warning("Invalid filename \"${text}\" for unformatted manual page.");
-
- } elsif ($text =~ qr"^sbin/(.*)") {
- my ($binname) = ($1);
-
- if (!exists($all_files->{"man/man8/${binname}.8"})) {
- $opt_warn_extra and $line->log_warning("Manual page missing for sbin/${binname}.");
- }
-
- } elsif ($dirname eq "share/aclocal" && $basename =~ qr"\.m4$") {
- # Fine.
-
- } elsif ($text =~ qr"^share/doc/html/") {
- $opt_warn_plist_depr and $line->log_warning("Use of \"share/doc/html\" is deprecated. Use \"share/doc/\${PKGBASE}\" instead.");
-
- } elsif (defined($effective_pkgbase) && $text =~ qr"^share/doc/\Q${effective_pkgbase}\E/") {
- # Fine.
-
- } elsif (defined($effective_pkgbase) && $text =~ qr"^share/examples/\Q${effective_pkgbase}\E/") {
- # Fine.
-
- } elsif (defined($effective_pkgbase) && $text =~ qr"^share/\Q${effective_pkgbase}\E/") {
- # Fine.
-
- } elsif ($text =~ qr"^share/locale/[\w\@_]+/LC_MESSAGES/[^/]+\.mo$") {
- # Fine.
-
- } elsif ($text =~ qr"^share/man/") {
- $line->log_warning("Man pages should be installed into man/, not share/man/.");
-
- } else {
- $opt_debug_unchecked and $line->log_debug("Unchecked pathname \"${text}\".");
- }
-
- if ($text =~ /\${PKGLOCALEDIR}/ && defined($pkgctx_vardef) && !exists($pkgctx_vardef->{"USE_PKGLOCALEDIR"})) {
- $line->log_warning("PLIST contains \${PKGLOCALEDIR}, but USE_PKGLOCALEDIR was not found.");
- }
-
- if ($text =~ qr"/CVS/") {
- $line->log_warning("CVS files should not be in the PLIST.");
- }
- if ($text =~ qr"\.orig$") {
- $line->log_warning(".orig files should not be in the PLIST.");
- }
- if ($text =~ qr"/perllocal\.pod$") {
- $line->log_warning("perllocal.pod files should not be in the PLIST.");
- $line->explain_warning(
- "This file is handled automatically by the INSTALL/DEINSTALL scripts,",
- "since its contents changes frequently.");
- }
-
- if ($text =~ qr"^(.*)(\.a|\.so[0-9.]*)$") {
- my ($basename, $ext) = ($1, $2);
-
- if (exists($all_files->{"${basename}.la"})) {
- $line->log_warning("Redundant library found. The libtool library is in line " . $all_files->{"${basename}.la"}->lines . ".");
- }
- }
-
- } elsif ($text =~ qr"^\$\{[\w_]+\}$") {
- # A variable on its own line.
-
- } else {
- $line->log_error("Unknown line type.");
- }
- }
- checklines_trailing_empty_lines($lines);
- autofix($lines);
-}
-
-sub checkfile($) {
- my ($fname) = @_;
- my ($st, $basename);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkfile()");
-
- $basename = basename($fname);
- if ($basename =~ qr"^(?:work.*|.*~|.*\.orig|.*\.rej)$") {
- if ($opt_import) {
- log_error($fname, NO_LINE_NUMBER, "Must be cleaned up before committing the package.");
- }
- return;
- }
-
- if (!($st = lstat($fname))) {
- log_error($fname, NO_LINE_NUMBER, "$!");
- return;
- }
- if (S_ISDIR($st->mode)) {
- if ($basename eq "files" || $basename eq "patches" || $basename eq "CVS") {
- # Ok
-
- } elsif (!is_emptydir($fname)) {
- log_warning($fname, NO_LINE_NUMBER, "Unknown directory name.");
- }
-
- } elsif (S_ISLNK($st->mode)) {
- if ($basename !~ qr"^work") {
- log_warning($fname, NO_LINE_NUMBER, "Unknown symlink name.");
- }
-
- } elsif (!S_ISREG($st->mode)) {
- log_error($fname, NO_LINE_NUMBER, "Only files and directories are allowed in pkgsrc.");
-
- } elsif ($basename eq "ALTERNATIVES") {
- $opt_check_ALTERNATIVES and checkfile_ALTERNATIVES($fname);
-
- } elsif ($basename eq "buildlink3.mk") {
- $opt_check_bl3 and checkfile_buildlink3_mk($fname);
-
- } elsif ($basename =~ qr"^(?:.*\.mk|Makefile.*)$") {
- $opt_check_mk and checkfile_mk($fname);
-
- } elsif ($basename =~ qr"^DESCR") {
- $opt_check_DESCR and checkfile_DESCR($fname);
-
- } elsif ($basename =~ qr"^distinfo") {
- $opt_check_distinfo and checkfile_distinfo($fname);
-
- } elsif ($basename eq "DEINSTALL" || $basename eq "INSTALL") {
- $opt_check_INSTALL and checkfile_INSTALL($fname);
-
- } elsif ($basename =~ qr"^MESSAGE") {
- $opt_check_MESSAGE and checkfile_MESSAGE($fname);
-
- } elsif ($basename =~ qr"^patch-[A-Za-z0-9]*$") {
- $opt_check_patches and checkfile_patch($fname);
-
- } elsif ($fname =~ qr"(?:^|/)patches/manual-[^/]*$") {
- $opt_debug_unchecked and log_debug($fname, NO_LINE_NUMBER, "Unchecked file \"${fname}\".");
-
- } elsif ($fname =~ qr"(?:^|/)patches/[^/]*$") {
- log_warning($fname, NO_LINE_NUMBER, "Patch files should be named \"patch-\", followed by letters and digits only.");
-
- } elsif ($basename =~ qr"^PLIST") {
- $opt_check_PLIST and checkfile_PLIST($fname);
-
- } elsif ($basename eq "TODO" || $basename eq "README") {
- # Ok
-
- } elsif (!-T $fname) {
- log_warning($fname, NO_LINE_NUMBER, "Unexpectedly found a binary file.");
-
- } else {
- log_warning($fname, NO_LINE_NUMBER, "Unexpected file found.");
- $opt_check_extra and checkfile_extra($fname);
- }
-}
-
-sub my_split($$) {
- my ($delimiter, $s) = @_;
- my ($pos, $next, @result);
-
- $pos = 0;
- for ($pos = 0; $pos != -1; $pos = $next) {
- $next = index($s, $delimiter, $pos);
- push @result, (($next == -1) ? substr($s, $pos) : substr($s, $pos, $next - $pos));
- if ($next != -1) {
- $next += length($delimiter);
- }
- }
- return @result;
-}
-
-# Checks that the files in the directory are in sync with CVS's status.
-#
-sub checkdir_CVS($) {
- my ($fname) = @_;
-
- my $cvs_entries = load_file("$fname/CVS/Entries");
- my $cvs_entries_log = load_file("$fname/CVS/Entries.Log");
- return unless $cvs_entries;
-
- foreach my $line (@$cvs_entries) {
- my ($type, $fname, $mtime, $date, $empty, $tag, $undef) = my_split("/", $line->text);
- next if ($type eq "D" && !defined($fname));
- assert($type eq "" || $type eq "D", "Unknown line format: " . $line->text);
- assert(defined($tag), "Unknown line format: " . $line->text);
- assert(defined($empty) && $empty eq "", "Unknown line format: " . $line->text);
- assert(!defined($undef), "Unknown line format: " . $line->text);
- }
-}
-
-#
-# Procedures to check a directory including the files in it.
-#
-
-sub checkdir_root() {
- my ($fname) = "${current_dir}/Makefile";
- my ($lines, $prev_subdir, @subdirs);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkdir_root()");
-
- if (!($lines = load_lines($fname, true))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
-
- parselines_mk($lines);
- if (0 <= $#{$lines}) {
- checkline_rcsid_regex($lines->[0], qr"#\s+", "# ");
- }
-
- foreach my $line (@{$lines}) {
- if ($line->text =~ qr"^(#?)SUBDIR\s*\+=(\s*)(\S+)\s*(?:#\s*(.*?)\s*|)$") {
- my ($comment_flag, $indentation, $subdir, $comment) = ($1, $2, $3, $4);
-
- if ($comment_flag eq "#" && (!defined($comment) || $comment eq "")) {
- $line->log_warning("${subdir} commented out without giving a reason.");
- }
-
- if ($indentation ne "\t") {
- $line->log_warning("Indentation should be a single tab character.");
- }
-
- if ($subdir =~ qr"\$" || !-f "${current_dir}/${subdir}/Makefile") {
- next;
- }
-
- if (defined($prev_subdir) && $subdir eq $prev_subdir) {
- $line->log_error("${subdir} must only appear once.");
- } elsif (defined($prev_subdir) && $subdir lt $prev_subdir) {
- $line->log_warning("${subdir} should come before ${prev_subdir}.");
- } else {
- # correctly ordered
- }
-
- $prev_subdir = $subdir;
-
- if ($comment_flag eq "") {
- push(@subdirs, "${current_dir}/${subdir}");
- }
- }
- }
-
- checklines_mk($lines);
-
- if ($opt_recursive) {
- push(@todo_items, @subdirs);
- }
-}
-
-sub checkdir_category() {
- my $fname = "${current_dir}/Makefile";
- my ($lines, $lineno);
-
- $opt_debug_trace and log_debug($fname, NO_LINES, "checkdir_category()");
-
- if (!($lines = load_lines($fname, true))) {
- log_error($fname, NO_LINE_NUMBER, "Cannot be read.");
- return;
- }
- parselines_mk($lines);
-
- $lineno = 0;
-
- # The first line must contain the RCS Id
- if ($lineno <= $#{$lines} && checkline_rcsid_regex($lines->[$lineno], qr"#\s+", "# ")) {
- $lineno++;
- }
-
- # Then, arbitrary comments may follow
- while ($lineno <= $#{$lines} && $lines->[$lineno]->text =~ qr"^#") {
- $lineno++;
- }
-
- # Then we need an empty line
- expect_empty_line($lines, \$lineno);
-
- # Then comes the COMMENT line
- if ($lineno <= $#{$lines} && $lines->[$lineno]->text =~ qr"^COMMENT=\t*(.*)") {
- my ($comment) = ($1);
-
- checkline_valid_characters_in_variable($lines->[$lineno], qr"[-\040'(),/0-9A-Za-z]");
- $lineno++;
- } else {
- $lines->[$lineno]->log_error("COMMENT= line expected.");
- }
-
- # Then we need an empty line
- expect_empty_line($lines, \$lineno);
-
- # And now to the most complicated part of the category Makefiles,
- # the (hopefully) sorted list of SUBDIRs. The first step is to
- # collect the SUBDIRs in the Makefile and in the file system.
-
- my (@f_subdirs, @m_subdirs);
-
- @f_subdirs = sort(get_subdirs($current_dir));
-
- my $prev_subdir = undef;
- while ($lineno <= $#{$lines}) {
- my $line = $lines->[$lineno];
-
- if ($line->text =~ qr"^(#?)SUBDIR\+=(\s*)(\S+)\s*(?:#\s*(.*?)\s*|)$") {
- my ($comment_flag, $indentation, $subdir, $comment) = ($1, $2, $3, $4);
-
- if ($comment_flag eq "#" && (!defined($comment) || $comment eq "")) {
- $line->log_warning("${subdir} commented out without giving a reason.");
- }
-
- if ($indentation ne "\t") {
- $line->log_warning("Indentation should be a single tab character.");
- }
-
- if (defined($prev_subdir) && $subdir eq $prev_subdir) {
- $line->log_error("${subdir} must only appear once.");
- } elsif (defined($prev_subdir) && $subdir lt $prev_subdir) {
- $line->log_warning("${subdir} should come before ${prev_subdir}.");
- } else {
- # correctly ordered
- }
-
- push(@m_subdirs, [$subdir, $line, $comment_flag ? false : true]);
- $prev_subdir = $subdir;
- $lineno++;
-
- } else {
- if ($line->text ne "") {
- $line->log_error("SUBDIR+= line or empty line expected.");
- }
- last;
- }
- }
-
- # To prevent unnecessary warnings about subdirectories that are
- # in one list, but not in the other, we generate the sets of
- # subdirs of each list.
- my (%f_check, %m_check);
- foreach my $f (@f_subdirs) { $f_check{$f} = true; }
- foreach my $m (@m_subdirs) { $m_check{$m->[0]} = true; }
-
- my ($f_index, $f_atend, $f_neednext, $f_current) = (0, false, true, undef, undef);
- my ($m_index, $m_atend, $m_neednext, $m_current) = (0, false, true, undef, undef);
- my ($line, $m_recurse);
- my (@subdirs);
-
- while (!($m_atend && $f_atend)) {
-
- if (!$m_atend && $m_neednext) {
- $m_neednext = false;
- if ($m_index > $#m_subdirs) {
- $m_atend = true;
- $line = $lines->[$lineno];
- next;
- } else {
- $m_current = $m_subdirs[$m_index]->[0];
- $line = $m_subdirs[$m_index]->[1];
- $m_recurse = $m_subdirs[$m_index]->[2];
- $m_index++;
- }
- }
-
- if (!$f_atend && $f_neednext) {
- $f_neednext = false;
- if ($f_index > $#f_subdirs) {
- $f_atend = true;
- next;
- } else {
- $f_current = $f_subdirs[$f_index++];
- }
- }
-
- if (!$f_atend && ($m_atend || $f_current lt $m_current)) {
- if (!exists($m_check{$f_current})) {
- $line->log_error("${f_current} exists in the file system, but not in the Makefile.");
- $line->append_before("SUBDIR+=\t${f_current}");
- }
- $f_neednext = true;
-
- } elsif (!$m_atend && ($f_atend || $m_current lt $f_current)) {
- if (!exists($f_check{$m_current})) {
- $line->log_error("${m_current} exists in the Makefile, but not in the file system.");
- $line->delete();
- }
- $m_neednext = true;
-
- } else { # $f_current eq $m_current
- $f_neednext = true;
- $m_neednext = true;
- if ($m_recurse) {
- push(@subdirs, "${current_dir}/${m_current}");
- }
- }
- }
-
- # the wip category Makefile may have its own targets for generating
- # indexes and READMEs. Just skip them.
- if ($is_wip) {
- while ($lineno <= $#{$lines} - 2) {
- $lineno++;
- }
- }
-
- # Then we need an empty line
- if ($lineno <= $#{$lines} && $lines->[$lineno]->text eq "") {
- $lineno++;
- } else {
- $lines->[$lineno]->log_error("Empty line expected.");
- }
-
- # And, last but not least, the .include line
- my $final_line = ".include \"../mk/bsd.pkg.subdir.mk\"";
- if ($lineno <= $#{$lines} && $lines->[$lineno]->text eq $final_line) {
- $lineno++;
- } else {
- $lines->[$lineno]->log_error("Expected this: ${final_line}.");
- }
-
- if ($lineno <= $#{$lines}) {
- $lines->[$lineno]->log_error("The file should end here.");
- }
-
- checklines_mk($lines);
-
- autofix($lines);
-
- if ($opt_recursive) {
- unshift(@todo_items, @subdirs);
- }
-}
-
-sub checkdir_package() {
- my ($whole, $lines, $have_distinfo, $have_patches);
-
- # Initialize global variables
- $pkgdir = undef;
- $filesdir = "files";
- $patchdir = "patches";
- $distinfo_file = "distinfo";
- $effective_pkgname = undef;
- $effective_pkgbase = undef;
- $effective_pkgversion = undef;
- $effective_pkgname_line = undef;
- $hack_php_patches = false;
- $seen_bsd_prefs_mk = false;
- $pkgctx_vardef = {%{get_userdefined_variables()}};
- $pkgctx_varuse = {};
- $pkgctx_bl3 = {};
- $seen_Makefile_common = false;
-
- # we need to handle the Makefile first to get some variables
- if (!load_package_Makefile("${current_dir}/Makefile", \$whole, \$lines)) {
- log_error("${current_dir}/Makefile", NO_LINE_NUMBER, "Cannot be read.");
- goto cleanup;
- }
-
- my @files = <${current_dir}/*>;
- if ($pkgdir ne ".") {
- push(@files, <${current_dir}/${pkgdir}/*>);
- }
- if ($opt_check_extra) {
- push(@files, <${current_dir}/${filesdir}/*>);
- }
- push(@files, <${current_dir}/${patchdir}/*>);
- if ($distinfo_file !~ qr"^(?:\./)?distinfo$") {
- push(@files, "${current_dir}/${distinfo_file}");
- }
- $have_distinfo = false;
- $have_patches = false;
-
- # Determine the used variables before checking any of the
- # Makefile fragments.
- foreach my $fname (@files) {
- if ($fname =~ qr"^((?:.*/)?Makefile\..*|.*\.mk)$"
- && (defined(my $lines = load_lines($fname, true)))) {
- parselines_mk($lines);
- determine_used_variables($lines);
- }
- }
-
- foreach my $fname (@files) {
- if ($fname eq "${current_dir}/Makefile") {
- $opt_check_Makefile and checkfile_package_Makefile($fname, $whole, $lines);
- } else {
- checkfile($fname);
- }
- if ($fname =~ qr"/patches/patch-[A-Za-z0-9]*$") {
- $have_patches = true;
- } elsif ($fname =~ qr"/distinfo$") {
- $have_distinfo = true;
- }
- }
-
- if ($opt_check_distinfo && $opt_check_patches) {
- if ($have_patches && ! $have_distinfo) {
- log_warning("${current_dir}/$distinfo_file", NO_LINE_NUMBER, "File not found. Please run '".conf_make." makepatchsum'.");
- }
- }
-
- if (!is_emptydir("${current_dir}/scripts")) {
- log_warning("${current_dir}/scripts", NO_LINE_NUMBER, "This directory and its contents are deprecated! Please call the script(s) explicitly from the corresponding target(s) in the pkg's Makefile.");
- }
-
-cleanup:
- # Clean up global variables.
- $pkgdir = undef;
- $filesdir = undef;
- $patchdir = undef;
- $distinfo_file = undef;
- $effective_pkgname = undef;
- $effective_pkgbase = undef;
- $effective_pkgversion = undef;
- $effective_pkgname_line = undef;
- $hack_php_patches = undef;
- $seen_bsd_prefs_mk = undef;
- $pkgctx_vardef = undef;
- $pkgctx_varuse = undef;
- $pkgctx_bl3 = undef;
- $seen_Makefile_common = undef;
-}
-
-#
-# Selecting the proper checking procedures for a directory entry.
-#
-
-sub checkitem($) {
- my ($item) = @_;
- my ($st, $is_dir, $is_reg);
-
- if (!($st = lstat($item))) {
- log_error($item, NO_LINE_NUMBER, "Does not exist.");
- return;
- }
-
- $is_dir = S_ISDIR($st->mode);
- $is_reg = S_ISREG($st->mode);
- if (!$is_reg && !$is_dir) {
- log_error($item, NO_LINE_NUMBER, "Must be a file or directory.");
- return;
- }
-
- $current_dir = $is_dir ? $item : dirname($item);
- my $abs_current_dir = Cwd::abs_path($current_dir);
- $is_wip = !$opt_import && ($abs_current_dir =~ qr"/wip(?:/|$)");
- $is_internal = ($abs_current_dir =~ qr"/mk(?:/|$)");
-
- # Determine the root directory of pkgsrc. By only overwriting
- # the global variable $cwd_pkgsrcdir when we are checking inside
- # a pkgsrc tree, the user can specify a tree with the
- # --pkgsrcdir option and then check files outside of any pkgsrc
- # tree.
- $cur_pkgsrcdir = undef;
- foreach my $d (".", "..", "../..", "../../..") {
- if (-f "${current_dir}/${d}/mk/bsd.pkg.mk") {
- $cur_pkgsrcdir = $d;
- }
- }
- if (!defined($cwd_pkgsrcdir) && defined($cur_pkgsrcdir)) {
- $cwd_pkgsrcdir = "${current_dir}/${cur_pkgsrcdir}";
- }
-
- if (!defined($cwd_pkgsrcdir)) {
- log_error($item, NO_LINE_NUMBER, "Cannot determine the pkgsrc root directory.");
- return;
- }
-
- check_pkglint_version(); # (needs $cwd_pkgsrcdir)
-
- if ($is_dir) {
- checkdir_CVS($item);
- }
-
- if ($is_reg) {
- checkfile($item);
-
- } elsif (!defined($cur_pkgsrcdir)) {
- log_error($item, NO_LINES, "Cannot check directories outside a pkgsrc tree.");
-
- } elsif ($cur_pkgsrcdir eq "../..") {
- checkdir_package();
-
- } elsif ($cur_pkgsrcdir eq "..") {
- checkdir_category();
-
- } elsif ($cur_pkgsrcdir eq ".") {
- checkdir_root();
-
- } else {
- log_error($item, NO_LINE_NUMBER, "Don't know how to check this directory.");
- }
-}
-
-#
-# The main program
-#
-
-sub main() {
-
- $| = true;
- parse_command_line();
-
- @todo_items = (@ARGV != 0) ? @ARGV : (".");
- while (@todo_items != 0) {
- checkitem(shift(@todo_items));
- }
-
- PkgLint::Logging::print_summary_and_exit($opt_quiet);
-}
-
-main();
diff --git a/pkgtools/pkglint/files/plist-clash.pl b/pkgtools/pkglint/files/plist-clash.pl
deleted file mode 100644
index 4e3b70ba06d..00000000000
--- a/pkgtools/pkglint/files/plist-clash.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-#! @PERL@
-# $NetBSD: plist-clash.pl,v 1.5 2005/11/10 14:30:56 rillig Exp $
-#
-# Scan all PLIST files given on the command line and report all lines
-# that appear more than once.
-
-my %files = ();
-
-sub read_PLIST($) {
- my ($fname) = @_;
-
- if (!open(F, "<", $fname)) {
- warn "$!\n";
- return undef;
- }
-
- my $lineno = 0;
- foreach my $line (<F>) {
- chomp($line);
- $lineno++;
-
- # Ignore comments and commands
- next if ($line =~ qr"^@");
-
- # Ignore filenames with embedded variables
- next if ($line =~ qr"\$");
-
- if ($line =~ qr"^[A-Za-z0-9].*") {
- if (!exists($files{$line})) {
- $files{$line} = [];
- }
- push(@{$files{$line}}, "$fname:$lineno");
-
- } else {
- warn("ERROR: $fname:$lineno: Unknown line type\n");
- }
- }
- close(F);
-}
-
-sub main() {
- if (@ARGV == 0) {
- die("usage: $0 <plist>...\n");
- }
-
- foreach my $plist (@ARGV) {
- read_PLIST($plist);
- }
-
- foreach my $file (sort keys %files) {
- my $srcs = $files{$file};
- if (@{$srcs} != 1) {
- foreach my $src (@{$srcs}) {
- print "$src: $file\n";
- }
- }
- }
-}
-
-main();
diff --git a/pkgtools/pkgse/DESCR b/pkgtools/pkgse/DESCR
deleted file mode 100644
index 8befa6afb46..00000000000
--- a/pkgtools/pkgse/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-pkgse is a simple perl script that fetches informations about a
-NetBSD pkgsrc package from the pkgsrc.netbsd.se website.
diff --git a/pkgtools/pkgse/Makefile b/pkgtools/pkgse/Makefile
deleted file mode 100644
index 545aaab7ae8..00000000000
--- a/pkgtools/pkgse/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# $NetBSD: Makefile,v 1.6 2006/10/28 21:29:47 wiz Exp $
-#
-
-DISTNAME= pkgse-0.3
-CATEGORIES= pkgtools
-MASTER_SITES= http://imil.net/NetBSD/
-EXTRACT_SUFX= .tgz
-
-MAINTAINER= imil@gcu.info
-HOMEPAGE= http://imil.net/wp/
-COMMENT= Fetch informations about a NetBSD package from pkgsrc.netbsd.se
-
-DEPENDS+= p5-libwww>=5.76:../../www/p5-libwww
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-NO_CONFIGURE= yes
-NO_BUILD= yes
-USE_TOOLS+= perl:run
-
-INSTALLATION_DIRS= bin
-
-do-install:
- @${INSTALL_SCRIPT} ${WRKSRC}/pkgse ${PREFIX}/bin
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkgse/PLIST b/pkgtools/pkgse/PLIST
deleted file mode 100644
index 8f2ed1b9c4f..00000000000
--- a/pkgtools/pkgse/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2004/08/12 13:15:45 wiz Exp $
-bin/pkgse
diff --git a/pkgtools/pkgse/distinfo b/pkgtools/pkgse/distinfo
deleted file mode 100644
index 293f8bec960..00000000000
--- a/pkgtools/pkgse/distinfo
+++ /dev/null
@@ -1,5 +0,0 @@
-$NetBSD: distinfo,v 1.4 2005/11/29 10:21:05 rillig Exp $
-
-SHA1 (pkgse-0.3.tgz) = 5f7587f19bc768ab8920ad204226313cdd4b6204
-RMD160 (pkgse-0.3.tgz) = 3188c4cf20bca1db60c0006f702fc84758f559a9
-Size (pkgse-0.3.tgz) = 874 bytes
diff --git a/pkgtools/pkgsurvey/DESCR b/pkgtools/pkgsurvey/DESCR
deleted file mode 100644
index 3eb1391061b..00000000000
--- a/pkgtools/pkgsurvey/DESCR
+++ /dev/null
@@ -1,19 +0,0 @@
-pkgsurvey is a small utility to aid the pkgsrc people at pkgsrc.org
-
-Information of currently-installed packages is taken from the current
-machine, along with Operating System type, hardware architecture, and
-operating system release version information, and mailed to a central
-site.
-
-No information will be divulged to anyone - it is simply meant for use
-by the pkgsrc people, for finding the most popular packages.
-
-If the idea of divulging package or operating system version
-information is distasteful to you, or does not conform to your site's
-policy, then please feel free to delete pkgsurvey from your system:
-as root, type
-
- pkg_delete -v pkgsurvey
-
-Alistair G. Crooks
-Thu Feb 1 07:48:48 GMT 2001
diff --git a/pkgtools/pkgsurvey/MESSAGE b/pkgtools/pkgsurvey/MESSAGE
deleted file mode 100644
index 5229c39711f..00000000000
--- a/pkgtools/pkgsurvey/MESSAGE
+++ /dev/null
@@ -1,17 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.3 2003/05/06 17:42:24 jmmv Exp $
-
-Run
- pkgsurvey
-
-to send a list of all your installed packages via mail to the people
-doing NetBSD pkgsrc works to help them keep the system at an optimum.
-
-If the idea of divulging package or operating system version
-information is distasteful to you, or does not conform to your site's
-policy, then please feel free to delete pkgsurvey from your system:
-as root, type
-
- pkg_delete -v pkgsurvey
-
-===========================================================================
diff --git a/pkgtools/pkgsurvey/Makefile b/pkgtools/pkgsurvey/Makefile
deleted file mode 100644
index af98e9190d5..00000000000
--- a/pkgtools/pkgsurvey/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# $NetBSD: Makefile,v 1.9 2007/02/22 19:27:02 wiz Exp $
-#
-
-DISTNAME= pkgsurvey-0.0
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= agc@pkgsrc.org
-COMMENT= Utility to collate pkg information, and mail to central census site
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-NO_BUILD= yes
-
-INSTALLATION_DIRS= bin
-
-do-install:
- ${SED} -e 's|\$${PKG_INFO}|${PKG_INFO}|' \
- -e 's|\$${UNAME}|${UNAME}|g' \
- ${FILESDIR}/pkgsurvey.sh > ${PREFIX}/bin/pkgsurvey
- ${CHMOD} 755 ${PREFIX}/bin/pkgsurvey
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkgsurvey/PLIST b/pkgtools/pkgsurvey/PLIST
deleted file mode 100644
index bd75da4ac74..00000000000
--- a/pkgtools/pkgsurvey/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:31:52 zuntum Exp $
-bin/pkgsurvey
diff --git a/pkgtools/pkgsurvey/files/pkgsurvey.sh b/pkgtools/pkgsurvey/files/pkgsurvey.sh
deleted file mode 100644
index 455144c2e45..00000000000
--- a/pkgtools/pkgsurvey/files/pkgsurvey.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-
-${PKG_INFO} | sort | mail -s "`hostname` `${UNAME} -s`-`${UNAME} -p`-`${UNAME} -r`" agc-pkgsurvey@pkgsrc.org
-
-exit 0
diff --git a/pkgtools/port2pkg/DESCR b/pkgtools/port2pkg/DESCR
deleted file mode 100644
index 565a697ab3a..00000000000
--- a/pkgtools/port2pkg/DESCR
+++ /dev/null
@@ -1,11 +0,0 @@
-A converter from a FreeBSD port to a NetBSD package.
-
-port2pkg tries to convert FreeBSD ports to NetBSD packages. port2pkg
-copies files from portsdir to pkgsrcdir (if it does not exist, the
-pkgsrcdir is created), and tries to adapt the Makefile, patches and
-some files to NetBSD format in pkgsrcdir.
-
-port2pkg /mnt/ports/<category>/foo /usr/pkgsrc/<category>/foo
-
-Before committing a package which has been transformed using this
-utility, please check the results manually.
diff --git a/pkgtools/port2pkg/Makefile b/pkgtools/port2pkg/Makefile
deleted file mode 100644
index efe99d83aba..00000000000
--- a/pkgtools/port2pkg/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-# $NetBSD: Makefile,v 1.31 2007/01/07 09:14:09 rillig Exp $
-#
-
-DISTNAME= port2pkg-1.11
-PKGREVISION= 6
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-COMMENT= Convert from a FreeBSD port to a NetBSD package
-
-DEPENDS+= pkglint-[0-9]*:../../pkgtools/pkglint
-
-WRKSRC= ${WRKDIR}
-
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-USE_TOOLS+= gtar perl:run
-
-.include "../../mk/bsd.prefs.mk"
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1
-
-do-build:
-.if ${OPSYS} == "SunOS" || ${OPSYS} == "AIX"
- # the pre-generated man-pages are 'mandoc'; these OS need 'man'
- nroff -man ${FILESDIR}/port2pkg.1 >${WRKSRC}/port2pkg.0
-.else
- ${CP} ${FILESDIR}/port2pkg.0 ${WRKSRC}/port2pkg.0
-.endif
- ${SED} -e 's|$${GTAR}|${GTAR}|g' ${FILESDIR}/port2pkg.pl \
- > ${WRKSRC}/port2pkg
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/port2pkg ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/port2pkg.0 ${PREFIX}/${PKGMANDIR}/cat1
- ${INSTALL_MAN} ${FILESDIR}/port2pkg.1 ${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/port2pkg/PLIST b/pkgtools/port2pkg/PLIST
deleted file mode 100644
index 3161630b3af..00000000000
--- a/pkgtools/port2pkg/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:19:05 zuntum Exp $
-bin/port2pkg
-man/cat1/port2pkg.0
-man/man1/port2pkg.1
diff --git a/pkgtools/port2pkg/files/port2pkg.0 b/pkgtools/port2pkg/files/port2pkg.0
deleted file mode 100644
index 0ae25fd2091..00000000000
--- a/pkgtools/port2pkg/files/port2pkg.0
+++ /dev/null
@@ -1,34 +0,0 @@
-PORT2PKG(1) NetBSD General Commands Manual PORT2PKG(1)
-
-NNAAMMEE
- ppoorrtt22ppkkgg - convert a FreeBSD port to a NetBSD package
-
-SSYYNNOOPPSSIISS
- ppoorrtt22ppkkgg [--mm _m_a_i_n_t_a_i_n_e_r] _p_o_r_t_s_d_i_r _p_k_g_s_r_c_d_i_r
-
-DDEESSCCRRIIPPTTIIOONN
- ppoorrtt22ppkkgg tries to convert a FreeBSD port to a NetBSD package. ppoorrtt22ppkkgg
- copies files from _p_o_r_t_s_d_i_r to _p_k_g_s_r_c_d_i_r (if _p_k_g_s_r_c_d_i_r doesn't exists, it
- is created first), and tries adapting the Makefile, patches and some
- other files to NetBSD pkgsrc.
-
- OOppttiioonnss
- --mm Adjust maintainer of this package (default: tech-
- pkg@NetBSD.org).
-
-EEXXAAMMPPLLEESS
- port2pkg /mnt/ports/<category>/foo /usr/pkgsrc/<category>/foo
- or
- port2pkg -m your@email /mnt/ports/<category>/foo
- /usr/pkgsrc/<category>/foo
-
-SSEEEE AALLSSOO
- Read _P_a_c_k_a_g_e _C_o_n_s_t_r_u_c_t_o_r_'_s _G_u_i_d_e in _p_k_g_s_r_c_/_d_o_c_/_p_k_g_s_r_c_._t_x_t.
-
-AAUUTTHHOORRSS
- Kazuki Sakamoto <sakamoto@netbsd.org>
-
-BBUUGGSS
- ppoorrtt22ppkkgg is not a magic wand, please double-check converted pkgsrc.
-
-NetBSD 2.0 January 10, 2004 NetBSD 2.0
diff --git a/pkgtools/port2pkg/files/port2pkg.1 b/pkgtools/port2pkg/files/port2pkg.1
deleted file mode 100644
index 488f1d60e2c..00000000000
--- a/pkgtools/port2pkg/files/port2pkg.1
+++ /dev/null
@@ -1,56 +0,0 @@
-.\" $NetBSD: port2pkg.1,v 1.7 2006/09/16 06:37:40 wiz Exp $
-.\"
-.\" Copyright (c) 1999 by Kazuki Sakamoto (sakamoto@NetBSD.org)
-.\" Absolutely no warranty.
-.\"
-.Dd September 16, 2006
-.Dt PORT2PKG 1
-.Sh NAME
-.Nm port2pkg
-.Nd convert a FreeBSD port to a NetBSD package
-.Sh SYNOPSIS
-.Nm
-.Op Fl m Ar maintainer
-.Ar portsdir
-.Ar pkgsrcdir
-.Sh DESCRIPTION
-.Nm
-tries to convert a
-.Fx
-port to a
-.Nx
-package.
-.Nm
-copies files
-from
-.Ar portsdir
-to
-.Ar pkgsrcdir
-(if
-.Ar pkgsrcdir
-doesn't exists, it is created first),
-and tries adapting the Makefile, patches and some other files
-to
-.Nx
-pkgsrc.
-.Ss Options
-.Bl -tag -width Fl
-.It Fl m
-Adjust maintainer of this package
-(default: pkgsrc-users@NetBSD.org).
-.El
-.Sh EXAMPLES
-.Dl port2pkg /mnt/ports/\*[Lt]category\*[Gt]/foo /usr/pkgsrc/\*[Lt]category\*[Gt]/foo
-or
-.Dl port2pkg -m your@email /mnt/ports/\*[Lt]category\*[Gt]/foo /usr/pkgsrc/\*[Lt]category\*[Gt]/foo
-.Sh SEE ALSO
-.Xr pkglint 1
-Read
-.Ar Package Constructor's Guide
-in
-.Pa pkgsrc/doc/pkgsrc.txt .
-.Sh AUTHORS
-.An Kazuki Sakamoto Aq sakamoto@NetBSD.org
-.Sh BUGS
-.Nm
-is not a magic wand, please double-check converted pkgsrc.
diff --git a/pkgtools/port2pkg/files/port2pkg.pl b/pkgtools/port2pkg/files/port2pkg.pl
deleted file mode 100755
index 25a1ca6ea9b..00000000000
--- a/pkgtools/port2pkg/files/port2pkg.pl
+++ /dev/null
@@ -1,358 +0,0 @@
-#!/usr/bin/env perl
-#
-# $NetBSD: port2pkg.pl,v 1.18 2007/02/23 15:29:14 ginsbach Exp $
-#
-
-require 'getopts.pl';
-$^W=1;
-use strict;
-use vars qw($opt_m);
-my($maintainer) = "pkgsrc-users\@NetBSD.org";
-my($makefile, $master_site_subdir, $extract_cmd);
-my($portsdir, $pkgdir);
-my($namespace, $portname, $portversion, $distname,
- $pkgname, $pkgnameprefix, $pkgnamesuffix);
-my(@man, @cat);
-
-&usage_and_exit() if (! &Getopts('m:'));
-$|=1;
-
-$portsdir = shift;
-$pkgdir = shift;
-&usage_and_exit() if (! $portsdir || ! $pkgdir);
-
-$maintainer = $opt_m if ($opt_m);
-die "$portsdir: $!\n" if (! -d "$portsdir");
-if (! -d "$pkgdir") {
- if (mkdir($pkgdir, 0755) == 0) {
- die "$pkgdir: $!\n";
- }
-}
-
-system("${GTAR} cCf $portsdir - .|${GTAR} xCf $pkgdir -");
-
-&fix_new_ports();
-&read_Makefile();
-&conv_Makefile();
-&conv_PLIST();
-&add_NetBSD_ID();
-
-system("(cd $pkgdir; pkglint)");
-0;
-
-sub usage_and_exit {
- print "port2pkg [-m maintainer] portsdir pkgdir\n";
- exit;
-}
-
-sub fix_new_ports {
- my (@allfiles);
- my ($fn, $dn);
- if (-f "$pkgdir/pkg-comment") {
- rename("$pkgdir/pkg-comment", "$pkgdir/COMMENT") ||
- warn("can't copy $pkgdir/pkg-comment to $pkgdir/COMMENT");
- }
- rename("$pkgdir/pkg-descr", "$pkgdir/DESCR") ||
- warn("can't copy $pkgdir/pkg-descr to $pkgdir/DESCR");
- if (-f "$pkgdir/pkg-message") {
- rename("$pkgdir/pkg-message", "$pkgdir/MESSAGE") ||
- warn("can't copy $pkgdir/pkg-message to $pkgdir/MESSAGE");
- }
- foreach $fn (<$pkgdir/pkg-plist*>) {
- $dn = $fn;
- $dn =~ s|.*pkg-plist|PLIST|;
- rename("$fn", "$pkgdir/$dn") ||
- warn("can't copy $fn to $pkgdir/$dn");
- }
- unlink <$pkgdir/files/patch*>;
- unlink("$pkgdir/distinfo");
- mkdir("$pkgdir/patches",0777);
-}
-
-sub read_Makefile {
- open(PORTS, "$portsdir/Makefile")
- || die "$portsdir/Makefile: $!\n";
- while (<PORTS>) {
- if (/\\$/) {
- chop;
- chop;
- }
- $makefile .= $_;
- }
- close(PORTS);
-
- my ($extract_before_args, $extract_after_args);
- foreach my $line (split(/\n/, $makefile)) {
- $_ = $line;
- if (/^PORTNAME\?*=(\s*)(.*)/) {
- $namespace = $1;
- $portname = $2;
- } elsif (/^PORTVERSION\?*=\s*(.*)/) {
- $portversion = $1;
- } elsif (/^PKGNAMEPREFIX\?*=\s*(.*)/) {
- $pkgnameprefix = $1;
- } elsif (/^PKGNAMESUFFIX\?*=\s*(.*)/) {
- $pkgnamesuffix = $1;
- } elsif (/^DISTNAME\?*=\s*(.*)/) {
- $distname = $1;
- } elsif (/^MASTER_SITE_SUBDIR\?*=\s*(.*)/) {
- $master_site_subdir = $1;
- if (!($master_site_subdir =~ /\/$/)) {
- $master_site_subdir .= "/";
- }
- } elsif (/^MAN(.)\?*=\s*(.*)/) {
- $man[$1] .= $2;
- } elsif (/^CAT(.)\?*=\s*(.*)/) {
- $cat[$1] .= $2;
- } elsif (/^EXTRACT_CMD\?*=\s*(.*)/) {
- $extract_cmd = $1;
- } elsif (/^EXTRACT_BEFORE_ARGS\?*=\s*(.*)/) {
- $extract_before_args = $1;
- } elsif (/^EXTRACT_AFTER_ARGS\?*=\s*(.*)/) {
- $extract_after_args = $1;
- }
- }
-
- if (defined($extract_cmd) && $extract_cmd ne "") {
- if ($extract_before_args ne "") {
- $extract_before_args = " $extract_before_args";
- }
- if ($extract_after_args ne "") {
- $extract_after_args = " $extract_after_args";
- }
- $extract_cmd = "$extract_cmd$extract_before_args" .
- " \${DOWNLOADED_DISTFILE}$extract_after_args";
- }
-
- if (defined($distname)) {
- $distname =~ s/\${PORTNAME}/$portname/;
- $distname =~ s/\${PORTVERSION}/$portversion/;
-
- if ($distname ne "$portname-$portversion") {
- $pkgname = "$portname-$portversion";
- }
- } else {
- $distname = "$portname-$portversion";
- }
- if (defined($pkgnameprefix)) {
- $pkgname = $distname unless (defined($pkgname));
- $pkgname = $pkgnameprefix . $pkgname;
- }
- if (defined($pkgnamesuffix)) {
- $pkgname = $distname unless (defined($pkgname));
- $pkgname .= $pkgnamesuffix;
- }
-}
-
-sub conv_Makefile {
- open(PORTS, "$portsdir/Makefile")
- || die "$portsdir/Makefile: $!\n";
- open(PKG, ">$pkgdir/Makefile")
- || die "$pkgdir/Makefile: $!\n";
-
- print PKG "# \$NetBSD\$\n";
-
- # header
- while (<PORTS>) {
- last if (! /^\#/);
-
- if (/\$FreeBSD(: .*) \$/ || /\$Id(: .*) \$/) {
- print PKG "\# FreeBSD Id$1\n";
- } else {
- print;
- }
- }
- print PKG;
-
- # body
- my ($nextline, $remove, $master_sites, $noportdocs);
- while (<PORTS>) {
- if (/\\$/) {
- $nextline++;
- next if ($remove);
- } else {
- $nextline = 0;
- if ($remove) {
- $remove = 0;
- next;
- }
- }
-
- s|^\.include <bsd.port.pre.mk>|.include \"../../mk/bsd.prefs.mk\"|;
- s|^\.include <bsd.port.mk>|.include \"../../mk/bsd.pkg.mk\"|;
- s|^FETCH_(DEPENDS)|BUILD_$1|;
- s|^LIB_(DEPENDS)|$1|;
- s|\$\{PORTNAME\}|\${PKGBASE}|g;
- s|\$\{PORTSDIR\}|../..|g;
- s|PLIST_SUB|PLIST_SUBST|;
- s|^USE_GMAKE\?*=\s*yes|USE_TOOLS+=\tgmake|;
-
- if (defined($master_site_subdir) &&
- $master_site_subdir ne "" &&
- ($master_sites || /^MASTER_SITES\?*=/)) {
- s|([^L][^O][^C][^A][^L])\}|$1:=$master_site_subdir}|g;
-
- if ($nextline) {
- $master_sites = 1;
- } else {
- $master_sites = 0;
- }
- }
-
- if (/(\/usr\/local)/ ||
- /(\/usr\/X11R6)/ ||
- /(ldconfig)/i ||
- /(MASTERDIR)/ ||
- /(.*cat.*MESSAGE.*)/i) {
- print "WARN: found \"$1\"\n";
- }
-
- if (/^PORTVERSION/ ||
- /^PKGNAMEPREFIX/ ||
- /^PKGNAMESUFFIX/ ||
- /^DISTNAME/ ||
- /^MAN(.)\?*=/ ||
- /^CAT(.)\?*=/ ||
- /^MASTER_SITE_SUBDIR/ ||
- /^EXTRACT_BEFORE_ARGS/ ||
- /^EXTRACT_AFTER_ARGS/) {
- $remove = 1 if ($nextline);
- } elsif (/^PORTNAME/) {
- print PKG "DISTNAME=$namespace$distname\n";
- print PKG "PKGNAME=$namespace$pkgname\n" if defined($pkgname);
- $remove = 1 if ($nextline);
- } elsif (/^(EXTRACT_CMD\?*=)/) {
- print PKG "$1\t$extract_cmd\n";
- $remove = 1 if ($nextline);
- } elsif (/^(MAINTAINER\?*=)/) {
- print PKG "$1\t$maintainer\n";
- $remove = 1 if ($nextline);
-
- open(DESCR, "$pkgdir/DESCR")
- || die "$pkgdir/DESCR: $!\n";
- while (<DESCR>) {
- chop;
- if (/^WWW:[\s]*(.*)/) {
- print PKG "HOMEPAGE=\t$1\n";
- }
- }
- close(DESCR);
- if ( -f "$pkgdir/COMMENT") {
- open(COMMENT, "$pkgdir/COMMENT")
- || die "$pkgdir/COMMENT: $!\n";
- while (<COMMENT>) {
- chomp;
- print PKG "COMMENT=\t$_\n";
- }
- close(COMMENT);
- unlink("$pkgdir/COMMENT");
- }
- } elsif ($noportdocs || /^\.if.*NOPORTDOCS/) {
- if (/^\.if/) {
- $noportdocs++;
- print PKG $_ if ($noportdocs > 2);
- } elsif (/^\.endif/) {
- $noportdocs--;
- print PKG $_ if ($noportdocs > 2);
- } else {
- print PKG $_;
- }
- } else {
- print PKG $_;
- }
- }
-
- close(PORTS);
- close(PKG);
-}
-
-sub add_manual {
- my ($FILE, $category) = @_;
-
- for (my $i = 1; $i <= 8; $i++) {
- next if (!defined(eval "\$$category\[\$i\]"));
- foreach my $item (sort(split(/[ \t\n]+/,
- eval "\$$category\[\$i\]"))) {
- print $FILE "$category/$category$i/$item\n";
- }
- }
-}
-
-sub conv_PLIST {
- my ($file, $plist);
- return 0 if (!opendir(PKGDIR, "$pkgdir"));
- while ($plist = readdir(PKGDIR)) {
- next if (!($plist =~ /^PLIST/));
-
- open(OLDPLIST, "$pkgdir/$plist")
- || die "$pkgdir/$plist: $!\n";
- open(NEWPLIST, ">$pkgdir/new.$plist")
- || die "$pkgdir/new.$plist: $!\n";
-
- print NEWPLIST "\@comment \$NetBSD\$\n";
- my ($cat_added, $man_added);
- while (<OLDPLIST>) {
- s|\%\%([^\%]+)\%\%|\${$1}|g;
- next if (/^\@.*ldconfig/);
- if (defined($cat_added) && $cat_added == 0 && /^[d-z]/){
- &add_manual(*NEWPLIST, "cat");
- $cat_added++;
- }
- if (defined($man_added) && $man_added == 0 && /^[n-z]/){
- &add_manual(*NEWPLIST, "man");
- $man_added++;
- }
-
- print NEWPLIST $_;
- }
- if (defined($cat_added) && $cat_added == 0)
- {&add_manual(*NEWPLIST, "cat");}
- if (defined($man_added) && $man_added == 0)
- {&add_manual(*NEWPLIST, "man");}
-
- close(NEWPLIST);
- close(OLDPLIST);
- rename("$pkgdir/new.$plist", "$pkgdir/$plist");
- }
- closedir(PKGDIR);
-}
-
-sub add_NetBSD_ID {
- my ($patch);
- if (open(MD5, "$portsdir/files/md5")
- || open(MD5, "$portsdir/distinfo")) {
- open(NMD5, ">$pkgdir/distinfo")
- || die "$pkgdir/distinfo: $!\n";
- print NMD5 "\$NetBSD\$\n\n";
- while (<MD5>) {
- print NMD5 $_;
- }
- close(NMD5);
- close(MD5);
- }
-
- opendir(PATCHDIR, "$portsdir/patches") ||
- opendir(PATCHDIR, "$portsdir/files") ||
- return 0;
- while ($patch = readdir(PATCHDIR)) {
- if ($patch eq "\." || $patch eq "\.."
- || $patch eq "CVS") {next;}
- if (open(PATCH, "$portsdir/patches/$patch")
- || open(PATCH, "$portsdir/files/$patch")) {
- open(NPATCH, ">$pkgdir/patches/$patch")
- || die "$pkgdir/patches/$patch: $!\n";
- print NPATCH "\$NetBSD\$\n\n";
- while (<PATCH>) {
- if (/(FreeBSD)/i ||
- /(#!.*perl)/) {
- print "WARN: $pkgdir/patches/" .
- "$patch includes \"$1\".\n";
- }
- print NPATCH $_;
- }
- close(NPATCH);
- close(PATCH);
- }
- }
- closedir(PATCHDIR);
-}
diff --git a/pkgtools/prereq-readme/DESCR b/pkgtools/prereq-readme/DESCR
deleted file mode 100644
index 31fd09d59ae..00000000000
--- a/pkgtools/prereq-readme/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-This package provides the tools needed to build the pkgsrc
-README.html files.
diff --git a/pkgtools/prereq-readme/Makefile b/pkgtools/prereq-readme/Makefile
deleted file mode 100644
index 643ded451b8..00000000000
--- a/pkgtools/prereq-readme/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# $NetBSD: Makefile,v 1.6 2007/02/22 19:27:03 wiz Exp $
-#
-
-DISTNAME= prereq-readme-20050521
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= dmcmahill@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/
-COMMENT= Tools required for pkgsrc README.html generation
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-NO_BUILD= yes
-NO_INSTALL= # defined
-NO_PACKAGE= # defined
-
-# list all the tools we use
-USE_TOOLS+= awk
-USE_TOOLS+= cmp
-USE_TOOLS+= echo
-USE_TOOLS+= expr
-USE_TOOLS+= fgrep
-USE_TOOLS+= find
-USE_TOOLS+= grep
-USE_TOOLS+= gzip
-USE_TOOLS+= sed
-USE_TOOLS+= setenv
-USE_TOOLS+= sort
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/prereq-readme/PLIST b/pkgtools/prereq-readme/PLIST
deleted file mode 100644
index 4d8035f5e1e..00000000000
--- a/pkgtools/prereq-readme/PLIST
+++ /dev/null
@@ -1 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2005/05/18 04:48:24 dmcmahill Exp $
diff --git a/pkgtools/rc.subr/DESCR b/pkgtools/rc.subr/DESCR
deleted file mode 100644
index 70f61ba9e88..00000000000
--- a/pkgtools/rc.subr/DESCR
+++ /dev/null
@@ -1,4 +0,0 @@
-Portable implementation of the NetBSD rc.d subsystem.
-
-This package allows you to use rc.subr-style rc scripts (such as
-those included in pkgsrc) on other operating systems.
diff --git a/pkgtools/rc.subr/Makefile b/pkgtools/rc.subr/Makefile
deleted file mode 100644
index 9fe6c96ef92..00000000000
--- a/pkgtools/rc.subr/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile,v 1.14 2006/10/05 08:51:59 rillig Exp $
-#
-
-DISTNAME= rc.subr-20041011
-PKGREVISION= 1
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= grant@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/
-COMMENT= Portable NetBSD rc.subr implementation for pkgsrc
-
-ONLY_FOR_PLATFORM= Darwin-*-* Interix-*-* Linux-*-* SunOS-*-*
-
-NO_BUILD= yes
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-NO_MTREE= yes
-
-CHECK_FILES_SUPPORTED= no
-
-PLIST_SUBST+= RCD_SCRIPTS_DIR=${RCD_SCRIPTS_DIR:S/^\///}
-
-CONF_FILES+= ${PREFIX}etc/rc.conf.example ${PREFIX}etc/rc.conf
-
-INSTALLATION_DIRS= etc
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-do-install:
- ${INSTALL_DATA_DIR} ${RCD_SCRIPTS_DIR}
- ${INSTALL_DATA} ${WRKSRC}/rc.conf.example ${PREFIX}etc/rc.conf.example
- ${INSTALL_DATA} ${WRKSRC}/rc.subr ${PREFIX}etc/rc.subr
- ${INSTALL_SCRIPT} ${WRKSRC}/rc.d/DAEMON ${RCD_SCRIPTS_DIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/rc.d/LOGIN ${RCD_SCRIPTS_DIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/rc.d/NETWORKING ${RCD_SCRIPTS_DIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/rc.d/SERVERS ${RCD_SCRIPTS_DIR}
-
-.include "../../mk/bsd.pkg.mk"
-
-# if you change this, be sure to include a trailing /
-PREFIX:= /
diff --git a/pkgtools/rc.subr/PLIST b/pkgtools/rc.subr/PLIST
deleted file mode 100644
index d441fdaff87..00000000000
--- a/pkgtools/rc.subr/PLIST
+++ /dev/null
@@ -1,8 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2004/08/01 08:56:10 schmonz Exp $
-etc/rc.conf.example
-etc/rc.subr
-${RCD_SCRIPTS_DIR}/DAEMON
-${RCD_SCRIPTS_DIR}/LOGIN
-${RCD_SCRIPTS_DIR}/NETWORKING
-${RCD_SCRIPTS_DIR}/SERVERS
-@unexec ${RMDIR} ${RCD_SCRIPTS_DIR} 2> /dev/null || ${TRUE}
diff --git a/pkgtools/rc.subr/files/rc.conf.example b/pkgtools/rc.subr/files/rc.conf.example
deleted file mode 100644
index 4587a01b501..00000000000
--- a/pkgtools/rc.subr/files/rc.conf.example
+++ /dev/null
@@ -1,8 +0,0 @@
-# $NetBSD: rc.conf.example,v 1.2 2003/06/23 07:02:16 grant Exp $
-#
-# see rc.conf(5) for more information.
-#
-# Use program=YES to enable program, NO to disable it. program_flags are
-# passed to the program on the command line.
-#
-
diff --git a/pkgtools/rc.subr/files/rc.d/DAEMON b/pkgtools/rc.subr/files/rc.d/DAEMON
deleted file mode 100755
index b0dd9150e80..00000000000
--- a/pkgtools/rc.subr/files/rc.d/DAEMON
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DAEMON,v 1.1.1.1 2003/06/19 16:07:12 grant Exp $
-#
-
-# PROVIDE: DAEMON
-# REQUIRE: NETWORKING SERVERS
-
-# This is a dummy dependency, to ensure that general purpose daemons
-# are run _after_ the above are.
diff --git a/pkgtools/rc.subr/files/rc.d/LOGIN b/pkgtools/rc.subr/files/rc.d/LOGIN
deleted file mode 100755
index 7afcefaeea8..00000000000
--- a/pkgtools/rc.subr/files/rc.d/LOGIN
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: LOGIN,v 1.1.1.1 2003/06/19 16:07:12 grant Exp $
-#
-
-# PROVIDE: LOGIN
-# REQUIRE: DAEMON
-
-# This is a dummy dependency to ensure user services such as xdm,
-# inetd, cron and kerberos are started after everything else, incase
-# the administrator has increased the system security level and
-# wants to delay user logins until the system is (almost) fully
-# operational.
diff --git a/pkgtools/rc.subr/files/rc.d/NETWORKING b/pkgtools/rc.subr/files/rc.d/NETWORKING
deleted file mode 100755
index f284e3c217a..00000000000
--- a/pkgtools/rc.subr/files/rc.d/NETWORKING
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: NETWORKING,v 1.1.1.1 2003/06/19 16:07:12 grant Exp $
-#
-
-# PROVIDE: NETWORKING NETWORK
-
-# This is a dummy dependency, for services which require networking
-# to be operational before starting.
diff --git a/pkgtools/rc.subr/files/rc.d/SERVERS b/pkgtools/rc.subr/files/rc.d/SERVERS
deleted file mode 100755
index b202dd95cca..00000000000
--- a/pkgtools/rc.subr/files/rc.d/SERVERS
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: SERVERS,v 1.1.1.1 2003/06/19 16:07:12 grant Exp $
-#
-
-# PROVIDE: SERVERS
-# REQUIRE: mountcritremote
-
-# This is a dummy dependency, for early-start servers relying on
-# some basic configuration.
diff --git a/pkgtools/rc.subr/files/rc.subr b/pkgtools/rc.subr/files/rc.subr
deleted file mode 100644
index 1914c881777..00000000000
--- a/pkgtools/rc.subr/files/rc.subr
+++ /dev/null
@@ -1,956 +0,0 @@
-# $NetBSD: rc.subr,v 1.6 2006/02/17 15:15:56 sketch Exp $
-#
-# Copyright (c) 1997-2002 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Luke Mewburn.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# rc.subr
-# functions used by various rc scripts
-#
-
-# global variables
-# ----------------
-
-_RCCMD_chown="/usr/sbin/chown"
-_RCCMD_chroot="/usr/sbin/chroot"
-_RCCMD_ci="/usr/bin/ci"
-_RCCMD_co="/usr/bin/co"
-_RCCMD_cp="/bin/cp"
-_RCCMD_echo="echo" # use sh builtin
-_RCCMD_kill="/bin/kill"
-_RCCMD_logger="/usr/bin/logger"
-_RCCMD_mount="/sbin/mount"
-_RCCMD_mv="/bin/mv"
-_RCCMD_nice="/usr/bin/nice"
-_RCCMD_ps="/bin/ps"
-_RCCMD_rcs="/usr/bin/rcs"
-_RCCMD_rm="/bin/rm"
-_RCCMD_sh="/bin/sh"
-_RCCMD_su="/usr/bin/su"
-_RCCMD_systrace="/bin/systrace"
-_RCCMD_whoami="/usr/bin/whoami"
-
-_RCARG_psformat="-o pid,command"
-_RCARG_ps="-ax"
-_RCARG_su="-m"
-
-_osname=$(uname -s)
-case $_osname in
- SunOS)
- _RCCMD_chown="/bin/chown"
-# _RCCMD_ci="/usr/bin/ci" # not in Solaris 9
-# _RCCMD_co="/usr/bin/co" # not in Solaris 9
- _RCCMD_echo="/usr/ucb/echo"
-# _RCCMD_systrace="/bin/systrace" # not in Solaris 9
- _RCCMD_whoami="/usr/ucb/whoami"
- _RCARG_psformat="-o pid,comm"
- _RCARG_ps="-ef"
- _RCARG_su=""
- ;;
- Interix)
- bsd_echo () {
- if [ "$1" = "-n" ]; then
- shift; echo "$@\c"
- else
- echo "$@"
- fi
- }
- _RCCMD_chown="/usr/bin/chown"
- _RCCMD_ci="/usr/contrib/bin/ci"
- _RCCMD_co="/usr/contrib/bin/co"
- _RCCMD_echo="bsd_echo"
- _RCCMD_rcs="/usr/contrib/bin/rcs"
- _RCARG_psformat="-wwo pid,comm"
- ;;
- Linux)
- _RCCMD_chown="/bin/chown"
-# _RCCMD_ci="/usr/bin/ci" # not in Slackware 8.1
-# _RCCMD_co="/usr/bin/co" # not in Slackware 8.1
- _RCCMD_nice=$(which nice)
-# _RCCMD_rcs="/usr/bin/rcs" # not in Slackware 8.1
-# _RCCMD_systrace="/bin/systrace" # not in Slackware 8.1
- _RCARG_ps="ax"
- ;;
-esac
-
-#
-# functions
-# ---------
-
-#
-# checkyesno var
-# Test $1 variable, and warn if not set to YES or NO.
-# Return 0 if it's "yes" (et al), nonzero otherwise.
-#
-checkyesno()
-{
- eval _value=\$${1}
- case $_value in
-
- # "yes", "true", "on", or "1"
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
- return 0
- ;;
-
- # "no", "false", "off", or "0"
- [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
- return 1
- ;;
- *)
- warn "\$${1} is not set properly - see rc.conf(5)."
- return 1
- ;;
- esac
-}
-
-# reverse_list list
-# print the list in reverse order
-#
-reverse_list()
-{
- _revlist=
- for _revfile; do
- _revlist="$_revfile $_revlist"
- done
- ${_RCCMD_echo} $_revlist
-}
-
-#
-# mount_critical_filesystems type
-# Go through the list of critical filesystems as provided in
-# the rc.conf(5) variable $critical_filesystems_${type}, checking
-# each one to see if it is mounted, and if it is not, mounting it.
-#
-mount_critical_filesystems()
-{
- eval _fslist=\$critical_filesystems_${1}
- for _fs in $_fslist; do
- ${_RCCMD_mount} | (
- _ismounted=false
- while read what _on on _type type; do
- if [ $on = $_fs ]; then
- _ismounted=true
- fi
- done
- if $_ismounted; then
- :
- else
- ${_RCCMD_mount} $_fs >/dev/null 2>&1
- fi
- )
- done
-}
-
-#
-# check_pidfile pidfile procname [interpreter]
-# Parses the first line of pidfile for a PID, and ensures
-# that the process is running and matches procname.
-# Prints the matching PID upon success, nothing otherwise.
-# interpreter is optional; see _find_processes() for details.
-#
-check_pidfile()
-{
- _pidfile=$1
- _procname=$2
- _interpreter=$3
- if [ -z "$_pidfile" -o -z "$_procname" ]; then
- err 3 'USAGE: check_pidfile pidfile procname [interpreter]'
- fi
- if [ ! -f $_pidfile ]; then
- return
- fi
- read _pid _junk < $_pidfile
- if [ -z "$_pid" ]; then
- return
- fi
- _find_processes $_procname ${_interpreter:-.} '-p '"$_pid"
-}
-
-#
-# check_process procname [interpreter]
-# Ensures that a process (or processes) named procname is running.
-# Prints a list of matching PIDs.
-# interpreter is optional; see _find_processes() for details.
-#
-check_process()
-{
- _procname=$1
- _interpreter=$2
- if [ -z "$_procname" ]; then
- err 3 'USAGE: check_process procname [interpreter]'
- fi
- _find_processes $_procname ${_interpreter:-.} ${_RCARG_ps}
-}
-
-#
-# _find_processes procname interpreter psargs
-# Search for procname in the output of ps generated by psargs.
-# Prints the PIDs of any matching processes, space separated.
-#
-# If interpreter == ".", check the following variations of procname
-# against the first word of each command:
-# procname
-# `basename procname`
-# `basename procname` + ":"
-# "(" + `basename procname` + ")"
-#
-# If interpreter != ".", read the first line of procname, remove the
-# leading #!, normalise whitespace, append procname, and attempt to
-# match that against each command, either as is, or with extra words
-# at the end.
-#
-_find_processes()
-{
- if [ $# -ne 3 ]; then
- err 3 'USAGE: _find_processes procname interpreter psargs'
- fi
- _procname=$1
- _interpreter=$2
- _psargs=$3
-
- _pref=
- if [ $_interpreter != "." ]; then # an interpreted script
- read _interp < $_procname # read interpreter name
- _interp=${_interp#\#!} # strip #!
- set -- $_interp
- if [ $_interpreter != $1 ]; then
- warn "\$command_interpreter $_interpreter != $1"
- fi
- _interp="$* $_procname" # cleanup spaces, add _procname
- _fp_args='_argv'
- _fp_match='case "$_argv" in
- ${_interp}|"${_interp} "*)'
- else # a normal daemon
- _procnamebn=${_procname##*/}
- _fp_args='_arg0 _argv'
- _fp_match='case "$_arg0" in
- $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")'
- fi
-
- _proccheck='
- ${_RCCMD_ps} ${_RCARG_psformat} '"$_psargs"' |
- while read _npid '"$_fp_args"'; do
- case "$_npid" in
- PID)
- continue ;;
- esac ; '"$_fp_match"'
- ${_RCCMD_echo} -n "$_pref$_npid" ;
- _pref=" "
- ;;
- esac
- done'
-
- eval $_proccheck
-}
-
-#
-# wait_for_pids pid [pid ...]
-# spins until none of the pids exist
-#
-wait_for_pids()
-{
- _list="$@"
- if [ -z "$_list" ]; then
- return
- fi
- _prefix=
- while true; do
- _nlist="";
- for _j in $_list; do
- if ${_RCCMD_kill} -0 $_j 2>/dev/null; then
- _nlist="${_nlist}${_nlist:+ }$_j"
- fi
- done
- if [ -z "$_nlist" ]; then
- break
- fi
- _list=$_nlist
- ${_RCCMD_echo} -n ${_prefix:-"Waiting for PIDS: "}$_list
- _prefix=", "
- sleep 2
- done
- if [ -n "$_prefix" ]; then
- ${_RCCMD_echo} "."
- fi
-}
-
-#
-# run_rc_command argument
-# Search for argument in the list of supported commands, which is:
-# "start stop restart rcvar status poll ${extra_commands}"
-# If there's a match, run ${argument}_cmd or the default method
-# (see below).
-#
-# If argument has a given prefix, then change the operation as follows:
-# Prefix Operation
-# ------ ---------
-# fast Skip the pid check, and set rc_fast=yes
-# force Set ${rcvar} to YES, and set rc_force=yes
-#
-# The following globals are used:
-#
-# Name Needed Purpose
-# ---- ------ -------
-# name y Name of script.
-#
-# command n Full path to command.
-# Not needed if ${rc_arg}_cmd is set for
-# each keyword.
-#
-# command_args n Optional args/shell directives for command.
-#
-# command_interpreter n If not empty, command is interpreted, so
-# call check_{pidfile,process}() appropriately.
-#
-# extra_commands n List of extra commands supported.
-#
-# pidfile n If set, use check_pidfile $pidfile $command,
-# otherwise use check_process $command.
-# In either case, only check if $command is set.
-#
-# procname n Process name to check for instead of $command.
-#
-# rcvar n This is checked with checkyesno to determine
-# if the action should be run.
-#
-# ${name}_chroot n Directory to chroot to before running ${command}
-# Requires /usr to be mounted.
-#
-# ${name}_chdir n Directory to cd to before running ${command}
-# (if not using ${name}_chroot).
-#
-# ${name}_flags n Arguments to call ${command} with.
-# NOTE: $flags from the parent environment
-# can be used to override this.
-#
-# ${name}_nice n Nice level to run ${command} at.
-#
-# ${name}_user n User to run ${command} as, using su(1) if not
-# using ${name}_chroot.
-# Requires /usr to be mounted.
-#
-# ${name}_group n Group to run chrooted ${command} as.
-# Requires /usr to be mounted.
-#
-# ${name}_groups n Comma separated list of supplementary groups
-# to run the chrooted ${command} with.
-# Requires /usr to be mounted.
-#
-# ${name}_systrace n Flags passed to systrace(1) if it is used.
-# Setting this variable enables systracing
-# of the given program. The use of "-a" is
-# recommended so that the boot process is not
-# stalled. In order to pass no flags to
-# systrace, set this variable to "--".
-#
-# ${rc_arg}_cmd n If set, use this as the method when invoked;
-# Otherwise, use default command (see below)
-#
-# ${rc_arg}_precmd n If set, run just before performing the
-# ${rc_arg}_cmd method in the default
-# operation (i.e, after checking for required
-# bits and process (non)existence).
-# If this completes with a non-zero exit code,
-# don't run ${rc_arg}_cmd.
-#
-# ${rc_arg}_postcmd n If set, run just after performing the
-# ${rc_arg}_cmd method, if that method
-# returned a zero exit code.
-#
-# required_dirs n If set, check for the existence of the given
-# directories before running the default
-# (re)start command.
-#
-# required_files n If set, check for the readability of the given
-# files before running the default (re)start
-# command.
-#
-# required_vars n If set, perform checkyesno on each of the
-# listed variables before running the default
-# (re)start command.
-#
-# Default behaviour for a given argument, if no override method is
-# provided:
-#
-# Argument Default behaviour
-# -------- -----------------
-# start if !running && checkyesno ${rcvar}
-# ${command}
-#
-# stop if ${pidfile}
-# rc_pid=$(check_pidfile $pidfile $command)
-# else
-# rc_pid=$(check_process $command)
-# kill $sig_stop $rc_pid
-# wait_for_pids $rc_pid
-# ($sig_stop defaults to TERM.)
-#
-# reload Similar to stop, except use $sig_reload instead,
-# and doesn't wait_for_pids.
-# $sig_reload defaults to HUP.
-#
-# restart Run `stop' then `start'.
-#
-# status Show if ${command} is running, etc.
-#
-# poll Wait for ${command} to exit.
-#
-# rcvar Display what rc.conf variable is used (if any).
-#
-# Variables available to methods, and after run_rc_command() has
-# completed:
-#
-# Variable Purpose
-# -------- -------
-# rc_arg Argument to command, after fast/force processing
-# performed
-#
-# rc_flags Flags to start the default command with.
-# Defaults to ${name}_flags, unless overridden
-# by $flags from the environment.
-# This variable may be changed by the precmd method.
-#
-# rc_pid PID of command (if appropriate)
-#
-# rc_fast Not empty if "fast" was provided (q.v.)
-#
-# rc_force Not empty if "force" was provided (q.v.)
-#
-#
-run_rc_command()
-{
- rc_arg=$1
- if [ -z "$name" ]; then
- err 3 'run_rc_command: $name is not set.'
- fi
-
- case "$rc_arg" in
- fast*) # "fast" prefix; don't check pid
- rc_arg=${rc_arg#fast}
- rc_fast=yes
- ;;
- force*) # "force prefix; always start
- rc_arg=${rc_arg#force}
- rc_force=yes
- if [ -n "${rcvar}" ]; then
- eval ${rcvar}=YES
- fi
- ;;
- esac
-
- _keywords="start stop restart rcvar $extra_commands"
- rc_pid=
- _pidcmd=
- _procname=${procname:-${command}}
-
- # setup pid check command if not fast
- if [ -z "$rc_fast" -a -n "$_procname" ]; then
- if [ -n "$pidfile" ]; then
- _pidcmd='rc_pid=$(check_pidfile '"$pidfile $_procname $command_interpreter"')'
- else
- _pidcmd='rc_pid=$(check_process '"$_procname $command_interpreter"')'
- fi
- if [ -n "$_pidcmd" ]; then
- _keywords="${_keywords} status poll"
- fi
- fi
-
- if [ -z "$rc_arg" ]; then
- rc_usage "$_keywords"
- fi
-
- if [ -n "$flags" ]; then # allow override from environment
- rc_flags=$flags
- else
- eval rc_flags=\$${name}_flags
- fi
- eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \
- _nice=\$${name}_nice _user=\$${name}_user \
- _group=\$${name}_group _groups=\$${name}_groups \
- _systrace=\$${name}_systrace
-
- if [ -n "$_user" ]; then # unset $_user if running as that user
- if [ "$_user" = "$($_RCCMD_whoami)" ]; then
- unset _user
- fi
- fi
-
- # if ${rcvar} is set, and $1 is not
- # "rcvar", then run
- # checkyesno ${rcvar}
- # and return if that failed
- #
- if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then
- if ! checkyesno ${rcvar}; then
- return 0
- fi
- fi
-
- eval $_pidcmd # determine the pid if necessary
-
- for _elem in $_keywords; do
- if [ "$_elem" != "$rc_arg" ]; then
- continue
- fi
-
- # if there's a custom ${XXX_cmd},
- # run that instead of the default
- #
- eval _cmd=\$${rc_arg}_cmd _precmd=\$${rc_arg}_precmd \
- _postcmd=\$${rc_arg}_postcmd
- if [ -n "$_cmd" ]; then
- # if the precmd failed and force
- # isn't set, exit
- #
- if ! eval $_precmd && [ -z "$rc_force" ]; then
- return 1
- fi
-
- if ! eval $_cmd && [ -z "$rc_force" ]; then
- return 1
- fi
- eval $_postcmd
- return 0
- fi
-
- case "$rc_arg" in # default operations...
-
- status)
- if [ -n "$rc_pid" ]; then
- ${_RCCMD_echo} \
- "${name} is running as pid $rc_pid."
- else
- ${_RCCMD_echo} "${name} is not running."
- return 1
- fi
- ;;
-
- start)
- if [ -n "$rc_pid" ]; then
- ${_RCCMD_echo} \
- "${name} already running? (pid=$rc_pid)."
- exit 1
- fi
-
- if [ ! -x ${_chroot}${command} ]; then
- return 0
- fi
-
- # check for required variables,
- # directories, and files
- #
- for _f in $required_vars; do
- if ! checkyesno $_f; then
- warn "\$${_f} is not set."
- if [ -z "$rc_force" ]; then
- return 1
- fi
- fi
- done
- for _f in $required_dirs; do
- if [ ! -d "${_f}/." ]; then
- warn "${_f} is not a directory."
- if [ -z "$rc_force" ]; then
- return 1
- fi
- fi
- done
- for _f in $required_files; do
- if [ ! -r "${_f}" ]; then
- warn "${_f} is not readable."
- if [ -z "$rc_force" ]; then
- return 1
- fi
- fi
- done
-
- # if the precmd failed and force
- # isn't set, exit
- #
- if ! eval $_precmd && [ -z "$rc_force" ]; then
- return 1
- fi
-
- # setup the command to run, and run it
- #
- ${_RCCMD_echo} "Starting ${name}."
- if [ -n "$_chroot" ]; then
- if [ "$_osname" = "SunOS" ]; then
- _doit="\
-${_nice:+${_RCCMD_nice} -n $_nice }\
-${_RCCMD_chroot} $_chroot"
- if [ -n "$_user" ]; then
- _doit="\
-$_doit ${_RCCMD_su} ${_RCARG_su} $_user \
--c '${_RCCMD_sh} -c'"
- fi
- _doit="\
-$_doit $command $rc_flags $command_args"
- else
- _doit="\
-${_nice:+${_RCCMD_nice} -n $_nice }\
-${_systrace:+${_RCCMD_systrace} $_systrace }\
-${_RCCMD_chroot} ${_user:+-u $_user }${_group:+-g $_group }\
-${_groups:+-G $_groups } $_chroot $command $rc_flags $command_args"
- fi
- else
- _doit="\
-${_chdir:+cd $_chdir; }\
-${_nice:+${_RCCMD_nice} -n $_nice }\
-${_systrace:+${_RCCMD_systrace} $_systrace }\
-$command $rc_flags $command_args"
- if [ -n "$_user" ]; then
- _doit="${_RCCMD_su} ${_RCARG_su} $_user \
- -c '${_RCCMD_sh} -c \"$_doit\"'"
- fi
- fi
-
- # if the cmd failed and force
- # isn't set, exit
- #
- if ! eval $_doit && [ -z "$rc_force" ]; then
- return 1
- fi
-
- # finally, run postcmd
- #
- eval $_postcmd
- ;;
-
- stop)
- if [ -z "$rc_pid" ]; then
- if [ -n "$pidfile" ]; then
- ${_RCCMD_echo} \
- "${name} not running? (check $pidfile)."
- else
- ${_RCCMD_echo} "${name} not running?"
- fi
- exit 1
- fi
-
- # if the precmd failed and force
- # isn't set, exit
- #
- if ! eval $_precmd && [ -z "$rc_force" ]; then
- return 1
- fi
-
- # send the signal to stop
- #
- ${_RCCMD_echo} "Stopping ${name}."
- _doit="${_RCCMD_kill} -${sig_stop:-TERM} $rc_pid"
- if [ -n "$_user" ]; then
- _doit="${_RCCMD_su} ${_RCARG_su} $_user \
- -c '${_RCCMD_sh} -c \"$_doit\"'"
- fi
-
- # if the stop cmd failed and force
- # isn't set, exit
- #
- if ! eval $_doit && [ -z "$rc_force" ]; then
- return 1
- fi
-
- # wait for the command to exit,
- # and run postcmd.
- wait_for_pids $rc_pid
- eval $_postcmd
- ;;
-
- reload)
- if [ -z "$rc_pid" ]; then
- if [ -n "$pidfile" ]; then
- ${_RCCMD_echo} \
- "${name} not running? (check $pidfile)."
- else
- ${_RCCMD_echo} "${name} not running?"
- fi
- exit 1
- fi
- ${_RCCMD_echo} "Reloading ${name} config files."
- if ! eval $_precmd && [ -z "$rc_force" ]; then
- return 1
- fi
- _doit="${_RCCMD_kill} -${sig_reload:-HUP} $rc_pid"
- if [ -n "$_user" ]; then
- _doit="${_RCCMD_su} ${_RCARG_su} $_user -c '${_RCCMD_sh} -c \"$_doit\"'"
- fi
- if ! eval $_doit && [ -z "$rc_force" ]; then
- return 1
- fi
- eval $_postcmd
- ;;
-
- restart)
- if ! eval $_precmd && [ -z "$rc_force" ]; then
- return 1
- fi
- # prevent restart being called more
- # than once by any given script
- #
- if ${_rc_restart_done:-false}; then
- return 0
- fi
- _rc_restart_done=true
-
- ( $0 ${rc_force:+force}stop )
- $0 ${rc_force:+force}start
-
- eval $_postcmd
- ;;
-
- poll)
- if [ -n "$rc_pid" ]; then
- wait_for_pids $rc_pid
- fi
- ;;
-
- rcvar)
- ${_RCCMD_echo} "# $name"
- if [ -n "$rcvar" ]; then
- if checkyesno ${rcvar}; then
- ${_RCCMD_echo} "\$${rcvar}=YES"
- else
- ${_RCCMD_echo} "\$${rcvar}=NO"
- fi
- fi
- ;;
-
- *)
- rc_usage "$_keywords"
- ;;
-
- esac
- return 0
- done
-
- ${_RCCMD_echo} 1>&2 "$0: unknown directive '$rc_arg'."
- rc_usage "$_keywords"
- exit 1
-}
-
-#
-# run_rc_script file arg
-# Start the script `file' with `arg', and correctly handle the
-# return value from the script. If `file' ends with `.sh', it's
-# sourced into the current environment. If `file' appears to be
-# a backup or scratch file, ignore it. Otherwise if it's
-# executable run as a child process.
-#
-run_rc_script()
-{
- _file=$1
- _arg=$2
- if [ -z "$_file" -o -z "$_arg" ]; then
- err 3 'USAGE: run_rc_script file arg'
- fi
-
- unset name command command_args command_interpreter \
- extra_commands pidfile procname \
- rcvar required_dirs required_files required_vars
- eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd
-
- case "$_file" in
- *.sh) # run in current shell
- set $_arg ; . $_file
- ;;
- *[~#]|*.OLD|*.orig) # scratch file; skip
- warn "Ignoring scratch file $_file"
- ;;
- *) # run in subshell
- if [ -x $_file ]; then
- if [ -n "$rc_fast_and_loose" ]; then
- set $_arg ; . $_file
- else
- ( set $_arg ; . $_file )
- fi
- fi
- ;;
- esac
-}
-
-#
-# load_rc_config
-# Source in the configuration file for a given command.
-#
-load_rc_config()
-{
- _command=$1
- if [ -z "$_command" ]; then
- err 3 'USAGE: load_rc_config command'
- fi
-
- if ${_rc_conf_loaded:-false}; then
- :
- else
- . /etc/rc.conf
- _rc_conf_loaded=true
- fi
- if [ -f /etc/rc.conf.d/"$_command" ]; then
- . /etc/rc.conf.d/"$_command"
- fi
-}
-
-
-#
-# rc_usage commands
-# Print a usage string for $0, with `commands' being a list of
-# valid commands.
-#
-rc_usage()
-{
- ${_RCCMD_echo} -n 1>&2 "Usage: $0 [fast|force]("
-
- _sep=
- for _elem; do
- ${_RCCMD_echo} -n 1>&2 "$_sep$_elem"
- _sep="|"
- done
- ${_RCCMD_echo} 1>&2 ")"
- exit 1
-}
-
-#
-# err exitval message
-# Display message to stderr and log to the syslog, and exit with exitval.
-#
-err()
-{
- exitval=$1
- shift
-
- if [ -x ${_RCCMD_logger} ]; then
- ${_RCCMD_logger} "$0: ERROR: $*"
- fi
- ${_RCCMD_echo} 1>&2 "$0: ERROR: $*"
- exit $exitval
-}
-
-#
-# warn message
-# Display message to stderr and log to the syslog.
-#
-warn()
-{
- if [ -x ${_RCCMD_logger} ]; then
- ${_RCCMD_logger} "$0: WARNING: $*"
- fi
- ${_RCCMD_echo} 1>&2 "$0: WARNING: $*"
-}
-
-#
-# backup_file action file cur backup
-# Make a backup copy of `file' into `cur', and save the previous
-# version of `cur' as `backup' or use rcs for archiving.
-#
-# This routine checks the value of the backup_uses_rcs variable,
-# which can be either YES or NO.
-#
-# The `action' keyword can be one of the following:
-#
-# add `file' is now being backed up (and is possibly
-# being reentered into the backups system). `cur'
-# is created and RCS files, if necessary, are
-# created as well.
-#
-# update `file' has changed and needs to be backed up.
-# If `cur' exists, it is copied to to `back' or
-# checked into RCS (if the repository file is old),
-# and then `file' is copied to `cur'. Another RCS
-# check in done here if RCS is being used.
-#
-# remove `file' is no longer being tracked by the backups
-# system. If RCS is not being used, `cur' is moved
-# to `back', otherwise an empty file is checked in,
-# and then `cur' is removed.
-#
-#
-backup_file()
-{
- _action=$1
- _file=$2
- _cur=$3
- _back=$4
-
- if checkyesno backup_uses_rcs; then
- _msg0="backup archive"
- _msg1="update"
-
- # ensure that history file is not locked
- if [ -f $_cur,v ]; then
- ${_RCCMD_rcs} -q -u -U -M $_cur
- fi
-
- # ensure after switching to rcs that the
- # current backup is not lost
- if [ -f $_cur ]; then
- # no archive, or current newer than archive
- if [ ! -f $_cur,v -o $_cur -nt $_cur,v ]; then
- ${_RCCMD_ci} -q -f -u -t-"$_msg0" \
- -m"$_msg1" $_cur
- ${_RCCMD_rcs} -q -kb -U $_cur
- ${_RCCMD_co} -q -f -u $_cur
- fi
- fi
-
- case $_action in
- add|update)
- ${_RCCMD_cp} -p $_file $_cur
- ${_RCCMD_ci} -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
- ${_RCCMD_rcs} -q -kb -U $_cur
- ${_RCCMD_co} -q -f -u $_cur
- ${_RCCMD_chown} root:wheel $_cur $_cur,v
- ;;
- remove)
- ${_RCCMD_cp} /dev/null $_cur
- ${_RCCMD_ci} -q -f -u -t-"$_msg0" -m"$_msg1" $_cur
- ${_RCCMD_rcs} -q -kb -U $_cur
- ${_RCCMD_chown} root:wheel $_cur $_cur,v
- ${_RCCMD_rm} $_cur
- ;;
- esac
- else
- case $_action in
- add|update)
- if [ -f $_cur ]; then
- ${_RCCMD_cp} -p $_cur $_back
- fi
- ${_RCCMD_cp} -p $_file $_cur
- ${_RCCMD_chown} root:wheel $_cur
- ;;
- remove)
- ${_RCCMD_mv} -f $_cur $_back
- ;;
- esac
- fi
-}
diff --git a/pkgtools/rcorder/DESCR b/pkgtools/rcorder/DESCR
deleted file mode 100644
index f9c5bcf9b3b..00000000000
--- a/pkgtools/rcorder/DESCR
+++ /dev/null
@@ -1,4 +0,0 @@
-rcorder is designed to print out a dependency ordering of a set of
-interdependent files. Typically it is used to find an execution
-sequence for a set of shell scripts in which certain files must be
-executed before others (such as rc.d startup and shutdown scripts).
diff --git a/pkgtools/rcorder/Makefile b/pkgtools/rcorder/Makefile
deleted file mode 100644
index 5253029eb34..00000000000
--- a/pkgtools/rcorder/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# $NetBSD: Makefile,v 1.8 2005/09/28 14:31:08 rillig Exp $
-#
-
-DISTNAME= rcorder-20031013
-CATEGORIES= pkgtools sysutils
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= schmonz@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/
-COMMENT= Print a dependency ordering of interdependent files
-
-NO_CHECKSUM= yes
-GNU_CONFIGURE= yes
-
-.include "../../mk/bsd.prefs.mk"
-
-.if defined(LIBNBCOMPAT_STYLE) && (${LIBNBCOMPAT_STYLE} == "inplace")
-. include "../../pkgtools/libnbcompat/inplace.mk"
-.else
-. include "../../pkgtools/libnbcompat/buildlink3.mk"
-.endif
-
-do-extract:
- @${CP} -R ${FILESDIR} ${WRKSRC}
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/rcorder/PLIST b/pkgtools/rcorder/PLIST
deleted file mode 100644
index 59a61ee5456..00000000000
--- a/pkgtools/rcorder/PLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/08/27 01:49:15 schmonz Exp $
-sbin/rcorder
-man/cat8/rcorder.0
-man/man8/rcorder.8
diff --git a/pkgtools/rcorder/files/Makefile.in b/pkgtools/rcorder/files/Makefile.in
deleted file mode 100644
index a8349b239bb..00000000000
--- a/pkgtools/rcorder/files/Makefile.in
+++ /dev/null
@@ -1,150 +0,0 @@
-# $Id: Makefile.in,v 1.1 2004/08/27 03:06:07 jlam Exp $
-
-@SET_MAKE@
-SHELL = @SHELL@
-VPATH=@srcdir@
-
-PACKAGE_NAME= @PACKAGE_NAME@
-PACKAGE_VERSION= @PACKAGE_VERSION@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-mandir = @mandir@
-sbindir = @sbindir@
-top_builddir = .
-
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-mkinstalldirs = $(SHELL) $(srcdir)/mkinstalldirs
-install_sh = $(SHELL) $(srcdir)/install-sh
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
-host_alias = @host_alias@
-host_triplet = @host@
-CANONICAL_HOST = @CANONICAL_HOST@
-
-CC = @CC@
-CCLD = $(CC)
-LIBS = @LIBS@
-CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@ -I. -I@srcdir@ -DHOST=\"$(CANONICAL_HOST)\" -DVERSION=\"$(PACKAGE_VERSION)\"
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-
-LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
-COMPILE = $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)
-
-SRCS = ealloc.c hash.c rcorder.c
-OBJS = ealloc.o hash.o rcorder.o
-
-DISTFILES = $(SRCS) AUTHORS COPYING INSTALL Makefile.in NEWS README aclocal.m4 \
-config.guess config.h.in config.sub configure configure.ac install-sh \
-missing mkinstalldirs regress.sh
-
-.c.o:
- $(COMPILE) -c $< -o $@
-
-all: rcorder
-
-rcorder: $(OBJS)
- $(LINK) $(OBJS) $(LIBS)
-
-check: rcorder
- @SHELL@ $(srcdir)/regress.sh
-
-clean:
- rm -f *.o rcorder
-
-distclean: clean
- rm -f Makefile config.h
- rm -f config.status config.cache config.log configure.lineno
-
-maintainer-clean: distclean
- rm -f configure config.h.in
-
-install: rcorder
- $(mkinstalldirs) $(DESTDIR)$(sbindir)
- @f=`echo rcorder|sed '$(transform)'`; \
- echo "$(INSTALL_PROGRAM) rcorder $(DESTDIR)$(sbindir)/$$f"; \
- $(INSTALL_PROGRAM) rcorder $(DESTDIR)$(sbindir)/$$f
- $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
- @f=`echo rcorder.8|sed '$(transform)'`; \
- echo "$(INSTALL_DATA) rcorder.8 $(DESTDIR)$(mandir)/man8/$$f"; \
- $(INSTALL_DATA) rcorder.8 $(DESTDIR)$(mandir)/man8/$$f
- $(mkinstalldirs) $(DESTDIR)$(mandir)/cat8
- @f=`echo rcorder.cat8|sed '$(transform);s,\.cat8$$,.0,'`; \
- echo "$(INSTALL_DATA) rcorder.cat8 $(DESTDIR)$(mandir)/cat8/$$f"; \
- $(INSTALL_DATA) rcorder.cat8 $(DESTDIR)$(mandir)/cat8/$$f
-
-uninstall:
- @f=`echo rcorder|sed '$(transform)'`; \
- echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \
- rm -f $(DESTDIR)$(sbindir)/$$f
-
-GZIP_ENV= --best
-TAR= tar
-distdir= $(PACKAGE_NAME)-$(PACKAGE_VERSION)
-
-distdir: $(DISTFILES)
- -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
- mkdir $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
- fi; \
- if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
-
-dist: distdir
- $(TAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
-
-distcheck: dist
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(TAR) xf -
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- chmod a-w $(distdir)
- dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
- && cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) \
- && $(MAKE) check \
- && $(MAKE) install \
- && $(MAKE) uninstall \
- && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
- || (echo "Error: files left after uninstall" 1>&2; \
- exit 1) ) \
- && $(MAKE) dist \
- && $(MAKE) distclean \
- && rm -f $(distdir).tar.gz \
- && (test `find . -type f -print | wc -l` -eq 0 \
- || (echo "Error: files left after distclean" 1>&2; \
- exit 1) )
- -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
- @echo "$(distdir).tar.gz is ready for distribution" | \
- sed 'h;s/./=/g;p;x;p;x'
diff --git a/pkgtools/rcorder/files/config.guess b/pkgtools/rcorder/files/config.guess
deleted file mode 100755
index 0f0fe712ae6..00000000000
--- a/pkgtools/rcorder/files/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /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 Free Software Foundation,
-# Inc.
-
-timestamp='2007-03-06'
-
-# 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted 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.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-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
-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' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# 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" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { 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 __ELF__ >/dev/null
- 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 ;;
- 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:SunOS:5.*:*)
- echo i386-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:*:[45])
- 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 __LP64__ >/dev/null
- 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*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-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 ;;
- 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 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- 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 ;;
- 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:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- 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 ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-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 ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa:Linux:*:*)
- echo xtensa-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*)
- 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 i386.
- echo i386-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; } ;;
- 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.0*:*)
- 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 ;;
- 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
- 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 ;;
- 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 ;;
-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://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-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/pkgtools/rcorder/files/config.h.in b/pkgtools/rcorder/files/config.h.in
deleted file mode 100644
index b87bf231bcd..00000000000
--- a/pkgtools/rcorder/files/config.h.in
+++ /dev/null
@@ -1,64 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `util' library (-lutil). */
-#undef HAVE_LIBUTIL
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_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 <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 <sys/cdefs.h> header file. */
-#undef HAVE_SYS_CDEFS_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/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* 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 version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
diff --git a/pkgtools/rcorder/files/config.sub b/pkgtools/rcorder/files/config.sub
deleted file mode 100755
index 5defff65a6e..00000000000
--- a/pkgtools/rcorder/files/config.sub
+++ /dev/null
@@ -1,1622 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-01-18'
-
-# 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 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.
-
-# 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
-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-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-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)
- os=
- basic_machine=$1
- ;;
- -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 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | 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 | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # 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-* | c54x-* | c55x-* | c6x-* \
- | 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-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | 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-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | 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-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # 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
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- 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
- ;;
- cr16c)
- basic_machine=cr16c-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
- ;;
- 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
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- 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
- ;;
- 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[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.
- -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* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -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* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -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*)
- # 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
- ;;
- -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
- ;;
- # 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
- ;;
- -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/pkgtools/rcorder/files/configure b/pkgtools/rcorder/files/configure
deleted file mode 100755
index d9c3314c5f8..00000000000
--- a/pkgtools/rcorder/files/configure
+++ /dev/null
@@ -1,4629 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for nbsed 20031013.
-#
-# Report bugs to <agc@NetBSD.org>.
-#
-# Copyright (C) 2003 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 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='nbsed'
-PACKAGE_TARNAME='nbsed'
-PACKAGE_VERSION='20031013'
-PACKAGE_STRING='nbsed 20031013'
-PACKAGE_BUGREPORT='agc@NetBSD.org'
-
-ac_unique_file="rcorder.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#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"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CANONICAL_HOST SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AUTOCONF AUTOHEADER CPP EGREP LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# 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.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-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
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -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 | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$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 ;;
-
- -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 ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- 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 ;;
-
- -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=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 ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- 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'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-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
- 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
-
-
-# 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 its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- 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
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# 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 nbsed 20031013 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 \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-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]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --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]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_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]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of nbsed 20031013:";;
- esac
- cat <<\_ACEOF
-
-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>
- CPPFLAGS 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 <agc@NetBSD.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style 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
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-nbsed configure 20031013
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by nbsed $as_me 20031013, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-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`
-hostinfo = `(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=.
- echo "PATH: $as_dir"
-done
-
-} >&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_sep=
-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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$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
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >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
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- 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.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-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 `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-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
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`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.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-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_config_headers="$ac_config_headers config.h"
-
-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 $. echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-CANONICAL_HOST=$host
-
-
-# Checks for programs.
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-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
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- 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
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; 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 | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$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
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 -std1 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 -std1. */
-int osf4_cc_array ['\x00' == 0 ? 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
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-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
-
-# 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.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- 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
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-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. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$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'
-
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-
-
-
-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
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
- echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-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
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.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))
- exit(2);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-for ac_header in err.h stdio.h stdlib.h string.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to agc@NetBSD.org ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-for ac_header in sys/cdefs.h sys/stat.h sys/types.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to agc@NetBSD.org ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-echo "$as_me:$LINENO: checking for fparseln in -lutil" >&5
-echo $ECHO_N "checking for fparseln in -lutil... $ECHO_C" >&6
-if test "${ac_cv_lib_util_fparseln+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lutil $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char fparseln ();
-int
-main ()
-{
-fparseln ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_util_fparseln=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_util_fparseln=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_util_fparseln" >&5
-echo "${ECHO_T}$ac_cv_lib_util_fparseln" >&6
-if test $ac_cv_lib_util_fparseln = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUTIL 1
-_ACEOF
-
- LIBS="-lutil $LIBS"
-
-fi
-
-
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* 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 x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* 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";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 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;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-
- ac_config_files="$ac_config_files 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, don't put newlines in cache variables' values.
-# 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.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *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 \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!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" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- 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}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $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}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# 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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_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 $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; 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
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); 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 sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# 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'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by nbsed $as_me 20031013, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet 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
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-nbsed config.status 20031013
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-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=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- 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
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- 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
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@CANONICAL_HOST@,$CANONICAL_HOST,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # 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. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #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.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # 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. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# 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 || { (exit 1); exit 1; }
-fi
-
diff --git a/pkgtools/rcorder/files/configure.ac b/pkgtools/rcorder/files/configure.ac
deleted file mode 100644
index 6e87bb3f22b..00000000000
--- a/pkgtools/rcorder/files/configure.ac
+++ /dev/null
@@ -1,36 +0,0 @@
-dnl $NetBSD: configure.ac,v 1.1 2004/08/27 03:06:07 jlam Exp $
-dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.57)
-AC_INIT([nbsed],[20031013],[agc@NetBSD.org])
-AC_CONFIG_SRCDIR([rcorder.c])
-AC_CONFIG_HEADER(config.h)
-AC_ARG_PROGRAM
-
-AC_CANONICAL_HOST
-CANONICAL_HOST=$host
-AC_SUBST(CANONICAL_HOST)
-
-# Checks for programs.
-AC_PROG_MAKE_SET
-AC_PROG_CC
-AC_PROG_INSTALL
-
-AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
-AC_SUBST(AUTOCONF)
-AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
-AC_SUBST(AUTOHEADER)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([err.h stdio.h stdlib.h string.h unistd.h])
-AC_CHECK_HEADERS([sys/cdefs.h sys/stat.h sys/types.h])
-
-dnl Checks for libraries.
-AC_CHECK_LIB(util, fparseln)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/pkgtools/rcorder/files/ealloc.c b/pkgtools/rcorder/files/ealloc.c
deleted file mode 100644
index dbd0ca8c2a1..00000000000
--- a/pkgtools/rcorder/files/ealloc.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/* $NetBSD: ealloc.c,v 1.2 2004/08/27 03:06:07 jlam Exp $ */
-
-/*
- * Copyright (c) 1988, 1989, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Adam de Boor.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1989 by Berkeley Softworks
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Adam de Boor.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-__RCSID("$NetBSD: ealloc.c,v 1.2 2004/08/27 03:06:07 jlam Exp $");
-#endif /* not lint */
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-
-#include "ealloc.h"
-
-static void enomem(void);
-
-/*
- * enomem --
- * die when out of memory.
- */
-static void
-enomem(void)
-{
-
- errx(2, "Cannot allocate memory.");
-}
-
-/*
- * emalloc --
- * malloc, but die on error.
- */
-void *
-emalloc(size_t len)
-{
- void *p;
-
- if ((p = malloc(len)) == NULL)
- enomem();
- return(p);
-}
-
-/*
- * estrdup --
- * strdup, but die on error.
- */
-char *
-estrdup(const char *str)
-{
- char *p;
-
- if ((p = strdup(str)) == NULL)
- enomem();
- return(p);
-}
-
-/*
- * erealloc --
- * realloc, but die on error.
- */
-void *
-erealloc(void *ptr, size_t size)
-{
-
- if ((ptr = realloc(ptr, size)) == NULL)
- enomem();
- return(ptr);
-}
-
-/*
- * ecalloc --
- * calloc, but die on error.
- */
-void *
-ecalloc(size_t nmemb, size_t size)
-{
- void *ptr;
-
- if ((ptr = calloc(nmemb, size)) == NULL)
- enomem();
- return(ptr);
-}
diff --git a/pkgtools/rcorder/files/ealloc.h b/pkgtools/rcorder/files/ealloc.h
deleted file mode 100644
index 7dee832fb47..00000000000
--- a/pkgtools/rcorder/files/ealloc.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* $NetBSD: ealloc.h,v 1.1.1.1 2004/08/27 01:49:16 schmonz Exp $ */
-
-void *emalloc(size_t);
-char *estrdup(const char *);
-void *erealloc(void *, size_t);
-void *ecalloc(size_t, size_t);
diff --git a/pkgtools/rcorder/files/hash.c b/pkgtools/rcorder/files/hash.c
deleted file mode 100644
index 06a73a41d27..00000000000
--- a/pkgtools/rcorder/files/hash.c
+++ /dev/null
@@ -1,481 +0,0 @@
-/* $NetBSD: hash.c,v 1.2 2004/08/27 03:06:07 jlam Exp $ */
-
-/*
- * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Adam de Boor.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1988, 1989 by Adam de Boor
- * Copyright (c) 1989 by Berkeley Softworks
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Adam de Boor.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: hash.c,v 1.2 2004/08/27 03:06:07 jlam Exp $";
-#else
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)hash.c 8.1 (Berkeley) 6/6/93";
-#else
-__RCSID("$NetBSD: hash.c,v 1.2 2004/08/27 03:06:07 jlam Exp $");
-#endif
-#endif /* not lint */
-#endif
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* hash.c --
- *
- * This module contains routines to manipulate a hash table.
- * See hash.h for a definition of the structure of the hash
- * table. Hash tables grow automatically as the amount of
- * information increases.
- */
-#include "hash.h"
-#include "ealloc.h"
-
-/*
- * Forward references to local procedures that are used before they're
- * defined:
- */
-
-static void RebuildTable(Hash_Table *);
-
-/*
- * The following defines the ratio of # entries to # buckets
- * at which we rebuild the table to make it larger.
- */
-
-#define rebuildLimit 8
-
-/*
- *---------------------------------------------------------
- *
- * Hash_InitTable --
- *
- * This routine just sets up the hash table.
- *
- * Input:
- * t Structure to use to hold table.
- * numBuckets How many buckets to create for starters. This number
- * is rounded up to a power of two. If <= 0, a reasonable
- * default is chosen. The table will grow in size later
- * as needed.
- *
- * Results:
- * None.
- *
- * Side Effects:
- * Memory is allocated for the initial bucket area.
- *
- *---------------------------------------------------------
- */
-
-void
-Hash_InitTable(Hash_Table *t, int numBuckets)
-{
- int i;
- struct Hash_Entry **hp;
-
- /*
- * Round up the size to a power of two.
- */
- if (numBuckets <= 0)
- i = 16;
- else {
- for (i = 2; i < numBuckets; i <<= 1)
- continue;
- }
- t->numEntries = 0;
- t->size = i;
- t->mask = i - 1;
- t->bucketPtr = hp = (struct Hash_Entry **)emalloc(sizeof(*hp) * i);
- while (--i >= 0)
- *hp++ = NULL;
-}
-
-/*
- *---------------------------------------------------------
- *
- * Hash_DeleteTable --
- *
- * This routine removes everything from a hash table
- * and frees up the memory space it occupied (except for
- * the space in the Hash_Table structure).
- *
- * Results:
- * None.
- *
- * Side Effects:
- * Lots of memory is freed up.
- *
- *---------------------------------------------------------
- */
-
-void
-Hash_DeleteTable(Hash_Table *t)
-{
- struct Hash_Entry **hp, *h, *nexth;
- int i;
-
- nexth = NULL;
- for (hp = t->bucketPtr, i = t->size; --i >= 0;) {
- for (h = *hp++; h != NULL; h = nexth) {
- nexth = h->next;
- free((char *)h);
- }
- }
- free((char *)t->bucketPtr);
-
- /*
- * Set up the hash table to cause memory faults on any future access
- * attempts until re-initialization.
- */
- t->bucketPtr = NULL;
-}
-
-/*
- *---------------------------------------------------------
- *
- * Hash_FindEntry --
- *
- * Searches a hash table for an entry corresponding to key.
- *
- * Input:
- * t Hash table to search.
- * key A hash key.
- *
- * Results:
- * The return value is a pointer to the entry for key,
- * if key was present in the table. If key was not
- * present, NULL is returned.
- *
- * Side Effects:
- * None.
- *
- *---------------------------------------------------------
- */
-
-Hash_Entry *
-Hash_FindEntry(Hash_Table *t, char *key)
-{
- Hash_Entry *e;
- unsigned h;
- char *p;
-
- for (h = 0, p = key; *p;)
- h = (h << 5) - h + *p++;
- p = key;
- for (e = t->bucketPtr[h & t->mask]; e != NULL; e = e->next)
- if (e->namehash == h && strcmp(e->name, p) == 0)
- return (e);
- return (NULL);
-}
-
-/*
- *---------------------------------------------------------
- *
- * Hash_CreateEntry --
- *
- * Searches a hash table for an entry corresponding to
- * key. If no entry is found, then one is created.
- *
- * Input:
- * t Hash table to search.
- * key A hash key.
- * newPtr Filled in with 1 if new entry created, 0 otherwise.
- *
- * Results:
- * The return value is a pointer to the entry. If *newPtr
- * isn't NULL, then *newPtr is filled in with TRUE if a
- * new entry was created, and FALSE if an entry already existed
- * with the given key.
- *
- * Side Effects:
- * Memory may be allocated, and the hash buckets may be modified.
- *---------------------------------------------------------
- */
-
-Hash_Entry *
-Hash_CreateEntry(Hash_Table *t, char *key, int *newPtr)
-{
- Hash_Entry *e;
- unsigned h;
- char *p;
- int keylen;
- struct Hash_Entry **hp;
-
- /*
- * Hash the key. As a side effect, save the length (strlen) of the
- * key in case we need to create the entry.
- */
- for (h = 0, p = key; *p;)
- h = (h << 5) - h + *p++;
- keylen = p - key;
- p = key;
- for (e = t->bucketPtr[h & t->mask]; e != NULL; e = e->next) {
- if (e->namehash == h && strcmp(e->name, p) == 0) {
- if (newPtr != NULL)
- *newPtr = 0;
- return (e);
- }
- }
-
- /*
- * The desired entry isn't there. Before allocating a new entry,
- * expand the table if necessary (and this changes the resulting
- * bucket chain).
- */
- if (t->numEntries >= rebuildLimit * t->size)
- RebuildTable(t);
- e = (Hash_Entry *) emalloc(sizeof(*e) + keylen);
- hp = &t->bucketPtr[h & t->mask];
- e->next = *hp;
- *hp = e;
- e->clientData = NULL;
- e->namehash = h;
- (void) strcpy(e->name, p);
- t->numEntries++;
-
- if (newPtr != NULL)
- *newPtr = 1;
- return (e);
-}
-
-/*
- *---------------------------------------------------------
- *
- * Hash_DeleteEntry --
- *
- * Delete the given hash table entry and free memory associated with
- * it.
- *
- * Results:
- * None.
- *
- * Side Effects:
- * Hash chain that entry lives in is modified and memory is freed.
- *
- *---------------------------------------------------------
- */
-
-void
-Hash_DeleteEntry(Hash_Table *t, Hash_Entry *e)
-{
- Hash_Entry **hp, *p;
-
- if (e == NULL)
- return;
- for (hp = &t->bucketPtr[e->namehash & t->mask];
- (p = *hp) != NULL; hp = &p->next) {
- if (p == e) {
- *hp = p->next;
- free((char *)p);
- t->numEntries--;
- return;
- }
- }
- (void)write(2, "bad call to Hash_DeleteEntry\n", 29);
- abort();
-}
-
-/*
- *---------------------------------------------------------
- *
- * Hash_EnumFirst --
- * This procedure sets things up for a complete search
- * of all entries recorded in the hash table.
- *
- * Input:
- * t Table to be searched.
- * searchPtr Area in which to keep state about search.
- *
- * Results:
- * The return value is the address of the first entry in
- * the hash table, or NULL if the table is empty.
- *
- * Side Effects:
- * The information in searchPtr is initialized so that successive
- * calls to Hash_Next will return successive HashEntry's
- * from the table.
- *
- *---------------------------------------------------------
- */
-
-Hash_Entry *
-Hash_EnumFirst(Hash_Table *t, Hash_Search *searchPtr)
-{
-
- searchPtr->tablePtr = t;
- searchPtr->nextIndex = 0;
- searchPtr->hashEntryPtr = NULL;
- return Hash_EnumNext(searchPtr);
-}
-
-/*
- *---------------------------------------------------------
- *
- * Hash_EnumNext --
- * This procedure returns successive entries in the hash table.
- *
- * Results:
- * The return value is a pointer to the next HashEntry
- * in the table, or NULL when the end of the table is
- * reached.
- *
- * Side Effects:
- * The information in searchPtr is modified to advance to the
- * next entry.
- *
- *---------------------------------------------------------
- */
-
-Hash_Entry *
-Hash_EnumNext(Hash_Search *searchPtr)
-{
- Hash_Entry *e;
- Hash_Table *t = searchPtr->tablePtr;
-
- /*
- * The hashEntryPtr field points to the most recently returned
- * entry, or is nil if we are starting up. If not nil, we have
- * to start at the next one in the chain.
- */
- e = searchPtr->hashEntryPtr;
- if (e != NULL)
- e = e->next;
- /*
- * If the chain ran out, or if we are starting up, we need to
- * find the next nonempty chain.
- */
- while (e == NULL) {
- if (searchPtr->nextIndex >= t->size)
- return (NULL);
- e = t->bucketPtr[searchPtr->nextIndex++];
- }
- searchPtr->hashEntryPtr = e;
- return (e);
-}
-
-/*
- *---------------------------------------------------------
- *
- * RebuildTable --
- * This local routine makes a new hash table that
- * is larger than the old one.
- *
- * Results:
- * None.
- *
- * Side Effects:
- * The entire hash table is moved, so any bucket numbers
- * from the old table are invalid.
- *
- *---------------------------------------------------------
- */
-
-static void
-RebuildTable(Hash_Table *t)
-{
- Hash_Entry *e, *next, **hp, **xp;
- int i, mask;
- Hash_Entry **oldhp;
- int oldsize;
-
- next = NULL;
- oldhp = t->bucketPtr;
- oldsize = i = t->size;
- i <<= 1;
- t->size = i;
- t->mask = mask = i - 1;
- t->bucketPtr = hp = (struct Hash_Entry **) emalloc(sizeof(*hp) * i);
- while (--i >= 0)
- *hp++ = NULL;
- for (hp = oldhp, i = oldsize; --i >= 0;) {
- for (e = *hp++; e != NULL; e = next) {
- next = e->next;
- xp = &t->bucketPtr[e->namehash & mask];
- e->next = *xp;
- *xp = e;
- }
- }
- free((char *)oldhp);
-}
diff --git a/pkgtools/rcorder/files/hash.h b/pkgtools/rcorder/files/hash.h
deleted file mode 100644
index 99bf669211d..00000000000
--- a/pkgtools/rcorder/files/hash.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* $NetBSD: hash.h,v 1.1.1.1 2004/08/27 01:49:16 schmonz Exp $ */
-
-/*
- * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Adam de Boor.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)hash.h 8.1 (Berkeley) 6/6/93
- */
-
-/*
- * Copyright (c) 1988, 1989 by Adam de Boor
- * Copyright (c) 1989 by Berkeley Softworks
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Adam de Boor.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)hash.h 8.1 (Berkeley) 6/6/93
- */
-
-/* hash.h --
- *
- * This file contains definitions used by the hash module,
- * which maintains hash tables.
- */
-
-#ifndef _HASH
-#define _HASH
-
-/*
- * The following defines one entry in the hash table.
- */
-
-typedef struct Hash_Entry {
- struct Hash_Entry *next; /* Used to link together all the
- * entries associated with the same
- * bucket. */
- void *clientData; /* Arbitrary piece of data associated
- * with key. */
- unsigned namehash; /* hash value of key */
- char name[1]; /* key string */
-} Hash_Entry;
-
-typedef struct Hash_Table {
- struct Hash_Entry **bucketPtr;
- /* Pointers to Hash_Entry, one
- * for each bucket in the table. */
- int size; /* Actual size of array. */
- int numEntries; /* Number of entries in the table. */
- int mask; /* Used to select bits for hashing. */
-} Hash_Table;
-
-/*
- * The following structure is used by the searching routines
- * to record where we are in the search.
- */
-
-typedef struct Hash_Search {
- Hash_Table *tablePtr; /* Table being searched. */
- int nextIndex; /* Next bucket to check (after
- * current). */
- Hash_Entry *hashEntryPtr; /* Next entry to check in current
- * bucket. */
-} Hash_Search;
-
-/*
- * Macros.
- */
-
-/*
- * void *Hash_GetValue(h)
- * Hash_Entry *h;
- */
-
-#define Hash_GetValue(h) ((h)->clientData)
-
-/*
- * Hash_SetValue(h, val);
- * Hash_Entry *h;
- * char *val;
- */
-
-#define Hash_SetValue(h, val) ((h)->clientData = (void *) (val))
-
-/*
- * Hash_GetKey(h);
- * Hash_Entry *h;
- */
-
-#define Hash_GetKey(h) ((h)->name)
-
-/*
- * Hash_Size(n) returns the number of words in an object of n bytes
- */
-
-#define Hash_Size(n) (((n) + sizeof (int) - 1) / sizeof (int))
-
-void Hash_InitTable(Hash_Table *, int);
-void Hash_DeleteTable(Hash_Table *);
-Hash_Entry *Hash_FindEntry(Hash_Table *, char *);
-Hash_Entry *Hash_CreateEntry(Hash_Table *, char *, int *);
-void Hash_DeleteEntry(Hash_Table *, Hash_Entry *);
-Hash_Entry *Hash_EnumFirst(Hash_Table *, Hash_Search *);
-Hash_Entry *Hash_EnumNext(Hash_Search *);
-
-#endif /* _HASH */
diff --git a/pkgtools/rcorder/files/install-sh b/pkgtools/rcorder/files/install-sh
deleted file mode 100755
index 1826bf8b81f..00000000000
--- a/pkgtools/rcorder/files/install-sh
+++ /dev/null
@@ -1,201 +0,0 @@
-:
-# NAME:
-# install.sh - portable version of install(1)
-#
-# SYNOPSIS:
-# install [-CNcs] [-f flags] [-i errs] [-o owner] [-g group] [-m mode] file1 file2 ...
-# install -d [-i errs] [-o owner] [-g group] [-m mode] directory ...
-#
-# DESCRIPTION:
-# Compatible with BSD install(1). Except that '-c' is always
-# true and we always move an already installed target aside as
-# this is important on many systems. Recent BSD install(1)
-# versions have a '-b' option for this.
-#
-#
-# OPTIONS:
-# -b move previous target file aside (always true).
-#
-# -B "suffix"
-# use "suffix" instead of .old for saving existing target.
-#
-# -c copy rather than move the file into place (always true).
-#
-# -C compare. Only install if target is missing or
-# different.
-#
-# -N newer. Only install if target is missing or older.
-#
-# -s strip target
-#
-# -o "owner"
-# make target owned by "owner"
-#
-# -g "group"
-# make target group owned by "group"
-#
-# -m "mode"
-# set permissions to "mode"
-#
-# -f "flags"
-# Pass "flags" onto chflags(1)
-#
-# -i "errs"
-# Ignore errors from steps indicated by "errs" (``s,o,g,m'').
-#
-# BUGS:
-# The '-i' option is to save your sanity when 'bsd.prog.mk'
-# insists on haveing a '-o' "owner" option which is doomed to
-# fail on many systems. We ignore '-b', '-B' and '-c' options.
-#
-# AUTHOR:
-# Simon J. Gerraty <sjg@quick.com.au>
-#
-
-# RCSid:
-# $Id: install-sh,v 1.1 2004/08/27 03:06:07 jlam Exp $
-#
-# @(#) Copyright (c) 1993 Simon J. Gerraty
-#
-# This file is provided in the hope that it will
-# be of use. There is absolutely NO WARRANTY.
-# Permission to copy, redistribute or otherwise
-# use this file is hereby granted provided that
-# the above copyright notice and this notice are
-# left intact.
-#
-# Please send copies of changes and bug-fixes to:
-# sjg@quick.com.au
-#
-
-set -- `getopt B:bpxCNcsdo:g:m:i:f: $*`
-
-Mydir=`dirname $0`
-[ -s $Mydir/.installrc ] && . $Mydir/.installrc
-
-owner=:
-group=:
-mode=:
-strip=:
-mkdirs=
-compare=:
-newer=:
-chflags=:
-LS1=
-CP_P=
-
-while [ $# -gt 1 ]
-do
- case $1 in
- --) shift; break;;
- -p) CP_P=-p;;
- -x) set -x;;
- -B) OLD_EXT=$2; shift;;
- -C) compare=Different;;
- -N) newer=Newer;
- # check if /bin/ls supports -1
- /bin/ls -1 $0 >/dev/null 2>&1 && LS1=1
- ;;
- -o) owner="${CHOWN:-chown} $2 "; shift;;
- -g) group="${CHGRP:-chgrp} $2 "; shift;;
- -m) mode="${CHMOD:-chmod} $2 "; shift;;
- -s) strip=${STRIP:-strip};;
- -d) mkdirs="mkdir -p";;
- -i) ignore_err="$ignore_err$2"; shift;;
- -f) chflags="${CHFLAGS:-chflags} $2 "; shift;;
- esac
- shift
-done
-
-Newer() {
- n=`/bin/ls -t$LS1 $* 2>/dev/null | head -1`
- [ $1 = $n ]
-}
-
-Different() {
- cmp -s $*
- [ $? != 0 ]
-}
-
-Err() {
- case "$ignore_err" in
- *$1*) ;;
- *) exit 1;;
- esac
-}
-
-Setem() {
- # the order is important
- if [ ! -d $1 ]; then
- $strip $1 || Err s
- fi
- $group $1 || Err g
- $owner $1 || Err o
- $mode $1 || Err m
- $chflags $1 || Err f
- return 0
-}
-
-# a bug in HP-UX's /bin/sh, means we need to re-set $*
-# after any calls to add_path()
-args="$*"
-
-# all this just for chown!
-add_path () { [ -d $1 ] && eval ${2:-PATH}="\$${2:-PATH}:$1"; }
-add_path /etc
-add_path /usr/etc
-add_path /sbin
-add_path /usr/sbin
-
-# restore saved $*
-set -- $args
-
-# make directories if needed
-# and ensure mode etc are as desired
-if [ "$mkdirs" ]; then
- for d in $*
- do
- [ ! -d $d ] && $mkdirs $d
- Setem $d
- done
- exit 0 # that's all we do
-fi
-
-# install files
-if [ $# -gt 2 ]; then
- dest_dir=yes
-elif [ $# -eq 1 ]; then
- echo "what should I do with $*?" >&2
- exit 1
-fi
-
-# get list of files
-while [ $# -gt 1 ]
-do
- files="$files $1"
- shift
-done
-# last one is dest
-dest=$1
-shift
-
-
-if [ "$dest_dir" = yes -a ! -d $dest ]; then
- echo "no directory $dest" >&2
- exit 1
-fi
-
-for f in $files
-do
- b=`basename $f`
- if [ -d $dest ]; then
- t=$dest/$b
- else
- t=$dest
- fi
- $newer $f $t || continue
- $compare $f $t || continue
- [ -f $t ] && { mv -f $t $t.old || exit 1; }
- { cp $CP_P $f $t && Setem $t; } || exit 1
-done
-exit 0
diff --git a/pkgtools/rcorder/files/mkinstalldirs b/pkgtools/rcorder/files/mkinstalldirs
deleted file mode 100755
index c2f7770c1e1..00000000000
--- a/pkgtools/rcorder/files/mkinstalldirs
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-# $Id: mkinstalldirs,v 1.1 2004/08/27 03:06:07 jlam Exp $
-
-errstatus=0
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- 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
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/pkgtools/rcorder/files/rcorder.8 b/pkgtools/rcorder/files/rcorder.8
deleted file mode 100644
index 852ec746524..00000000000
--- a/pkgtools/rcorder/files/rcorder.8
+++ /dev/null
@@ -1,168 +0,0 @@
-.\" $NetBSD: rcorder.8,v 1.1.1.1 2004/08/27 01:49:15 schmonz Exp $
-.\"
-.\" Copyright (c) 1998
-.\" Perry E. Metzger. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgment:
-.\" This product includes software developed for the NetBSD Project
-.\" by Perry E. Metzger.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\"
-.Dd April 23, 2003
-.Dt RCORDER 8
-.Os
-.Sh NAME
-.Nm rcorder
-.Nd print a dependency ordering of interdependent files
-.Sh SYNOPSIS
-.Nm
-.Op Fl k Ar keep
-.Op Fl s Ar skip
-.Ar
-.Sh DESCRIPTION
-.Nm
-is designed to print out a dependency ordering of a set of
-interdependent files.
-Typically it is used to find an execution sequence for a set of
-shell scripts in which certain files must be executed before others.
-.Pp
-Each file passed to
-.Nm
-should be annotated with special lines (which look like comments to the
-shell) which indicate the dependencies the files have upon certain
-points in the sequence, known as
-.Dq conditions ,
-and which indicate, for each file, which
-.Dq conditions
-may be expected to be filled by that file.
-.Pp
-Within each file, a block containing a series of
-.Dq REQUIRE ,
-.Dq PROVIDE ,
-.Dq BEFORE
-and
-.Dq KEYWORD
-lines should appear.
-The format of the lines is rigid.
-Each line must begin with a single
-.Dq # ,
-followed by a single space, followed by
-.Dq PROVIDE: ,
-.Dq REQUIRE: ,
-.Dq BEFORE: ,
-or
-.Dq KEYWORD: .
-No deviation is permitted.
-Each dependency line is then followed by a series of conditions,
-separated by whitespace.
-Multiple
-.Dq PROVIDE ,
-.Dq REQUIRE ,
-.Dq BEFORE
-and
-.Dq KEYWORD
-lines may appear, but all such lines must appear in a sequence without
-any intervening lines, as once a line that does not follow the format
-is reached, parsing stops.
-.Pp
-The options are as follows:
-.Bl -tag -width Ds
-.It Fl k
-Add the specified keyword to the
-.Dq keep list .
-If any
-.Fl k
-option is given, only those files containing the matching keyword are listed.
-.It Fl s
-Add the specified keyword to the
-.Dq skip list .
-If any
-.Fl s
-option is given, files containing the matching keyword are not listed.
-.El
-.Pp
- An example block follows:
-.Bd -literal -offset indent
-# REQUIRE: networking syslog
-# REQUIRE: usr
-# PROVIDE: dns nscd
-.Ed
-.Pp
-This block states that the file in which it appears depends upon the
-.Dq networking ,
-.Dq syslog ,
-and
-.Dq usr
-conditions, and provides the
-.Dq dns
-and
-.Dq nscd
-conditions.
-.Pp
-A file may contain zero
-.Dq PROVIDE
-lines, in which case it provides no conditions, and may contain zero
-.Dq REQUIRE
-lines, in which case it has no dependencies.
-A file containing no
-.Dq PROVIDE ,
-.Dq REQUIRE ,
-or
-.Dq BEFORE
-lines may be output at an arbitrary position in the dependency
-ordering.
-.Pp
-There must be at least one file with no dependencies in the set of
-arguments passed to
-.Nm
-in order for it to find a starting place in the dependency ordering.
-.Sh DIAGNOSTICS
-.Nm
-may print one of the following error messages and exit with a non-zero
-status if it encounters an error while processing the file list.
-.Bl -diag
-.It "Requirement %s has no providers, aborting."
-No file has a
-.Dq PROVIDE
-line corresponding to a condition present in a
-.Dq REQUIRE
-line in another file.
-.It "Circular dependency on provision %s, aborting."
-A set of files has a circular dependency which was detected while
-processing the stated condition.
-.It "Circular dependency on file %s, aborting."
-A set of files has a circular dependency which was detected while
-processing the stated file.
-.El
-.Sh SEE ALSO
-.Xr rc 8
-.Sh HISTORY
-The
-.Nm
-program first appeared in
-.Nx 1.5 .
-.Sh AUTHORS
-Written by Perry E. Metzger (perry@piermont.com) and
-Matthew R. Green (mrg@eterna.com.au).
diff --git a/pkgtools/rcorder/files/rcorder.c b/pkgtools/rcorder/files/rcorder.c
deleted file mode 100644
index 73e7332a2bc..00000000000
--- a/pkgtools/rcorder/files/rcorder.c
+++ /dev/null
@@ -1,781 +0,0 @@
-/* $NetBSD: rcorder.c,v 1.2 2004/08/27 03:06:07 jlam Exp $ */
-
-/*
- * Copyright (c) 1998, 1999 Matthew R. Green
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1998
- * Perry E. Metzger. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the NetBSD Project
- * by Perry E. Metzger.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <nbcompat.h>
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#if HAVE_ERR_H
-#include <err.h>
-#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "ealloc.h"
-#include "hash.h"
-
-#ifdef DEBUG
-int debug = 0;
-# define DPRINTF(args) if (debug) { fflush(stdout); fprintf args; }
-#else
-# define DPRINTF(args)
-#endif
-
-#define REQUIRE_STR "# REQUIRE:"
-#define REQUIRE_LEN (sizeof(REQUIRE_STR) - 1)
-#define REQUIRES_STR "# REQUIRES:"
-#define REQUIRES_LEN (sizeof(REQUIRES_STR) - 1)
-#define PROVIDE_STR "# PROVIDE:"
-#define PROVIDE_LEN (sizeof(PROVIDE_STR) - 1)
-#define PROVIDES_STR "# PROVIDES:"
-#define PROVIDES_LEN (sizeof(PROVIDES_STR) - 1)
-#define BEFORE_STR "# BEFORE:"
-#define BEFORE_LEN (sizeof(BEFORE_STR) - 1)
-#define KEYWORD_STR "# KEYWORD:"
-#define KEYWORD_LEN (sizeof(KEYWORD_STR) - 1)
-#define KEYWORDS_STR "# KEYWORDS:"
-#define KEYWORDS_LEN (sizeof(KEYWORDS_STR) - 1)
-
-int exit_code;
-int file_count;
-char **file_list;
-
-enum {
- RESET = 0,
- SET = 1,
-};
-
-Hash_Table provide_hash_s, *provide_hash;
-
-typedef struct provnode provnode;
-typedef struct filenode filenode;
-typedef struct f_provnode f_provnode;
-typedef struct f_reqnode f_reqnode;
-typedef struct strnodelist strnodelist;
-
-struct provnode {
- int head;
- int in_progress;
- filenode *fnode;
- provnode *next, *last;
-};
-
-struct f_provnode {
- provnode *pnode;
- f_provnode *next;
-};
-
-struct f_reqnode {
- Hash_Entry *entry;
- f_reqnode *next;
-};
-
-struct strnodelist {
- filenode *node;
- strnodelist *next;
- char s[1];
-};
-
-struct filenode {
- char *filename;
- int in_progress;
- filenode *next, *last;
- f_reqnode *req_list;
- f_provnode *prov_list;
- strnodelist *keyword_list;
-};
-
-filenode fn_head_s, *fn_head;
-
-strnodelist *bl_list;
-strnodelist *keep_list;
-strnodelist *skip_list;
-
-void do_file(filenode *fnode);
-void strnode_add(strnodelist **, char *, filenode *);
-int skip_ok(filenode *fnode);
-int keep_ok(filenode *fnode);
-void satisfy_req(f_reqnode *rnode, char *);
-void crunch_file(char *);
-void parse_line(filenode *, char *, void (*)(filenode *, char *));
-filenode *filenode_new(char *);
-void add_require(filenode *, char *);
-void add_provide(filenode *, char *);
-void add_before(filenode *, char *);
-void add_keyword(filenode *, char *);
-void insert_before(void);
-Hash_Entry *make_fake_provision(filenode *);
-void crunch_all_files(void);
-void initialize(void);
-void generate_ordering(void);
-int main(int, char *[]);
-
-int
-main(int argc, char *argv[])
-{
- int ch;
-
- while ((ch = getopt(argc, argv, "dk:s:")) != -1)
- switch (ch) {
- case 'd':
-#ifdef DEBUG
- debug = 1;
-#else
- warnx("debugging not compiled in, -d ignored");
-#endif
- break;
- case 'k':
- strnode_add(&keep_list, optarg, 0);
- break;
- case 's':
- strnode_add(&skip_list, optarg, 0);
- break;
- default:
- /* XXX should crunch it? */
- break;
- }
- argc -= optind;
- argv += optind;
-
- file_count = argc;
- file_list = argv;
-
- DPRINTF((stderr, "parse_args\n"));
- initialize();
- DPRINTF((stderr, "initialize\n"));
- crunch_all_files();
- DPRINTF((stderr, "crunch_all_files\n"));
- generate_ordering();
- DPRINTF((stderr, "generate_ordering\n"));
-
- exit(exit_code);
-}
-
-/*
- * initialise various variables.
- */
-void
-initialize(void)
-{
-
- fn_head = &fn_head_s;
-
- provide_hash = &provide_hash_s;
- Hash_InitTable(provide_hash, file_count);
-}
-
-/* generic function to insert a new strnodelist element */
-void
-strnode_add(strnodelist **listp, char *s, filenode *fnode)
-{
- strnodelist *ent;
-
- ent = emalloc(sizeof *ent + strlen(s));
- ent->node = fnode;
- strcpy(ent->s, s);
- ent->next = *listp;
- *listp = ent;
-}
-
-/*
- * below are the functions that deal with creating the lists
- * from the filename's given and the dependancies and provisions
- * in each of these files. no ordering or checking is done here.
- */
-
-/*
- * we have a new filename, create a new filenode structure.
- * fill in the bits, and put it in the filenode linked list
- */
-filenode *
-filenode_new(char *filename)
-{
- filenode *temp;
-
- temp = emalloc(sizeof(*temp));
- memset(temp, 0, sizeof(*temp));
- temp->filename = estrdup(filename);
- temp->req_list = NULL;
- temp->prov_list = NULL;
- temp->keyword_list = NULL;
- temp->in_progress = RESET;
- /*
- * link the filenode into the list of filenodes.
- * note that the double linking means we can delete a
- * filenode without searching for where it belongs.
- */
- temp->next = fn_head->next;
- if (temp->next != NULL)
- temp->next->last = temp;
- temp->last = fn_head;
- fn_head->next = temp;
- return (temp);
-}
-
-/*
- * add a requirement to a filenode.
- */
-void
-add_require(filenode *fnode, char *s)
-{
- Hash_Entry *entry;
- f_reqnode *rnode;
- int new;
-
- entry = Hash_CreateEntry(provide_hash, s, &new);
- if (new)
- Hash_SetValue(entry, NULL);
- rnode = emalloc(sizeof(*rnode));
- rnode->entry = entry;
- rnode->next = fnode->req_list;
- fnode->req_list = rnode;
-}
-
-/*
- * add a provision to a filenode. if this provision doesn't
- * have a head node, create one here.
- */
-void
-add_provide(filenode *fnode, char *s)
-{
- Hash_Entry *entry;
- f_provnode *f_pnode;
- provnode *pnode, *head;
- int new;
-
- entry = Hash_CreateEntry(provide_hash, s, &new);
- head = Hash_GetValue(entry);
-
- /* create a head node if necessary. */
- if (head == NULL) {
- head = emalloc(sizeof(*head));
- head->head = SET;
- head->in_progress = RESET;
- head->fnode = NULL;
- head->last = head->next = NULL;
- Hash_SetValue(entry, head);
- }
-#if 0
- /*
- * Don't warn about this. We want to be able to support
- * scripts that do two complex things:
- *
- * - Two independent scripts which both provide the
- * same thing. Both scripts must be executed in
- * any order to meet the barrier. An example:
- *
- * Script 1:
- *
- * PROVIDE: mail
- * REQUIRE: LOGIN
- *
- * Script 2:
- *
- * PROVIDE: mail
- * REQUIRE: LOGIN
- *
- * - Two interdependent scripts which both provide the
- * same thing. Both scripts must be executed in
- * graph order to meet the barrier. An example:
- *
- * Script 1:
- *
- * PROVIDE: nameservice dnscache
- * REQUIRE: SERVERS
- *
- * Script 2:
- *
- * PROVIDE: nameservice nscd
- * REQUIRE: dnscache
- */
- else if (new == 0) {
- warnx("file `%s' provides `%s'.", fnode->filename, s);
- warnx("\tpreviously seen in `%s'.",
- head->next->fnode->filename);
- }
-#endif
-
- pnode = emalloc(sizeof(*pnode));
- pnode->head = RESET;
- pnode->in_progress = RESET;
- pnode->fnode = fnode;
- pnode->next = head->next;
- pnode->last = head;
- head->next = pnode;
- if (pnode->next != NULL)
- pnode->next->last = pnode;
-
- f_pnode = emalloc(sizeof(*f_pnode));
- f_pnode->pnode = pnode;
- f_pnode->next = fnode->prov_list;
- fnode->prov_list = f_pnode;
-}
-
-/*
- * put the BEFORE: lines to a list and handle them later.
- */
-void
-add_before(filenode *fnode, char *s)
-{
-
- strnode_add(&bl_list, s, fnode);
-}
-
-/*
- * add a key to a filenode.
- */
-void
-add_keyword(filenode *fnode, char *s)
-{
-
- strnode_add(&fnode->keyword_list, s, fnode);
-}
-
-/*
- * loop over the rest of a line, giving each word to
- * add_func() to do the real work.
- */
-void
-parse_line(filenode *node, char *buffer, void (*add_func)(filenode *, char *))
-{
- char *s;
-
- while ((s = strsep(&buffer, " \t\n")) != NULL)
- if (*s != '\0')
- (*add_func)(node, s);
-}
-
-/*
- * given a file name, create a filenode for it, read in lines looking
- * for provision and requirement lines, building the graphs as needed.
- */
-void
-crunch_file(char *filename)
-{
- FILE *fp;
- char *buf;
- int require_flag, provide_flag, before_flag, keyword_flag;
- enum { BEFORE_PARSING, PARSING, PARSING_DONE } state;
- filenode *node;
- char delims[3] = { '\\', '\\', '\0' };
- struct stat st;
-
- if ((fp = fopen(filename, "r")) == NULL) {
- warn("could not open %s", filename);
- return;
- }
-
- if (fstat(fileno(fp), &st) == -1) {
- warn("could not stat %s", filename);
- fclose(fp);
- return;
- }
-
- if (!S_ISREG(st.st_mode)) {
-#if 0
- warnx("%s is not a file", filename);
-#endif
- fclose(fp);
- return;
- }
-
- node = filenode_new(filename);
-
- /*
- * we don't care about length, line number, don't want # for comments,
- * and have no flags.
- */
- for (state = BEFORE_PARSING; state != PARSING_DONE &&
- (buf = fparseln(fp, NULL, NULL, delims, 0)) != NULL; free(buf)) {
- require_flag = provide_flag = before_flag = keyword_flag = 0;
- if (strncmp(REQUIRE_STR, buf, REQUIRE_LEN) == 0)
- require_flag = REQUIRE_LEN;
- else if (strncmp(REQUIRES_STR, buf, REQUIRES_LEN) == 0)
- require_flag = REQUIRES_LEN;
- else if (strncmp(PROVIDE_STR, buf, PROVIDE_LEN) == 0)
- provide_flag = PROVIDE_LEN;
- else if (strncmp(PROVIDES_STR, buf, PROVIDES_LEN) == 0)
- provide_flag = PROVIDES_LEN;
- else if (strncmp(BEFORE_STR, buf, BEFORE_LEN) == 0)
- before_flag = BEFORE_LEN;
- else if (strncmp(KEYWORD_STR, buf, KEYWORD_LEN) == 0)
- keyword_flag = KEYWORD_LEN;
- else if (strncmp(KEYWORDS_STR, buf, KEYWORDS_LEN) == 0)
- keyword_flag = KEYWORDS_LEN;
- else {
- if (state == PARSING)
- state = PARSING_DONE;
- continue;
- }
-
- state = PARSING;
- if (require_flag)
- parse_line(node, buf + require_flag, add_require);
- else if (provide_flag)
- parse_line(node, buf + provide_flag, add_provide);
- else if (before_flag)
- parse_line(node, buf + before_flag, add_before);
- else if (keyword_flag)
- parse_line(node, buf + keyword_flag, add_keyword);
- }
- fclose(fp);
-}
-
-Hash_Entry *
-make_fake_provision(filenode *node)
-{
- Hash_Entry *entry;
- f_provnode *f_pnode;
- provnode *head, *pnode;
- static int i = 0;
- int new;
- char buffer[30];
-
- do {
- snprintf(buffer, sizeof buffer, "fake_prov_%08d", i++);
- entry = Hash_CreateEntry(provide_hash, buffer, &new);
- } while (new == 0);
- head = emalloc(sizeof(*head));
- head->head = SET;
- head->in_progress = RESET;
- head->fnode = NULL;
- head->last = head->next = NULL;
- Hash_SetValue(entry, head);
-
- pnode = emalloc(sizeof(*pnode));
- pnode->head = RESET;
- pnode->in_progress = RESET;
- pnode->fnode = node;
- pnode->next = head->next;
- pnode->last = head;
- head->next = pnode;
- if (pnode->next != NULL)
- pnode->next->last = pnode;
-
- f_pnode = emalloc(sizeof(*f_pnode));
- f_pnode->pnode = pnode;
- f_pnode->next = node->prov_list;
- node->prov_list = f_pnode;
-
- return (entry);
-}
-
-/*
- * go through the BEFORE list, inserting requirements into the graph(s)
- * as required. in the before list, for each entry B, we have a file F
- * and a string S. we create a "fake" provision (P) that F provides.
- * for each entry in the provision list for S, add a requirement to
- * that provisions filenode for P.
- */
-void
-insert_before(void)
-{
- Hash_Entry *entry, *fake_prov_entry;
- provnode *pnode;
- f_reqnode *rnode;
- strnodelist *bl;
- int new;
-
- while (bl_list != NULL) {
- bl = bl_list->next;
-
- fake_prov_entry = make_fake_provision(bl_list->node);
-
- entry = Hash_CreateEntry(provide_hash, bl_list->s, &new);
- if (new == 1)
- warnx("file `%s' is before unknown provision `%s'", bl_list->node->filename, bl_list->s);
-
- for (pnode = Hash_GetValue(entry); pnode; pnode = pnode->next) {
- if (pnode->head)
- continue;
-
- rnode = emalloc(sizeof(*rnode));
- rnode->entry = fake_prov_entry;
- rnode->next = pnode->fnode->req_list;
- pnode->fnode->req_list = rnode;
- }
-
- free(bl_list);
- bl_list = bl;
- }
-}
-
-/*
- * loop over all the files calling crunch_file() on them to do the
- * real work. after we have built all the nodes, insert the BEFORE:
- * lines into graph(s).
- */
-void
-crunch_all_files(void)
-{
- int i;
-
- for (i = 0; i < file_count; i++)
- crunch_file(file_list[i]);
- insert_before();
-}
-
-/*
- * below are the functions that traverse the graphs we have built
- * finding out the desired ordering, printing each file in turn.
- * if missing requirements, or cyclic graphs are detected, a
- * warning will be issued, and we will continue on..
- */
-
-/*
- * given a requirement node (in a filename) we attempt to satisfy it.
- * we do some sanity checking first, to ensure that we have providers,
- * aren't already satisfied and aren't already being satisfied (ie,
- * cyclic). if we pass all this, we loop over the provision list
- * calling do_file() (enter recursion) for each filenode in this
- * provision.
- */
-void
-satisfy_req(f_reqnode *rnode, char *filename)
-{
- Hash_Entry *entry;
- provnode *head;
-
- entry = rnode->entry;
- head = Hash_GetValue(entry);
-
- if (head == NULL) {
- warnx("requirement `%s' in file `%s' has no providers.",
- Hash_GetKey(entry), filename);
- exit_code = 1;
- return;
- }
-
- /* return if the requirement is already satisfied. */
- if (head->next == NULL)
- return;
-
- /*
- * if list is marked as in progress,
- * print that there is a circular dependency on it and abort
- */
- if (head->in_progress == SET) {
- warnx("Circular dependency on provision `%s' in file `%s'.",
- Hash_GetKey(entry), filename);
- exit_code = 1;
- return;
- }
-
- head->in_progress = SET;
-
- /*
- * while provision_list is not empty
- * do_file(first_member_of(provision_list));
- */
- while (head->next != NULL)
- do_file(head->next->fnode);
-}
-
-int
-skip_ok(filenode *fnode)
-{
- strnodelist *s;
- strnodelist *k;
-
- for (s = skip_list; s; s = s->next)
- for (k = fnode->keyword_list; k; k = k->next)
- if (strcmp(k->s, s->s) == 0)
- return (0);
-
- return (1);
-}
-
-int
-keep_ok(filenode *fnode)
-{
- strnodelist *s;
- strnodelist *k;
-
- for (s = keep_list; s; s = s->next)
- for (k = fnode->keyword_list; k; k = k->next)
- if (strcmp(k->s, s->s) == 0)
- return (1);
-
- /* an empty keep_list means every one */
- return (!keep_list);
-}
-
-/*
- * given a filenode, we ensure we are not a cyclic graph. if this
- * is ok, we loop over the filenodes requirements, calling satisfy_req()
- * for each of them.. once we have done this, remove this filenode
- * from each provision table, as we are now done.
- */
-void
-do_file(filenode *fnode)
-{
- f_reqnode *r, *r_tmp;
- f_provnode *p, *p_tmp;
- provnode *pnode;
- int was_set;
-
- DPRINTF((stderr, "do_file on %s.\n", fnode->filename));
-
- /*
- * if fnode is marked as in progress,
- * print that fnode; is circularly depended upon and abort.
- */
- if (fnode->in_progress == SET) {
- warnx("Circular dependency on file `%s'.",
- fnode->filename);
- was_set = exit_code = 1;
- } else
- was_set = 0;
-
- /* mark fnode */
- fnode->in_progress = SET;
-
- /*
- * for each requirement of fnode -> r
- * satisfy_req(r, filename)
- */
- r = fnode->req_list;
- while (r != NULL) {
- r_tmp = r;
- satisfy_req(r, fnode->filename);
- r = r->next;
- free(r_tmp);
- }
- fnode->req_list = NULL;
-
- /*
- * for each provision of fnode -> p
- * remove fnode from provision list for p in hash table
- */
- p = fnode->prov_list;
- while (p != NULL) {
- p_tmp = p;
- pnode = p->pnode;
- if (pnode->next != NULL) {
- pnode->next->last = pnode->last;
- }
- if (pnode->last != NULL) {
- pnode->last->next = pnode->next;
- }
- free(pnode);
- p = p->next;
- free(p_tmp);
- }
- fnode->prov_list = NULL;
-
- /* do_it(fnode) */
- DPRINTF((stderr, "next do: "));
-
- /* if we were already in progress, don't print again */
- if (was_set == 0 && skip_ok(fnode) && keep_ok(fnode))
- printf("%s\n", fnode->filename);
-
- if (fnode->next != NULL) {
- fnode->next->last = fnode->last;
- }
- if (fnode->last != NULL) {
- fnode->last->next = fnode->next;
- }
-
- DPRINTF((stderr, "nuking %s\n", fnode->filename));
- free(fnode->filename);
- free(fnode);
-}
-
-void
-generate_ordering(void)
-{
-
- /*
- * while there remain undone files{f},
- * pick an arbitrary f, and do_file(f)
- * Note that the first file in the file list is perfectly
- * arbitrary, and easy to find, so we use that.
- */
-
- /*
- * N.B.: the file nodes "self delete" after they execute, so
- * after each iteration of the loop, the head will be pointing
- * to something totally different. The loop ends up being
- * executed only once for every strongly connected set of
- * nodes.
- */
- while (fn_head->next != NULL) {
- DPRINTF((stderr, "generate on %s\n", fn_head->next->filename));
- do_file(fn_head->next);
- }
-}
diff --git a/pkgtools/rcorder/files/rcorder.cat8 b/pkgtools/rcorder/files/rcorder.cat8
deleted file mode 100644
index 4271d485fd0..00000000000
--- a/pkgtools/rcorder/files/rcorder.cat8
+++ /dev/null
@@ -1,86 +0,0 @@
-RCORDER(8) NetBSD System Manager's Manual RCORDER(8)
-
-NNAAMMEE
- rrccoorrddeerr - print a dependency ordering of interdependent files
-
-SSYYNNOOPPSSIISS
- rrccoorrddeerr [--kk _k_e_e_p] [--ss _s_k_i_p] _f_i_l_e _._._.
-
-DDEESSCCRRIIPPTTIIOONN
- rrccoorrddeerr is designed to print out a dependency ordering of a set of inter-
- dependent files. Typically it is used to find an execution sequence for
- a set of shell scripts in which certain files must be executed before
- others.
-
- Each file passed to rrccoorrddeerr should be annotated with special lines (which
- look like comments to the shell) which indicate the dependencies the
- files have upon certain points in the sequence, known as ``conditions'',
- and which indicate, for each file, which ``conditions'' may be expected
- to be filled by that file.
-
- Within each file, a block containing a series of ``REQUIRE'',
- ``PROVIDE'', ``BEFORE'' and ``KEYWORD'' lines should appear. The format
- of the lines is rigid. Each line must begin with a single ``#'', fol-
- lowed by a single space, followed by ``PROVIDE:'', ``REQUIRE:'',
- ``BEFORE:'', or ``KEYWORD:''. No deviation is permitted. Each depen-
- dency line is then followed by a series of conditions, separated by
- whitespace. Multiple ``PROVIDE'', ``REQUIRE'', ``BEFORE'' and
- ``KEYWORD'' lines may appear, but all such lines must appear in a
- sequence without any intervening lines, as once a line that does not fol-
- low the format is reached, parsing stops.
-
- The options are as follows:
-
- --kk Add the specified keyword to the ``keep list''. If any --kk option
- is given, only those files containing the matching keyword are
- listed.
-
- --ss Add the specified keyword to the ``skip list''. If any --ss option
- is given, files containing the matching keyword are not listed.
-
- An example block follows:
-
- # REQUIRE: networking syslog
- # REQUIRE: usr
- # PROVIDE: dns nscd
-
- This block states that the file in which it appears depends upon the
- ``networking'', ``syslog'', and ``usr'' conditions, and provides the
- ``dns'' and ``nscd'' conditions.
-
- A file may contain zero ``PROVIDE'' lines, in which case it provides no
- conditions, and may contain zero ``REQUIRE'' lines, in which case it has
- no dependencies. A file containing no ``PROVIDE'', ``REQUIRE'', or
- ``BEFORE'' lines may be output at an arbitrary position in the dependency
- ordering.
-
- There must be at least one file with no dependencies in the set of argu-
- ments passed to rrccoorrddeerr in order for it to find a starting place in the
- dependency ordering.
-
-DDIIAAGGNNOOSSTTIICCSS
- rrccoorrddeerr may print one of the following error messages and exit with a
- non-zero status if it encounters an error while processing the file list.
-
- RReeqquuiirreemmeenntt %%ss hhaass nnoo pprroovviiddeerrss,, aabboorrttiinngg.. No file has a ``PROVIDE''
- line corresponding to a condition present in a ``REQUIRE'' line in
- another file.
-
- CCiirrccuullaarr ddeeppeennddeennccyy oonn pprroovviissiioonn %%ss,, aabboorrttiinngg.. A set of files has a cir-
- cular dependency which was detected while processing the stated condi-
- tion.
-
- CCiirrccuullaarr ddeeppeennddeennccyy oonn ffiillee %%ss,, aabboorrttiinngg.. A set of files has a circular
- dependency which was detected while processing the stated file.
-
-SSEEEE AALLSSOO
- rc(8)
-
-HHIISSTTOORRYY
- The rrccoorrddeerr program first appeared in NetBSD 1.5.
-
-AAUUTTHHOORRSS
- Written by Perry E. Metzger (perry@piermont.com) and Matthew R. Green
- (mrg@eterna.com.au).
-
-NetBSD 2.0_BETA April 23, 2003 NetBSD 2.0_BETA
diff --git a/pkgtools/rcorder/files/rcorder2nbcompat b/pkgtools/rcorder/files/rcorder2nbcompat
deleted file mode 100755
index a0109a49338..00000000000
--- a/pkgtools/rcorder/files/rcorder2nbcompat
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: rcorder2nbcompat,v 1.1 2004/08/27 03:06:07 jlam Exp $
-#
-# Copyright (c) 2004 The NetBSD Foundation, Inc.
-# All rights reserved.
-#
-# This code is derived from software contributed to The NetBSD Foundation
-# by Johnny C. Lam.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the NetBSD
-# Foundation, Inc. and its contributors.
-# 4. Neither the name of The NetBSD Foundation nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-if [ $# -lt 1 ]; then echo "rcorder2nbcompat dest"; exit 1; fi
-
-: ${PKGSRCDIR:=/usr/pkgsrc}
-: ${BSDSRCDIR:=/usr/src}
-
-if [ ! -d "${BSDSRCDIR}" ]; then
- echo "${BSDSRCDIR} doesn't exist"
- exit 1
-fi
-
-src2nbcompat="${PKGSRCDIR}/pkgtools/libnbcompat/files/src2nbcompat"
-dest=$1
-
-$src2nbcompat ${BSDSRCDIR}/sbin/rcorder $dest
diff --git a/pkgtools/rdigest/DESCR b/pkgtools/rdigest/DESCR
deleted file mode 100644
index f31cf690b86..00000000000
--- a/pkgtools/rdigest/DESCR
+++ /dev/null
@@ -1,16 +0,0 @@
-This utility is a wrapper for the md5(3), sha1(3), rmd160(3), and
-tiger hash routines. It is remarkably similar to the digest package,
-except that it can recursively checksum directory trees.
-
-While a simple checksum on a tar file is usually satisfactory, once
-said archive has been extracted, it is virtually impossible to
-repackage the extracted tree in a form that can yield a repeatable
-checksum. To be specific, changes in timestamps and ownership, and
-changes in file ordering within directories can affect the checksum of
-the archive, while not really impacting the actual code at all.
-
-The algorithm used to checksum a directory in this implementation
-is considers only the files' pathnames, the files' types (ie,
-directory vs. file vs. symbolic link), and their contents (for
-the latter two). It is described in greater detail in the man
-page.
diff --git a/pkgtools/rdigest/Makefile b/pkgtools/rdigest/Makefile
deleted file mode 100644
index f0947daa012..00000000000
--- a/pkgtools/rdigest/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# $NetBSD: Makefile,v 1.2 2003/12/24 09:53:50 jmmv Exp $
-
-DISTNAME= rdigest-${VERSION}
-CATEGORIES= # be quiet pkglint
-MASTER_SITES= # be quiet pkglint
-
-MAINTAINER= atatat@NetBSD.org
-COMMENT= Recursive message digest wrapper utility
-
-DIGESTDIR= ${.CURDIR}/../../pkgtools/digest
-FILESDIR= ${DIGESTDIR}/files
-
-.include "${DIGESTDIR}/Makefile"
diff --git a/pkgtools/rdigest/PLIST b/pkgtools/rdigest/PLIST
deleted file mode 100644
index 5484aa3449d..00000000000
--- a/pkgtools/rdigest/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2003/07/24 05:21:04 atatat Exp $
-bin/rdigest
-man/man1/rdigest.1
diff --git a/pkgtools/rdigest/distinfo b/pkgtools/rdigest/distinfo
deleted file mode 100644
index 0264fff1460..00000000000
--- a/pkgtools/rdigest/distinfo
+++ /dev/null
@@ -1,5 +0,0 @@
-$NetBSD: distinfo,v 1.5 2005/12/04 15:50:30 rillig Exp $
-
-SHA1 (patch-aa) = 89dc6a984901ea749690a159a801e1a73d0b55a9
-SHA1 (patch-ab) = 576c6afbde00e64e1fb7c35c1c2f90b8037f2c9a
-SHA1 (patch-ac) = e211afcbf2db8f50870f6b9547704cc8651919bd
diff --git a/pkgtools/rdigest/patches/patch-aa b/pkgtools/rdigest/patches/patch-aa
deleted file mode 100644
index cb5a6e1f303..00000000000
--- a/pkgtools/rdigest/patches/patch-aa
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2005/03/28 20:52:55 agc Exp $
-
---- Makefile.in.orig 2005-03-28 21:39:38.000000000 +0100
-+++ Makefile.in 2005-03-28 21:41:02.000000000 +0100
-@@ -57,7 +57,7 @@
- .c.o:
- $(COMPILE) -c $< -o $@
-
--all: digest
-+all: rdigest
-
- digest-types.h: bits
- ./bits digest-types.h
-@@ -65,10 +65,10 @@
- bits: bits.o
- $(LINK) $(bits_OBJS) $(LIBS)
-
--digest: $(digest_OBJS)
-+rdigest: $(digest_OBJS)
- $(LINK) $(digest_OBJS) $(LIBS)
-
--check: digest
-+check: rdigest
- @SHELL@ $(srcdir)/regress.sh
-
- digest.o: digest-types.h
-@@ -84,7 +84,7 @@
- whirlpool.o: digest-types.h
-
- clean:
-- rm -f *.o digest bits digest-types.h
-+ rm -f *.o rdigest bits digest-types.h
-
- distclean: clean
- rm -f Makefile config.h
-@@ -93,18 +93,18 @@
- maintainer-clean: distclean
- rm -f configure config.h.in
-
--install: digest
-+install: rdigest
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-- @f=`echo digest|sed '$(transform)'`; \
-- echo "$(INSTALL_PROGRAM) digest $(DESTDIR)$(bindir)/$$f"; \
-- $(INSTALL_PROGRAM) digest $(DESTDIR)$(bindir)/$$f
-+ @f=`echo rdigest|sed '$(transform)'`; \
-+ echo "$(INSTALL_PROGRAM) rdigest $(DESTDIR)$(bindir)/$$f"; \
-+ $(INSTALL_PROGRAM) rdigest $(DESTDIR)$(bindir)/$$f
- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
-- @f=`echo digest.1|sed '$(transform)'`; \
-+ @f=`echo rdigest.1|sed '$(transform)'`; \
- echo "$(INSTALL_DATA) digest.1 $(DESTDIR)$(mandir)/man1/$$f"; \
- $(INSTALL_DATA) digest.1 $(DESTDIR)$(mandir)/man1/$$f
-
- uninstall:
-- @f=`echo digest|sed '$(transform)'`; \
-+ @f=`echo rdigest|sed '$(transform)'`; \
- echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
- rm -f $(DESTDIR)$(bindir)/$$f
-
diff --git a/pkgtools/rdigest/patches/patch-ab b/pkgtools/rdigest/patches/patch-ab
deleted file mode 100644
index 3098b1d69af..00000000000
--- a/pkgtools/rdigest/patches/patch-ab
+++ /dev/null
@@ -1,90 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2005/03/31 05:02:24 atatat Exp $
-
---- digest.1.orig 2005-03-30 23:40:39.000000000 -0500
-+++ digest.1
-@@ -2,5 +2,5 @@
- .\"
- .\"
--.\" Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
-+.\" Copyright (c) 2001-2005 Alistair G. Crooks. All rights reserved.
- .\"
- .\" Redistribution and use in source and binary forms, with or without
-@@ -32,12 +32,13 @@
- .\"
- .\"
--.Dd March 23, 2005
--.Dt DIGEST 1
-+.Dd March 31, 2005
-+.Dt RDIGEST 1
- .Os
- .Sh NAME
--.Nm digest
--.Nd calculate message digests
-+.Nm rdigest
-+.Nd calculate message digests of files and directories
- .Sh SYNOPSIS
- .Nm
-+.Op Fl x Ar directory
- .Ar algorithm
- .Op file ...
-@@ -45,6 +46,13 @@
- The
- .Nm
--utility calculates message digests of files or,
-+utility calculates message digests of files, directories, or,
- if no file is specified, standard input.
-+The
-+.Fl x
-+option can be used as many times as required to indicate directories
-+not to be included in a directory's hash.
-+This allows you to skip, eg, CVS subdirectories in a given tree, which
-+can have relatively volatile contents not pertinent to the hash.
-+.Pp
- The list of possible algorithms is:
- .Bl -tag -width Ds
-@@ -89,4 +97,23 @@ algorithm implementations, which are loc
- C library, and was designed to be scalable as new message digest
- algorithms are developed.
-+The checksum for a directory is implemented as the hash over a list of
-+one or two hashes for each of the items in the tree.
-+.Bl -bullet
-+.It
-+For a file, the string
-+.Dq f \&
-+along with the path make up the data for one hash, and the contents of
-+the file is used for the second hash.
-+.It
-+For a symbolic link, the string
-+.Dq l \&
-+along with the path to the symbolic link make up the data for one
-+hash, and the target of the symbolic link is used for the second hash.
-+.It
-+For a directory, the string
-+.Dq d \&
-+along with the path make up the data for one hash.
-+There is no second hash for a directory.
-+.El
- .Pp
- The
-@@ -95,4 +122,5 @@ utility exits 0 on success, and \*[Gt]0
- .Sh SEE ALSO
- .Xr cksum 1 ,
-+.Xr digest 1 ,
- .Xr md5 3 ,
- .Xr rmd160 3 ,
-@@ -102,8 +130,12 @@ The
- .Nm
- utility first appeared in
--.Nx 1.6 .
-+.Nx 2.0 .
- .Sh AUTHORS
- The
-+.Xr digest 1
-+utility was written by Alistair G. Crooks \*[Lt]agc@netbsd.org\*[Gt].
- .Nm
--utility was written by
--.An Alistair G. Crooks Aq agc@netbsd.org .
-+was implemented by Andrew Brown \*[Lt]atatat@netbsd.org\*[Gt] as a
-+patch to
-+.Xr digest 1
-+to add recursive capabilities.
diff --git a/pkgtools/rdigest/patches/patch-ac b/pkgtools/rdigest/patches/patch-ac
deleted file mode 100644
index 3e1df949289..00000000000
--- a/pkgtools/rdigest/patches/patch-ac
+++ /dev/null
@@ -1,210 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2005/12/02 16:30:07 rillig Exp $
-
---- digest.c.orig 2005-01-20 21:10:03.000000000 -0500
-+++ digest.c
-@@ -43,9 +43,14 @@
- #endif
-
-
-+#include <sys/queue.h>
-+#include <sys/stat.h>
-+
- #ifdef HAVE_ERRNO_H
- #include <errno.h>
- #endif
-+#include <fcntl.h>
-+#include <fts.h>
- #ifdef HAVE_LOCALE_H
- #include <locale.h>
- #endif
-@@ -147,21 +152,178 @@ digest_file(char *fn, alg_t *alg)
- return (rc);
- }
-
-+struct excl {
-+ LIST_ENTRY(excl) n;
-+ const char *p;
-+};
-+
-+LIST_HEAD(, excl) excl;
-+
-+static void
-+exclude(const char *p)
-+{
-+ struct excl *e;
-+
-+ e = malloc(sizeof(struct excl));
-+ e->p = p;
-+ LIST_INSERT_HEAD(&excl, e, n);
-+}
-+
-+static int
-+skip(const char *p)
-+{
-+ struct excl *e;
-+
-+#ifdef LIST_FOREACH
-+ LIST_FOREACH(e, &excl, n)
-+#else
-+ for (e = excl.lh_first; e; e = e->n.le_next)
-+#endif
-+ if (strcmp(e->p, p) == 0)
-+ return (1);
-+
-+ return (0);
-+}
-+
-+static int
-+compar(const FTSENT **fa, const FTSENT **fb)
-+{
-+ return (strcmp((*fa)->fts_name, (*fb)->fts_name));
-+}
-+
-+static int
-+digest_directory(char *dn, alg_t *alg)
-+{
-+ char in[BUFSIZ * 20], dot[2];
-+ char *digest;
-+ int cc, rc, l, fd, cwd;
-+ char *pathlist[2];
-+ FTS *ftsp;
-+ FTSENT *f;
-+
-+ rc = 1;
-+ l = alg->hash_len * 2;
-+ digest = malloc(l + 1);
-+ sprintf(dot, ".");
-+ pathlist[0] = dot;
-+ pathlist[1] = NULL;
-+
-+ if ((cwd = open(".", O_RDONLY)) == -1 ||
-+ chdir(dn) == -1 ||
-+ (ftsp = fts_open(pathlist,
-+ FTS_COMFOLLOW | FTS_NOCHDIR | FTS_PHYSICAL,
-+ compar)) == NULL) {
-+ (void) fprintf(stderr, "%s\n", dn);
-+ free(digest);
-+ return (0);
-+ }
-+
-+ (*alg->hash_init)(&alg->hash_ctx);
-+
-+ while ((f = fts_read(ftsp)) != NULL) {
-+ /* skip the second pass on a directory */
-+ if (f->fts_info == FTS_DP)
-+ continue;
-+
-+ /* skip directories named CVS, RCS, or SCCS */
-+ if ((f->fts_info == FTS_NS ||
-+ S_ISDIR(f->fts_statp->st_mode)) &&
-+ skip(f->fts_name)) {
-+ fts_set(ftsp, f, FTS_SKIP);
-+ continue;
-+ }
-+
-+ /* try to handle things based on stat info */
-+ if (f->fts_info != FTS_NS) {
-+ /* only mention directories */
-+ if (S_ISDIR(f->fts_statp->st_mode)) {
-+ (*alg->hash_init)(&alg->hash_ctx2);
-+ (*alg->hash_update)(&alg->hash_ctx2, "d ", 2);
-+ (*alg->hash_update)(&alg->hash_ctx2, f->fts_path, f->fts_pathlen);
-+ (*alg->hash_end)(&alg->hash_ctx2, digest);
-+ digest[l] = '\n';
-+ (*alg->hash_update)(&alg->hash_ctx, digest, l + 1);
-+
-+ /* hash the filename and then the contents separately */
-+ } else if (S_ISREG(f->fts_statp->st_mode)) {
-+ if ((fd = open(f->fts_path, O_RDONLY)) != -1) {
-+ (*alg->hash_init)(&alg->hash_ctx2);
-+ (*alg->hash_update)(&alg->hash_ctx2, "f ", 2);
-+ (*alg->hash_update)(&alg->hash_ctx2, f->fts_path, f->fts_pathlen);
-+ (*alg->hash_end)(&alg->hash_ctx2, &digest[0]);
-+ digest[l] = '\n';
-+ (*alg->hash_update)(&alg->hash_ctx, digest, 33);
-+
-+ (*alg->hash_init)(&alg->hash_ctx2);
-+ while ((cc = read(fd, in, sizeof(in))) > 0) {
-+ (*alg->hash_update)(&alg->hash_ctx2, in, cc);
-+ }
-+ close(fd);
-+ (*alg->hash_end)(&alg->hash_ctx2, digest);
-+ digest[l] = '\n';
-+ (*alg->hash_update)(&alg->hash_ctx, digest, l + 1);
-+ } else {
-+ (void) fprintf(stderr, "%s\n", f->fts_path);
-+ rc = 0;
-+ }
-+
-+ /* hash in symlinks as well, along with the link contents */
-+ } else if (S_ISLNK(f->fts_statp->st_mode)) {
-+ if ((cc = readlink(f->fts_path, in, sizeof(in))) > 0) {
-+ (*alg->hash_init)(&alg->hash_ctx2);
-+ (*alg->hash_update)(&alg->hash_ctx2, "l ", 2);
-+ (*alg->hash_update)(&alg->hash_ctx2, f->fts_path, f->fts_pathlen);
-+ (*alg->hash_end)(&alg->hash_ctx2, digest);
-+ digest[l] = '\n';
-+ (*alg->hash_update)(&alg->hash_ctx, digest, l + 1);
-+
-+ (*alg->hash_init)(&alg->hash_ctx2);
-+ (*alg->hash_update)(&alg->hash_ctx2, in, cc);
-+ (*alg->hash_end)(&alg->hash_ctx2, digest);
-+ digest[l] = '\n';
-+ (*alg->hash_update)(&alg->hash_ctx, digest, l + 1);
-+ } else {
-+ (void) fprintf(stderr, "%s\n", f->fts_path);
-+ rc = 0;
-+ }
-+ }
-+ }
-+ }
-+
-+ fts_close(ftsp);
-+ fchdir(cwd);
-+ close(cwd);
-+
-+ if (rc == 1) {
-+ (*alg->hash_end)(&alg->hash_ctx, digest);
-+ (void) printf("%s (%s) = %s\n", alg->name, dn, digest);
-+ }
-+
-+ free(digest);
-+ return (rc);
-+}
-+
- int
- main(int argc, char **argv)
- {
- alg_t *alg;
- int rval;
- int i;
-+ struct stat st;
-+
-+ LIST_INIT(&excl);
-
- #ifdef HAVE_SETLOCALE
- (void) setlocale(LC_ALL, "");
- #endif
-- while ((i = getopt(argc, argv, "V")) != -1) {
-+ while ((i = getopt(argc, argv, "Vx:")) != -1) {
- switch(i) {
- case 'V':
- printf("%s\n", VERSION);
- return EXIT_SUCCESS;
-+ case 'x':
-+ exclude(optarg);
-+ break;
- }
- }
- argc -= optind;
-@@ -186,7 +348,9 @@ main(int argc, char **argv)
- }
- } else {
- for (i = 0 ; i < argc ; i++) {
-- if (!digest_file(argv[i], alg)) {
-+ if (stat(argv[i], &st) == -1 ||
-+ (S_ISREG(st.st_mode) && !digest_file(argv[i], alg)) ||
-+ (S_ISDIR(st.st_mode) && !digest_directory(argv[i], alg))) {
- (void) fprintf(stderr, "%s\n", argv[i]);
- rval = EXIT_FAILURE;
- }
diff --git a/pkgtools/revbump/DESCR b/pkgtools/revbump/DESCR
deleted file mode 100644
index 7f74cd8816b..00000000000
--- a/pkgtools/revbump/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-Tools for bumping PKGREVISIONs and adapting BUILDLINK_ABI_DEPENDS
-versions to the latest version automatically.
-
-This tool is mostly intended for pkgsrc developers with commit
-access.
diff --git a/pkgtools/revbump/Makefile b/pkgtools/revbump/Makefile
deleted file mode 100644
index 871c5fb2f3f..00000000000
--- a/pkgtools/revbump/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-# $NetBSD: Makefile,v 1.12 2006/07/11 12:52:14 wiz Exp $
-
-DISTNAME= revbump-1.8
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= wiz@NetBSD.org
-HOMEPAGE= http://www.pkgsrc.org/
-COMMENT= Tools for bumping PKGREVISIONs (for pkgsrc developers)
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_CONFIGURE= yes
-USE_TOOLS+= perl:run
-USE_LANGUAGES= # empty
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-
-do-build:
- ${SED} -e "s!@PERL@!${PERL5}!g" -e "s! make ! ${MAKE} !g" \
- ${FILESDIR}/blbump > ${WRKDIR}/blbump
- ${SED} -e "s!@PERL@!${PERL5}!g" -e "s! make ! ${MAKE} !g" \
- ${FILESDIR}/finddepends > ${WRKDIR}/finddepends
- ${SED} -e "s!@PERL@!${PERL5}!g" -e "s! make ! ${MAKE} !g" \
- ${FILESDIR}/revbump > ${WRKDIR}/revbump
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/blbump ${PREFIX}/bin
- ${INSTALL_MAN} ${FILESDIR}/blbump.1 ${PREFIX}/${PKGMANDIR}/man1
- ${INSTALL_SCRIPT} ${WRKDIR}/finddepends ${PREFIX}/bin
- ${INSTALL_MAN} ${FILESDIR}/finddepends.1 ${PREFIX}/${PKGMANDIR}/man1
- ${INSTALL_SCRIPT} ${WRKDIR}/revbump ${PREFIX}/bin
- ${INSTALL_MAN} ${FILESDIR}/revbump.1 ${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/revbump/PLIST b/pkgtools/revbump/PLIST
deleted file mode 100644
index b199687f76b..00000000000
--- a/pkgtools/revbump/PLIST
+++ /dev/null
@@ -1,7 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2006/03/05 23:35:49 wiz Exp $
-bin/blbump
-bin/finddepends
-bin/revbump
-man/man1/blbump.1
-man/man1/finddepends.1
-man/man1/revbump.1
diff --git a/pkgtools/revbump/files/blbump b/pkgtools/revbump/files/blbump
deleted file mode 100644
index adb5d31b18a..00000000000
--- a/pkgtools/revbump/files/blbump
+++ /dev/null
@@ -1,149 +0,0 @@
-#!@PERL@ -w
-# -*- perl -*-
-#
-# $NetBSD: blbump,v 1.4 2006/04/06 06:25:46 reed Exp $
-#
-# Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
-#
-# This code was originally contributed to the NetBSD Foundation, Inc.
-# by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-use strict;
-use Getopt::Std;
-
-my (@PACKAGES, $PKGSRCDIR, %opt, $pkg);
-
-$PKGSRCDIR = $ENV{PKGSRCDIR};
-if (! $PKGSRCDIR) {
- $PKGSRCDIR = "/usr/pkgsrc";
-}
-
-sub usage {
- print STDERR "usage: blbump [-h] [-p pkgsrcdir] [cat1/pkg1 ... catN/pkgN]\n\n";
- print STDERR "If no packages are given as arguments, the list is read from stdin.\n";
- print STDERR "Packages whose buildlink files cannot be updated automatically\n";
- print STDERR "are written to stdout.\n";
- exit 0;
-}
-
-sub blbump {
- my $pkgdir = shift;
- my ($pkgver, $ret);
- local (*MAKE);
-
- # ignore packages without buildlink3.mk files
- if (not -e "$PKGSRCDIR/$pkgdir/buildlink3.mk") {
- return 1;
- }
- open(MAKE, '-|', "cd $PKGSRCDIR/$pkgdir ; make show-var VARNAME=PKGNAME");
- $pkgver = <MAKE>;
- close(MAKE);
- chop $pkgver;
- $pkgver =~ s/-([^-]*)$/>=$1/;
-
- if (-f "$PKGSRCDIR/$pkgdir/buildlink3.mk") {
- $ret = bumpbl("$PKGSRCDIR/$pkgdir/buildlink3.mk", $pkgver);
- if ($ret == 0) {
- return 0;
- }
- }
-
- return 1;
-}
-
-sub bumpbl {
- my ($backupbl, $done, $newbl, $oldbl, $pkgver);
- $oldbl = shift;
- $pkgver = shift;
- local (*OLDBL);
-
- open(OLDBL, $oldbl) or return 0;
- $newbl = "$oldbl.new";
- open(NEWBL, ">$newbl");
-
- $done = 0;
- while (<OLDBL>) {
- if ($done == 0 && /^(BUILDLINK_ABI_DEPENDS.+=[ \t]+)(.+)$/) {
- print NEWBL "$1$pkgver\n";
- $done = 1;
- } elsif ($done == 0 && /^BUILDLINK_PKGSRCDIR(.*=[ \t]+)/) {
- print NEWBL "BUILDLINK_ABI_DEPENDS${1}$pkgver\n";
- print NEWBL $_;
- $done = 1;
- } else {
- print NEWBL $_;
- }
- }
-
- # no suitable place found
- if ($done == 0) {
- close(NEWBL);
- close(OLDBL);
- unlink "$newbl";
- return 0;
- }
-
- close(NEWBL);
- close(OLDBL);
- rename("$newbl", "$oldbl");
-
- return 1;
-}
-
-getopts('hp:', \%opt);
-usage() if $opt{h};
-if ($opt{p}) {
- $PKGSRCDIR = $opt{p};
-}
-
-@PACKAGES = ();
-push @PACKAGES, @ARGV;
-
-if (! -d $PKGSRCDIR || ! -d "$PKGSRCDIR/doc" || ! -d "$PKGSRCDIR/mk") {
- print STDERR "Invalid pkgsrc directory $PKGSRCDIR\n";
- exit 1;
-}
-
-if (! @PACKAGES) {
- while (<STDIN>) {
- chop;
- push @PACKAGES, $_;
- }
-}
-
-foreach $pkg (@PACKAGES) {
- if (! -f "$PKGSRCDIR/$pkg/Makefile") {
- print "$pkg\n";
- } else {
- print "$pkg\n" if blbump("$pkg") == 0;
- $pkg =~ /\/(.*)$/;
- }
-}
-
-exit 0;
diff --git a/pkgtools/revbump/files/blbump.1 b/pkgtools/revbump/files/blbump.1
deleted file mode 100644
index 6ca74834ac5..00000000000
--- a/pkgtools/revbump/files/blbump.1
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" $NetBSD: blbump.1,v 1.4 2006/04/06 06:25:46 reed Exp $
-.\"
-.\" Copyright (c) 2003, 2004, 2005 The NetBSD Foundation, Inc.
-.\"
-.\" This code was originally contributed to the NetBSD Foundation, Inc.
-.\" by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in
-.\" the documentation and/or other materials provided with the
-.\" distribution.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd March 7, 2006
-.Dt BLBUMP 1
-.Os
-.Sh NAME
-.Nm blbump
-.Nd tool to help bumping dependencies in buildlink3 files automatically
-.Sh SYNOPSIS
-.Nm
-.Op Fl h
-.Op Fl p Ar pkgsrcdir
-.Op cat1/pkg1 ... catN/pkgN
-.Sh DESCRIPTION
-.Nm
-is a perl script for pkgsrc developers that simplifies bumping
-buildlink3 file dependencies automatically.
-Given a package (in
-.Ar category/package
-format) on the command line or stdin, it will try to adjust the
-.Dv BUILDLINK_ABI_DEPENDS
-line for that package to the current version automatically.
-.Pp
-.Nm Fl h
-displays a short usage.
-.Pp
-If
-.Fl p
-is given,
-.Ar pkgsrcdir
-is used instead of the default
-.Pa /usr/pkgsrc .
-.Pp
-.Nm
-reports successful updates on stdout, and prints the package name
-(in
-.Ar category/package
-form) on stdout for each package where it failed.
-.Sh SEE ALSO
-.Xr finddepends 1 ,
-.Xr revbump 1
diff --git a/pkgtools/revbump/files/finddepends b/pkgtools/revbump/files/finddepends
deleted file mode 100644
index a406b3305c7..00000000000
--- a/pkgtools/revbump/files/finddepends
+++ /dev/null
@@ -1,135 +0,0 @@
-#!@PERL@ -w
-# -*- perl -*-
-#
-# $NetBSD: finddepends,v 1.5 2006/07/11 12:52:14 wiz Exp $
-#
-# Copyright (c) 2006 The NetBSD Foundation, Inc.
-#
-# This code was originally contributed to the NetBSD Foundation, Inc.
-# by Thomas Klausner <wiz@NetBSD.org>.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-use strict;
-use Getopt::Std;
-
-my ($PKGSRCDIR, $arg, $bl3, %bl3content, @bl3files, @bl3result,
- $content, $found, $key, $makefile, @makefiles, %opt,
- @optionfiles, $pattern, @searchlist);
-
-$PKGSRCDIR = $ENV{PKGSRCDIR};
-if (! $PKGSRCDIR) {
- $PKGSRCDIR = "/usr/pkgsrc";
-}
-
-sub usage {
- print STDERR "usage: finddepends [-h] [-p pkgsrcdir] package\n\n";
- print STDERR "Find all packages that depend on the argument package.\n";
- exit 0;
-}
-
-getopts('hp:', \%opt);
-usage() if $opt{h};
-if ($opt{p}) {
- $PKGSRCDIR = $opt{p};
-}
-
-usage if (1 ne @ARGV);
-$arg = shift;
-
-@searchlist = ();
-push @searchlist, $arg;
-
-if (! -d $PKGSRCDIR || ! -d "$PKGSRCDIR/doc" || ! -d "$PKGSRCDIR/mk") {
- print STDERR "Invalid pkgsrc directory $PKGSRCDIR\n";
- exit 1;
-}
-
-@bl3files = <$PKGSRCDIR/*/*/buildlink3.mk>;
-%bl3content = ();
-foreach $bl3 (@bl3files) {
- open OUT, $bl3 or die "can't open $bl3";
- $content = "";
- while (<OUT>) {
- chomp($_);
- $content .= $_;
- }
- close OUT;
- $bl3content{$bl3} = $content;
-}
-
-@bl3result = ();
-while ($pattern = pop @searchlist) {
-# print "* Looking for $pattern\n";
- for $key (keys %bl3content) {
-# print "searching $key ($bl3content{$key})\n\n";
- if ($bl3content{$key} =~ m/\Q$pattern/) {
-# print "\n\n ******** MATCH $key \n\n";
-# print "** $pattern found in $key\n";
-# print "** BUMP $key\n";
- delete($bl3content{$key});
-# print "\n\n **** ADDING $key \n\n";
- $key =~ s,$PKGSRCDIR/,,;
-# print "** Adding $key\n";
- print "$key\n";
- push @searchlist, $key;
- push @bl3result, $key;
- }
- }
-}
-
-print "\n";
-
-@makefiles = <$PKGSRCDIR/*/*/Makefile*>;
-@optionfiles = <$PKGSRCDIR/*/*/options.mk>;
-push(@makefiles, @optionfiles);
-
-for $makefile (@makefiles) {
-# print "* reading $makefile\n";
- open OUT, $makefile or die "can't open $bl3";
- $content = "";
- while (<OUT>) {
- chomp($_);
- $content .= $_;
- }
- close OUT;
- $found = 0;
- for $pattern (@bl3result) {
- if ($content =~ m/\Q$pattern/) {
- $found = 1;
- last;
- }
- }
-# print "** BUMP $makefile\n" if ($found);
- if ($found) {
- $makefile =~ s,$PKGSRCDIR/,,;
- print "$makefile\n";
- }
-}
-
-exit 0;
diff --git a/pkgtools/revbump/files/finddepends.1 b/pkgtools/revbump/files/finddepends.1
deleted file mode 100644
index 9ae5c8710be..00000000000
--- a/pkgtools/revbump/files/finddepends.1
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" $NetBSD: finddepends.1,v 1.4 2006/04/13 18:58:17 wiz Exp $
-.\"
-.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
-.\"
-.\" This code was originally contributed to the NetBSD Foundation, Inc.
-.\" by Thomas Klausner <wiz@NetBSD.org>.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in
-.\" the documentation and/or other materials provided with the
-.\" distribution.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd April 13, 2006
-.Dt FINDDEPENDS 1
-.Os
-.Sh NAME
-.Nm finddepends
-.Nd find direct dependencies of a package
-.Sh SYNOPSIS
-.Nm
-.Op Fl h
-.Op Fl p Ar pkgsrcdir
-.Ar pattern
-.Sh DESCRIPTION
-.Nm
-is a perl script for pkgsrc developers that helps finding packages
-affected by a recursive PKGREVISION bump.
-Given a
-.Ar pattern
-on the command line, it will recursively find all buildlink3.mk files
-that include it, and then find all Makefiles that include any of the
-buildlink3.mk files.
-.Pp
-.Nm Fl h
-displays a short usage.
-.Pp
-If
-.Fl p
-is given,
-.Ar pkgsrcdir
-is used instead of the default
-.Pa /usr/pkgsrc .
-.Pp
-See
-.Xr revbump 1
-for an example of a complete recursive PKGREVISION bump.
-.Sh ENVIRONMENT
-.Ev PKGSRCDIR
-pkgsrc root directory.
-Defaults to
-.Pa /usr/pkgsrc .
-.Sh EXAMPLES
-.Dl finddepends security/libtasn1
-.Pp
-would first output all buildlink3.mk files that include
-security/libtasn1, and then all Makefiles and options.mk files that
-include any of the found buildlink3.mk files.
-.Sh SEE ALSO
-.Xr blbump 1 ,
-.Xr revbump 1
diff --git a/pkgtools/revbump/files/revbump b/pkgtools/revbump/files/revbump
deleted file mode 100644
index 38570008cc1..00000000000
--- a/pkgtools/revbump/files/revbump
+++ /dev/null
@@ -1,166 +0,0 @@
-#!@PERL@ -w
-# -*- perl -*-
-#
-# $NetBSD: revbump,v 1.3 2006/03/09 17:24:48 wiz Exp $
-#
-# Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
-#
-# This code was originally contributed to the NetBSD Foundation, Inc.
-# by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-use strict;
-use Getopt::Std;
-
-my (@PACKAGES, $PKGSRCDIR, %opt, $pkg);
-
-$PKGSRCDIR = $ENV{PKGSRCDIR};
-if (! $PKGSRCDIR) {
- $PKGSRCDIR = "/usr/pkgsrc";
-}
-
-sub usage {
- print STDERR "usage: revbump [-h] [-p pkgsrcdir] [cat1/pkg1 ... catN/pkgN]\n\n";
- print STDERR "If no packages are given as arguments, the list is read from stdin.\n";
- print STDERR "Packages for which revision cannot be bumped are written to stdout.\n";
- exit 0;
-}
-
-sub revbump {
- my $pkgdir = shift;
- my ($pkg, $oldpkgver, $pkgver, $done, $oldmk, $newmk, $backupmk);
- local (*OLDMK, *MAKE);
-
- $pkgdir =~ /\/(.*)$/;
- $pkg = $1;
-
- $oldmk = "$PKGSRCDIR/$pkgdir/Makefile";
-
- open(MAKE, '-|', "cd $PKGSRCDIR/$pkgdir ; make show-var VARNAME=PKGVERSION");
- $oldpkgver = <MAKE>;
- close(MAKE);
- chop $oldpkgver;
-
- open(OLDMK, $oldmk);
- $newmk = "$oldmk.new";
- open(NEWMK, ">$newmk");
-
- $done = 0;
- while (<OLDMK>) {
- if ($done == 0 && /^PKGREVISION=([ \t]+)([0-9]+)$/) {
- $done = $2 + 1;
- print NEWMK "PKGREVISION=${1}${done}\n";
- } elsif ($done == 0 && /^SVR4_PKGNAME=([ \t]+)/) {
- print NEWMK "PKGREVISION=${1}1\n";
- print NEWMK $_;
- $done = 1;
- } elsif ($done == 0 && /^CATEGORIES=([ \t]+)/) {
- print NEWMK "PKGREVISION=${1}1\n";
- print NEWMK $_;
- $done = 1;
- } else {
- print NEWMK $_;
- }
- }
-
- # no suitable place found
- if ($done == 0) {
- close(NEWMK);
- close(OLDMK);
- unlink "$newmk";
- return 0;
- }
-
- close(NEWMK);
- close(OLDMK);
- $backupmk = "$oldmk.orig";
- rename("$oldmk", "$backupmk");
- rename("$newmk", "$oldmk");
-
- open(MAKE, '-|', "cd $PKGSRCDIR/$pkgdir ; make show-var VARNAME=PKGVERSION");
- $pkgver = <MAKE>;
- close(MAKE);
- chop $pkgver;
-
- # compare previous PKGVERSION and current PKGVERSION to see if update
- # was successful
- if ($oldpkgver =~ /.*nb([0-9]+)$/) {
- $oldpkgver = $1;
- } else {
- $oldpkgver = 0;
- }
- if ($pkgver =~ /.*nb([0-9]+)$/) {
- $pkgver = $1;
- } else {
- $pkgver = 0;
- }
- if ($oldpkgver + 1 != $pkgver) {
- # unsuccessful, revert change
- rename("$backupmk", "$oldmk");
- return 0;
- }
-
- unlink "$backupmk";
-
- print("Updated $pkgdir from $oldpkgver to $pkgver\n");
-
- return 1;
-}
-
-getopts('hp:', \%opt);
-usage() if $opt{h};
-if ($opt{p}) {
- $PKGSRCDIR = $opt{p};
-}
-
-@PACKAGES = ();
-push @PACKAGES, @ARGV;
-
-if (! -d $PKGSRCDIR || ! -d "$PKGSRCDIR/doc" || ! -d "$PKGSRCDIR/mk") {
- print STDERR "Invalid pkgsrc directory $PKGSRCDIR\n";
- exit 1;
-}
-
-if (! @PACKAGES) {
- while (<STDIN>) {
- chop;
- push @PACKAGES, $_;
- }
-}
-
-foreach $pkg (@PACKAGES) {
- if (! -f "$PKGSRCDIR/$pkg/Makefile") {
- print "$pkg\n";
- } else {
- print "$pkg\n" if revbump("$pkg") == 0;
- $pkg =~ /\/(.*)$/;
- }
-}
-
-exit 0;
diff --git a/pkgtools/revbump/files/revbump.1 b/pkgtools/revbump/files/revbump.1
deleted file mode 100644
index 06271d396e9..00000000000
--- a/pkgtools/revbump/files/revbump.1
+++ /dev/null
@@ -1,110 +0,0 @@
-.\" $NetBSD: revbump.1,v 1.7 2006/04/17 13:40:17 wiz Exp $
-.\"
-.\" Copyright (c) 2003, 2004, 2005, 2006 The NetBSD Foundation, Inc.
-.\"
-.\" This code was originally contributed to the NetBSD Foundation, Inc.
-.\" by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in
-.\" the documentation and/or other materials provided with the
-.\" distribution.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd April 17, 2006
-.Dt REVBUMP 1
-.Os
-.Sh NAME
-.Nm revbump
-.Nd tool to help bump PKGREVISIONs automatically
-.Sh SYNOPSIS
-.Nm
-.Op Fl h
-.Op Fl p Ar pkgsrcdir
-.Op cat1/pkg1 ... catN/pkgN
-.Sh DESCRIPTION
-.Nm
-is a perl script for pkgsrc developers that simplifies bumping
-PKGREVISIONs automatically.
-Given a package (in
-.Ar category/package
-format) on the command line or stdin, it will try to increase
-the PKGREVISION for that package automatically.
-.Pp
-.Nm Fl h
-displays a short usage.
-.Pp
-If
-.Fl p
-is given,
-.Ar pkgsrcdir
-is used instead of the default
-.Pa /usr/pkgsrc .
-.Pp
-.Nm
-reports successful updates on stdout, and prints the package name
-(in
-.Ar category/package
-form) on stdout for each package where it failed.
-.Sh EXAMPLES
-.Dl revbump devel/gmake x11/glib2
-.Pp
-would bump the PKGREVISIONs of gmake and glib2, as would
-.Bd -literal -offset indent
-revbump \*[Lt]\*[Lt] EOF
-devel/gmake
-x11/glib2
-EOF
-.Ed
-.Pp
-The complete procedure for a recursive dependency bump for
-the openssl package using
-.Nm
-and
-.Xr blbump 1
-would be:
-.Bd -literal -offset indent
-cd /usr/pkgsrc
-finddepends security/openssl \*[Gt] allbump
-grep buildlink3.mk allbump | sed 's/.buildlink3.mk//' \*[Gt] bl3bump
-grep -v buildlink3.mk allbump | sed 's/.Makefile$//' \*[Gt] makebump
-revbump \*[Lt] makebump \*[Gt] makebump.manual
-[handle the PKGREVISION bumps in makebump.manual manually;
- this will include any Makefile.common files - the files that include
- them will currently need to be found manually]
-blbump \*[Lt] bl3bump \*[Gt] bl3bump.manual
-[handle the *ABI_DEPENDS* bumps in bl3bump.manual manually]
-cvs diff `cat allbump`
-[look for PYPKGPREFIX -\*[Gt] py22 or py23pth expansions
- in buildlink files and any unrelated diffs you have in your
- local tree, and fix them]
-lintpkgsrc -d
-[fix broken dependencies noted by this (usually meta-pkg/kde3,
- subversion, nessus)]
-cvs diff `cat allbump`
-cvs commit `cat allbump`
-rm allbump bl3bump* makebump*
-.Ed
-.Sh SEE ALSO
-.Xr blbump 1 ,
-.Xr finddepends 1
diff --git a/pkgtools/rpm2pkg/DESCR b/pkgtools/rpm2pkg/DESCR
deleted file mode 100644
index 42e3a7c5cab..00000000000
--- a/pkgtools/rpm2pkg/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-"rpm2pkg" can be used to convert RedHat Package Manager archives used by
-many Linux distribution like e.g. Red Hat or SuSE into NetBSD packages.
-It will extract the RPM files and create a NetBSD package list on the fly.
diff --git a/pkgtools/rpm2pkg/Makefile b/pkgtools/rpm2pkg/Makefile
deleted file mode 100644
index b308dba97f0..00000000000
--- a/pkgtools/rpm2pkg/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-# $NetBSD: Makefile,v 1.34 2006/07/06 21:14:19 jlam Exp $
-
-DISTNAME= rpm2pkg-2.1.1
-PKGREVISION= 2
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= tron@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/Documentation/pkgsrc/
-COMMENT= Convert RPM archives to NetBSD packages
-
-CONFLICTS+= suse-base<=6.4
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= YES
-
-CPPFLAGS+= ${BUILDLINK_CPPFLAGS.bzip2} ${BUILDLINK_CPPFLAGS.rpm} \
- ${BUILDLINK_CPPFLAGS.zlib}
-LIBS+= -lrpm -lintl -lz -lbz2
-
-.include "../../mk/bsd.prefs.mk"
-
-.if (${CC} == gcc)
-CFLAGS+= -Wall
-.endif
-
-INSTALLATION_DIRS= ${PKGMANDIR}/man8 sbin
-
-do-build:
- ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o ${WRKSRC}/rpm2pkg \
- ${FILESDIR}/rpm2pkg.c ${LIBS}
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/rpm2pkg ${PREFIX}/sbin
- ${INSTALL_MAN} ${FILESDIR}/rpm2pkg.8 ${PREFIX}/${PKGMANDIR}/man8
-
-.include "../../archivers/bzip2/buildlink3.mk"
-.include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
-.include "../../misc/rpm/buildlink3.mk"
-.include "../../mk/bdb.buildlink3.mk"
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/rpm2pkg/PLIST b/pkgtools/rpm2pkg/PLIST
deleted file mode 100644
index 34d30fc88a5..00000000000
--- a/pkgtools/rpm2pkg/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:19:10 zuntum Exp $
-sbin/rpm2pkg
-man/man8/rpm2pkg.8
diff --git a/pkgtools/rpm2pkg/files/rpm2pkg.8 b/pkgtools/rpm2pkg/files/rpm2pkg.8
deleted file mode 100644
index 26b3362138f..00000000000
--- a/pkgtools/rpm2pkg/files/rpm2pkg.8
+++ /dev/null
@@ -1,161 +0,0 @@
-.\" $NetBSD: rpm2pkg.8,v 1.5 2001/12/03 19:03:23 wiz Exp $
-.\"
-.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Emmanuel Dreyfus.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 27, 2001
-.Dt RPM2PKG 8
-.Os
-.Sh NAME
-.Nm rpm2pkg
-.Nd RPM to BSD package conversion helper
-.Sh SYNOPSIS
-.Nm
-.Op Fl d Ar directory
-.Op Fl f Ar package_list
-.Op Fl i Ar ignored_dir
-.Op Fl p Ar prefix
-.Op Fl s Ar strip_path_count
-.Ar rpm_file ...
-.Sh DESCRIPTION
-.Nm
-helps in building BSD packages from RPM files by unpacking each specified
-.Ar rpm_file ,
-and by building a
-.Ar package_list
-according to what was extracted. The
-.Ar package_list
-has the format expected by the
-.Nx
-package system.
-.Pp
-.Nm
-also provides a mechanism that helps in selecting what is actually
-extracted from the RPM files. It is therefore possible to reject files
-that are of no interest when building a BSD package. This is especially
-useful for files that are to be extracted in
-.Pa /var
-or
-.Pa /etc .
-.Pp
-The following options are available:
-.Bl -tag -width indent
-.It Fl d Ar directory
-Change working directory to
-.Ar directory .
-.It Fl f Ar package_list
-Produce a
-.Nx
-package list
-.Ar package_list
-from what was actually extracted from the RPM files archives.
-.It Fl i Ar ignored_dir
-Do not extract files contained in the
-.Ar ignored_dir
-directory of the RPM file's archives.
-.It Fl p Ar prefix
-Use
-.Ar prefix
-when extracting files.
-.It Fl s Ar strip_path_count
-Strip
-.Ar strip_path_count
-leading directories in file names.
-.El
-.Sh EXAMPLES
-.Nm
-.Fl d Ar /usr/pkg
-.Fl f Ar /usr/pkgsrc/emulator/more_linux_lib/work/PLIST_DYNAMIC
-.Fl p Ar emul/linux
-.Fl i Ar tmp
-.Fl i Ar var
-.Fl i Ar usr/tmp
-.Ar /usr/pkgsrc/distfiles/more_linux_lib/foo.rpm
-.Ar /usr/pkgsrc/distfiles/more_linux_lib/bar.rpm
-.Pp
-This will extract
-.Pa foo.rpm
-and
-.Pa bar.rpm
-into
-.Pa /usr/pkg/emul/linux .
-A packing list called
-.Pa PLIST_DYNAMIC
-will be created, with pathnames relative to
-.Pa /usr/pkg ,
-because this is the directory into which we asked
-.Nm
-to change with the
-.Fl d
-option.
-.Pp
-.Nm
-will not extract files contained in the
-.Pa tmp ,
-.Pa var ,
-or
-.Pa usr/tmp
-directories of the RPM file's archives.
-.Pp
-.Nm
-.Fl s Ar 1
-.Fl d Ar /usr/pkg
-.Ar /usr/pkgsrc/distfiles/pack/bar.rpm
-.Pp
-This will extract the
-.Ar bar.rpm
-file in
-.Pa /usr/pkg
-while striping the leading directory of files path in
-.Ar bar.rpm .
-This is useful for dealing with RPM archives that contains files like
-.Pa usr/bin/foo ,
-which you would like to go in
-.Pa /usr/pkg/bin .
-.Sh COMPATIBILITY
-.Nm
-should work with any regular RPM file.
-.Sh SEE ALSO
-.Xr cpio 1 ,
-.Xr rpm 8 ,
-.Xr rpm2cpio 8
-.br
-.Em Dq Documentation on the NetBSD Package System ,
-.An Hubert Feyrer Aq hubert.feyrer@informatik.fh-regensburg.de ,
-.An Alistair Crooks Aq agc@pkgsrc.org
-.Sh AUTHORS
-.An Matthias Scheler Aq tron@netbsd.org
-.br
-This man page was written by
-.An Emmanuel Dreyfus Aq manu@netbsd.org
diff --git a/pkgtools/rpm2pkg/files/rpm2pkg.c b/pkgtools/rpm2pkg/files/rpm2pkg.c
deleted file mode 100644
index b83285d1f34..00000000000
--- a/pkgtools/rpm2pkg/files/rpm2pkg.c
+++ /dev/null
@@ -1,965 +0,0 @@
-/* $NetBSD: rpm2pkg.c,v 1.6 2006/01/21 20:46:29 tron Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Matthias Scheler.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <bzlib.h>
-#include <rpmlib.h>
-#include <zlib.h>
-
-#define C_IRUSR 0000400
-#define C_IWUSR 0000200
-#define C_IXUSR 0000100
-#define C_IRGRP 0000040
-#define C_IWGRP 0000020
-#define C_IXGRP 0000010
-#define C_IROTH 0000004
-#define C_IWOTH 0000002
-#define C_IXOTH 0000001
-#define C_ISUID 0004000
-#define C_ISGID 0002000
-#define C_ISVTX 0001000
-#define C_ISDIR 0040000
-#define C_ISREG 0100000
-#define C_ISCHR 0020000
-#define C_ISLNK 0120000
-
-char CPIOMagic[] = {'0','7','0','7','0','1'};
-
-#define CPIO_END_MARKER "TRAILER!!!"
-#define CPIO_FIELD_LENGTH 8
-
-#define CPIO_HDR_INODE 0
-#define CPIO_HDR_MODE 1
-#define CPIO_HDR_FILESIZE 6
-#define CPIO_HDR_NAMESIZE 11
-#define CPIO_NUM_HEADERS 13
-
-#define CP_IFMT 0170000
-
-#define TRUE 1
-#define FALSE 0
-
-typedef struct ModeMapStruct {
- unsigned long mm_CPIOMode;
- mode_t mm_SysMode;
-} ModeMap;
-
-ModeMap ModeMapTab[] = {
- {C_IRUSR, S_IRUSR},
- {C_IWUSR, S_IWUSR},
- {C_IXUSR, S_IXUSR},
- {C_IRGRP, S_IRGRP},
- {C_IWGRP, S_IWGRP},
- {C_IXGRP, S_IXGRP},
- {C_IROTH, S_IROTH},
- {C_IWOTH, S_IWOTH},
- {C_IXOTH, S_IXOTH},
- {C_ISUID, S_ISUID},
- {C_ISGID, S_ISGID},
- {C_ISVTX, S_ISVTX},
- {0, 0}
-};
-
-typedef struct PListEntryStruct PListEntry;
-struct PListEntryStruct {
- PListEntry *pe_Childs[2];
- int pe_DirEmpty;
- mode_t pe_DirMode;
- unsigned long pe_INode;
- char *pe_Link;
- char pe_Name[1];
-};
-
-#define pe_Left pe_Childs[0]
-#define pe_Right pe_Childs[1]
-
-typedef void PListEntryFunc(PListEntry *,FILE *);
-
-#define PLIST_ORDER_FORWARD 0
-#define PLIST_ORDER_BACKWARD 1
-
-#define INVERT_PLIST_ORDER(o) (1 - (o))
-
-typedef struct FileHandleStruct {
- FILE *fh_File;
- BZFILE *fh_BZFile;
- gzFile *fh_GZFile;
- off_t fh_Pos;
-} FileHandle;
-
-static int
-InitBuffer(void **Buffer, int *BufferSizePtr)
-{
- if (*Buffer == NULL) {
- int BufferSize;
-
- BufferSize = sysconf(_SC_PAGESIZE) * 256;
- while ((*Buffer = malloc(BufferSize)) == NULL) {
- BufferSize >>= 1;
- if (BufferSize == 0)
- return FALSE;
- }
- *BufferSizePtr = BufferSize;
- }
- return TRUE;
-}
-
-static void
-Close(FileHandle *fh)
-{
- if (fh->fh_BZFile != NULL) {
- int bzerror;
-
- (void)BZ2_bzReadClose(&bzerror, fh->fh_BZFile);
- (void)fclose(fh->fh_File);
- } else {
- (void)gzclose(fh->fh_GZFile);
- }
- free(fh);
-}
-
-static FileHandle *
-Open(int fd)
-{
- off_t offset;
- char Magic[3];
- FileHandle *fh;
-
- if ((offset = lseek(fd, 0, SEEK_CUR)) < 0)
- return NULL;
- if (read(fd, Magic, sizeof (Magic)) != sizeof (Magic))
- return NULL;
- if (lseek(fd, offset, SEEK_SET) != offset)
- return NULL;
-
- if ((fh = calloc(1, sizeof (FileHandle))) == NULL)
- return NULL;
-
- if ((Magic[0] == 'B') && (Magic[1] == 'Z') && (Magic[2] == 'h')) {
- int bzerror;
-
- if ((fd = dup(fd)) < 0) {
- free(fh);
- return NULL;
- }
- if ((fh->fh_File = fdopen(fd, "rb")) == NULL) {
- perror("fdopen");
- (void)close(fd);
- free(fh);
- return NULL;
- }
- if ((fh->fh_BZFile = BZ2_bzReadOpen(&bzerror, fh->fh_File, 0,
- 0, NULL, 0)) == NULL) {
- (void)fclose(fh->fh_File);
- free(fh);
- return (NULL);
- }
- } else {
- if ((fh->fh_GZFile = gzdopen(fd, "r")) == NULL) {
- free(fh);
- return (NULL);
- }
- }
-
- return (fh);
-}
-
-static int
-Read(FileHandle *fh, void *buffer, int length)
-{
- int bzerror, bytes;
-
- bytes = (fh->fh_BZFile != NULL) ?
- BZ2_bzRead(&bzerror, fh->fh_BZFile, buffer, length) :
- gzread(fh->fh_GZFile, buffer, length);
- if (bytes > 0)
- fh->fh_Pos += bytes;
-
- return (bytes == length);
-}
-
-static int
-SkipAndAlign(FileHandle *fh, off_t Skip)
-
-{
- off_t NewPos;
-
- NewPos = (fh->fh_Pos + Skip + 3) & ~3;
- if (fh->fh_Pos == NewPos)
- return TRUE;
-
- if (fh->fh_GZFile != NULL) {
- if (gzseek(fh->fh_GZFile, NewPos, SEEK_SET) == NewPos) {
- fh->fh_Pos = NewPos;
- return TRUE;
- }
- return FALSE;
- } else {
- static void *Buffer = NULL;
- static int BufferSize = 0;
-
- if (!InitBuffer(&Buffer, &BufferSize))
- return FALSE;
-
- while (fh->fh_Pos < NewPos) {
- off_t Length;
- int Chunk;
-
- Length = NewPos - fh->fh_Pos;
- Chunk = (Length > BufferSize) ? BufferSize : Length;
- if (!Read(fh, Buffer, Chunk))
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
-static PListEntry *
-InsertPListEntry(PListEntry **Tree,char *Name)
-{
- PListEntry *Node;
-
- while ((Node = *Tree) != NULL) {
- Tree = (strcmp(Name, Node->pe_Name) <0) ?
- &Node->pe_Left : &Node->pe_Right;
- }
-
- if ((Node = calloc(1, sizeof (PListEntry) + strlen(Name))) == NULL) {
- perror("calloc");
- exit(EXIT_FAILURE);
- }
-
- (void)strcpy(Node->pe_Name, Name);
-
- return *Tree = Node;
-}
-
-static PListEntry *
-FindPListEntry(PListEntry *Tree, char *Name)
-{
- while (Tree != NULL) {
- int Result;
-
- if ((Result = strcmp(Name, Tree->pe_Name)) == 0) break;
- Tree = (Result < 0) ? Tree->pe_Left : Tree->pe_Right;
- }
-
- return Tree;
-}
-
-static void
-PListEntryFile(PListEntry *Node, FILE *Out)
-
-{
- (void)fputs(Node->pe_Name, Out);
- (void)fputc('\n', Out);
-}
-
-static char *
-StrCat(char *Prefix, char *Suffix)
-{
- int Length;
- char *Str;
-
- Length = strlen(Prefix);
- if ((Str = malloc(Length + strlen(Suffix) + 1)) == NULL) {
- perror("malloc");
- exit(EXIT_FAILURE);
- }
-
- (void)memcpy(Str, Prefix, Length);
- (void)strcpy(&Str[Length], Suffix);
-
- return Str;
-}
-
-static void
-PListEntryLink(PListEntry *Node, FILE *Out)
-
-{
- char *Ptr;
- struct stat Stat;
- int Result;
-
- if ((Ptr = strrchr(Node->pe_Name, '/')) != NULL) {
- char Old, *Targetname;
-
- Old = Ptr[1];
- Ptr[1] = '\0';
- Targetname = StrCat(Node->pe_Name, Node->pe_Link);
- Ptr[1] = Old;
-
- Result = stat(Targetname, &Stat);
- free(Targetname);
- } else {
- Result = stat(Node->pe_Link, &Stat);
- }
-
- if ((Result == 0) && ((Stat.st_mode & S_IFMT) == S_IFREG)) {
- PListEntryFile(Node, Out);
- return;
- }
-
- (void)fprintf(Out, "@exec ln -fs %s %%D/%s\n@unexec rm -f %%D/%s\n",
- Node->pe_Link, Node->pe_Name, Node->pe_Name);
-}
-
-static void
-PListEntryMakeDir(PListEntry *Node, FILE *Out)
-
-{
- if (Node->pe_DirEmpty) {
- (void)fprintf(Out, "@exec mkdir -m %o -p %%D/%s\n",
- Node->pe_DirMode, Node->pe_Name);
- }
-}
-
-static void
-PListEntryRemoveDir(PListEntry *Node, FILE *Out)
-
-{
- (void)fprintf(Out, "@dirrm %s\n", Node->pe_Name);
-}
-
-static void
-ProcessPList(PListEntry *Tree, PListEntryFunc Func, int Order, FILE *Out)
-
-{
- while (Tree != NULL) {
- if (Tree->pe_Childs[Order] != NULL)
- ProcessPList(Tree->pe_Childs[Order], Func, Order, Out);
- Func(Tree, Out);
- Tree = Tree->pe_Childs[INVERT_PLIST_ORDER(Order)];
- }
-}
-
-static char **
-ArrayAdd(char **Array, char *String)
-
-{
- int Old;
-
- Old = 0;
- if (Array != NULL) {
- while (Array[Old] != NULL)
- Old ++;
- }
- if ((Array = realloc(Array, sizeof (char *) * (Old + 2))) == NULL) {
- perror("realloc");
- exit(EXIT_FAILURE);
- }
-
- Array[Old++] = String;
- Array[Old] = NULL;
-
- return Array;
-}
-
-static void
-Usage(char *Progname)
-{
- (void)fprintf(stderr,
- "Usage: %s [-d directory] [-f packlist] [[-i ignorepath] ...]\n"
- " [-p prefix] [-s stripcount] rpmfile [...]\n",
- Progname);
- exit(EXIT_FAILURE);
-}
-
-static char *
-GetData(FileHandle *In, unsigned long Length)
-{
- char *Ptr;
-
- if ((Ptr = malloc(Length + 1)) != NULL) {
- if (Read(In, Ptr, Length) && SkipAndAlign(In, 0)) {
- Ptr[Length] = '\0';
- return Ptr;
- }
- free(Ptr);
- }
-
- return NULL;
-}
-
-static int
-GetCPIOHeader(FileHandle *In, unsigned long *Fields, char **Name)
-{
- char Buffer[CPIO_NUM_HEADERS*CPIO_FIELD_LENGTH], *Ptr;
- int Index;
- unsigned long Value;
-
- *Name = NULL;
-
- if (!Read(In, Buffer, sizeof (CPIOMagic)))
- return FALSE;
- if (memcmp(Buffer, CPIOMagic, sizeof (CPIOMagic)) != 0)
- return FALSE;
-
- if (!Read(In, Buffer, sizeof (Buffer)))
- return FALSE;
-
- Ptr = Buffer;
- Index = sizeof (Buffer);
- Value = 0;
- while (Index-- > 0) {
- Value <<= 4;
- if ((*Ptr >= '0') && (*Ptr <= '9')) {
- Value += (unsigned long)(*Ptr++-'0');
- } else if ((*Ptr >= 'A') && (*Ptr <= 'F')) {
- Value += (unsigned long)(*Ptr++-'A') + 10;
- } else if ((*Ptr >= 'a') && (*Ptr <= 'f')) {
- Value += (unsigned long)(*Ptr++-'a') + 10;
- } else {
- return FALSE;
- }
-
- if ((Index % CPIO_FIELD_LENGTH) == 0) {
- *Fields++ = Value;
- Value = 0;
- }
- }
-
- Value = Fields[CPIO_HDR_NAMESIZE - CPIO_NUM_HEADERS];
- if ((*Name = GetData(In, Value)) == NULL)
- return FALSE;
- return ((*Name)[Value -1 ] == '\0');
-}
-
-static mode_t
-ConvertMode(unsigned long CPIOMode)
-{
- mode_t Mode;
- ModeMap *Ptr;
-
- Mode = 0;
- Ptr = ModeMapTab;
- while (Ptr->mm_CPIOMode != 0) {
- if ((CPIOMode & Ptr->mm_CPIOMode) != 0)
- Mode |= Ptr->mm_SysMode;
- Ptr++;
- }
-
- return Mode;
-}
-
-static int
-MakeTargetDir(char *Name, PListEntry **Dirs, int MarkNonEmpty)
-{
- char *Basename;
- PListEntry *Dir;
- struct stat Stat;
- int Result;
-
- if ((Basename = strrchr(Name, '/')) == NULL)
- return TRUE;
-
- *Basename = '\0';
- if ((Dir = FindPListEntry(*Dirs, Name)) != NULL) {
- *Basename = '/';
- Dir->pe_DirEmpty = !MarkNonEmpty;
- return TRUE;
- }
-
- if (!MakeTargetDir(Name, Dirs, TRUE)) {
- *Basename = '/';
- return FALSE;
- }
-
- if (stat(Name, &Stat) == 0) {
- Result = S_ISDIR(Stat.st_mode);
- } else if (errno != ENOENT) {
- Result = FALSE;
- } else if ((Result = (mkdir(Name, S_IRWXU|S_IRWXG|S_IRWXO) == 0))) {
- InsertPListEntry(Dirs, Name)->pe_DirMode =
- S_IRWXU|S_IRWXG|S_IRWXO;
- }
-
- *Basename = '/';
- return Result;
-}
-
-static int
-MakeDir(char *Name, mode_t Mode, int *OldDir)
-{
- struct stat Stat;
-
- *OldDir = FALSE;
- if (mkdir(Name, Mode) == 0)
- return TRUE;
-
- if ((errno != EEXIST) || (lstat(Name, &Stat) < 0) ||
- !S_ISDIR(Stat.st_mode)) {
- return FALSE;
- }
-
- *OldDir = TRUE;
- return TRUE;
-}
-
-static int
-MakeSymLink(char *Link, char *Name)
-{
- struct stat Stat;
-
- if (symlink(Link, Name) == 0) return TRUE;
-
- if ((errno != EEXIST) || (lstat(Name, &Stat) < 0) ||
- !S_ISLNK(Stat.st_mode)) {
- return FALSE;
- }
-
- return ((unlink(Name) == 0) && (symlink(Link, Name) == 0));
-}
-
-static int
-WriteFile(FileHandle *In, char *Name, mode_t Mode, unsigned long Length,
- char *Link)
-{
- int Out;
- struct stat Stat;
- static void *Buffer = NULL;
- static int BufferSize = 0;
-
- if ((lstat(Name, &Stat) == 0) &&
- (!S_ISREG(Stat.st_mode) || (unlink(Name) < 0))) {
- return FALSE;
- }
-
- if (!InitBuffer(&Buffer, &BufferSize))
- return FALSE;
-
- if (Link != NULL) {
- if (link(Link, Name) < 0)
- return FALSE;
- Out = open(Name, O_WRONLY, Mode);
- } else {
- Out = open(Name, O_WRONLY|O_CREAT, Mode);
- }
- if (Out < 0)
- return FALSE;
-
- while (Length > 0) {
- int Chunk;
-
- Chunk = (Length > BufferSize) ? BufferSize : Length;
- if (!Read(In, Buffer, Chunk) ||
- (write(Out, Buffer, Chunk) != Chunk))
- break;
- Length -= Chunk;
- }
-
- if ((close(Out) == 0) && (Length == 0))
- return SkipAndAlign(In, 0);
-
- (void)unlink(Name);
- return FALSE;
-}
-
-static void
-CheckSymLinks(PListEntry **Links, PListEntry **Files, PListEntry **Dirs)
-{
- PListEntry *Link;
-
- while ((Link = *Links) != NULL) {
- struct stat Stat;
- PListEntry *Ptr;
- char *Basename;
-
- if (Link->pe_Left != NULL)
- CheckSymLinks(&Link->pe_Left, Files, Dirs);
-
- if ((stat(Link->pe_Name, &Stat) < 0) ||
- !S_ISREG(Stat.st_mode)) {
- Links = &Link->pe_Right;
- continue;
- }
-
- (void)InsertPListEntry(Files, Link->pe_Name);
- if ((Basename = strrchr(Link->pe_Name, '/')) != NULL) {
- *Basename = '\0';
- if ((Ptr = FindPListEntry(*Dirs,
- Link->pe_Name)) != NULL)
- Ptr->pe_DirEmpty = FALSE;
- }
-
- if (Link->pe_Right == NULL) {
- *Links = Link->pe_Left;
- free(Link);
- break;
- }
-
- *Links = Link->pe_Right;
- Ptr = Link->pe_Left;
- free(Link);
-
- if (Ptr == NULL)
- continue;
-
- Link = *Links;
- while (Link->pe_Left != NULL)
- Link = Link->pe_Left;
- Link->pe_Left = Ptr;
- }
-}
-
-static int
-CheckPrefix(char *Prefix, char *Name)
-{
- int Length;
-
- Length = strlen(Prefix);
- return ((strncmp(Prefix, Name, Length) == 0) &&
- ((Name[Length] == '\0') || (Name[Length] == '/')));
-}
-
-static char *
-StripPrefix(char *Name, int Count)
-{
- char *NewName;
-
- if (Count <= 0)
- return Name;
-
- NewName = Name;
- while (Count-- > 0) {
- NewName = strchr(NewName, '/');
- if (NewName == NULL)
- return NULL;
- NewName++;
- }
- (void)memmove(Name, NewName, strlen(NewName) + 1);
-
- return Name;
-}
-
-int
-main(int argc, char **argv)
-{
- char *Progname;
- FILE *PListFile;
- char **Ignore, *Prefix;
- int Opt, Index, FD, IsSource, StripCount;
- PListEntry *Files, *Links, *Dirs;
- Header Hdr;
- FileHandle *In;
-
- Progname = strrchr(argv[0], '/');
- if (Progname == NULL)
- Progname = argv[0];
- else
- Progname ++;
-
- PListFile = NULL;
- Ignore = NULL;
- Prefix = NULL;
- StripCount = 0;
- while ((Opt = getopt(argc, argv, "s:d:f:i:p:")) != -1) {
- switch (Opt) {
- case 's':
- StripCount = atoi(optarg);
- if (StripCount <= 0) {
- (void)fprintf(stderr,
- "%s: -s argument \"%s\" "
- "must be a positive integer.\n",
- Progname, optarg);
- return EXIT_FAILURE;
- }
- break;
- case 'f':
- if (PListFile != NULL)
- (void)fclose(PListFile);
- if ((PListFile = fopen(optarg, "a")) == NULL) {
- perror(optarg);
- return EXIT_FAILURE;
- }
- break;
- case 'i':
- Ignore = ArrayAdd(Ignore, optarg);
- break;
- case 'd':
- if (chdir(optarg)) {
- perror(optarg);
- return EXIT_FAILURE;
- }
- break;
- case 'p':
- if (strlen(optarg) > 0)
- Prefix = optarg;
- break;
- default:
- Usage(Progname);
- }
- }
-
- argc -= optind;
- argv += optind;
- if (argc == 0)
- Usage(Progname);
-
- if ((Prefix != NULL) && (Prefix[strlen(Prefix) - 1] != '/'))
- Prefix = StrCat(Prefix, "/");
-
- Files = NULL;
- Links = NULL;
- Dirs = NULL;
- for (Index = 0; Index < argc ; Index++) {
- PListEntry *Last;
-
- if ((FD = open(argv[Index], O_RDONLY, 0)) < 0) {
- perror(argv[Index]);
- return EXIT_FAILURE;
- }
-
- switch (rpmReadPackageHeader(FD, &Hdr, &IsSource, NULL,
- NULL)) {
- case 0:
- break;
- case 1:
- (void)fprintf(stderr,
- "%s: file is not an RPM package.\n", argv[Index]);
- return EXIT_FAILURE;
- default:
- (void)fprintf(stderr, "%s: error reading header.\n",
- argv[Index]);
- return EXIT_FAILURE;
- }
-
- if ((In = Open(FD)) == NULL) {
- (void)fprintf(stderr,
- "%s: cannot read cpio data.\n", argv[Index]);
- return EXIT_FAILURE;
- }
-
- Last = NULL;
- for (;;) {
- unsigned long Fields[CPIO_NUM_HEADERS];
- char *Name;
- mode_t Mode;
- unsigned long Length;
-
- if (!GetCPIOHeader(In, Fields, &Name)) {
- (void)fprintf(stderr,
- "%s: error in cpio header.\n",
- argv[Index]);
- return EXIT_FAILURE;
- }
- if (strcmp(Name, CPIO_END_MARKER) == 0) {
- free(Name);
- break;
- }
- if (*Name == '\0')
- Fields[CPIO_HDR_MODE] = 0;
-
- if (Ignore != NULL) {
- char **Ptr;
-
- Ptr = Ignore;
- while (*Ptr != NULL) {
- if (CheckPrefix(*Ptr, Name)) {
- Fields[CPIO_HDR_MODE] = 0;
- break;
- }
- Ptr++;
- }
- }
-
- if ((Name = StripPrefix(Name, StripCount)) == NULL) {
- (void)fprintf(stderr,
- "%s: Leading path to strip too "
- "big (-s %d)\n",
- argv[Index], StripCount);
- return EXIT_FAILURE;
- }
-
- if (Prefix != NULL) {
- char *Fullname;
-
- Fullname = StrCat(Prefix, Name);
- free(Name);
- Name = Fullname;
- }
-
- Mode = ConvertMode(Fields[CPIO_HDR_MODE]);
- Length = Fields[CPIO_HDR_FILESIZE];
- switch (Fields[CPIO_HDR_MODE] & CP_IFMT) {
- case C_ISDIR: {
- PListEntry *Dir;
- int OldDir;
-
- if (Length != 0) {
- (void)fprintf(stderr,
- "%s: error in cpio file.\n",
- argv[Index]);
- return EXIT_FAILURE;
- }
-
- if (!MakeTargetDir(Name, &Dirs, TRUE)) {
- (void)fprintf(stderr,
- "%s: can't create parent "
- "directories for \"%s\".\n",
- argv[Index], Name);
- return EXIT_FAILURE;
- }
-
- if (!MakeDir(Name, Mode, &OldDir)) {
- (void)fprintf(stderr,
- "%s: can't create directory "
- "\"%s\".\n", argv[Index], Name);
- return EXIT_FAILURE;
- }
-
- if (!OldDir) {
- Dir = InsertPListEntry(&Dirs, Name);
- Dir->pe_DirEmpty = TRUE;
- Dir->pe_DirMode = Mode;
- }
- break;
- }
- case C_ISLNK: {
- char *Link;
-
- if ((Link = GetData(In, Length)) == NULL) {
- (void)fprintf(stderr,
- "%s: error in cpio file.\n",
- argv[Index]);
- return EXIT_FAILURE;
- }
-
- if (!MakeTargetDir(Name, &Dirs, TRUE)) {
- (void)fprintf(stderr,
- "%s: can't create parent "
- "directories for \"%s\".\n",
- argv[Index], Name);
- return EXIT_FAILURE;
- }
-
- if (*Link == '/') {
- char *Ptr;
-
- (void)memmove(Link, Link + 1,
- strlen(Link + 1) + 1);
- Ptr = Name;
- if (Prefix != NULL)
- Ptr += strlen(Prefix);
-
- while ((Ptr = strchr(Ptr, '/'))
- != NULL) {
- char *NewLink;
-
- NewLink = StrCat("../", Link);
- free(Link);
- Link = NewLink;
- Ptr++;
- }
- }
-
- if (!MakeSymLink(Link, Name)) {
- (void)fprintf(stderr,
- "%s: can't create symbolic link "
- "\"%s\".\n", argv[Index], Name);
- return EXIT_FAILURE;
- }
-
- InsertPListEntry(&Links, Name)->pe_Link = Link;
- break;
- }
- case C_ISREG:
- if (!MakeTargetDir(Name, &Dirs, TRUE)) {
- (void)fprintf(stderr,
- "%s: can't create parent "
- "directories for \"%s\".\n",
- argv[Index], Name);
- return EXIT_FAILURE;
- }
-
-
- if ((Last != NULL) && (Last->pe_INode !=
- Fields[CPIO_HDR_INODE])) {
- Last = NULL;
- }
-
- if (!WriteFile(In, Name, Mode, Length,
- (Last != NULL)? Last->pe_Name : NULL)) {
- (void)fprintf(stderr,
- "%s: can't write file \"%s\".\n",
- argv[Index],
- Name);
- return EXIT_FAILURE;
- }
-
- Last = InsertPListEntry(&Files, Name);
- Last->pe_INode = Fields[CPIO_HDR_INODE];
- break;
- default:
- if ((Length > 0) &&
- !SkipAndAlign(In, Length)) {
- (void)fprintf(stderr,
- "%s: error in cpio file.\n",
- argv[Index]);
- return EXIT_FAILURE;
- }
-
- }
-
- free(Name);
- }
-
- Close(In);
- (void)close(FD);
- }
-
- if (PListFile != NULL) {
- ProcessPList(Files, PListEntryFile, PLIST_ORDER_FORWARD,
- PListFile);
- ProcessPList(Dirs, PListEntryMakeDir, PLIST_ORDER_FORWARD,
- PListFile);
- ProcessPList(Links, PListEntryLink, PLIST_ORDER_FORWARD,
- PListFile);
- ProcessPList(Dirs, PListEntryRemoveDir, PLIST_ORDER_BACKWARD,
- PListFile);
- (void)fclose(PListFile);
- }
-
- return EXIT_SUCCESS;
-}
diff --git a/pkgtools/shlock/DESCR b/pkgtools/shlock/DESCR
deleted file mode 100644
index c1c7ffd861d..00000000000
--- a/pkgtools/shlock/DESCR
+++ /dev/null
@@ -1,15 +0,0 @@
-The shlock command can create or verify a lock file on behalf of a
-shell or other script program. When it attempts to create a lock
-file, if one already exists, shlock verifies that it is or is not
-valid. If valid, shlock will exit with a non-zero exit code. If
-invalid, shlock will re- move the lock file, and create a new one.
-
-shlock uses the rename(2) system call to make the final target lock
-file, which is an atomic operation (i.e. "dot locking", so named for
-this mech- anism's original use for locking system mailboxes). It
-puts the process ID ("PID") from the command line into the requested
-lock file.
-
-shlock verifies that an extant lock file is still valid by using
-kill(2) with a zero signal to check for the existence of the process
-that holds the lock.
diff --git a/pkgtools/shlock/Makefile b/pkgtools/shlock/Makefile
deleted file mode 100644
index 8614724d62d..00000000000
--- a/pkgtools/shlock/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# $NetBSD: Makefile,v 1.18 2006/12/19 13:28:20 rillig Exp $
-#
-
-DISTNAME= shlock-20020114
-CATEGORIES= pkgtools sysutils
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-#HOMEPAGE=
-COMMENT= Shell utility to perform dot-locking
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= #empty
-NO_CHECKSUM= yes
-MANCOMPRESSED_IF_MANZ= yes
-PLIST_SRC= ${WRKDIR}/PLIST
-BUILD_DEFS+= MANINSTALL
-
-MAKE_ENV+= ${BSD_MAKE_ENV}
-
-.include "../../mk/bsd.prefs.mk"
-
-PKGSRC_LOCKTYPE= none # avoid "bootstrapping problem"
-
-.if !empty(OPSYS:MSunOS) || !empty(OPSYS:MDarwin) || \
- !empty(OPSYS:MDragonFly) || !empty(OPSYS:MFreeBSD) || \
- !empty(OPSYS:MLinux)
-MANINSTALL=
-.endif
-
-post-extract:
- @for FILE in Makefile shlock.c shlock.1; do \
- ${CP} ${FILESDIR}/$$FILE ${WRKSRC}; \
- done
-
-pre-install:
- @${RM} -f ${PLIST_SRC}
- @${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
- @if [ -n "${MANINSTALL:Mcatinstall}" ]; then \
- ${ECHO} man/cat1/shlock.0 >> ${PLIST_SRC}; \
- fi
- @if [ -n "${MANINSTALL:Mmaninstall}" ]; then \
- ${ECHO} man/man1/shlock.1 >> ${PLIST_SRC}; \
- fi
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/shlock/PLIST b/pkgtools/shlock/PLIST
deleted file mode 100644
index 47c6ed31acf..00000000000
--- a/pkgtools/shlock/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2002/01/15 13:20:27 agc Exp $
-bin/shlock
diff --git a/pkgtools/shlock/files/Makefile b/pkgtools/shlock/files/Makefile
deleted file mode 100644
index 41e2a141e36..00000000000
--- a/pkgtools/shlock/files/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# $NetBSD: Makefile,v 1.5 2006/12/07 19:10:21 rpaulo Exp $
-
-PROG= shlock
-
-.if (${OPSYS} == SunOS || ${OPSYS} == Darwin || ${OPSYS} == DragonFly || \
- ${OPSYS} == Linux)
-NOMAN= YES
-.endif
-
-.include <bsd.prog.mk>
diff --git a/pkgtools/shlock/files/shlock.1 b/pkgtools/shlock/files/shlock.1
deleted file mode 100644
index dd5928f4761..00000000000
--- a/pkgtools/shlock/files/shlock.1
+++ /dev/null
@@ -1,121 +0,0 @@
-.\" $NetBSD: shlock.1,v 1.1.1.1 2002/01/15 13:20:28 agc Exp $
-.\"
-.Dd June 29, 1997
-.Dt SHLOCK 1
-.Os
-.Sh NAME
-.Nm shlock
-.Nd create or verify a lock file for shell scripts
-.Sh SYNOPSIS
-.Nm
-.Fl f
-.Ar lockfile
-.Op Fl p Ar PID
-.Op Fl u
-.Op Fl d
-.Sh DESCRIPTION
-The
-.Nm
-command can create or verify a lock file on behalf of a shell or
-other script program.
-When it attempts to create a lock file, if one already exists,
-.Nm
-verifies that it is or is not valid.
-If valid,
-.Nm
-will exit with a non-zero exit code.
-If invalid,
-.Nm
-will remove the lock file, and
-create a new one.
-.Pp
-.Nm
-uses the
-.Xr rename 2
-system call to make the final target lock file, which is an atomic
-operation (i.e. "dot locking", so named for this mechanism's original
-use for locking system mailboxes).
-It puts the process ID ("PID") from the command line into the
-requested lock file.
-.Pp
-.Nm
-verifies that an extant lock file is still valid by
-using
-.Xr kill 2
-with a zero signal to check for the existence of the process that
-holds the lock.
-.Pp
-The
-.Fl f
-argument with
-.Ar lockfile
-is always required.
-.Pp
-The
-.Fl p
-option with
-.Ar PID
-is given when the program is to create a lock file; when absent,
-.Nm
-will simply check for the validity of the lock file.
-.Pp
-The
-.Fl u
-option causes
-.Nm
-to read and write the PID as a binary pid_t, instead of as ASCII,
-to be compatible with the locks created by UUCP.
-.Pp
-The
-.Fl d
-option causes
-.Nm
-to be verbose about what it is doing.
-.Sh EXIT STATUS
-A zero exit code indicates a valid lock file.
-.Sh EXAMPLES
-.Ss BOURNE SHELL
-.Bd -literal
-#!/bin/sh
-lckfile=/tmp/foo.lock
-if shlock -f ${lckfile} -p $$
-then
-# do what required the lock
- rm ${lckfile}
-else
- echo Lock ${lckfile} already held by `cat ${lckfile}`
-fi
-.Ed
-.Ss C SHELL
-.Bd -literal
-#!/bin/csh -f
-set lckfile=/tmp/foo.lock
-shlock -f ${lckfile} -p $$
-if ($status == 0) then
-# do what required the lock
- rm ${lckfile}
-else
- echo Lock ${lckfile} already held by `cat ${lckfile}`
-endif
-.Ed
-.Pp
-The examples assume that the filesystem where the lock file is to
-be created is writeable by the user, and has space available.
-.Sh HISTORY
-.Nm
-was written for the first Network News Transfer Protocol (NNTP)
-software distribution, released in March 1986.
-The algorithm was suggested by Peter Honeyman,
-from work he did on HoneyDanBer UUCP.
-.Sh AUTHORS
-.An Erik E. Fair Aq fair@clock.org
-.Sh BUGS
-Does not work on NFS or other network filesystem on different
-systems because the disparate systems have disjoint PID spaces.
-.Pp
-Cannot handle the case where a lock file was not deleted, the
-process that created it has exited, and the system has created a
-new process with the same PID as in the dead lock file.
-The lock file will appear to be valid even though the process is
-unrelated to the one that created the lock in the first place.
-Always remove your lock files after you're done.
diff --git a/pkgtools/shlock/files/shlock.c b/pkgtools/shlock/files/shlock.c
deleted file mode 100644
index 78b9b822e2e..00000000000
--- a/pkgtools/shlock/files/shlock.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/* $NetBSD: shlock.c,v 1.1.1.1 2002/01/15 13:20:28 agc Exp $ */
-
-/*
-** Program to produce reliable locks for shell scripts.
-** Algorithm suggested by Peter Honeyman, January 1984,
-** in connection with HoneyDanBer UUCP.
-**
-** I tried extending this to handle shared locks in November 1987,
-** and ran into to some fundamental problems:
-**
-** Neither 4.3 BSD nor System V have an open(2) with locking,
-** so that you can open a file and have it locked as soon as
-** it's real; you have to make two system calls, and there's
-** a race...
-**
-** When removing dead process id's from a list in a file,
-** you need to truncate the file (you don't want to create a
-** new one; see above); unfortunately for the portability of
-** this program, only 4.3 BSD has ftruncate(2).
-**
-** Erik E. Fair <fair@ucbarpa.berkeley.edu>, November 8, 1987
-**
-** Extensions for UUCP style locks (i.e. pid is an int in the file,
-** rather than an ASCII string). Also fix long standing bug with
-** full file systems and temporary files.
-**
-** Erik E. Fair <fair@apple.com>, November 12, 1989
-**
-** ANSIfy the code somewhat to make gcc -Wall happy with the code.
-** Submit to NetBSD
-**
-** Erik E. Fair <fair@clock.org>, May 20, 1997
-*/
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <fcntl.h> /* Needed on hpux */
-#include <stdio.h>
-#include <signal.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#define LOCK_SET 0
-#define LOCK_FAIL 1
-
-#define LOCK_GOOD 0
-#define LOCK_BAD 1
-
-#define FAIL (-1)
-
-#define TRUE 1
-#define FALSE 0
-
-int Debug = FALSE;
-char *Pname;
-const char USAGE[] = "%s: USAGE: shlock -f file -p pid [-d][-u]\n";
-const char E_unlk[] = "%s: unlink(%s): %s\n";
-const char E_open[] = "%s: open(%s): %s\n";
-
-#define dprintf if (Debug) printf
-
-/*
-** Prototypes to make the ANSI compilers happy
-** Didn't lint used to do type and argument checking?
-** (and wasn't that sufficient?)
-*/
-
-#ifdef __STDC__
-/* the following is in case you need to make the prototypes go away. */
-#define _P(x) x
-
-char *xtmpfile _P((char *, pid_t, int));
-int p_exists _P((pid_t));
-int cklock _P((char *, int));
-int mklock _P((char *, pid_t, int));
-void bad_usage _P((void));
-int main _P((int, char **));
-#endif /* __STDC__ */
-
-/*
-** Create a temporary file, all ready to lock with.
-** The file arg is so we get the filename right, if he
-** gave us a full path, instead of using the current directory
-** which might not be in the same filesystem.
-*/
-char *
-xtmpfile(file, pid, uucpstyle)
-char *file;
-pid_t pid;
-int uucpstyle;
-{
- int fd;
- int len;
- char *cp, buf[BUFSIZ];
- static char tempname[BUFSIZ];
-
- sprintf(buf, "shlock%ld", (u_long)getpid());
- if ((cp = strrchr(strcpy(tempname, file), '/')) != (char *)NULL) {
- *++cp = '\0';
- (void) strcat(tempname, buf);
- } else
- (void) strcpy(tempname, buf);
- dprintf("%s: temporary filename: %s\n", Pname, tempname);
-
- sprintf(buf, "%ld\n", (u_long)pid);
- len = strlen(buf);
-openloop:
- if ((fd = open(tempname, O_RDWR|O_CREAT|O_EXCL, 0644)) < 0) {
- switch(errno) {
- case EEXIST:
- dprintf("%s: file %s exists already.\n",
- Pname, tempname);
- if (unlink(tempname) < 0) {
- fprintf(stderr, E_unlk,
- Pname, tempname, strerror(errno));
- return((char *)NULL);
- }
- /*
- ** Further profanity
- */
- goto openloop;
- default:
- fprintf(stderr, E_open,
- Pname, tempname, strerror(errno));
- return((char *)NULL);
- }
- }
-
- /*
- ** Write the PID into the temporary file before attempting to link
- ** to the actual lock file. That way we have a valid lock the instant
- ** the link succeeds.
- */
- if (uucpstyle ?
- (write(fd, &pid, sizeof(pid)) != sizeof(pid)) :
- (write(fd, buf, len) < 0))
- {
- fprintf(stderr, "%s: write(%s,%ld): %s\n",
- Pname, tempname, (u_long)pid, strerror(errno));
- (void) close(fd);
- if (unlink(tempname) < 0) {
- fprintf(stderr, E_unlk,
- Pname, tempname, strerror(errno));
- }
- return((char *)NULL);
- }
- (void) close(fd);
- return(tempname);
-}
-
-/*
-** Does the PID exist?
-** Send null signal to find out.
-*/
-int
-p_exists(pid)
-pid_t pid;
-{
- dprintf("%s: process %ld is ", Pname, (u_long)pid);
- if (pid <= 0) {
- dprintf("invalid\n");
- return(FALSE);
- }
- if (kill(pid, 0) < 0) {
- switch(errno) {
- case ESRCH:
- dprintf("dead\n");
- return(FALSE); /* pid does not exist */
- case EPERM:
- dprintf("alive\n");
- return(TRUE); /* pid exists */
- default:
- dprintf("state unknown: %s\n", strerror(errno));
- return(TRUE); /* be conservative */
- }
- }
- dprintf("alive\n");
- return(TRUE); /* pid exists */
-}
-
-/*
-** Check the validity of an existing lock file.
-**
-** Read the PID out of the lock
-** Send a null signal to determine whether that PID still exists
-** Existence (or not) determines the validity of the lock.
-**
-** Two bigs wins to this algorithm:
-**
-** o Locks do not survive crashes of either the system or the
-** application by any appreciable period of time.
-**
-** o No clean up to do if the system or application crashes.
-**
-*/
-int
-cklock(file, uucpstyle)
-char *file;
-int uucpstyle;
-{
- int fd = open(file, O_RDONLY);
- ssize_t len;
- pid_t pid;
- char buf[BUFSIZ];
-
- dprintf("%s: checking extant lock <%s>\n", Pname, file);
- if (fd < 0) {
- if (errno != ENOENT)
- fprintf(stderr, E_open, Pname, file, strerror(errno));
- return(TRUE); /* might or might not; conservatism */
- }
-
- if (uucpstyle ?
- ((len = read(fd, &pid, sizeof(pid))) != sizeof(pid)) :
- ((len = read(fd, buf, sizeof(buf))) <= 0))
- {
- close(fd);
- dprintf("%s: lock file format error\n", Pname);
- return(FALSE);
- }
- close(fd);
- buf[len + 1] = '\0';
- return(p_exists(uucpstyle ? pid : atoi(buf)));
-}
-
-int
-mklock(file, pid, uucpstyle)
-char *file;
-pid_t pid;
-int uucpstyle;
-{
- char *tmp;
- int retcode = FALSE;
-
- dprintf("%s: trying lock <%s> for process %ld\n", Pname, file,
- (u_long)pid);
- if ((tmp = xtmpfile(file, pid, uucpstyle)) == (char *)NULL)
- return(FALSE);
-
-linkloop:
- if (link(tmp, file) < 0) {
- switch(errno) {
- case EEXIST:
- dprintf("%s: lock <%s> already exists\n", Pname, file);
- if (cklock(file, uucpstyle)) {
- dprintf("%s: extant lock is valid\n", Pname);
- break;
- } else {
- dprintf("%s: lock is invalid, removing\n",
- Pname);
- if (unlink(file) < 0) {
- fprintf(stderr, E_unlk,
- Pname, file, strerror(errno));
- break;
- }
- }
- /*
- ** I hereby profane the god of structured programming,
- ** Edsgar Dijkstra
- */
- goto linkloop;
- default:
- fprintf(stderr, "%s: link(%s, %s): %s\n",
- Pname, tmp, file, strerror(errno));
- break;
- }
- } else {
- dprintf("%s: got lock <%s>\n", Pname, file);
- retcode = TRUE;
- }
- if (unlink(tmp) < 0) {
- fprintf(stderr, E_unlk, Pname, tmp, strerror(errno));
- }
- return(retcode);
-}
-
-void
-bad_usage()
-{
- fprintf(stderr, USAGE, Pname);
- exit(LOCK_FAIL);
-}
-
-int
-main(ac, av)
-int ac;
-char *av[];
-{
- int x;
- char *file = (char *)NULL;
- pid_t pid = 0;
- int uucpstyle = FALSE; /* indicating UUCP style locks */
- int only_check = TRUE; /* don't make a lock */
-
- Pname = ((Pname = strrchr(av[0], '/')) ? Pname + 1 : av[0]);
-
- for(x = 1; x < ac; x++) {
- if (av[x][0] == '-') {
- switch(av[x][1]) {
- case 'u':
- uucpstyle = TRUE;
- break;
- case 'd':
- Debug = TRUE;
- break;
- case 'p':
- if (strlen(av[x]) > 2) {
- pid = atoi(&av[x][2]);
- } else {
- if (++x >= ac) {
- bad_usage();
- }
- pid = atoi(av[x]);
- }
- only_check = FALSE; /* wants one */
- break;
- case 'f':
- if (strlen(av[x]) > 2) {
- file = &av[x][2];
- } else {
- if (++x >= ac) {
- bad_usage();
- }
- file = av[x];
- }
- break;
- default:
- fprintf(stderr, USAGE, Pname);
- exit(LOCK_FAIL);
- }
- }
- }
-
- if (file == (char *)NULL || (!only_check && pid <= 0)) {
- bad_usage();
- }
-
- if (only_check) {
- exit(cklock(file, uucpstyle) ? LOCK_GOOD : LOCK_BAD);
- }
-
- exit(mklock(file, pid, uucpstyle) ? LOCK_SET : LOCK_FAIL);
-}
diff --git a/pkgtools/tnftp/Makefile b/pkgtools/tnftp/Makefile
deleted file mode 100644
index 8ab0fceddbf..00000000000
--- a/pkgtools/tnftp/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# $NetBSD: Makefile,v 1.1 2006/07/14 21:41:42 jlam Exp $
-#
-# This version of tnftp installs into ${PKG_TOOLS_BIN}.
-#
-
-.include "../../net/tnftp/Makefile.common"
-
-CATEGORIES= pkgtools
-
-NO_PKGTOOLS_REQD_CHECK= yes
-PKG_PRESERVE= yes
-
-PKG_TOOLS_PREFIX= ${PKG_TOOLS_BIN:C|/[^/]?bin$||}
-
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR= share/man
-.endif
-
-.if ${PKG_TOOLS_PREFIX} == ${LOCALBASE}
-CONFLICTS+= kth-krb4-[0-9]*
-CONFLICTS+= lukemftp-[0-9]*
-.endif
-
-.include "../../mk/bsd.pkg.mk"
-
-PREFIX:= ${PKG_TOOLS_PREFIX}
diff --git a/pkgtools/url2pkg/DESCR b/pkgtools/url2pkg/DESCR
deleted file mode 100644
index c060cd4f35f..00000000000
--- a/pkgtools/url2pkg/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-The url2pkg program creates a new pkgsrc package from only the URL of a
-distribution file. It is intended to help pkgsrc developers create new
-packages quickly and easily.
diff --git a/pkgtools/url2pkg/Makefile b/pkgtools/url2pkg/Makefile
deleted file mode 100644
index fbdced1e32c..00000000000
--- a/pkgtools/url2pkg/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-# $NetBSD: Makefile,v 1.50 2007/03/19 01:38:56 rillig Exp $
-#
-
-DISTNAME= url2pkg-2.6
-CATEGORIES= pkgtools
-MASTER_SITES= # none
-DISTFILES= # none
-
-MAINTAINER= rillig@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/Documentation/pkgsrc/creating.html
-COMMENT= Tool to automate initial steps in building a package
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}
-NO_CHECKSUM= yes
-NO_BUILD= yes
-USE_LANGUAGES= # none
-USE_TOOLS+= perl:run
-
-INSTALLATION_DIRS= bin ${PKGMANDIR}/man8 lib/url2pkg/ExtUtils
-
-do-extract:
- cd ${FILESDIR} && cp *.pl *.pm ${WRKSRC}/
-
-.include "../../mk/bsd.prefs.mk"
-
-SUBST_CLASSES+= up
-SUBST_STAGE.up= do-configure
-SUBST_FILES.up= url2pkg.pl MakeMaker.pm
-SUBST_SED.up= -e 's,@MAKE@,'${MAKE:Q}',g'
-SUBST_SED.up+= -e 's,@PERL@,${PERL5},g'
-SUBST_SED.up+= -e 's,@PERLLIBDIR@,${PREFIX}/lib/url2pkg,g'
-.if defined(BATCH)
-SUBST_SED.up+= -e 's,@PKGSRCDIR@,/usr/pkgsrc,g'
-.else
-SUBST_SED.up+= -e 's,@PKGSRCDIR@,${PKGSRCDIR},g'
-.endif
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/url2pkg.pl ${PREFIX}/bin/url2pkg
- ${INSTALL_MAN} ${FILESDIR}/url2pkg.8 ${PREFIX}/${PKGMANDIR}/man8
- ${INSTALL_DATA} ${WRKSRC}/MakeMaker.pm ${PREFIX}/lib/url2pkg/ExtUtils/
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/url2pkg/PLIST b/pkgtools/url2pkg/PLIST
deleted file mode 100644
index d1749367a14..00000000000
--- a/pkgtools/url2pkg/PLIST
+++ /dev/null
@@ -1,6 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2006/10/02 16:49:30 rillig Exp $
-bin/url2pkg
-lib/url2pkg/ExtUtils/MakeMaker.pm
-man/man8/url2pkg.8
-@dirrm lib/url2pkg/ExtUtils
-@dirrm lib/url2pkg
diff --git a/pkgtools/url2pkg/files/MakeMaker.pm b/pkgtools/url2pkg/files/MakeMaker.pm
deleted file mode 100644
index de1e9b7cd8d..00000000000
--- a/pkgtools/url2pkg/files/MakeMaker.pm
+++ /dev/null
@@ -1,76 +0,0 @@
-# -*-perl-*-
-
-# This is a drop-in replacement for the MakeMaker Perl module. Instead
-# of generating a Makefile, it extracts the dependency information for
-# other Perl modules. It is used to simplify the generation of pkgsrc
-# packages for Perl modules.
-
-package ExtUtils::MakeMaker;
-
-use strict;
-use warnings;
-
-use constant conf_pkgsrcdir => '@PKGSRCDIR@';
-
-BEGIN {
- use Exporter;
- use vars qw(@ISA @EXPORT);
- @ISA = qw(Exporter);
- @EXPORT = qw(WriteMakefile prompt);
-}
-
-# Finds and returns the category a given package lies in.
-# If the package does not exist, C<undef> is returned.
-# If the package exists more than once, it is unspecified which
-# of the categories is returned.
-sub find_category($) {
- my ($pkg) = @_;
- my ($retval, $pkgsrcdir);
-
- opendir(D, conf_pkgsrcdir) or die;
- foreach my $cat (readdir(D)) {
- next if ($cat =~ qr"^\.");
-
- if (-d (conf_pkgsrcdir."/${cat}/${pkg}")) {
- $retval = $cat;
- }
- }
- closedir(D);
- return $retval;
-}
-
-sub WriteMakefile(%) {
- my (%options) = @_;
-
- if (exists($options{"PREREQ_PM"})) {
- my $deps = $options{"PREREQ_PM"};
-
- foreach my $dep (sort(keys(%{$deps}))) {
- my ($ver, $pkgbase, $category);
-
- $ver = $deps->{$dep};
- ($pkgbase = "p5-${dep}") =~ s/::/-/g;
- $category = find_category($pkgbase);
-
- if (defined($category)) {
- printf("%s>=%s:../../%s/%s\n", $pkgbase, $ver, $category, $pkgbase);
-
- } else {
- # If the package does not exist but the
- # Perl module can be loaded, assume that
- # no extra dependency is needed. Otherwise fail.
- if (!eval(sprintf("use %s %s; 1;", $dep, $ver))) {
- die("$0: ERROR: No pkgsrc package found for dependency ${dep}>=${ver}.\n$@\n");
- }
- }
- }
- }
-}
-
-sub prompt(@) {
- my ($message, $default) = @_;
-
- return $default || "";
-}
-
-1;
diff --git a/pkgtools/url2pkg/files/url2pkg.8 b/pkgtools/url2pkg/files/url2pkg.8
deleted file mode 100644
index dcdfc05453d..00000000000
--- a/pkgtools/url2pkg/files/url2pkg.8
+++ /dev/null
@@ -1,127 +0,0 @@
-.\" $NetBSD: url2pkg.8,v 1.8 2006/10/02 16:49:30 rillig Exp $
-.\"
-.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Emmanuel Dreyfus.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 28, 2001
-.Dt URL2PKG 8
-.Os
-.Sh NAME
-.Nm url2pkg
-.Nd Automatic pkgsrc package generator
-.Sh SYNOPSIS
-.Nm
-.Op Ar URL
-.Sh DESCRIPTION
-.Nm
-takes the
-.Ar URL
-to a package's distfile that should be
-turned into a package. The
-generated package includes a
-.Pa Makefile
-and a basic set of files to get the
-package going. Any customisations to get the package going need to be
-adjusted manually after
-.Nm
-has finished its job.
-.Pp
-.Nm
-is intended to help starting to created a package, it is not
-intended to fly on autopilot, though.
-.Pp
-The
-.Pa Makefile
-contains all the required variables, such as DISTNAME or MASTER_SITES, but some of them cannot be automatically set. Hence, the user's usual editor is invoked to edit the
-.Pa Makefile .
-.Pp
-After the
-.Pa Makefile
-is completed,
-.Nm
-fetches the archive, and computes its checksum via the
-.Ic make makesum
-target. Then archive extraction is done, via the
-.Ic make extract
-target, and finally,
-.Nm
-attempts to detect if
-the software uses a
-.Ic configure
-script, and if it's from GNU
-.Ic autoconf .
-.Pp
-If the user does not supply the
-.Ar URL
-on the command line, then
-.Nm
-will prompt for it.
-.Sh ENVIRONMENT
-.Bl -tag -width indent
-.It PKGEDITOR, EDITOR
-Editor used for
-.Pa Makefile
-edition.
-.It PKGMAINTAINER, REPLYTO
-Name used for the MAINTAINER field in the package
-.Pa Makefile .
-.El
-.Sh EXAMPLES
-.Nm
-.Ar http://www.foo.com/bar/buz.tgz
-.Pp
-Will generate a template
-.Nx
-package for the software that can be found at
-.Ar http://www.foo.com/bar/buz.tgz .
-.Sh SEE ALSO
-.Xr packages 7
-.br
-.Em "Documentation on the NetBSD Package System" ,
-.An Hubert Feyrer Aq hubertf@NetBSD.org ,
-.An Alistair Crooks Aq agc@NetBSD.org .
-.Sh AUTHORS
-.Nm
-was written by
-.An Roland Illig Aq rillig@NetBSD.org ,
-enhancing the previous version by
-.An Hubert Feyrer Aq hubertf@NetBSD.org .
-.br
-This man page was written by
-.An Emmanuel Dreyfus Aq manu@NetBSD.org .
-.Sh BUGS
-.Nm
-does not generate an empty
-.Pa patches
-directory.
diff --git a/pkgtools/url2pkg/files/url2pkg.pl b/pkgtools/url2pkg/files/url2pkg.pl
deleted file mode 100644
index 7a4af95219b..00000000000
--- a/pkgtools/url2pkg/files/url2pkg.pl
+++ /dev/null
@@ -1,445 +0,0 @@
-#! @PERL@
-# $NetBSD: url2pkg.pl,v 1.8 2007/03/19 01:38:56 rillig Exp $
-#
-
-use strict;
-use warnings;
-
-#
-# Build-time Configuration.
-#
-
-my $make = '@MAKE@';
-my $perllibdir = '@PERLLIBDIR@';
-
-use constant true => 1;
-use constant false => 0;
-
-#
-# Some helper subroutines.
-#
-
-sub run_editor($$) {
- my ($fname, $lineno) = @_;
-
- my $editor = $ENV{"PKGEDITOR"} || $ENV{"EDITOR"} || "vi";
-
- system { $editor } ($editor, "+${lineno}", $fname);
-}
-
-sub get_maintainer() {
-
- return $ENV{"PKGMAINTAINER"} || $ENV{"REPLYTO"} || "INSERT_YOUR_MAIL_ADDRESS_HERE";
-}
-
-sub print_section($$) {
- my ($f, $vars) = @_;
-
- if (scalar(@{$vars}) == 0) {
- return;
- }
-
- my $width = 0;
- foreach my $var (@{$vars}) {
- my $len = length($var->[0]);
- $width = ($len > $width) ? $len : $width;
- }
-
- foreach my $var (@{$vars}) {
- my $len = length($var->[0]) + 1;
- my $adjlen = (($width + 1 + 1) + 7) &-8;
- my $ntabs = (7 + $adjlen - $len) / 8;
- printf $f ("%s=%s%s\n", $var->[0], "\t" x $ntabs, $var->[1]);
- }
- printf $f ("\n");
-}
-
-#
-# Introduction to the magic_* subroutines.
-#
-# The following routines are called after the distfiles have been
-# downloaded and extracted. They may inspect the extracted files
-# to automatically define some variables in the package Makefile.
-#
-# The following variables may be used in the magic_* subroutines:
-# $distname contains the package name, including the version number.
-# $abs_wrkdir is an absolute pathname to the working directory, which
-# contains the extracted distfiles. $abs_wrksrc is the absolute pathname
-# to a subdirectory of $abs_wrkdir, in which you can usually find the
-# package-provided Makefiles or configure scripts.
-#
-# The following lists may be extended by the magic_* routines and
-# will later appear in the package Makefile: @depends and @build_depends
-# contain the dependencies of the package, in the form
-# "package>=version". @includes is a list of pathnames relative to the
-# package path. All these files will be included at the bottom of the
-# Makefile. @build_vars is a list of [varname, value] items that contain
-# variables that will be defined in the fourth paragraph of the package
-# Makefile, where the build configuration takes place. The @extra_vars
-# are similar to the @build_vars, but separated by an empty line in the
-# Makefile. The @todo items are inserted below the second paragraph in
-# the Makefile.
-#
-
-my ($distname, $abs_wrkdir, $abs_wrksrc);
-my (@wrksrc_files, @wrksrc_dirs);
-my (@depends, @build_depends, @includes, @build_vars, @extra_vars, @todo);
-my ($pkgname);
-
-#
-# And now to the real magic_* subroutines.
-#
-
-sub magic_configure() {
- my $gnu_configure = false;
-
- open(CONF, "<", "${abs_wrksrc}/configure") or return;
- while (defined(my $line = <CONF>)) {
- if ($line =~ qr"autoconf|Free Software Foundation"i) {
- $gnu_configure = true;
- last;
- }
- }
- close(CONF);
-
- my $varname = ($gnu_configure ? "GNU_CONFIGURE" : "HAS_CONFIGURE");
- push(@build_vars, [$varname, "yes"]);
-}
-
-sub magic_gconf2_schemas() {
- my @gconf2_files = grep(/schemas(?:\.in.*)$/, @wrksrc_files);
- if (@gconf2_files) {
- push(@build_vars, ["CONFIGURE_ENV+", "GCONF_SCHEMA_FILE_DIR=\${PREFIX}/share/gconf/schemas/"]);
- push(@build_vars, ["MAKE_ENV+", "GCONF_SCHEMA_FILE_DIR=\${PREFIX}/share/gconf/schemas/"]);
- foreach my $f (@gconf2_files) {
- if ($f =~ qr"(.*schemas)") {
- push(@extra_vars, ["GCONF2_SCHEMAS+", $1]);
- }
- }
- push(@includes, "../../devel/GConf2/schemas.mk");
- }
-}
-
-sub magic_libtool() {
- if (-f "${abs_wrksrc}/ltconfig" || -f "${abs_wrksrc}/ltmain.sh") {
- push(@build_vars, ["USE_LIBTOOL", "yes"]);
- }
- if (-d "${abs_wrksrc}/libltdl") {
- push(@includes, "../../devel/libltdl/convenience.mk");
- }
-}
-
-sub magic_perlmod() {
- if (-f "${abs_wrksrc}/Build.PL") {
-
- # It's a Module::Build module. Dependencies cannot yet be
- # extracted automatically.
- push(@todo, "Look for the dependencies in Build.PL.");
-
- push(@build_vars, ["PERL5_MODULE_TYPE", "Module::Build"]);
-
- } elsif (-f "${abs_wrksrc}/Makefile.PL") {
- open(DEPS, "cd ${abs_wrksrc} && perl -I${perllibdir} Makefile.PL |") or die;
- while (defined(my $dep = <DEPS>)) {
- chomp($dep);
- if ($dep =~ qr"\.\./\.\./") {
- # Many Perl modules write other things to
- # stdout, so filter them out.
- push(@depends, $dep);
- }
- }
- close(DEPS) or die;
-
- } else {
- return;
- }
-
- my $packlist = $distname;
- $packlist =~ s/-[0-9].*//;
- $packlist =~ s/-/\//g;
- push(@build_vars, ["PERL5_PACKLIST", "auto/${packlist}/.packlist"]);
- push(@includes, "../../lang/perl5/module.mk");
- $pkgname = "p5-\${DISTNAME}";
-}
-
-sub magic_pkg_config() {
- my @pkg_config_files = grep { /\.pc\.in$/ && ! /-uninstalled\.pc\.in$/ } @wrksrc_files;
- if (@pkg_config_files) {
- push(@build_vars, ["USE_TOOLS+", "pkg-config"]);
- }
- foreach my $f (@pkg_config_files) {
- push(@extra_vars, ["PKGCONFIG_OVERRIDE+", $f]);
- }
-}
-
-sub magic_po() {
- if (grep(/\.g?mo$/, @wrksrc_files)) {
- push(@build_vars, ["USE_PKGLOCALEDIR", "yes"]);
- }
-}
-
-sub magic_use_languages() {
- my @languages;
-
- grep(/\.(c|xs)$/, @wrksrc_files) and push(@languages, "c");
- grep(/\.(cpp|c\+\+|cxx|cc|C)$/, @wrksrc_files) and push(@languages, "c++");
- grep(/\.f$/, @wrksrc_files) and push(@languages, "fortran");
-
- my $use_languages = join(" ", @languages);
- if ($use_languages eq "") {
- $use_languages = "# none";
- }
- if ($use_languages ne "c") {
- push(@build_vars, ["USE_LANGUAGES", $use_languages]);
- }
-}
-
-#
-# Subroutines for generating the initial package and adjusting it after
-# the distfiles have been extracted.
-#
-
-sub generate_initial_package($) {
- my ($url) = @_;
- my ($found, $master_site);
- my ($master_sites, $distfile, $homepage, $dist_sufx, $category);
-
- $found = false;
- open(SITES, "<", "../../mk/fetch/sites.mk") or die;
- while (defined(my $line = <SITES>)) {
- chomp($line);
-
- if ($line =~ qr"^(MASTER_SITE_.*)\+=") {
- $master_site = $1;
-
- } elsif ($line =~ qr"^\t(.*?)(?:\s+\\)$") {
- my ($site) = ($1);
-
- if (index($url, $site) == 0) {
- $found = true;
-
- if ($url =~ qr"^\Q${site}\E(.+)/([^/]+)$") {
- my $subdir = $1;
- $distfile = $2;
-
- $master_sites = "\${${master_site}:=${subdir}/}";
- if ($master_site eq "MASTER_SITE_SOURCEFORGE") {
- $homepage = "http://${subdir}.sourceforge.net/";
- } elsif ($master_site eq "MASTER_SITE_GNU") {
- $homepage = "http://www.gnu.org/software/${subdir}/";
- } else {
- $homepage = substr($url, 0, -length($distfile));
- }
- } else {
- $master_sites = "\${${master_site}}";
- }
- }
- }
- }
-
- if (!$found) {
- if ($url =~ qr"^http://(?:pr)?downloads\.sourceforge\.net/([^/]*)/([^/?]+)(?:\?(?:download|use_mirror=.*))?$") {
- my $pkgbase = $1;
- $distfile = $2;
-
- $master_sites = "\${MASTER_SITE_SOURCEFORGE:=${pkgbase}/}";
- $homepage = "http://${pkgbase}.sourceforge.net/";
- $found = true;
- }
- }
-
- if (!$found) {
- if ($url =~ qr"^(.*/)(.*)$") {
- ($master_sites, $distfile) = ($1, $2);
- $homepage = $master_sites;
- } else {
- die("$0: ERROR: Invalid URL: ${url}\n");
- }
- }
-
- if ($distfile =~ qr"^(.*)(\.tgz|\.tar\.Z|\.tar\.gz|\.tar\.bz2)$") {
- ($distname, $dist_sufx) = ($1, $2);
- } elsif ($distfile =~ qr"^(.*)(\.[^.]+)$") {
- ($distname, $dist_sufx) = ($1, $2);
- } else {
- ($distname, $dist_sufx) = ($distfile, "# none");
- }
-
- # ignore errors.
- rename("Makefile", "Makefile-url2pkg.bak");
-
- `pwd` =~ qr".*/([^/]+)/[^/]+$" or die;
- $category = $1;
-
- open(MF, ">", "Makefile") or die;
- print MF ("# \$NetBSD\$\n");
- print MF ("#\n");
- print MF ("\n");
- print_section(*MF, [
- ["DISTNAME", $distname],
- ["CATEGORIES", $category],
- ["MASTER_SITES", $master_sites],
- ($dist_sufx ne ".tar.gz"
- ? ["EXTRACT_SUFX", $dist_sufx]
- : ())
- ]);
- print_section(*MF, [
- ["MAINTAINER", get_maintainer()],
- ["HOMEPAGE", $homepage],
- ["COMMENT", "SHORT_DESCRIPTION_OF_THE_PACKAGE"]
- ]);
- print MF ("# url2pkg-marker (please do not remove this line.)\n");
- print MF (".include \"../../mk/bsd.pkg.mk\"\n");
- close(MF) or die;
-
- open(PLIST, ">", "PLIST") or die;
- print PLIST ("\@comment \$NetBSD\$\n");
- close(PLIST) or die;
-
- open(DI, ">", "distinfo") or die;
- close(DI) or die;
-
- open(DESCR, ">", "DESCR") or die;
- close(DESCR) or die;
-
- run_editor("Makefile", 5);
-
- print ("url2pkg> Running \"make makesum\" ...\n");
- (system { $make } ($make, "makesum")) == 0 or die;
-
- print ("url2pkg> Running \"make extract\" ...\n");
- (system { $make } ($make, "extract")) == 0 or die;
-}
-
-sub adjust_package_from_extracted_distfiles()
-{
- my ($seen_marker);
-
- chomp($abs_wrkdir = `${make} show-var VARNAME=WRKDIR`);
-
- #
- # Determine the value of WRKSRC.
- #
- my @files = ();
- opendir(WRKDIR, $abs_wrkdir) or die;
- while (defined(my $f = readdir(WRKDIR))) {
- next if $f =~ qr"^\.";
- push(@files, $f);
- }
- closedir(WRKDIR);
- if (@files == 1) {
- if ($files[0] ne $distname) {
- push(@build_vars, ["WRKSRC", "\${WRKDIR}/$files[0]"]);
- }
- $abs_wrksrc = "${abs_wrkdir}/$files[0]";
- } else {
- push(@build_vars, ["WRKSRC", "\${WRKDIR}" .
- ((@files > 1) ? " # More than one possibility -- please check manually." : "")]);
- $abs_wrksrc = $abs_wrkdir;
- }
-
- chomp(@wrksrc_files = `cd "${abs_wrksrc}" && find * -type f`);
- chomp(@wrksrc_dirs = `cd "${abs_wrksrc}" && find * -type d`);
-
- magic_configure();
- magic_gconf2_schemas();
- magic_libtool();
- magic_perlmod();
- magic_pkg_config();
- magic_po();
- magic_use_languages();
-
- print("url2pkg> Adjusting the Makefile.\n");
-
- open(MF1, "<", "Makefile") or die;
- open(MF2, ">", "Makefile-url2pkg.new") or die;
-
- # Copy the user-edited part of the Makefile.
- while (defined(my $line = <MF1>)) {
- if ($line =~ qr"^# url2pkg-marker\b") {
- $seen_marker = true;
- last;
- }
- print MF2 ($line);
-
- # Note: This is not elegant, but works.
- if (defined($pkgname) && $line =~ qr"^DISTNAME=(\t+)") {
- print MF2 ("PKGNAME=$1${pkgname}\n");
- }
- }
-
- if (@todo) {
- foreach my $todo (@todo) {
- print MF2 ("# TODO: ${todo}\n");
- }
- print MF2 ("\n");
- }
-
- my @depend_vars;
- foreach my $bd (@build_depends) {
- push(@depend_vars, ["BUILD_DEPENDS+", $bd]);
- }
- foreach my $d (@depends) {
- push(@depend_vars, ["DEPENDS+", $d]);
- }
- print_section(*MF2, \@depend_vars);
-
- print_section(*MF2, \@build_vars);
- print_section(*MF2, \@extra_vars);
-
- foreach my $f (@includes) {
- print MF2 (".include \"${f}\"\n");
- }
-
- # Copy the rest of the user-edited part of the Makefile.
- while (defined(my $line = <MF1>)) {
- print MF2 ($line);
- }
-
- close(MF1);
- close(MF2) or die;
- if ($seen_marker) {
- rename("Makefile-url2pkg.new", "Makefile") or die;
- } else {
- unlink("Makefile-url2pkg.new");
- die("$0: ERROR: didn't find the url2pkg marker in the file.\n");
- }
-
-}
-
-sub main() {
- my $url;
-
- if (!-f "../../mk/bsd.pkg.mk") {
- die("$0 must be run from a package directory (.../pkgsrc/category/package).");
- }
-
- my @extract_cookie = <w*/.extract_done>;
- if (scalar(@extract_cookie) == 0) {
- if (scalar(@ARGV) == 0) {
- print("URL: ");
- # Pressing Ctrl-D is considered equivalent to
- # aborting the process.
- if (!defined($url = <STDIN>)) {
- print("\n");
- print("No URL given -- aborting.\n");
- exit(0);
- }
- } else {
- $url = shift(@ARGV);
- }
-
- generate_initial_package($url);
- } else {
- chomp($distname = `${make} show-var VARNAME=DISTNAME`);
- }
-
- adjust_package_from_extracted_distfiles();
-
- print("\n");
- print("Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!\n");
- print("\n");
- print("Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)\n");
-}
-
-main();
diff --git a/pkgtools/verifypc/DESCR b/pkgtools/verifypc/DESCR
deleted file mode 100644
index 3c4b4aa44a7..00000000000
--- a/pkgtools/verifypc/DESCR
+++ /dev/null
@@ -1,8 +0,0 @@
-verifypc is a tool that sanity checks the dependencies of a package based on
-the results of a successful build, assuming the package uses pkg-config to
-detect dependencies.
-
-verifypc will warn you if the configuration script requests an uninstalled
-or unavailable package (not specified as a direct dependency) or if the
-requested package does not match the version specification in the packages'
-dependencies.
diff --git a/pkgtools/verifypc/Makefile b/pkgtools/verifypc/Makefile
deleted file mode 100644
index 66cefe9b95c..00000000000
--- a/pkgtools/verifypc/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-# $NetBSD: Makefile,v 1.8 2006/11/02 18:02:08 joerg Exp $
-#
-
-DISTNAME= verifypc-1.4
-CATEGORIES= pkgtools
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= jmmv@NetBSD.org
-COMMENT= Sanity check package dependencies according to pkg-config
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-PKG_DESTDIR_SUPPORT= user-destdir
-
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= YES
-NO_BUILD= YES
-WRKSRC= ${WRKDIR}
-
-SUBST_CLASSES+= vars
-SUBST_STAGE.vars= do-configure
-SUBST_MESSAGE.vars= Configuring sources.
-SUBST_FILES.vars= *
-SUBST_SED.vars= -e 's|@MAKE@|${MAKE}|g'
-SUBST_SED.vars+= -e 's|@SH@|${SH}|g'
-
-INSTALLATION_DIRS= ${PKGMANDIR}/man1 bin
-
-do-extract:
- ${CP} ${FILESDIR}/verifypc.sh ${WRKSRC}
- ${CP} ${FILESDIR}/verifypc.1 ${WRKSRC}
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/verifypc.sh \
- ${DESTDIR}${PREFIX}/bin/verifypc
- ${INSTALL_MAN} ${WRKSRC}/verifypc.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/verifypc/PLIST b/pkgtools/verifypc/PLIST
deleted file mode 100644
index 0ca188f5683..00000000000
--- a/pkgtools/verifypc/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2005/10/01 12:56:51 jmmv Exp $
-bin/verifypc
-man/man1/verifypc.1
diff --git a/pkgtools/verifypc/files/verifypc.1 b/pkgtools/verifypc/files/verifypc.1
deleted file mode 100644
index 67f668822bd..00000000000
--- a/pkgtools/verifypc/files/verifypc.1
+++ /dev/null
@@ -1,94 +0,0 @@
-.\" $NetBSD: verifypc.1,v 1.1.1.1 2005/10/01 12:56:51 jmmv Exp $
-.\"
-.\" verifypc - Sanity check package dependencies according to pkg-config
-.\" Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" 3. Neither the name of author nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd October 1, 2005
-.Dt VERIFYPC 1
-.Os
-.Sh NAME
-.Nm verifypc
-.Nd sanity check package dependencies according to pkg-config
-.Sh SYNOPSIS
-.Nm
-.Sh DESCRIPTION
-.Nm
-is a tool that sanity checks the dependencies of a package based on the
-results of a successful build, assuming the package uses
-.Xr pkg-config 1
-to detect its dependencies.
-It will warn you if the configuration script requests an uninstalled or
-unavailable package (not specified as a direct dependency) or if the
-requested package does not match the version specification in the
-packages' dependencies.
-.Pp
-.Nm
-has to be run within a package directory after that package has
-been successfully built.
-Usually, a
-.Sq make configure
-is enough, but it is recommended to run a full build to also catch calls to
-.Xr pkg-config 1
-in the build phase.
-.Pp
-In order to do its checks,
-.Nm
-relies on a log file generated by
-.Xr pkg-config 1 ;
-this log is stored inside the work directory and is automatically generated
-by pkgsrc assuming that your installed
-.Xr pkg-config 1
-binary is newer than 0.19nb1.
-The tool will return an error if the log file does not exist.
-.Sh RETURN VALUES
-.Nm
-exits 0 if all dependencies are correctly satisfied by the package or 1 if
-there were any errors.
-.Sh ENVIRONMENT
-The following environment variables are honored:
-.Bl -tag
-.It Ev MAKE
-Path to the
-.Xr make 1
-utility used to parse package make files.
-Defaults to
-.Pa @MAKE@ .
-.It Ev VERIFYPC_IGNORE
-White-space separated list of pkg-config package names that this tool
-will ignore if they were not found.
-Useful to shut up warnings for packages that are not yet in pkgsrc, such as
-X11 pkg-config files.
-Defaults to nothing.
-.El
-.Sh SEE ALSO
-.Xr pkg-config 1
-.Sh HISTORY
-The
-.Nm
-utility first appeared in pkgsrc-2005Q4.
-.Sh AUTHORS
-.An Julio M. Merino Vidal Aq jmmv@NetBSD.org
diff --git a/pkgtools/verifypc/files/verifypc.sh b/pkgtools/verifypc/files/verifypc.sh
deleted file mode 100644
index 6d2dca8c27d..00000000000
--- a/pkgtools/verifypc/files/verifypc.sh
+++ /dev/null
@@ -1,172 +0,0 @@
-#!@SH@
-#
-# $NetBSD: verifypc.sh,v 1.5 2006/09/14 15:35:46 jmmv Exp $
-#
-# verifypc - Sanity check package dependencies according to pkg-config
-# Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name of author nor the names of its contributors may
-# be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-: ${MAKE:=@MAKE@}
-
-: ${VERIFYPC_IGNORE:=}
-
-SORTED_DEPS=
-
-# -------------------------------------------------------------------------
-
-#
-# Show an error message on stderr and exit.
-#
-err() {
- echo "verifypc: ${@}" 1>&2
- exit 1
-}
-
-# -------------------------------------------------------------------------
-
-#
-# Show a warning message on stderr.
-#
-warn() {
- echo "verifypc: ${@}" 1>&2
-}
-
-# -------------------------------------------------------------------------
-
-#
-# Checks if the file passed as an argument belongs to any of our direct
-# dependencies.
-#
-search_file_in_depends() {
- local file="${1}"
- local dep dir file
-
- for dep in ${SORTED_DEPS}; do
- dir=$(echo ${dep} | cut -d : -f 2)
- if [ -d ${dir} ] && grep ${file} ${dir}/PLIST* >/dev/null; then
- echo ${dep}
- return
- fi
- done
-}
-
-# -------------------------------------------------------------------------
-
-#
-# Checks if the pkg-config dependency specification is satisfied by
-# the 'dep' package dependency.
-#
-check_match() {
- local dep="${1}" pcname="${2}" pcop="${3}" pcver="${4}"
- local out pkgdep pkgname ret
-
- if [ ${pcop} != ">" -a ${pcop} != ">=" -a ${pcop} != "-" ]; then
- warn "unsupported operator ${pcop} in ${pcname} dependency"
- return 1
- fi
-
- pkgdep=$(echo ${dep} | cut -d : -f 1 | sed 's|>=|-|;s|>|-|')
- pkgname=$(echo ${pkgdep} | sed 's|^\(.*\)-\([0-9].*\)$|\1|')
-
- out=$(pkg_admin pmatch "${pkgname}${pcop}${pcver}" "${pkgdep}" 2>&1)
- ret=$?
- if [ ${ret} -ne 0 ]; then
- warn "${pcname} not correct; '${pcop} ${pcver}' needed"
- return 1
- elif [ -n "${out}" ]; then
- warn "${pcname} pmatch failed; wanted" \
- "${pkgname}${pcop}${pcver}, have ${pkgdep}"
- return 1
- fi
- return 0
-}
-
-# -------------------------------------------------------------------------
-
-#
-# Main program.
-#
-main() {
- local dep error lines log pcname pcop pcver
-
- [ -f Makefile -a -f ../../mk/bsd.pkg.mk ] ||
- err "must be run within a package directory"
-
- log=$(${MAKE} show-var VARNAME=_PKG_CONFIG_LOG)
-
- [ -f ${log} ] ||
- err "pkg-config log not found; must run '${MAKE} configure' first"
-
- # Construct a list of dependency specifications for the current package.
- SORTED_DEPS=$(${MAKE} show-vars VARNAMES="BUILD_DEPENDS DEPENDS" | tr ' ' '
-' | sed 's,\([.<>=]\)\([0-9][.:n]\),\10\2,g' | \
- sed 's,\([.<>=]\)\([0-9][.:n]\),\10\2,g' | \
- sort -r | \
- sed 's,\([.<>=]\)0\([0-9][.:n]\),\1\2,g' | \
- sed 's,\([.<>=]\)0\([0-9][.:n]\),\1\2,g' | \
- uniq)
-
- error=0
- lines=$(cat ${log} | sort | uniq | tr ' ' '¬')
- for l in ${lines}; do
- pcname=$(echo ${l} | cut -d '¬' -f 1)
- pcop=$(echo ${l} | cut -d '¬' -f 2)
- pcver=$(echo ${l} | cut -d '¬' -f 3)
-
- dep=$(search_file_in_depends pkgconfig/${pcname}.pc)
- if [ -n "${dep}" -a "${pcop}" != "NOT-FOUND" ]; then
- # The package passed to pkg-config is correct, as we have it
- # among our dependencies. If we are requiring an specific
- # version of it, let's check if it is correct.
- if [ ${pcop} != "(any)" ]; then
- check_match ${dep} ${pcname} ${pcop} ${pcver}
- [ $? -eq 0 ] || error=1
- fi
- else
- # The package passed to pkg-config cannot be found among our
- # dependencies or it does not exist; tell the user.
- if echo ${VERIFYPC_IGNORE} | \
- egrep "^${pcname}$|^${pcname} | ${pcname} | ${pcname}$" \
- >/dev/null
- then
- : # Package explicitly ignored by the user, so shut up.
- else
- if [ "${pcop}" != "NOT-FOUND" ]; then
- warn "${pcname} not a direct dependency"
- else
- warn "${pcname} not found"
- fi
- error=1
- fi
- fi
- done
-
- return ${error}
-}
-
-main "${@}"
diff --git a/pkgtools/x11-links/DESCR b/pkgtools/x11-links/DESCR
deleted file mode 100644
index aac85b5e2e6..00000000000
--- a/pkgtools/x11-links/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-x11-links creates a shadow directory of symbolic links for X11 headers and
-libraries to ${X11BASE} under ${PREFIX}/share/x11-links.
-
-It is intended for use by buildlink code to cleanly separate out the true
-X11 code files from any installed X11 package code files. The X11
-hierarchies supported are:
-
- XFree86-3.3.x
- XFree86-4.0.x
- XFree86-4.1.x
- XFree86-4.2.x
- XFree86-4.3.x
- Xorg-6.8.x
- Xorg-6.9
diff --git a/pkgtools/x11-links/Makefile b/pkgtools/x11-links/Makefile
deleted file mode 100644
index 7f6619dca33..00000000000
--- a/pkgtools/x11-links/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# $NetBSD: Makefile,v 1.81 2006/07/21 13:40:27 jlam Exp $
-#
-# NOTE: If you update this package, then you'll likely need to also update
-# the x11-links dependency in buildlink3.mk to the correct version,
-# usually the most recent.
-
-DISTNAME= x11-links-0.30
-CATEGORIES= pkgtools x11
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= jlam@pkgsrc.org
-HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
-COMMENT= Shadow tree of links to native X11 headers and libraries
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-
-WRKSRC= ${WRKDIR}
-USE_LANGUAGES= # empty
-EXTRACT_ONLY= # empty
-NO_CHECKSUM= yes
-NO_MTREE= yes
-
-PLIST_SRC.dirs= ${WRKDIR}/.PLIST_SRC.dirs
-PLIST_SRC.files= ${WRKDIR}/.PLIST_SRC.files
-PLIST_SRC= ${.CURDIR}/PLIST ${PLIST_SRC.files} ${PLIST_SRC.dirs}
-
-.include "../../mk/bsd.prefs.mk"
-
-.if !exists(${X11BASE}/include/X11/X.h)
-PKG_FAIL_REASON+= "${PKGNAME} requires X headers to be installed"
-.endif
-
-.if ${OPSYS} == "IRIX"
-. include "xsgi.mk"
-.elif ${OPSYS} == "OSF1"
-. include "xdec.mk"
-.elif !empty(X11BASE:M*openwin)
-. include "openwin.mk"
-.elif exists(${X11BASE}/lib/X11/config/xorgversion.def)
-. include "xorg.mk"
-.else
-. include "xfree.mk"
-.endif
-
-X11_LINKS_SUBDIR= share/x11-links
-X11_LINKS_BUILD_DIR= ${WRKSRC}/${X11_LINKS_SUBDIR}
-X11_LINKS_DIR= ${PREFIX}/${X11_LINKS_SUBDIR}
-
-FILES_LIST_CMD= ${SED} -e "s/@ABI@/${ABI}/" ${FILES_LIST} | ${GREP} -v "^\#"
-
-CREATE_X11LINK?= ${LN} -fs $$src $$dest
-
-.include "../../mk/x11.buildlink3.mk"
-
-do-build:
- ${MKDIR} ${X11_LINKS_BUILD_DIR}
- ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}
- ${FILES_LIST_CMD} | ${SED} -e "s,/[^/]*$$,," | ${SORT} -u | \
- while read dir; do \
- if [ -d ${X11BASE}/$$dir ]; then \
- ${MKDIR} ${X11_LINKS_BUILD_DIR}/$$dir; \
- ${CHMOD} ${PKGDIRMODE} ${X11_LINKS_BUILD_DIR}/$$dir; \
- fi; \
- done
- ${RM} -f ${PLIST_SRC.files}
- ${FILES_LIST_CMD} | ${SORT} -u | \
- while read file; do \
- if ${TEST} -r ${X11BASE}/$$file; then \
- src="${X11BASE}/$$file"; \
- dest="${X11_LINKS_BUILD_DIR}/$$file"; \
- ${CREATE_X11LINK}; \
- ${ECHO} "${X11_LINKS_SUBDIR}/$$file" \
- >> ${PLIST_SRC.files}; \
- fi; \
- done
- ${RM} -f ${PLIST_SRC.dirs}
- { cd ${WRKSRC}; ${FIND} ${X11_LINKS_SUBDIR} -type d -print | \
- ${SORT} -ur | ${SED} -e "s|^|@dirrm |"; \
- } > ${PLIST_SRC.dirs}
-
-do-install:
- ${INSTALL_DATA_DIR} ${X11_LINKS_DIR}
- cd ${X11_LINKS_BUILD_DIR} && ${PAX} -rw . ${X11_LINKS_DIR}
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/x11-links/PLIST b/pkgtools/x11-links/PLIST
deleted file mode 100644
index 006a82bff13..00000000000
--- a/pkgtools/x11-links/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:19:14 zuntum Exp $
-@comment this plist is automatically generated
diff --git a/pkgtools/x11-links/buildlink3.mk b/pkgtools/x11-links/buildlink3.mk
deleted file mode 100644
index 0131bfaa361..00000000000
--- a/pkgtools/x11-links/buildlink3.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# $NetBSD: buildlink3.mk,v 1.8 2007/01/17 03:11:19 rillig Exp $
-#
-# Don't include this file manually! It will be included as necessary
-# by bsd.buildlink3.mk.
-
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-X11_LINKS_BUILDLINK3_MK:= ${X11_LINKS_BUILDLINK3_MK}+
-
-.if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= x11-links
-.endif
-
-# x11-links must come first so that packages listed later can overwrite
-# any symlinks created by buildlinking x11-links.
-#
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nx11-links}
-BUILDLINK_PACKAGES:= x11-links ${BUILDLINK_PACKAGES}
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}x11-links
-
-.if !empty(X11_LINKS_BUILDLINK3_MK:M+)
-BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.25
-BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links
-BUILDLINK_DEPMETHOD.x11-links?= build
-
-# Force all of the headers and libraries to be symlinked into
-# ${BUILDLINK_X11_DIR}, even in the "pkgviews" case.
-#
-BUILDLINK_CONTENTS_FILTER.x11-links= \
- ${EGREP} '(include.*/|\.h$$|\.pc$$|/lib[^/]*$$)'
-
-# Rename the symlinks so that they appear in ${BUILDLINK_X11_DIR}/include
-# and ${BUILDLINK_X11_DIR}/lib.
-#
-BUILDLINK_FNAME_TRANSFORM.x11-links+= -e "s|/share/x11-links/|/|"
-
-.endif # X11_LINKS_BUILDLINK3_MK
-
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/pkgtools/x11-links/builtin.mk b/pkgtools/x11-links/builtin.mk
deleted file mode 100644
index 10d8241067d..00000000000
--- a/pkgtools/x11-links/builtin.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-# $NetBSD: builtin.mk,v 1.7 2005/06/01 18:03:08 jlam Exp $
-
-BUILTIN_PKG:= x11-links
-.include "../../mk/buildlink3/bsd.builtin.mk"
-
-.if !defined(USE_BUILTIN.x11-links)
-USE_BUILTIN.x11-links= no
-.endif
-MAKEVARS+= USE_BUILTIN.x11-links
diff --git a/pkgtools/x11-links/files/openwin b/pkgtools/x11-links/files/openwin
deleted file mode 100644
index e774d245cb2..00000000000
--- a/pkgtools/x11-links/files/openwin
+++ /dev/null
@@ -1,1001 +0,0 @@
-# $NetBSD: openwin,v 1.1 2003/09/02 07:14:46 jlam Exp $
-#
-# Filelist for Solaris based on files existing in Solaris 9.
-#
-include/X11/bitmaps/1x1
-include/X11/bitmaps/2x2
-include/X11/bitmaps/Dashes
-include/X11/bitmaps/Down
-include/X11/bitmaps/Excl
-include/X11/bitmaps/FlipHoriz
-include/X11/bitmaps/FlipVert
-include/X11/bitmaps/Fold
-include/X11/bitmaps/Left
-include/X11/bitmaps/Right
-include/X11/bitmaps/RotateLeft
-include/X11/bitmaps/RotateRight
-include/X11/bitmaps/Stipple
-include/X11/bitmaps/Term
-include/X11/bitmaps/Up
-include/X11/bitmaps/black
-include/X11/bitmaps/black6
-include/X11/bitmaps/box6
-include/X11/bitmaps/boxes
-include/X11/bitmaps/calculator
-include/X11/bitmaps/cntr_ptr
-include/X11/bitmaps/cntr_ptrmsk
-include/X11/bitmaps/cross_weave
-include/X11/bitmaps/dimple1
-include/X11/bitmaps/dimple3
-include/X11/bitmaps/dot
-include/X11/bitmaps/dropbar7
-include/X11/bitmaps/dropbar8
-include/X11/bitmaps/flagup
-include/X11/bitmaps/escherknot
-include/X11/bitmaps/flagdown
-include/X11/bitmaps/flipped_gray
-include/X11/bitmaps/gray
-include/X11/bitmaps/gray1
-include/X11/bitmaps/gray3
-include/X11/bitmaps/hlines2
-include/X11/bitmaps/hlines3
-include/X11/bitmaps/icon
-include/X11/bitmaps/keyboard16
-include/X11/bitmaps/left_ptr
-include/X11/bitmaps/left_ptrmsk
-include/X11/bitmaps/letters
-include/X11/bitmaps/light_gray
-include/X11/bitmaps/mailempty
-include/X11/bitmaps/mailemptymsk
-include/X11/bitmaps/mailfull
-include/X11/bitmaps/mailfullmsk
-include/X11/bitmaps/mensetmanus
-include/X11/bitmaps/menu10
-include/X11/bitmaps/menu12
-include/X11/bitmaps/menu16
-include/X11/bitmaps/menu8
-include/X11/bitmaps/noletters
-include/X11/bitmaps/opendot
-include/X11/bitmaps/opendotMask
-include/X11/bitmaps/plaid
-include/X11/bitmaps/scales
-include/X11/bitmaps/right_ptr
-include/X11/bitmaps/right_ptrmsk
-include/X11/bitmaps/root_weave
-include/X11/bitmaps/sipb
-include/X11/bitmaps/star
-include/X11/bitmaps/starMask
-include/X11/bitmaps/stipple
-include/X11/bitmaps/target
-include/X11/bitmaps/terminal
-include/X11/bitmaps/tie_fighter
-include/X11/bitmaps/vlines2
-include/X11/bitmaps/vlines3
-include/X11/bitmaps/weird_size
-include/X11/bitmaps/wide_weave
-include/X11/bitmaps/wierd_size
-include/X11/bitmaps/wingdogs
-include/X11/bitmaps/woman
-include/X11/bitmaps/xfd_icon
-include/X11/bitmaps/xlogo11
-include/X11/bitmaps/xlogo16
-include/X11/bitmaps/xlogo32
-include/X11/bitmaps/xlogo64
-include/X11/bitmaps/txtdup
-include/X11/bitmaps/txtdupmask
-include/X11/bitmaps/txtdupmore
-include/X11/bitmaps/txtdupok
-include/X11/bitmaps/txtdupokmask
-include/X11/bitmaps/txtdupokmore
-include/X11/bitmaps/txtmv
-include/X11/bitmaps/txtmvmask
-include/X11/bitmaps/txtmvmore
-include/X11/bitmaps/txtmvok
-include/X11/bitmaps/txtmvokmask
-include/X11/bitmaps/txtmvokmore
-include/X11/DPS/ColorSB.h
-include/X11/DPS/ColorSBP.h
-include/X11/DPS/DPSScrollW.h
-include/X11/DPS/DPSScrollWP.h
-include/X11/DPS/FontCreatP.h
-include/X11/DPS/FontCreato.h
-include/X11/DPS/FontSB.h
-include/X11/DPS/FontSBP.h
-include/X11/DPS/FontSamplP.h
-include/X11/DPS/FontSample.h
-include/X11/DPS/PSres.h
-include/X11/DPS/XDPS.h
-include/X11/DPS/XDPSlib.h
-include/X11/DPS/XDPSproto.h
-include/X11/DPS/dpsXclient.h
-include/X11/DPS/dpsXcommon.h
-include/X11/DPS/dpsXpreview.h
-include/X11/DPS/dpsXshare.h
-include/X11/DPS/dpsXuserpath.h
-include/X11/DPS/dpsclient.h
-include/X11/DPS/dpsconfig.h
-include/X11/DPS/dpsexcept.h
-include/X11/DPS/psops.h
-include/X11/DPS/dpsfriends.h
-include/X11/DPS/dpsops.h
-include/X11/ICE/ICE.h
-include/X11/ICE/ICEconn.h
-include/X11/ICE/ICElib.h
-include/X11/ICE/ICEmsg.h
-include/X11/ICE/ICEproto.h
-include/X11/ICE/ICEutil.h
-include/X11/SM/SM.h
-include/X11/SM/SMlib.h
-include/X11/SM/SMproto.h
-include/X11/Xaw/AllWidgets.h
-include/X11/Xaw/AsciiSink.h
-include/X11/Xaw/AsciiSinkP.h
-include/X11/Xaw/AsciiSrc.h
-include/X11/Xaw/AsciiSrcP.h
-include/X11/Xaw/AsciiText.h
-include/X11/Xaw/AsciiTextP.h
-include/X11/Xaw/Box.h
-include/X11/Xaw/BoxP.h
-include/X11/Xaw/Cardinals.h
-include/X11/Xaw/Clock.h
-include/X11/Xaw/ClockP.h
-include/X11/Xaw/Command.h
-include/X11/Xaw/CommandP.h
-include/X11/Xaw/Dialog.h
-include/X11/Xaw/DialogP.h
-include/X11/Xaw/Form.h
-include/X11/Xaw/FormP.h
-include/X11/Xaw/Grip.h
-include/X11/Xaw/GripP.h
-include/X11/Xaw/Label.h
-include/X11/Xaw/LabelP.h
-include/X11/Xaw/List.h
-include/X11/Xaw/ListP.h
-include/X11/Xaw/Logo.h
-include/X11/Xaw/LogoP.h
-include/X11/Xaw/Mailbox.h
-include/X11/Xaw/MailboxP.h
-include/X11/Xaw/MenuButtoP.h
-include/X11/Xaw/MenuButton.h
-include/X11/Xaw/MultiSink.h
-include/X11/Xaw/MultiSinkP.h
-include/X11/Xaw/MultiSrc.h
-include/X11/Xaw/MultiSrcP.h
-include/X11/Xaw/Paned.h
-include/X11/Xaw/PanedP.h
-include/X11/Xaw/Panner.h
-include/X11/Xaw/PannerP.h
-include/X11/Xaw/Porthole.h
-include/X11/Xaw/PortholeP.h
-include/X11/Xaw/Repeater.h
-include/X11/Xaw/RepeaterP.h
-include/X11/Xaw/Reports.h
-include/X11/Xaw/Scrollbar.h
-include/X11/Xaw/ScrollbarP.h
-include/X11/Xaw/Simple.h
-include/X11/Xaw/SimpleMenP.h
-include/X11/Xaw/SimpleMenu.h
-include/X11/Xaw/SimpleP.h
-include/X11/Xaw/Sme.h
-include/X11/Xaw/SmeP.h
-include/X11/Xaw/SmeBSB.h
-include/X11/Xaw/SmeBSBP.h
-include/X11/Xaw/SmeLine.h
-include/X11/Xaw/SmeLineP.h
-include/X11/Xaw/StripCharP.h
-include/X11/Xaw/StripChart.h
-include/X11/Xaw/Template.c
-include/X11/Xaw/Template.h
-include/X11/Xaw/TemplateP.h
-include/X11/Xaw/Text.h
-include/X11/Xaw/TextP.h
-include/X11/Xaw/TextSink.h
-include/X11/Xaw/TextSinkP.h
-include/X11/Xaw/TextSrc.h
-include/X11/Xaw/TextSrcP.h
-include/X11/Xaw/Toggle.h
-include/X11/Xaw/ToggleP.h
-include/X11/Xaw/Tree.h
-include/X11/Xaw/TreeP.h
-include/X11/Xaw/VendorEP.h
-include/X11/Xaw/Viewport.h
-include/X11/Xaw/ViewportP.h
-include/X11/Xaw/XawImP.h
-include/X11/Xaw/XawInit.h
-include/X11/Xmu/Atoms.h
-include/X11/Xmu/CharSet.h
-include/X11/Xmu/CloseHook.h
-include/X11/Xmu/Converters.h
-include/X11/Xmu/CurUtil.h
-include/X11/Xmu/CvtCache.h
-include/X11/Xmu/DisplayQue.h
-include/X11/Xmu/Drawing.h
-include/X11/Xmu/Editres.h
-include/X11/Xmu/EditresP.h
-include/X11/Xmu/Error.h
-include/X11/Xmu/ExtAgent.h
-include/X11/Xmu/Initer.h
-include/X11/Xmu/Misc.h
-include/X11/Xmu/StdCmap.h
-include/X11/Xmu/StdSel.h
-include/X11/Xmu/SysUtil.h
-include/X11/Xmu/WhitePoint.h
-include/X11/Xmu/WidgetNode.h
-include/X11/Xmu/WinUtil.h
-include/X11/Xmu/Xct.h
-include/X11/Xmu/Xmu.h
-include/X11/Xmu/XmuSolaris.h
-include/X11/extensions/MITMisc.h
-include/X11/extensions/Print.h
-include/X11/extensions/XEVI.h
-include/X11/extensions/XI.h
-include/X11/extensions/XIE.h
-include/X11/extensions/XIElib.h
-include/X11/extensions/XIEproto.h
-include/X11/extensions/XIEprotost.h
-include/X11/extensions/XInput.h
-include/X11/extensions/XIproto.h
-include/X11/extensions/XKB.h
-include/X11/extensions/XKBconfig.h
-include/X11/extensions/XKBfile.h
-include/X11/extensions/XKBgeom.h
-include/X11/extensions/XKBproto.h
-include/X11/extensions/XKBsrv.h
-include/X11/extensions/XKBstr.h
-include/X11/extensions/XKM.h
-include/X11/extensions/XKMformat.h
-include/X11/extensions/XShm.h
-include/X11/extensions/XTest.h
-include/X11/extensions/Xag.h
-include/X11/extensions/Xagsrv.h
-include/X11/extensions/Xagstr.h
-include/X11/extensions/Xcup.h
-include/X11/extensions/Xcupstr.h
-include/X11/extensions/Xdbe.h
-include/X11/extensions/Xdbeproto.h
-include/X11/extensions/Xext.h
-include/X11/extensions/allplanes.h
-include/X11/extensions/allplanesstr.h
-include/X11/extensions/dpms.h
-include/X11/extensions/dpmsstr.h
-include/X11/extensions/fbpm.h
-include/X11/extensions/fbpmstr.h
-include/X11/extensions/lbxbuf.h
-include/X11/extensions/lbxbufstr.h
-include/X11/extensions/lbxdeltastr.h
-include/X11/extensions/lbximage.h
-include/X11/extensions/lbxopts.h
-include/X11/extensions/lbxstr.h
-include/X11/extensions/lbxzlib.h
-include/X11/extensions/multibuf.h
-include/X11/extensions/multibufst.h
-include/X11/extensions/panoramiXext.h
-include/X11/extensions/record.h
-include/X11/extensions/recordstr.h
-include/X11/extensions/saver.h
-include/X11/extensions/saverproto.h
-include/X11/extensions/scrnsaver.h
-include/X11/extensions/security.h
-include/X11/extensions/securstr.h
-include/X11/extensions/shape.h
-include/X11/extensions/shapestr.h
-include/X11/extensions/shmstr.h
-include/X11/extensions/sync.h
-include/X11/extensions/syncstr.h
-include/X11/extensions/transovl.h
-include/X11/extensions/transovlstr.h
-include/X11/extensions/xinerama.h
-include/X11/extensions/xtestext1.h
-include/X11/Composite.h
-include/X11/CompositeP.h
-include/X11/ConstrainP.h
-include/X11/Constraint.h
-include/X11/Core.h
-include/X11/CoreP.h
-include/X11/DECkeysym.h
-include/X11/Intrinsic.h
-include/X11/IntrinsicP.h
-include/X11/Object.h
-include/X11/ObjectP.h
-include/X11/RectObj.h
-include/X11/RectObjP.h
-include/X11/Shell.h
-include/X11/ShellP.h
-include/X11/StringDefs.h
-include/X11/Suncompose.h
-include/X11/Sunkeysym.h
-include/X11/Vendor.h
-include/X11/Sunowconfig.h
-include/X11/VendorP.h
-include/X11/X.h
-include/X11/XKBlib.h
-include/X11/XSunExt.h
-include/X11/XWDFile.h
-include/X11/Xatom.h
-include/X11/Xauth.h
-include/X11/Xcms.h
-include/X11/Xdmcp.h
-include/X11/Xfuncproto.h
-include/X11/Xfuncs.h
-include/X11/XlcGeneric.h
-include/X11/XlcPubI.h
-include/X11/XlcPublic.h
-include/X11/Xlcint.h
-include/X11/Xlib.h
-include/X11/Xlibint.h
-include/X11/Xlocale.h
-include/X11/Xmd.h
-include/X11/Xos.h
-include/X11/Xosdefs.h
-include/X11/Xproto.h
-include/X11/Xprotostr.h
-include/X11/Xresource.h
-include/X11/Xstreams.h
-include/X11/Xutil.h
-include/X11/Xthreads.h
-include/X11/Xvarargs.h
-include/X11/ap_keysym.h
-include/X11/comstats.h
-include/X11/copyright.h
-include/X11/cursorfont.h
-include/X11/keysym.h
-include/X11/keysymdef.h
-include/X11/nmdefs.h
-include/X11/nodename.h
-include/X11/xpm.h
-include/Xau
-include/config/generic.h
-include/desktop/tt_c.h
-include/desktop/ttdnd.h
-include/desktop/tttk.h
-include/dga/XineramaInfo.h
-include/dga/dga.h
-include/dga/dga_externaldefs.h
-include/images/clocktool.icon
-include/images/clocktool.rom.icon
-include/images/ASCII_glyph.icon
-include/images/Audiotool_glyph.icon
-include/images/Audiotool_glyph_mask.icon
-include/images/Binder_glyph.icon
-include/images/Binder_glyph_mask.icon
-include/images/Book_glyph.icon
-include/images/Book_glyph_mask.icon
-include/images/CDMgr_glyph.icon
-include/images/CDMgr_glyph_mask.icon
-include/images/CD_glyph.icon
-include/images/CD_glyph_mask.icon
-include/images/Calctool_glyph.icon
-include/images/Calctool_glyph_mask.icon
-include/images/CalendarMgrFile_glyph.icon
-include/images/CalendarMgrFile_glyph_mask.icon
-include/images/CalendarMgr_glyph.icon
-include/images/CalendarMgr_glyph_mask.icon
-include/images/Clock_glyph.icon
-include/images/Clock_glyph_mask.icon
-include/images/Code_CCsource_glyph.icon
-include/images/Code_asm_glyph.icon
-include/images/Code_ccsource_glyph.icon
-include/images/Code_cheader_glyph.icon
-include/images/Code_csource_glyph.icon
-include/images/Code_lib_glyph.icon
-include/images/Code_object_glyph.icon
-include/images/Compressed_glyph.icon
-include/images/Console_glyph.icon
-include/images/Console_glyph_mask.icon
-include/images/Corefile_glyph.icon
-include/images/DOSwin_glyph.icon
-include/images/DOSwin_glyph_mask.icon
-include/images/Dbxtool_glyph.icon
-include/images/Dbxtool_glyph_mask.icon
-include/images/Empty_doc_glyph.icon
-include/images/Exclamation_doc_glyph.icon
-include/images/FileMgr.icon
-include/images/FileMgr_glyph.icon
-include/images/FileMgr_glyph_mask.icon
-include/images/FileMgr_mask.icon
-include/images/FirstAid_doc_glyph.icon
-include/images/Folder_closed_glyph.icon
-include/images/Folder_closed_glyph_mask.icon
-include/images/Folder_open_glyph.icon
-include/images/Folder_open_glyph_mask.icon
-include/images/Font_glyph.icon
-include/images/Fontedit_glyph.icon
-include/images/Fontedit_glyph_mask.icon
-include/images/Frame_doc_glyph.icon
-include/images/GIF_glyph.icon
-include/images/GILfile_glyph.icon
-include/images/GILfile_glyph_mask.icon
-include/images/Generic_Doc_glyph.icon
-include/images/Generic_Doc_glyph_mask.icon
-include/images/Generic_GUI_prog_glyph.icon
-include/images/Generic_GUI_prog_glyph_mask.icon
-include/images/Generic_SunOS_prog_glyph.icon
-include/images/Generic_SunOS_prog_glyph_mask.icon
-include/images/Generic_config_glyph.icon
-include/images/Generic_init_glyph.icon
-include/images/Generic_rc_glyph.icon
-include/images/Generic_raster_glyph.icon
-include/images/Generic_spreadsheet_glyph.icon
-include/images/Help_glyph.icon
-include/images/Hidden_file_glyph.icon
-include/images/Hospital_doc_glyph.icon
-include/images/IA_Navigate_glyph.icon
-include/images/IA_Navigate_glyph_mask.icon
-include/images/IA_View_glyph.icon
-include/images/IA_View_glyph_mask.icon
-include/images/IFF_glyph.icon
-include/images/Iconedit_glyph.icon
-include/images/Iconedit_glyph_mask.icon
-include/images/Imagetool_glyph.icon
-include/images/Imagetool_glyph_mask.icon
-include/images/Info_doc_glyph.icon
-include/images/JPEG_glyph.icon
-include/images/Mailfile_glyph.icon
-include/images/Mailfile_glyph_mask.icon
-include/images/Mailtool_Compose_glyph.icon
-include/images/Mailtool_Compose_glyph_mask.icon
-include/images/Mailtool_glyph.icon
-include/images/Mailtool_glyph_mask.icon
-include/images/Makefile_glyph.icon
-include/images/MultiBrowse_glyph.icon
-include/images/MultiBrowse_glyph_mask.icon
-include/images/PSdoc.icon
-include/images/Pageview_glyph.icon
-include/images/Pageview_glyph_mask.icon
-include/images/Perfmeter_glyph.icon
-include/images/Perfmeter_glyph_mask.icon
-include/images/PostScript_Doc_glyph.icon
-include/images/abc.pr
-include/images/PostScript_alt_glyph.icon
-include/images/PostScript_distilled_glyph.icon
-include/images/Printtool_glyph.icon
-include/images/Printtool_glyph_mask.icon
-include/images/Radioactive_doc_glyph.icon
-include/images/SPARC_exec_glyph.icon
-include/images/SPARC_exec_glyph_mask.icon
-include/images/SQLquery.icon
-include/images/SQLquery_mask.icon
-include/images/SQLreport.icon
-include/images/SQLreport_mask.icon
-include/images/Shell_script_glyph.icon
-include/images/Shell_script_glyph_mask.icon
-include/images/Shelltool_glyph.icon
-include/images/Shelltool_glyph_mask.icon
-include/images/abstk.pr
-include/images/Snapshot_glyph.icon
-include/images/Snapshot_glyph_mask.icon
-include/images/StayOut_doc_glyph.icon
-include/images/StayOut_glyph.icon
-include/images/StayOut_glyph_mask.icon
-include/images/Stop_Doc_glyph.icon
-include/images/SunAudio_16Bit_glyph.icon
-include/images/SunAudio_8Bit_glyph.icon
-include/images/SunAudio_Alt_16Bit_glyph.icon
-include/images/SunAudio_Alt_8Bit_glyph.icon
-include/images/SunAudio_Alt_glyph.icon
-include/images/SunAudio_glyph.icon
-include/images/SunIcon_1Bit_glyph.icon
-include/images/SunIcon_8Bit_glyph.icon
-include/images/SunIcon_glyph.icon
-include/images/TIFF_glyph.icon
-include/images/SunRaster_1Bit_glyph.icon
-include/images/SunRaster_24Bit_glyph.icon
-include/images/SunRaster_8Bit_glyph.icon
-include/images/SunRaster_glyph.icon
-include/images/Tapetool_glyph.icon
-include/images/Tapetool_glyph_mask.icon
-include/images/Textedit_glyph.icon
-include/images/Textedit_glyph_mask.icon
-include/images/XOut_doc_glyph.icon
-include/images/Xbm_glyph.icon
-include/images/Xpm_glyph.icon
-include/images/Xprog_glyph.icon
-include/images/Xprog_glyph_mask.icon
-include/images/YUV_glyph.icon
-include/images/ab_library.icon
-include/images/ab_library.mask.icon
-include/images/abstk_up.pr
-include/images/alert_bang32.pr
-include/images/alert_qmark32.pr
-include/images/app_list.icon
-include/images/app_listI.icon
-include/images/application.icon
-include/images/applicationI.icon
-include/images/audiodoc.icon
-include/images/basic_cursor.pr
-include/images/basic_text_cursor.pr
-include/images/bg1.xbm
-include/images/bg2.xbm
-include/images/bg3.xbm
-include/images/bind.icon
-include/images/bind.mask.icon
-include/images/black.cursor
-include/images/black.icon
-include/images/blank.pr
-include/images/boggle.icon
-include/images/box.icon16
-include/images/box.pr
-include/images/broken_list.icon
-include/images/brokenlink.icon
-include/images/bullseye.cursor
-include/images/busy.cursor
-include/images/busy.source.icon
-include/images/button.color.invert.icon
-include/images/button.color.normal.icon
-include/images/button.color.stencil.icon
-include/images/button.mono.invert.icon
-include/images/button.mono.normal.icon
-include/images/button.mono.stencil.icon
-include/images/button_stack.pr
-include/images/c.icon
-include/images/calctool.icon
-include/images/calctool.mask.icon
-include/images/canfield.icon
-include/images/canvas_demo.icon
-include/images/cardback.icon
-include/images/cd.icon
-include/images/cd.mask.icon
-include/images/chesstool.icon
-include/images/chess.clock.icon
-include/images/choice_12_off.pr
-include/images/choice_12_on.pr
-include/images/choice_14_off.pr
-include/images/choice_14_on.pr
-include/images/choice_16_off.pr
-include/images/choice_16_on.pr
-include/images/choice_19_off.pr
-include/images/choice_19_on.pr
-include/images/choice_24_off.pr
-include/images/choice_24_on.pr
-include/images/choice_32_off.pr
-include/images/choice_32_on.pr
-include/images/choice_stack.pr
-include/images/circle.icon16
-include/images/circle.pr
-include/images/circle_0.pr
-include/images/circle_25.pr
-include/images/circle_50.pr
-include/images/circle_75.pr
-include/images/circle_black.pr
-include/images/circle_root.pr
-include/images/clock.icon
-include/images/clock.rom.icon
-include/images/clock_rot.icon
-include/images/cmdtool.icon
-include/images/cmdtool_mask.icon
-include/images/cmrb14.pr
-include/images/cmrr14.pr
-include/images/col_pi.icon
-include/images/compose.icon
-include/images/compose.mask.icon
-include/images/compress.icon
-include/images/confirm.cursor
-include/images/confirm.pr
-include/images/confirm_left.pr
-include/images/confirm_middle.pr
-include/images/confirm_right.pr
-include/images/console.icon
-include/images/console_mask.icon
-include/images/copy.cursor
-include/images/copy_cursor.pr
-include/images/copyletter.cursor
-include/images/copyletter.pr
-include/images/copyletters.cursor
-include/images/copyletters.pr
-include/images/core_eye.icon
-include/images/coredoc.icon
-include/images/counter_rot.icon
-include/images/cursor_demo.icon
-include/images/cycle.pr
-include/images/dbxtool.icon
-include/images/dead.icon
-include/images/dead.mask.icon
-include/images/default.icon
-include/images/default_pin_out.pr
-include/images/defaultsedit.icon
-include/images/diskette.icon
-include/images/diskette.mask.icon
-include/images/doc.mask.icon
-include/images/doc_list.icon
-include/images/doc_listI.icon
-include/images/document.cursor
-include/images/document.icon
-include/images/document.mask.icon
-include/images/documentI.icon
-include/images/dos.icon
-include/images/dos.mask.icon
-include/images/down_arrow.icon
-include/images/down_arrow.pr
-include/images/down_button_10.pr
-include/images/down_button_12.pr
-include/images/down_button_14.pr
-include/images/down_button_19.pr
-include/images/draw.icon
-include/images/drawdoc.icon
-include/images/dup.cursor
-include/images/dup_cursor.pr
-include/images/dupedoc_drag.icon
-include/images/dupedoc_drop.icon
-include/images/ellipse.icon16
-include/images/fv.icon
-include/images/empty_letter.icon
-include/images/empty_letter.mask.icon
-include/images/emptymail.icon
-include/images/emptymail.mask.icon
-include/images/equal.icon
-include/images/eraser.icon
-include/images/experiment.icon
-include/images/filemgr.icon
-include/images/fl_arrow.xbm
-include/images/fl_doc.xbm
-include/images/fl_folder.xbm
-include/images/fm_clock.icon
-include/images/fm_clock.mask.icon
-include/images/fm_cmdtool.icon
-include/images/fm_cmdtool.mask.icon
-include/images/fm_dbxtool.icon
-include/images/fm_dbxtool.mask.icon
-include/images/fm_fontedit.icon
-include/images/fm_iconedit.icon
-include/images/fm_traffic.icon
-include/images/fm_iconedit.mask.icon
-include/images/fm_mailtool.icon
-include/images/fm_mailtool.mask.icon
-include/images/fm_textedit.icon
-include/images/fm_textedit.mask.icon
-include/images/focus_right.cursor
-include/images/focus_up.cursor
-include/images/fol_acc_copy.icon
-include/images/fol_acc_move.icon
-include/images/fol_drag_copy.icon
-include/images/fol_drag_move.icon
-include/images/folder.glyph
-include/images/folder.icon
-include/images/folder.mask.icon
-include/images/folder.pr
-include/images/folder_list.icon
-include/images/folder_listI.icon
-include/images/fols_acc_copy.icon
-include/images/gammon.icon
-include/images/fols_acc_move.icon
-include/images/fols_drag_copy.icon
-include/images/fols_drag_move.icon
-include/images/fontdoc.icon
-include/images/fontedit.icon
-include/images/frame.mask.icon
-include/images/framedoc.icon
-include/images/gallant19.pr
-include/images/gallantr19.pr
-include/images/gfxtool.icon
-include/images/glass.cursor
-include/images/gr_25.cursor
-include/images/gr_50.cursor
-include/images/gr_75.cursor
-include/images/gr_root.cursor
-include/images/grey.icon
-include/images/grey_stencil_50.pr
-include/images/grid.pr
-include/images/guidedoc.icon
-include/images/h.icon
-include/images/hello_world.icon
-include/images/hglass.cursor
-include/images/horzflip_arrow.icon
-include/images/hotspot.cursor
-include/images/ibeam.cursor
-include/images/icondoc.icon
-include/images/iconedit.icon
-include/images/iconedit.mask
-include/images/indentdefaults.icon
-include/images/jump1.icon
-include/images/jump2.icon
-include/images/jump3.icon
-include/images/jump4.icon
-include/images/jump5.icon
-include/images/jump6.icon
-include/images/k1.pr
-include/images/k2.pr
-include/images/k3.pr
-include/images/k4.pr
-include/images/k5.pr
-include/images/left_arrow.icon
-include/images/letter.pr
-include/images/letters.pr
-include/images/life.icon
-include/images/line.icon16
-include/images/line.pr
-include/images/lock.icon
-include/images/lockscreen.icon
-include/images/lucida.icon16
-include/images/mail.icon
-include/images/mail.mask.icon
-include/images/maildoc.icon
-include/images/mailseen.icon
-include/images/makefile.icon
-include/images/maze.icon
-include/images/mbox.glyph
-include/images/menu.invert.icon
-include/images/menu.normal.icon
-include/images/menu.stencil.icon
-include/images/mglass.icon
-include/images/mglass_mask.icon
-include/images/mouse_left_hand.pr
-include/images/mouse_left_hand_grey.pr
-include/images/mouse_mid_hand.pr
-include/images/mouse_mid_hand_grey.pr
-include/images/move.cursor
-include/images/move_cursor.pr
-include/images/move_h.cursor
-include/images/move_v.cursor
-include/images/moveletter.cursor
-include/images/moveletter.pr
-include/images/moveletters.cursor
-include/images/moveletters.pr
-include/images/nautilus.icon
-include/images/nomail.icon
-include/images/nomail.mask.icon
-include/images/none.cursor
-include/images/o.icon
-include/images/off.pr
-include/images/on.pr
-include/images/open_folder.icon
-include/images/open_folder.mask.icon
-include/images/overview.icon
-include/images/paintdoc.icon
-include/images/painting_hand.pr
-include/images/panel_button.pr
-include/images/panel_button_arrow.pr
-include/images/panel_check_choice.pr
-include/images/panel_check_off.pr
-include/images/panel_check_on.pr
-include/images/panel_choice_off.pr
-include/images/panel_choice_on.pr
-include/images/panel_choose_many.pr
-include/images/panel_choose_one.pr
-include/images/panel_default_button.pr
-include/images/panel_flush.pr
-include/images/panel_left_arrow.pr
-include/images/panel_menu_on.pr
-include/images/panel_pulldown.pr
-include/images/panel_pullright.pr
-include/images/panel_right_arrow.pr
-include/images/panel_switch.pr
-include/images/panel_text.pr
-include/images/panning.cursor
-include/images/perfmeter.icon
-include/images/perfmeter.mask.icon
-include/images/pin_in.pr
-include/images/pin_out.pr
-include/images/plus.icon
-include/images/point.icon16
-include/images/point.pr
-include/images/printer.icon
-include/images/printer.mask.icon
-include/images/ps_document.icon
-include/images/puzzle.icon
-include/images/puzzle.mask.icon
-include/images/qmark.cursor
-include/images/quick_move_cursor.pr
-include/images/readonly.icon
-include/images/reply.icon
-include/images/reply.mask.icon
-include/images/right_arrow.icon
-include/images/rolo.icon
-include/images/row_pi.icon
-include/images/rspeedometer.icon
-include/images/sched.icon
-include/images/screenb12.pr
-include/images/screenb14.pr
-include/images/screenr11.pr
-include/images/screenr12.pr
-include/images/screenr14.pr
-include/images/screenr7.pr
-include/images/scrollbar_demo.icon
-include/images/select_box4.icon16
-include/images/shine.pr
-include/images/sick.icon
-include/images/size_pointer.pr
-include/images/small_cd.icon
-include/images/small_cd.mask.icon
-include/images/small_dos.icon
-include/images/small_dos.mask.icon
-include/images/small_floppy.icon
-include/images/small_floppy.mask.icon
-include/images/small_waste.icon
-include/images/small_waste.mask.icon
-include/images/snapshot.icon
-include/images/snapshot.mask.icon
-include/images/source.icon
-include/images/source.ptr.icon
-include/images/speedometer.icon
-include/images/spreadsheet.icon
-include/images/square_0.pr
-include/images/square_17.pr
-include/images/square_25.pr
-include/images/square_50.pr
-include/images/square_75.pr
-include/images/square_80.pr
-include/images/square_black.pr
-include/images/square_root.pr
-include/images/stretchNE.cursor
-include/images/stretchNW.cursor
-include/images/stretchSE.cursor
-include/images/stretchSW.cursor
-include/images/stretch_h.cursor
-include/images/stretch_v.cursor
-include/images/sun30.icon
-include/images/sundraw.icon
-include/images/sundraw.mask.icon
-include/images/sunpaint.icon
-include/images/sunpaint.mask.icon
-include/images/sunview_manual.icon
-include/images/sunwrite.icon
-include/images/sunwrite.mask.icon
-include/images/swatch_17.icon16
-include/images/swatch_20.icon16
-include/images/swatch_25.icon16
-include/images/swatch_50.icon16
-include/images/swatch_75.icon16
-include/images/swatch_80.icon16
-include/images/swatch_83.icon16
-include/images/swatch_black.icon16
-include/images/swatch_root.icon16
-include/images/swatch_white.icon16
-include/images/switcher.icon
-include/images/sys_list.icon
-include/images/sys_listI.icon
-include/images/system.icon
-include/images/systemI.icon
-include/images/tapetool.icon
-include/images/tektool.icon
-include/images/template.icon
-include/images/terminal.icon
-include/images/terminal_mask.icon
-include/images/test.mask.icon
-include/images/text_move_cursor.pr
-include/images/textedit.icon
-include/images/textedit.mask.icon
-include/images/toggle_12_off.pr
-include/images/toggle_12_on.pr
-include/images/toggle_14_off.pr
-include/images/toggle_14_on.pr
-include/images/toggle_16_off.pr
-include/images/toggle_16_on.pr
-include/images/toggle_19_off.pr
-include/images/toggle_19_on.pr
-include/images/toggle_24_off.pr
-include/images/toggle_24_on.pr
-include/images/toggle_32_off.pr
-include/images/toggle_32_on.pr
-include/images/traffic.icon
-include/images/tree.icon
-include/images/tree_mask.icon
-include/images/tri_down.pr
-include/images/tri_left.pr
-include/images/tri_right.pr
-include/images/tri_up.pr
-include/images/undelete.image
-include/images/up_arrow.icon
-include/images/up_button_10.pr
-include/images/up_button_12.pr
-include/images/up_button_14.pr
-include/images/up_button_19.pr
-include/images/vertflip_arrow.icon
-include/images/vitool.icon
-include/images/waste-empty.icon
-include/images/waste-empty_mask.icon
-include/images/waste-full.icon
-include/images/waste-full_mask.icon
-include/images/white.icon
-include/images/white.pr
-include/images/writedoc.icon
-include/images/xpm.icon
-include/images/xsol.icon
-include/images/xsol.mask.icon
-include/kcms/icc.h
-include/kcms/kcs.h
-include/kcms/kcsstats.h
-include/kcms/kcstypes.h
-include/pixrect/cms.h
-include/pixrect/mem32_var.h
-include/pixrect/memvar.h
-include/pixrect/pixfont.h
-include/pixrect/pixrect.h
-include/pixrect/pixrect_hs.h
-include/pixrect/pr_dblbuf.h
-include/pixrect/pr_impl_make.h
-include/pixrect/pr_impl_util.h
-include/pixrect/pr_io.h
-include/pixrect/pr_line.h
-include/pixrect/pr_planegroups.h
-include/pixrect/pr_util.h
-include/pixrect/rasterfile.h
-include/pixrect/traprop.h
-include/pixrect/tv1var.h
-include/portable/c_varieties.h
-include/portable/portable.h
-include/xil/_XilDefines.h
-include/xil/_c_bindings.h
-include/xil/xil.h
-lib/libFS.so
-lib/libFS.so.5
-lib/libICE.so
-lib/libICE.so.6
-lib/libSM.so
-lib/libSM.so.6
-lib/libX.a
-lib/libX.so
-lib/libX.so.4
-lib/libX11.a
-lib/libX11.so
-lib/libX11.so.4
-lib/libXIE.so
-lib/libXIE.so.6
-lib/libXau.a
-lib/libXaw.a
-lib/libXaw.so
-lib/libXaw.so.4
-lib/libXaw.so.5
-lib/libXdmcp.a
-lib/libXext.a
-lib/libXext.so
-lib/libXext.so.0
-lib/libXi.a
-lib/libXi.so
-lib/libXi.so.5
-lib/libXinput.so
-lib/libXinput.so.0
-lib/libXmu.a
-lib/libXmu.so
-lib/libXmu.so.4
-lib/libXol.so
-lib/libXol.so.3
-lib/libXp.a
-lib/libXp.so
-lib/libXp.so.1
-lib/libXpm.so
-lib/libXpm.so.4
-lib/libXpm.so.4.11
-lib/libXt.a
-lib/libXt.so
-lib/libXt.so.4
-lib/libXtst.a
-lib/libXtst.so
-lib/libXtst.so.1
-lib/libce.so
-lib/libce.so.0
-lib/libdeskset.so
-lib/libdeskset.so.0
-lib/libdga.so
-lib/libdga.so.1
-lib/libdps.a
-lib/libdps.so
-lib/libdps.so.5
-lib/libdpstk.a
-lib/libdpstk.so
-lib/libdpstk.so.5
-lib/libdpstkXm.so
-lib/libdpstkXm.so.5
-lib/libdstt.so
-lib/libdstt.so.0
-lib/libkcs.so
-lib/libkcs.so.1
-lib/libolgx.so
-lib/libolgx.so.3
-lib/libowconfig.so
-lib/libowconfig.so.0
-lib/libpsres.a
-lib/libpsres.so
-lib/libpsres.so.5
-lib/libtiff.so
-lib/libtiff.so.3
-lib/libtt.so
-lib/libtt.so.1
-lib/libtt.so.2
-lib/libxil.so
-lib/libxil.so.1
-lib/libxkbfile.so
-lib/libxkbfile.so.4
-lib/libxrx.so
-lib/libxrx.so.1
-lib/libxview.so
-lib/libxview.so.3
diff --git a/pkgtools/x11-links/files/xdec b/pkgtools/x11-links/files/xdec
deleted file mode 100644
index 0f6ce8db489..00000000000
--- a/pkgtools/x11-links/files/xdec
+++ /dev/null
@@ -1,436 +0,0 @@
-shlib/X11/libXau.so
-shlib/X11/libXdmDecGreet.so
-shlib/X11/libXdmGreet.so
-shlib/X11/libXdmcp.so
-shlib/X11/libfont.so
-shlib/X11/libfr_Speedo.so
-shlib/X11/libfr_Type1.so
-shlib/X11/libfr_fs.so
-shlib/X11/lib_dec_cirrus.so
-shlib/X11/lib_dec_comet.so
-shlib/X11/lib_dec_ffb.so
-shlib/X11/lib_dec_p3.so
-shlib/X11/lib_dec_smt.so
-shlib/X11/lib_dec_vga.so
-shlib/X11/libcfb.so
-shlib/X11/lib_dec_ws.so
-shlib/X11/lib_dec_xi_db3.so
-shlib/X11/lib_dec_xi_pcm.so
-shlib/X11/lib_dec_xi_serial_mouse.so
-shlib/X11/lib_dec_xv_tx.so
-shlib/X11/libcfb16.so
-shlib/X11/libcfb32.so
-shlib/X11/libdbe.so
-shlib/X11/libdix.so
-shlib/X11/libdixie.so
-shlib/X11/libextAppgroup.so
-shlib/X11/libextEVI.so
-shlib/X11/libextMITMisc.so
-shlib/X11/libextMultibuf.so
-shlib/X11/libextScrnSvr.so
-shlib/X11/libextSecurity.so
-shlib/X11/libextSync.so
-shlib/X11/libextTOG_CUP.so
-shlib/X11/libextXCMisc.so
-shlib/X11/libextbigreq.so
-shlib/X11/libextdpms.so
-shlib/X11/libextkme.so
-shlib/X11/libextrecord.so
-shlib/X11/libextshape.so
-shlib/X11/libextshm.so
-shlib/X11/libextxtest.so
-shlib/X11/libextxtrap.so
-shlib/X11/liblbx.so
-shlib/X11/liblbxutil.so
-shlib/X11/libmfb.so
-shlib/X11/libmi.so
-shlib/X11/libmixie.so
-shlib/X11/libos.so
-shlib/X11/libpanoramiX.so
-shlib/X11/libxinput.so
-shlib/X11/libxkb.so
-shlib/X11/libxv.so
-shlib/X11/libxvfb.so
-shlib/X11/libxnest.so
-shlib/X11/libfr_TrueType.so
-shlib/X11/lib_dec_ati32.so
-shlib/X11/lib_dec_ati64.so
-shlib/X11/lib_dec_ati64_linear.so
-shlib/X11/lib_dec_ffb_ev5.so
-shlib/X11/lib_dec_gen.so
-shlib/X11/lib_dec_gen_linear.so
-shlib/X11/lib_dec_radeon.so
-shlib/X11/lib_dec_s3.so
-shlib/X11/lib_dec_s3_linear.so
-shlib/X11/lib_dec_triton.so
-shlib/X11/lib_dec_wd.so
-shlib/X11/libfb.so
-shlib/libDXm.so
-shlib/libDXterm.so
-shlib/libICE.so
-shlib/libMrm.so
-shlib/libSM.so
-shlib/libUil.so
-shlib/libX11.so
-shlib/libXETrap.so
-shlib/libXIE.so
-shlib/libXaw.so
-shlib/libXext.so
-shlib/libXi.so
-shlib/libXie.so
-shlib/libXm.so
-shlib/libXmu.so
-shlib/libXp.so
-shlib/libXt.so
-shlib/libXtst.so
-shlib/libXv.so
-include/X11/bitmaps/1x1
-include/X11/bitmaps/2x2
-include/X11/bitmaps/Dashes
-include/X11/bitmaps/Down
-include/X11/bitmaps/Excl
-include/X11/bitmaps/FlipHoriz
-include/X11/bitmaps/FlipVert
-include/X11/bitmaps/Fold
-include/X11/bitmaps/Left
-include/X11/bitmaps/Right
-include/X11/bitmaps/RotateLeft
-include/X11/bitmaps/RotateRight
-include/X11/bitmaps/Stipple
-include/X11/bitmaps/Term
-include/X11/bitmaps/Up
-include/X11/bitmaps/black
-include/X11/bitmaps/black6
-include/X11/bitmaps/box6
-include/X11/bitmaps/boxes
-include/X11/bitmaps/calculator
-include/X11/bitmaps/cntr_ptr
-include/X11/bitmaps/cntr_ptrmsk
-include/X11/bitmaps/cross_weave
-include/X11/bitmaps/dimple1
-include/X11/bitmaps/dimple3
-include/X11/bitmaps/dot
-include/X11/bitmaps/dropbar7
-include/X11/bitmaps/dropbar8
-include/X11/bitmaps/escherknot
-include/X11/bitmaps/flagdown
-include/X11/bitmaps/flagup
-include/X11/bitmaps/flipped_gray
-include/X11/bitmaps/gray
-include/X11/bitmaps/gray1
-include/X11/bitmaps/gray3
-include/X11/bitmaps/grid16
-include/X11/bitmaps/grid2
-include/X11/bitmaps/grid4
-include/X11/bitmaps/grid8
-include/X11/bitmaps/hlines2
-include/X11/bitmaps/hlines3
-include/X11/bitmaps/icon
-include/X11/bitmaps/keyboard16
-include/X11/bitmaps/left_ptr
-include/X11/bitmaps/left_ptrmsk
-include/X11/bitmaps/letters
-include/X11/bitmaps/light_gray
-include/X11/bitmaps/mailempty
-include/X11/bitmaps/mailemptymsk
-include/X11/bitmaps/mailfull
-include/X11/bitmaps/mailfullmsk
-include/X11/bitmaps/mensetmanus
-include/X11/bitmaps/menu10
-include/X11/bitmaps/menu12
-include/X11/bitmaps/menu16
-include/X11/bitmaps/menu6
-include/X11/bitmaps/menu8
-include/X11/bitmaps/noletters
-include/X11/bitmaps/opendot
-include/X11/bitmaps/opendotMask
-include/X11/bitmaps/plaid
-include/X11/bitmaps/right_ptr
-include/X11/bitmaps/right_ptrmsk
-include/X11/bitmaps/root_weave
-include/X11/bitmaps/scales
-include/X11/bitmaps/sipb
-include/X11/bitmaps/star
-include/X11/bitmaps/starMask
-include/X11/bitmaps/stipple
-include/X11/bitmaps/target
-include/X11/bitmaps/terminal
-include/X11/bitmaps/tie_fighter
-include/X11/bitmaps/vlines2
-include/X11/bitmaps/vlines3
-include/X11/bitmaps/weird_size
-include/X11/bitmaps/wide_weave
-include/X11/bitmaps/wingdogs
-include/X11/bitmaps/woman
-include/X11/bitmaps/xfd_icon
-include/X11/bitmaps/xlogo11
-include/X11/bitmaps/xlogo16
-include/X11/bitmaps/xlogo32
-include/X11/bitmaps/xlogo64
-include/X11/bitmaps/xsnow
-include/X11/bitmaps/slisttbf
-include/X11/bitmaps/slisttbs
-include/X11/bitmaps/textlist
-include/X11/bitmaps/textlistins
-include/X11/Compose.h
-include/X11/ComposeInt.h
-include/X11/Composite.h
-include/X11/CompositeP.h
-include/X11/ConstrainP.h
-include/X11/Constraint.h
-include/X11/Core.h
-include/X11/CoreP.h
-include/X11/DECWmHints.h
-include/X11/DECWmHintsP.h
-include/X11/DECkeysym.h
-include/X11/DECwI18n.h
-include/X11/Descripu.h
-include/X11/FCClib.h
-include/X11/HPkeysym.h
-include/X11/I18N.h
-include/X11/I18nConverter.h
-include/X11/ICE/ICE.h
-include/X11/ICE/ICEconn.h
-include/X11/ICE/ICElib.h
-include/X11/ICE/ICEmsg.h
-include/X11/ICE/ICEproto.h
-include/X11/ICE/ICEutil.h
-include/X11/Intrinsic.h
-include/X11/IntrinsicP.h
-include/X11/Object.h
-include/X11/ObjectP.h
-include/X11/PM/PM.h
-include/X11/PM/PMproto.h
-include/X11/RectObj.h
-include/X11/RectObjP.h
-include/X11/ResConfigP.h
-include/X11/SM/SM.h
-include/X11/SM/SMlib.h
-include/X11/SM/SMproto.h
-include/X11/Shell.h
-include/X11/ShellP.h
-include/X11/StringDefs.h
-include/X11/Sunkeysym.h
-include/X11/Vendor.h
-include/X11/VendorP.h
-include/X11/X.h
-include/X11/X10.h
-include/X11/XKBlib.h
-include/X11/XKBlibint.h
-include/X11/XUICompat.h
-include/X11/XWDFile.h
-include/X11/Xalloca.h
-include/X11/Xatom.h
-include/X11/Xauth.h
-include/X11/Xaw/AllWidgets.h
-include/X11/Xaw/AsciiSink.h
-include/X11/Xaw/AsciiSinkP.h
-include/X11/Xaw/AsciiSrc.h
-include/X11/Xaw/AsciiSrcP.h
-include/X11/Xaw/AsciiText.h
-include/X11/Xaw/AsciiTextP.h
-include/X11/Xaw/Box.h
-include/X11/Xaw/BoxP.h
-include/X11/Xaw/Cardinals.h
-include/X11/Xaw/Command.h
-include/X11/Xaw/CommandP.h
-include/X11/Xaw/Dialog.h
-include/X11/Xaw/DialogP.h
-include/X11/Xaw/Form.h
-include/X11/Xaw/FormP.h
-include/X11/Xaw/Grip.h
-include/X11/Xaw/GripP.h
-include/X11/Xaw/Label.h
-include/X11/Xaw/LabelP.h
-include/X11/Xaw/List.h
-include/X11/Xaw/ListP.h
-include/X11/Xaw/MenuButtoP.h
-include/X11/Xaw/MenuButton.h
-include/X11/Xaw/MultiSink.h
-include/X11/Xaw/MultiSinkP.h
-include/X11/Xaw/MultiSrc.h
-include/X11/Xaw/MultiSrcP.h
-include/X11/Xaw/Paned.h
-include/X11/Xaw/PanedP.h
-include/X11/Xaw/Panner.h
-include/X11/Xaw/PannerP.h
-include/X11/Xaw/Porthole.h
-include/X11/Xaw/PortholeP.h
-include/X11/Xaw/Repeater.h
-include/X11/Xaw/RepeaterP.h
-include/X11/Xaw/Reports.h
-include/X11/Xaw/Scrollbar.h
-include/X11/Xaw/ScrollbarP.h
-include/X11/Xaw/Simple.h
-include/X11/Xaw/SimpleMenP.h
-include/X11/Xaw/SimpleMenu.h
-include/X11/Xaw/SimpleP.h
-include/X11/Xaw/Sme.h
-include/X11/Xaw/SmeBSB.h
-include/X11/Xaw/SmeBSBP.h
-include/X11/Xaw/SmeLine.h
-include/X11/Xaw/SmeLineP.h
-include/X11/Xaw/SmeP.h
-include/X11/Xaw/StripCharP.h
-include/X11/Xaw/StripChart.h
-include/X11/Xaw/Template.c
-include/X11/Xaw/Text.h
-include/X11/Xaw/Template.h
-include/X11/Xaw/TemplateP.h
-include/X11/Xaw/TextP.h
-include/X11/Xaw/TextSink.h
-include/X11/Xaw/TextSinkP.h
-include/X11/Xaw/TextSrc.h
-include/X11/Xaw/TextSrcP.h
-include/X11/Xaw/Toggle.h
-include/X11/Xaw/ToggleP.h
-include/X11/Xaw/Tree.h
-include/X11/Xaw/TreeP.h
-include/X11/Xaw/VendorEP.h
-include/X11/Xaw/Viewport.h
-include/X11/Xaw/ViewportP.h
-include/X11/Xaw/XawImP.h
-include/X11/Xaw/XawInit.h
-include/X11/Xcms.h
-include/X11/Xdmcp.h
-include/X11/Xfuncproto.h
-include/X11/Xfuncs.h
-include/X11/Xlib.h
-include/X11/Xlibint.h
-include/X11/Xlocale.h
-include/X11/Xmd.h
-include/X11/Xmu/Atoms.h
-include/X11/Xmu/CharSet.h
-include/X11/Xmu/CloseHook.h
-include/X11/Xmu/Converters.h
-include/X11/Xmu/CurUtil.h
-include/X11/Xmu/CvtCache.h
-include/X11/Xmu/DisplayQue.h
-include/X11/Xmu/Drawing.h
-include/X11/Xmu/Editres.h
-include/X11/Xmu/EditresP.h
-include/X11/Xmu/Error.h
-include/X11/Xmu/ExtAgent.h
-include/X11/Xmu/Initer.h
-include/X11/Xmu/Misc.h
-include/X11/Xmu/StdCmap.h
-include/X11/Xmu/StdSel.h
-include/X11/Xmu/SysUtil.h
-include/X11/Xmu/WidgetNode.h
-include/X11/Xmu/WinUtil.h
-include/X11/Xmu/Xct.h
-include/X11/Xmu/Xmu.h
-include/X11/Xos.h
-include/X11/Xos_r.h
-include/X11/Xosdefs.h
-include/X11/Xpoll.h
-include/X11/Xproto.h
-include/X11/Xprotostr.h
-include/X11/Xresource.h
-include/X11/Xserver/argparse.h
-include/X11/Xserver/loadable.h
-include/X11/Xserver/loadable_server.h
-include/X11/Xthreads.h
-include/X11/Xutil.h
-include/X11/ap_keysym.h
-include/X11/cursorfont.h
-include/X11/decwcursor.h
-include/X11/extensions/MITMisc.h
-include/X11/extensions/Print.h
-include/X11/extensions/Printstr.h
-include/X11/extensions/XEVI.h
-include/X11/extensions/XEVIstr.h
-include/X11/extensions/XI.h
-include/X11/extensions/XIE.h
-include/X11/extensions/XIElib.h
-include/X11/extensions/XIEproto.h
-include/X11/extensions/XIEprotost.h
-include/X11/extensions/XInput.h
-include/X11/extensions/XIproto.h
-include/X11/extensions/XKB.h
-include/X11/extensions/XKBbells.h
-include/X11/extensions/XKBconfig.h
-include/X11/extensions/XKBfile.h
-include/X11/extensions/XKBgeom.h
-include/X11/extensions/XKBproto.h
-include/X11/extensions/XKBrules.h
-include/X11/extensions/XKBsrv.h
-include/X11/extensions/XKBstr.h
-include/X11/extensions/XKM.h
-include/X11/extensions/XKMformat.h
-include/X11/extensions/XLbx.h
-include/X11/extensions/XShm.h
-include/X11/extensions/XTest.h
-include/X11/extensions/Xag.h
-include/X11/extensions/Xagsrv.h
-include/X11/extensions/Xagstr.h
-include/X11/extensions/Xcup.h
-include/X11/extensions/Xcupstr.h
-include/X11/extensions/Xdbe.h
-include/X11/extensions/Xdbeproto.h
-include/X11/extensions/Xext.h
-include/X11/extensions/Xv.h
-include/X11/extensions/Xvlib.h
-include/X11/extensions/Xvproto.h
-include/X11/extensions/bits.h
-include/X11/extensions/dpms.h
-include/X11/extensions/dpmsstr.h
-include/X11/extensions/ip.h
-include/X11/extensions/lbxbuf.h
-include/X11/extensions/lbxbufstr.h
-include/X11/extensions/lbxdeltastr.h
-include/X11/extensions/lbximage.h
-include/X11/extensions/lbxopts.h
-include/X11/extensions/lbxstr.h
-include/X11/extensions/lbxzlib.h
-include/X11/extensions/multibuf.h
-include/X11/extensions/panoramiXext.h
-include/X11/extensions/panoramiXproto.h
-include/X11/extensions/record.h
-include/X11/extensions/recordstr.h
-include/X11/extensions/saver.h
-include/X11/extensions/saverproto.h
-include/X11/extensions/scrnsaver.h
-include/X11/extensions/security.h
-include/X11/extensions/securstr.h
-include/X11/extensions/shape.h
-include/X11/extensions/smt.h
-include/X11/extensions/smtstr.h
-include/X11/extensions/sync.h
-include/X11/extensions/xemacros.h
-include/X11/extensions/xkmeproto_include.h
-include/X11/extensions/xtestext1.h
-include/X11/extensions/xtrapdi.h
-include/X11/extensions/xtraplib.h
-include/X11/extensions/xtraplibp.h
-include/X11/extensions/xtrapproto.h
-include/X11/fonts/FS.h
-include/X11/fonts/FSlib.h
-include/X11/fonts/FSproto.h
-include/X11/fonts/fsmasks.h
-include/X11/keysym.h
-include/X11/keysymdef.h
-include/X11/smtXlibint.h
-lib/libFS.a
-lib/libXau.a
-lib/libXdmcp.a
-lib/libDXm.a
-lib/libICE.a
-lib/libMrm.a
-lib/libSM.a
-lib/libUil.a
-lib/libX11.a
-lib/libXETrap.a
-lib/libXIE.a
-lib/libXaw.a
-lib/libXext.a
-lib/libXi.a
-lib/libXie.a
-lib/libXm.a
-lib/libXmu.a
-lib/libXp.a
-lib/libXt.a
-lib/libXtst.a
-lib/libXv.a
-lib/libbkr.a
-lib/libxkbfile.a
diff --git a/pkgtools/x11-links/files/xfree b/pkgtools/x11-links/files/xfree
deleted file mode 100644
index d9622cd1061..00000000000
--- a/pkgtools/x11-links/files/xfree
+++ /dev/null
@@ -1,643 +0,0 @@
-# $NetBSD: xfree,v 1.12 2006/04/19 12:33:28 reed Exp $
-#
-# The files listed below are the union of the sets of files installed by
-# the supported XFree distributions, minus the set of files representing
-# bits that may be added via pkgsrc, e.g. MesaLib, Xpm, freetype2, etc.
-#
-include/DPS/ColorSB.h
-include/DPS/ColorSBP.h
-include/DPS/DPSScrollW.h
-include/DPS/DPSScrollWP.h
-include/DPS/FontCreatP.h
-include/DPS/FontCreato.h
-include/DPS/FontSB.h
-include/DPS/FontSBP.h
-include/DPS/FontSamplP.h
-include/DPS/FontSample.h
-include/DPS/PSres.h
-include/DPS/XDPS.h
-include/DPS/XDPSlib.h
-include/DPS/XDPSproto.h
-include/DPS/dpsNXargs.h
-include/DPS/dpsXclient.h
-include/DPS/dpsXcommon.h
-include/DPS/dpsXpreview.h
-include/DPS/dpsXshare.h
-include/DPS/dpsXuserpath.h
-include/DPS/dpsclient.h
-include/DPS/dpsconfig.h
-include/DPS/dpsexcept.h
-include/DPS/dpsfriends.h
-include/DPS/dpsops.h
-include/DPS/psops.h
-include/X11/Composite.h
-include/X11/CompositeP.h
-include/X11/ConstrainP.h
-include/X11/Constraint.h
-include/X11/Core.h
-include/X11/CoreP.h
-include/X11/DECkeysym.h
-include/X11/HPkeysym.h
-include/X11/ICE/ICE.h
-include/X11/ICE/ICEconn.h
-include/X11/ICE/ICElib.h
-include/X11/ICE/ICEmsg.h
-include/X11/ICE/ICEproto.h
-include/X11/ICE/ICEutil.h
-include/X11/Intrinsic.h
-include/X11/IntrinsicP.h
-include/X11/Object.h
-include/X11/ObjectP.h
-include/X11/PEX5/PEX.h
-include/X11/PEX5/PEXlib.h
-include/X11/PEX5/PEXlibint.h
-include/X11/PEX5/PEXproto.h
-include/X11/PEX5/PEXprotost.h
-include/X11/PM/PM.h
-include/X11/PM/PMproto.h
-include/X11/RectObj.h
-include/X11/RectObjP.h
-include/X11/SM/SM.h
-include/X11/SM/SMlib.h
-include/X11/SM/SMproto.h
-include/X11/Shell.h
-include/X11/ShellP.h
-include/X11/StringDefs.h
-include/X11/Sunkeysym.h
-include/X11/Vendor.h
-include/X11/VendorP.h
-include/X11/X.h
-include/X11/X10.h
-include/X11/XF86keysym.h
-include/X11/XKBlib.h
-include/X11/XWDFile.h
-include/X11/Xalloca.h
-include/X11/Xarch.h
-include/X11/Xatom.h
-include/X11/Xauth.h
-include/X11/Xaw/AllWidgets.h
-include/X11/Xaw/AsciiSink.h
-include/X11/Xaw/AsciiSinkP.h
-include/X11/Xaw/AsciiSrc.h
-include/X11/Xaw/AsciiSrcP.h
-include/X11/Xaw/AsciiText.h
-include/X11/Xaw/AsciiTextP.h
-include/X11/Xaw/Box.h
-include/X11/Xaw/BoxP.h
-include/X11/Xaw/Cardinals.h
-include/X11/Xaw/Command.h
-include/X11/Xaw/CommandP.h
-include/X11/Xaw/Dialog.h
-include/X11/Xaw/DialogP.h
-include/X11/Xaw/Form.h
-include/X11/Xaw/FormP.h
-include/X11/Xaw/Grip.h
-include/X11/Xaw/GripP.h
-include/X11/Xaw/Label.h
-include/X11/Xaw/LabelP.h
-include/X11/Xaw/List.h
-include/X11/Xaw/ListP.h
-include/X11/Xaw/MenuButtoP.h
-include/X11/Xaw/MenuButton.h
-include/X11/Xaw/MultiSink.h
-include/X11/Xaw/MultiSinkP.h
-include/X11/Xaw/MultiSrc.h
-include/X11/Xaw/MultiSrcP.h
-include/X11/Xaw/Paned.h
-include/X11/Xaw/PanedP.h
-include/X11/Xaw/Panner.h
-include/X11/Xaw/PannerP.h
-include/X11/Xaw/Porthole.h
-include/X11/Xaw/PortholeP.h
-include/X11/Xaw/Repeater.h
-include/X11/Xaw/RepeaterP.h
-include/X11/Xaw/Reports.h
-include/X11/Xaw/Scrollbar.h
-include/X11/Xaw/ScrollbarP.h
-include/X11/Xaw/Simple.h
-include/X11/Xaw/SimpleMenP.h
-include/X11/Xaw/SimpleMenu.h
-include/X11/Xaw/SimpleP.h
-include/X11/Xaw/Sme.h
-include/X11/Xaw/SmeBSB.h
-include/X11/Xaw/SmeBSBP.h
-include/X11/Xaw/SmeLine.h
-include/X11/Xaw/SmeLineP.h
-include/X11/Xaw/SmeP.h
-include/X11/Xaw/StripCharP.h
-include/X11/Xaw/StripChart.h
-include/X11/Xaw/Template.c
-include/X11/Xaw/Template.h
-include/X11/Xaw/TemplateP.h
-include/X11/Xaw/Text.h
-include/X11/Xaw/TextP.h
-include/X11/Xaw/TextSink.h
-include/X11/Xaw/TextSinkP.h
-include/X11/Xaw/TextSrc.h
-include/X11/Xaw/TextSrcP.h
-include/X11/Xaw/Tip.h
-include/X11/Xaw/TipP.h
-include/X11/Xaw/Toggle.h
-include/X11/Xaw/ToggleP.h
-include/X11/Xaw/Tree.h
-include/X11/Xaw/TreeP.h
-include/X11/Xaw/VendorEP.h
-include/X11/Xaw/Viewport.h
-include/X11/Xaw/ViewportP.h
-include/X11/Xaw/XawImP.h
-include/X11/Xaw/XawInit.h
-include/X11/Xcms.h
-include/X11/Xdefs.h
-include/X11/Xdmcp.h
-include/X11/Xft/XftFreetype.h
-include/X11/Xfuncproto.h
-include/X11/Xfuncs.h
-include/X11/Xlib.h
-include/X11/Xlibint.h
-include/X11/Xlocale.h
-include/X11/Xmd.h
-include/X11/Xmu/Atoms.h
-include/X11/Xmu/CharSet.h
-include/X11/Xmu/CloseHook.h
-include/X11/Xmu/Converters.h
-include/X11/Xmu/CurUtil.h
-include/X11/Xmu/CvtCache.h
-include/X11/Xmu/DisplayQue.h
-include/X11/Xmu/Drawing.h
-include/X11/Xmu/Editres.h
-include/X11/Xmu/EditresP.h
-include/X11/Xmu/Error.h
-include/X11/Xmu/ExtAgent.h
-include/X11/Xmu/Initer.h
-include/X11/Xmu/Lookup.h
-include/X11/Xmu/Misc.h
-include/X11/Xmu/StdCmap.h
-include/X11/Xmu/StdSel.h
-include/X11/Xmu/SysUtil.h
-include/X11/Xmu/WidgetNode.h
-include/X11/Xmu/WinUtil.h
-include/X11/Xmu/Xct.h
-include/X11/Xmu/Xmu.h
-include/X11/Xos.h
-include/X11/Xos_r.h
-include/X11/Xosdefs.h
-include/X11/Xpoll.h
-include/X11/Xproto.h
-include/X11/Xprotostr.h
-include/X11/Xresource.h
-include/X11/Xthreads.h
-include/X11/Xutil.h
-include/X11/ap_keysym.h
-include/X11/bitmaps/1x1
-include/X11/bitmaps/2x2
-include/X11/bitmaps/Dashes
-include/X11/bitmaps/Down
-include/X11/bitmaps/Excl
-include/X11/bitmaps/FlipHoriz
-include/X11/bitmaps/FlipVert
-include/X11/bitmaps/Fold
-include/X11/bitmaps/Left
-include/X11/bitmaps/Right
-include/X11/bitmaps/RotateLeft
-include/X11/bitmaps/RotateRight
-include/X11/bitmaps/Stipple
-include/X11/bitmaps/Term
-include/X11/bitmaps/Up
-include/X11/bitmaps/black
-include/X11/bitmaps/black6
-include/X11/bitmaps/box6
-include/X11/bitmaps/boxes
-include/X11/bitmaps/calculator
-include/X11/bitmaps/card.xbm
-include/X11/bitmaps/cntr_ptr
-include/X11/bitmaps/cntr_ptrmsk
-include/X11/bitmaps/cross_weave
-include/X11/bitmaps/dimple1
-include/X11/bitmaps/dimple3
-include/X11/bitmaps/dot
-include/X11/bitmaps/down.xbm
-include/X11/bitmaps/dropbar7
-include/X11/bitmaps/dropbar8
-include/X11/bitmaps/escherknot
-include/X11/bitmaps/flagdown
-include/X11/bitmaps/flagup
-include/X11/bitmaps/flipped_gray
-include/X11/bitmaps/gray
-include/X11/bitmaps/gray1
-include/X11/bitmaps/gray3
-include/X11/bitmaps/grid16
-include/X11/bitmaps/grid2
-include/X11/bitmaps/grid4
-include/X11/bitmaps/grid8
-include/X11/bitmaps/hlines2
-include/X11/bitmaps/hlines3
-include/X11/bitmaps/icon
-include/X11/bitmaps/keyboard.xbm
-include/X11/bitmaps/keyboard16
-include/X11/bitmaps/ldblarrow
-include/X11/bitmaps/left.xbm
-include/X11/bitmaps/left_ptr
-include/X11/bitmaps/left_ptrmsk
-include/X11/bitmaps/letters
-include/X11/bitmaps/light_gray
-include/X11/bitmaps/mailempty
-include/X11/bitmaps/mailemptymsk
-include/X11/bitmaps/mailfull
-include/X11/bitmaps/mailfullmsk
-include/X11/bitmaps/mensetmanus
-include/X11/bitmaps/menu10
-include/X11/bitmaps/menu12
-include/X11/bitmaps/menu16
-include/X11/bitmaps/menu6
-include/X11/bitmaps/menu8
-include/X11/bitmaps/monitor.xbm
-include/X11/bitmaps/mouse.xbm
-include/X11/bitmaps/narrower.xbm
-include/X11/bitmaps/noletters
-include/X11/bitmaps/opendot
-include/X11/bitmaps/opendotMask
-include/X11/bitmaps/plaid
-include/X11/bitmaps/rdblarrow
-include/X11/bitmaps/right.xbm
-include/X11/bitmaps/right_ptr
-include/X11/bitmaps/right_ptrmsk
-include/X11/bitmaps/root_weave
-include/X11/bitmaps/scales
-include/X11/bitmaps/shorter.xbm
-include/X11/bitmaps/sipb
-include/X11/bitmaps/star
-include/X11/bitmaps/starMask
-include/X11/bitmaps/stipple
-include/X11/bitmaps/taller.xbm
-include/X11/bitmaps/target
-include/X11/bitmaps/terminal
-include/X11/bitmaps/tie_fighter
-include/X11/bitmaps/up.xbm
-include/X11/bitmaps/vlines2
-include/X11/bitmaps/vlines3
-include/X11/bitmaps/weird_size
-include/X11/bitmaps/wide_weave
-include/X11/bitmaps/wider.xbm
-include/X11/bitmaps/wingdogs
-include/X11/bitmaps/woman
-include/X11/bitmaps/xfd_icon
-include/X11/bitmaps/xlogo11
-include/X11/bitmaps/xlogo16
-include/X11/bitmaps/xlogo32
-include/X11/bitmaps/xlogo64
-include/X11/bitmaps/xsnow
-include/X11/cursorfont.h
-include/X11/extensions/MITMisc.h
-include/X11/extensions/Print.h
-include/X11/extensions/Printstr.h
-include/X11/extensions/XEVI.h
-include/X11/extensions/XEVIstr.h
-include/X11/extensions/XI.h
-include/X11/extensions/XIE.h
-include/X11/extensions/XIElib.h
-include/X11/extensions/XIEproto.h
-include/X11/extensions/XIEprotost.h
-include/X11/extensions/XInput.h
-include/X11/extensions/XIproto.h
-include/X11/extensions/XKB.h
-include/X11/extensions/XKBbells.h
-include/X11/extensions/XKBconfig.h
-include/X11/extensions/XKBfile.h
-include/X11/extensions/XKBgeom.h
-include/X11/extensions/XKBproto.h
-include/X11/extensions/XKBrules.h
-include/X11/extensions/XKBsrv.h
-include/X11/extensions/XKBstr.h
-include/X11/extensions/XKBui.h
-include/X11/extensions/XKM.h
-include/X11/extensions/XKMformat.h
-include/X11/extensions/XLbx.h
-include/X11/extensions/XRes.h
-include/X11/extensions/XResproto.h
-include/X11/extensions/XShm.h
-include/X11/extensions/XTest.h
-include/X11/extensions/Xag.h
-include/X11/extensions/Xagsrv.h
-include/X11/extensions/Xagstr.h
-include/X11/extensions/Xcup.h
-include/X11/extensions/Xcupstr.h
-include/X11/extensions/Xdbe.h
-include/X11/extensions/Xdbeproto.h
-include/X11/extensions/Xext.h
-include/X11/extensions/Xinerama.h
-include/X11/extensions/Xv.h
-include/X11/extensions/XvMC.h
-include/X11/extensions/XvMClib.h
-include/X11/extensions/XvMCproto.h
-include/X11/extensions/Xvlib.h
-include/X11/extensions/Xvproto.h
-include/X11/extensions/bigreqstr.h
-include/X11/extensions/dpms.h
-include/X11/extensions/dpmsstr.h
-include/X11/extensions/dmxext.h
-include/X11/extensions/dmxproto.h
-include/X11/extensions/extutil.h
-include/X11/extensions/fontcache.h
-include/X11/extensions/fontcacheP.h
-include/X11/extensions/fontcachstr.h
-include/X11/extensions/lbxbuf.h
-include/X11/extensions/lbxbufstr.h
-include/X11/extensions/lbxdeltastr.h
-include/X11/extensions/lbximage.h
-include/X11/extensions/lbxopts.h
-include/X11/extensions/lbxstr.h
-include/X11/extensions/lbxzlib.h
-include/X11/extensions/mitmiscstr.h
-include/X11/extensions/multibuf.h
-include/X11/extensions/multibufst.h
-include/X11/extensions/panoramiXext.h
-include/X11/extensions/panoramiXproto.h
-include/X11/extensions/panoramiXwrap.h
-include/X11/extensions/record.h
-include/X11/extensions/recordstr.h
-include/X11/extensions/saver.h
-include/X11/extensions/saverproto.h
-include/X11/extensions/scrnsaver.h
-include/X11/extensions/security.h
-include/X11/extensions/securstr.h
-include/X11/extensions/shape.h
-include/X11/extensions/shapestr.h
-include/X11/extensions/shmstr.h
-include/X11/extensions/sync.h
-include/X11/extensions/syncstr.h
-include/X11/extensions/xcmiscstr.h
-include/X11/extensions/xf86bigfont.h
-include/X11/extensions/xf86bigfstr.h
-include/X11/extensions/xf86dga.h
-include/X11/extensions/xf86dga1.h
-include/X11/extensions/xf86dga1str.h
-include/X11/extensions/xf86dgastr.h
-include/X11/extensions/xf86misc.h
-include/X11/extensions/xf86mscstr.h
-include/X11/extensions/xf86vmode.h
-include/X11/extensions/xf86vmstr.h
-include/X11/extensions/xtestext1.h
-include/X11/extensions/xteststr.h
-include/X11/extensions/xtrapbits.h
-include/X11/extensions/xtrapddmi.h
-include/X11/extensions/xtrapdi.h
-include/X11/extensions/xtrapemacros.h
-include/X11/extensions/xtraplib.h
-include/X11/extensions/xtraplibp.h
-include/X11/extensions/xtrapproto.h
-include/X11/fonts/FS.h
-include/X11/fonts/FSlib.h
-include/X11/fonts/FSproto.h
-include/X11/fonts/codeconv/cconvversion.h
-include/X11/fonts/codeconv/xttcap.h
-include/X11/fonts/codeconv/xttcconv.h
-include/X11/fonts/codeconv/xttcconvP.h
-include/X11/fonts/codeconv/xttcommon.h
-include/X11/fonts/codeconv/xttversion.h
-include/X11/fonts/fontenc.h
-include/X11/fonts/fsmasks.h
-include/X11/keysym.h
-include/X11/keysymdef.h
-include/X11/pixmaps/card.xpm
-include/X11/pixmaps/computer.xpm
-include/X11/pixmaps/deny-always.xpm
-include/X11/pixmaps/deny.xpm
-include/X11/pixmaps/keyboard.xpm
-include/X11/pixmaps/logo.xpm
-include/X11/pixmaps/monitor.xpm
-include/X11/pixmaps/mouse.xpm
-include/X11/pixmaps/permit-always.xpm
-include/X11/pixmaps/permit.xpm
-include/X11/pixmaps/skull.xpm
-include/xf86Optrec.h
-include/xf86Parser.h
-lib@ABI@/libFS.a
-lib@ABI@/libFS.so
-lib@ABI@/libFS.so.6
-lib@ABI@/libFS.so.6.0
-lib@ABI@/libICE.a
-lib@ABI@/libICE.so
-lib@ABI@/libICE.so.6
-lib@ABI@/libICE.so.6.3
-lib@ABI@/libICE.dylib
-lib@ABI@/libICE.6.dylib
-lib@ABI@/libICE.6.3.dylib
-lib@ABI@/libPEX5.a
-lib@ABI@/libPEX5.so
-lib@ABI@/libPEX5.so.6
-lib@ABI@/libPEX5.so.6.0
-lib@ABI@/libPEX5.dylib
-lib@ABI@/libPEX5.6.dylib
-lib@ABI@/libPEX5.6.0.dylib
-lib@ABI@/libSM.a
-lib@ABI@/libSM.so
-lib@ABI@/libSM.so.6
-lib@ABI@/libSM.so.6.0
-lib@ABI@/libSM.dylib
-lib@ABI@/libSM.6.dylib
-lib@ABI@/libSM.6.0.dylib
-lib@ABI@/libX11.a
-lib@ABI@/libX11.so
-lib@ABI@/libX11.so.6
-lib@ABI@/libX11.so.6.1
-lib@ABI@/libX11.so.6.2
-lib@ABI@/libX11.dylib
-lib@ABI@/libX11.6.dylib
-lib@ABI@/libX11.6.1.dylib
-lib@ABI@/libX11.6.2.dylib
-lib@ABI@/libXIE.a
-lib@ABI@/libXIE.so
-lib@ABI@/libXIE.so.6
-lib@ABI@/libXIE.so.6.0
-lib@ABI@/libXIE.dylib
-lib@ABI@/libXIE.6.dylib
-lib@ABI@/libXIE.6.0.dylib
-lib@ABI@/libXRes.a
-lib@ABI@/libXRes.so
-lib@ABI@/libXRes.so.1
-lib@ABI@/libXRes.so.1.0
-lib@ABI@/libXTrap.a
-lib@ABI@/libXTrap.so
-lib@ABI@/libXTrap.so.6
-lib@ABI@/libXTrap.so.6.4
-lib@ABI@/libXTrap.dylib
-lib@ABI@/libXTrap.6.dylib
-lib@ABI@/libXTrap.6.4.dylib
-lib@ABI@/libXau.a
-lib@ABI@/libXau.so
-lib@ABI@/libXau.so.6
-lib@ABI@/libXau.so.6.0
-lib@ABI@/libXaw.a
-lib@ABI@/libXaw.so
-lib@ABI@/libXaw.so.6
-lib@ABI@/libXaw.so.6.1
-lib@ABI@/libXaw.so.7
-lib@ABI@/libXaw.so.7.0
-lib@ABI@/libXaw.so.7.1
-lib@ABI@/libXaw.dylib
-lib@ABI@/libXaw.6.dylib
-lib@ABI@/libXaw.6.1.dylib
-lib@ABI@/libXaw.7.dylib
-lib@ABI@/libXaw.7.0.dylib
-lib@ABI@/libXdmcp.a
-lib@ABI@/libXdmcp.so
-lib@ABI@/libXdmcp.so.6
-lib@ABI@/libXdmcp.so.6.0
-lib@ABI@/libXdpms.a
-lib@ABI@/libXext.a
-lib@ABI@/libXext.so
-lib@ABI@/libXext.so.6
-lib@ABI@/libXext.so.6.3
-lib@ABI@/libXext.so.6.4
-lib@ABI@/libXext.dylib
-lib@ABI@/libXext.6.dylib
-lib@ABI@/libXext.6.3.dylib
-lib@ABI@/libXext.6.4.dylib
-lib@ABI@/libXfont.a
-lib@ABI@/libXfont.so
-lib@ABI@/libXfont.so.1
-lib@ABI@/libXfont.so.1.3
-lib@ABI@/libXfont.so.1.4
-lib@ABI@/libXfont.so.1.5
-lib@ABI@/libXfont.dylib
-lib@ABI@/libXfont.1.dylib
-lib@ABI@/libXfont.1.3.dylib
-lib@ABI@/libXfont.1.4.dylib
-lib@ABI@/libXfontcache.a
-lib@ABI@/libXfontcache.so
-lib@ABI@/libXfontcache.so.1
-lib@ABI@/libXfontcache.so.1.2
-lib@ABI@/libXft.so.1
-lib@ABI@/libXft.so.1.0
-lib@ABI@/libXft.so.1.1
-lib@ABI@/libXft.dylib
-lib@ABI@/libXft.1.dylib
-lib@ABI@/libXft.1.0.dylib
-lib@ABI@/libXft.1.1.dylib
-lib@ABI@/libXi.a
-lib@ABI@/libXi.so
-lib@ABI@/libXi.so.6
-lib@ABI@/libXi.so.6.0
-lib@ABI@/libXi.dylib
-lib@ABI@/libXi.6.dylib
-lib@ABI@/libXi.6.0.dylib
-lib@ABI@/libXinerama.a
-lib@ABI@/libXinerama.so
-lib@ABI@/libXinerama.so.1
-lib@ABI@/libXinerama.so.1.0
-lib@ABI@/libXinerama.dylib
-lib@ABI@/libXinerama.1.dylib
-lib@ABI@/libXinerama.1.0.dylib
-lib@ABI@/libXmu.a
-lib@ABI@/libXmu.so
-lib@ABI@/libXmu.so.6
-lib@ABI@/libXmu.so.6.0
-lib@ABI@/libXmu.so.6.2
-lib@ABI@/libXmu.dylib
-lib@ABI@/libXmu.6.dylib
-lib@ABI@/libXmu.6.0.dylib
-lib@ABI@/libXmu.6.2.dylib
-lib@ABI@/libXmuu.a
-lib@ABI@/libXmuu.so
-lib@ABI@/libXmuu.so.1
-lib@ABI@/libXmuu.so.1.0
-lib@ABI@/libXmuu.dylib
-lib@ABI@/libXmuu.1.dylib
-lib@ABI@/libXmuu.1.0.dylib
-lib@ABI@/libXp.a
-lib@ABI@/libXp.so
-lib@ABI@/libXp.so.6
-lib@ABI@/libXp.so.6.2
-lib@ABI@/libXp.dylib
-lib@ABI@/libXp.6.dylib
-lib@ABI@/libXp.6.2.dylib
-lib@ABI@/libXss.a
-lib@ABI@/libXss.so
-lib@ABI@/libXss.so.1
-lib@ABI@/libXss.so.1.0
-lib@ABI@/libXt.a
-lib@ABI@/libXt.so
-lib@ABI@/libXt.so.6
-lib@ABI@/libXt.so.6.0
-lib@ABI@/libXt.dylib
-lib@ABI@/libXt.6.dylib
-lib@ABI@/libXt.6.0.dylib
-lib@ABI@/libXt.so.6.1
-lib@ABI@/libXtst.a
-lib@ABI@/libXtst.so
-lib@ABI@/libXtst.so.6
-lib@ABI@/libXtst.so.6.1
-lib@ABI@/libXtst.dylib
-lib@ABI@/libXtst.6.dylib
-lib@ABI@/libXtst.6.1.dylib
-lib@ABI@/libXv.a
-lib@ABI@/libXv.so
-lib@ABI@/libXv.so.1
-lib@ABI@/libXv.so.1.0
-lib@ABI@/libXv.dylib
-lib@ABI@/libXv.1.dylib
-lib@ABI@/libXv.1.0.dylib
-lib@ABI@/libXvMC.a
-lib@ABI@/libXvMC.so
-lib@ABI@/libXvMC.so.1
-lib@ABI@/libXvMC.so.1.0
-lib@ABI@/libXxf86dga.a
-lib@ABI@/libXxf86dga.so
-lib@ABI@/libXxf86dga.so.1
-lib@ABI@/libXxf86dga.so.1.0
-lib@ABI@/libXxf86dga.so.1.1
-lib@ABI@/libXxf86misc.a
-lib@ABI@/libXxf86misc.so
-lib@ABI@/libXxf86misc.so.1
-lib@ABI@/libXxf86misc.so.1.0
-lib@ABI@/libXxf86misc.so.1.1
-lib@ABI@/libXxf86vm.a
-lib@ABI@/libXxf86vm.so
-lib@ABI@/libXxf86vm.so.1
-lib@ABI@/libXxf86vm.so.1.0
-lib@ABI@/libdmx.a
-lib@ABI@/libdmx.so
-lib@ABI@/libdmx.so.1
-lib@ABI@/libdmx.so.1.0
-lib@ABI@/libdps.a
-lib@ABI@/libdps.so
-lib@ABI@/libdps.so.1
-lib@ABI@/libdps.so.1.0
-lib@ABI@/libdps.dylib
-lib@ABI@/libdps.1.dylib
-lib@ABI@/libdps.1.0.dylib
-lib@ABI@/libdpstk.a
-lib@ABI@/libdpstk.so
-lib@ABI@/libdpstk.so.1
-lib@ABI@/libdpstk.so.1.0
-lib@ABI@/libdpstk.dylib
-lib@ABI@/libdpstk.1.dylib
-lib@ABI@/libdpstk.1.0.dylib
-lib@ABI@/libfntstubs.a
-lib@ABI@/libfontenc.a
-lib@ABI@/libfontenc.so
-lib@ABI@/libfontenc.so.1
-lib@ABI@/libfontenc.so.1.0
-lib@ABI@/liboldX.a
-lib@ABI@/liboldX.so
-lib@ABI@/liboldX.so.6
-lib@ABI@/liboldX.so.6.0
-lib@ABI@/liboldX.dylib
-lib@ABI@/liboldX.6.dylib
-lib@ABI@/liboldX.6.0.dylib
-lib@ABI@/libpsres.a
-lib@ABI@/libpsres.so
-lib@ABI@/libpsres.so.1
-lib@ABI@/libpsres.so.1.0
-lib@ABI@/libpsres.dylib
-lib@ABI@/libpsres.1.dylib
-lib@ABI@/libpsres.1.0.dylib
-lib@ABI@/libxf86config.a
-lib@ABI@/libxkbfile.a
-lib@ABI@/libxkbfile.so
-lib@ABI@/libxkbfile.so.1
-lib@ABI@/libxkbfile.so.1.0
-lib@ABI@/libxkbui.a
-lib@ABI@/libxkbui.so
-lib@ABI@/libxkbui.so.1
-lib@ABI@/libxkbui.so.1.0
diff --git a/pkgtools/x11-links/files/xfree.MesaLib b/pkgtools/x11-links/files/xfree.MesaLib
deleted file mode 100644
index 2a4d4797cf9..00000000000
--- a/pkgtools/x11-links/files/xfree.MesaLib
+++ /dev/null
@@ -1,36 +0,0 @@
-# $NetBSD: xfree.MesaLib,v 1.4 2003/12/19 19:19:15 veego Exp $
-#
-include/GL/GLwDrawA.h
-include/GL/GLwDrawAP.h
-include/GL/GLwMDrawA.h
-include/GL/GLwMDrawAP.h
-include/GL/gl.h
-include/GL/glext.h
-include/GL/glx.h
-include/GL/glxext.h
-include/GL/glxint.h
-include/GL/glxmd.h
-include/GL/glxproto.h
-include/GL/glxtokens.h
-include/GL/osmesa.h
-lib/libGL.a
-lib/libGL.so
-lib/libGL.so.1
-lib/libGL.so.1.2
-lib/libGL.dylib
-lib/libGL.1.dylib
-lib/libGL.1.2.dylib
-lib/libGLw.a
-lib/libGLw.so
-lib/libGLw.so.1
-lib/libGLw.so.1.0
-lib/libGLw.dylib
-lib/libGLw.1.dylib
-lib/libGLw.1.0.dylib
-lib/libOSMesa.a
-lib/libOSMesa.so
-lib/libOSMesa.so.4
-lib/libOSMesa.so.4.0
-lib/libOSMesa.dylib
-lib/libOSMesa.4.dylib
-lib/libOSMesa.4.0.dylib
diff --git a/pkgtools/x11-links/files/xfree.Xft2 b/pkgtools/x11-links/files/xfree.Xft2
deleted file mode 100644
index 4c8bbfb22d5..00000000000
--- a/pkgtools/x11-links/files/xfree.Xft2
+++ /dev/null
@@ -1,12 +0,0 @@
-# $NetBSD: xfree.Xft2,v 1.1 2004/02/17 16:50:26 jlam Exp $
-#
-include/X11/Xft/Xft.h
-include/X11/Xft/XftCompat.h
-lib/libXft.a
-lib/libXft.so
-lib/libXft.so.2
-lib/libXft.so.2.0
-lib/libXft.so.2.1
-lib/libXft.dylib
-lib/libXft.2.dylib
-lib/libXft.2.0.dylib
diff --git a/pkgtools/x11-links/files/xfree.Xrandr b/pkgtools/x11-links/files/xfree.Xrandr
deleted file mode 100644
index 757126fdf67..00000000000
--- a/pkgtools/x11-links/files/xfree.Xrandr
+++ /dev/null
@@ -1,14 +0,0 @@
-# $NetBSD: xfree.Xrandr,v 1.1 2004/02/16 23:39:36 jlam Exp $
-#
-include/X11/extensions/Xrandr.h
-lib/libXrandr.a
-lib/libXrandr.so
-lib/libXrandr.so.1
-lib/libXrandr.so.1.0
-lib/libXrandr.so.2
-lib/libXrandr.so.2.0
-lib/libXrandr.dylib
-lib/libXrandr.1.dylib
-lib/libXrandr.1.0.dylib
-lib/libXrandr.2.dylib
-lib/libXrandr.2.0.dylib
diff --git a/pkgtools/x11-links/files/xfree.Xrender b/pkgtools/x11-links/files/xfree.Xrender
deleted file mode 100644
index d64e71e13c2..00000000000
--- a/pkgtools/x11-links/files/xfree.Xrender
+++ /dev/null
@@ -1,11 +0,0 @@
-# $NetBSD: xfree.Xrender,v 1.4 2004/02/16 23:39:36 jlam Exp $
-#
-include/X11/extensions/Xrender.h
-lib/libXrender.a
-lib/libXrender.so
-lib/libXrender.so.1
-lib/libXrender.so.1.1
-lib/libXrender.so.1.2
-lib/libXrender.dylib
-lib/libXrender.1.dylib
-lib/libXrender.1.1.dylib
diff --git a/pkgtools/x11-links/files/xfree.expat b/pkgtools/x11-links/files/xfree.expat
deleted file mode 100644
index 770ebfd9e90..00000000000
--- a/pkgtools/x11-links/files/xfree.expat
+++ /dev/null
@@ -1,15 +0,0 @@
-# $NetBSD: xfree.expat,v 1.2 2005/06/10 03:44:07 jlam Exp $
-#
-include/expat.h
-lib/libexpat.a
-lib/libexpat.so
-lib/libexpat.so.0
-lib/libexpat.so.1
-lib/libexpat.so.1.0
-lib/libexpat.so.2
-lib/libexpat.so.3
-lib/libexpat.so.4
-lib/libexpat.so.4.0
-lib/libexpat.dylib
-lib/libexpat.1.dylib
-lib/libexpat.1.0.dylib
diff --git a/pkgtools/x11-links/files/xfree.fontconfig b/pkgtools/x11-links/files/xfree.fontconfig
deleted file mode 100644
index dbddcb42b1e..00000000000
--- a/pkgtools/x11-links/files/xfree.fontconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-# $NetBSD: xfree.fontconfig,v 1.1 2004/02/16 23:39:36 jlam Exp $
-#
-include/fontconfig/fcfreetype.h
-include/fontconfig/fcprivate.h
-include/fontconfig/fontconfig.h
-lib/libfontconfig.a
-lib/libfontconfig.so
-lib/libfontconfig.so.1
-lib/libfontconfig.so.1.0
-lib/libfontconfig.dylib
-lib/libfontconfig.1.dylib
-lib/libfontconfig.1.0.dylib
diff --git a/pkgtools/x11-links/files/xfree.freetype2 b/pkgtools/x11-links/files/xfree.freetype2
deleted file mode 100644
index fcd5e1f2cd9..00000000000
--- a/pkgtools/x11-links/files/xfree.freetype2
+++ /dev/null
@@ -1,109 +0,0 @@
-# $NetBSD: xfree.freetype2,v 1.6 2005/06/10 03:44:07 jlam Exp $
-#
-include/freetype2/freetype/cache/ftccache.h
-include/freetype2/freetype/cache/ftccmap.h
-include/freetype2/freetype/cache/ftcglyph.h
-include/freetype2/freetype/cache/ftcimage.h
-include/freetype2/freetype/cache/ftcmanag.h
-include/freetype2/freetype/cache/ftcmru.h
-include/freetype2/freetype/cache/ftcsbits.h
-include/freetype2/freetype/cache/ftlru.h
-include/freetype2/freetype/config/ftconfig.h
-include/freetype2/freetype/config/ftheader.h
-include/freetype2/freetype/config/ftmodule.h
-include/freetype2/freetype/config/ftoption.h
-include/freetype2/freetype/config/ftstdlib.h
-include/freetype2/freetype/freetype.h
-include/freetype2/freetype/ftbbox.h
-include/freetype2/freetype/ftbdf.h
-include/freetype2/freetype/ftcache.h
-include/freetype2/freetype/ftchapters.h
-include/freetype2/freetype/fterrdef.h
-include/freetype2/freetype/fterrors.h
-include/freetype2/freetype/ftglyph.h
-include/freetype2/freetype/ftgzip.h
-include/freetype2/freetype/ftimage.h
-include/freetype2/freetype/ftincrem.h
-include/freetype2/freetype/ftlist.h
-include/freetype2/freetype/ftlzw.h
-include/freetype2/freetype/ftmac.h
-include/freetype2/freetype/ftmm.h
-include/freetype2/freetype/ftmodapi.h
-include/freetype2/freetype/ftmoderr.h
-include/freetype2/freetype/ftmodule.h
-include/freetype2/freetype/ftoutln.h
-include/freetype2/freetype/ftpfr.h
-include/freetype2/freetype/ftrender.h
-include/freetype2/freetype/ftsizes.h
-include/freetype2/freetype/ftsnames.h
-include/freetype2/freetype/ftstroke.h
-include/freetype2/freetype/ftstroker.h
-include/freetype2/freetype/ftsynth.h
-include/freetype2/freetype/ftsysio.h
-include/freetype2/freetype/ftsysmem.h
-include/freetype2/freetype/ftsystem.h
-include/freetype2/freetype/fttrigon.h
-include/freetype2/freetype/fttypes.h
-include/freetype2/freetype/ftwinfnt.h
-include/freetype2/freetype/ftxf86.h
-include/freetype2/freetype/internal/autohint.h
-include/freetype2/freetype/internal/bdftypes.h
-include/freetype2/freetype/internal/cfftypes.h
-include/freetype2/freetype/internal/fnttypes.h
-include/freetype2/freetype/internal/ftcalc.h
-include/freetype2/freetype/internal/ftcore.h
-include/freetype2/freetype/internal/ftdebug.h
-include/freetype2/freetype/internal/ftdriver.h
-include/freetype2/freetype/internal/ftexcept.h
-include/freetype2/freetype/internal/ftextend.h
-include/freetype2/freetype/internal/ftgloadr.h
-include/freetype2/freetype/internal/fthash.h
-include/freetype2/freetype/internal/ftmemory.h
-include/freetype2/freetype/internal/ftobject.h
-include/freetype2/freetype/internal/ftobjs.h
-include/freetype2/freetype/internal/ftrfork.h
-include/freetype2/freetype/internal/ftserv.h
-include/freetype2/freetype/internal/ftstream.h
-include/freetype2/freetype/internal/fttrace.h
-include/freetype2/freetype/internal/internal.h
-include/freetype2/freetype/internal/pcftypes.h
-include/freetype2/freetype/internal/pfr.h
-include/freetype2/freetype/internal/psaux.h
-include/freetype2/freetype/internal/psglobal.h
-include/freetype2/freetype/internal/pshints.h
-include/freetype2/freetype/internal/psnames.h
-include/freetype2/freetype/internal/sfnt.h
-include/freetype2/freetype/internal/t1types.h
-include/freetype2/freetype/internal/t42types.h
-include/freetype2/freetype/internal/tttypes.h
-include/freetype2/freetype/internal/services/svbdf.h
-include/freetype2/freetype/internal/services/svgldict.h
-include/freetype2/freetype/internal/services/svmm.h
-include/freetype2/freetype/internal/services/svpfr.h
-include/freetype2/freetype/internal/services/svpostnm.h
-include/freetype2/freetype/internal/services/svpscmap.h
-include/freetype2/freetype/internal/services/svpsinfo.h
-include/freetype2/freetype/internal/services/svsfnt.h
-include/freetype2/freetype/internal/services/svttcmap.h
-include/freetype2/freetype/internal/services/svwinfnt.h
-include/freetype2/freetype/internal/services/svxf86nm.h
-include/freetype2/freetype/t1tables.h
-include/freetype2/freetype/ttnameid.h
-include/freetype2/freetype/tttables.h
-include/freetype2/freetype/tttags.h
-include/freetype2/freetype/ttunpat.h
-include/freetype2/ft2build.h
-include/ft2build.h
-lib/libfreetype.a
-lib/libfreetype.so
-lib/libfreetype.so.6
-lib/libfreetype.so.7
-lib/libfreetype.so.8
-lib/libfreetype.so.8.0
-lib/libfreetype.so.9
-lib/libfreetype.so.9.0
-lib/libfreetype.dylib
-lib/libfreetype.8.dylib
-lib/libfreetype.8.0.dylib
-lib/libfreetype.9.dylib
-lib/libfreetype.9.0.dylib
diff --git a/pkgtools/x11-links/files/xfree.glu b/pkgtools/x11-links/files/xfree.glu
deleted file mode 100644
index 40b91cf4c2c..00000000000
--- a/pkgtools/x11-links/files/xfree.glu
+++ /dev/null
@@ -1,10 +0,0 @@
-# $NetBSD: xfree.glu,v 1.2 2003/09/07 21:53:03 jlam Exp $
-#
-include/GL/glu.h
-lib/libGLU.a
-lib/libGLU.so
-lib/libGLU.so.1
-lib/libGLU.so.1.3
-lib/libGLU.dylib
-lib/libGLU.1.dylib
-lib/libGLU.1.3.dylib
diff --git a/pkgtools/x11-links/files/xfree.randrext b/pkgtools/x11-links/files/xfree.randrext
deleted file mode 100644
index 20c28116da4..00000000000
--- a/pkgtools/x11-links/files/xfree.randrext
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xfree.randrext,v 1.1 2004/02/16 23:39:36 jlam Exp $
-#
-include/X11/extensions/randr.h
-include/X11/extensions/randrproto.h
diff --git a/pkgtools/x11-links/files/xfree.randrproto b/pkgtools/x11-links/files/xfree.randrproto
deleted file mode 100644
index f01573dc941..00000000000
--- a/pkgtools/x11-links/files/xfree.randrproto
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xfree.randrproto,v 1.1 2006/04/19 17:03:28 reed Exp $
-#
-include/X11/extensions/randr.h
-include/X11/extensions/randrproto.h
diff --git a/pkgtools/x11-links/files/xfree.render b/pkgtools/x11-links/files/xfree.render
deleted file mode 100644
index e19fbebfa9d..00000000000
--- a/pkgtools/x11-links/files/xfree.render
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xfree.render,v 1.1 2004/02/16 23:39:36 jlam Exp $
-#
-include/X11/extensions/render.h
-include/X11/extensions/renderproto.h
diff --git a/pkgtools/x11-links/files/xfree.renderproto b/pkgtools/x11-links/files/xfree.renderproto
deleted file mode 100644
index fa4414f06f4..00000000000
--- a/pkgtools/x11-links/files/xfree.renderproto
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xfree.renderproto,v 1.1 2006/04/19 17:03:28 reed Exp $
-#
-include/X11/extensions/render.h
-include/X11/extensions/renderproto.h
diff --git a/pkgtools/x11-links/files/xfree.xcursor b/pkgtools/x11-links/files/xfree.xcursor
deleted file mode 100644
index c8c39ff0e26..00000000000
--- a/pkgtools/x11-links/files/xfree.xcursor
+++ /dev/null
@@ -1,10 +0,0 @@
-# $NetBSD: xfree.xcursor,v 1.1 2004/02/16 23:39:36 jlam Exp $
-#
-include/X11/Xcursor/Xcursor.h
-lib/libXcursor.a
-lib/libXcursor.so
-lib/libXcursor.so.1
-lib/libXcursor.so.1.0
-lib/libXcursor.dylib
-lib/libXcursor.1.dylib
-lib/libXcursor.1.0.dylib
diff --git a/pkgtools/x11-links/files/xfree.xpm b/pkgtools/x11-links/files/xfree.xpm
deleted file mode 100644
index c1ddf9f8ea6..00000000000
--- a/pkgtools/x11-links/files/xfree.xpm
+++ /dev/null
@@ -1,10 +0,0 @@
-# $NetBSD: xfree.xpm,v 1.2 2003/09/07 21:53:03 jlam Exp $
-#
-include/X11/xpm.h
-lib/libXpm.a
-lib/libXpm.so
-lib/libXpm.so.4
-lib/libXpm.so.4.11
-lib/libXpm.dylib
-lib/libXpm.4.dylib
-lib/libXpm.4.11.dylib
diff --git a/pkgtools/x11-links/files/xorg b/pkgtools/x11-links/files/xorg
deleted file mode 100644
index 76ff25e7db8..00000000000
--- a/pkgtools/x11-links/files/xorg
+++ /dev/null
@@ -1,612 +0,0 @@
-# $NetBSD: xorg,v 1.2 2006/01/19 01:05:24 reed Exp $
-#
-# The files listed below are the union of the sets of files installed by
-# the supported Xorg (and some XFree) distributions, minus the set of files
-# representing bits that may be added via pkgsrc, e.g. Xfixes, MesaLib, Xpm,
-# freetype2, etc.
-#
-include/DPS/ColorSB.h
-include/DPS/ColorSBP.h
-include/DPS/DPSScrollW.h
-include/DPS/DPSScrollWP.h
-include/DPS/FontCreatP.h
-include/DPS/FontCreato.h
-include/DPS/FontSB.h
-include/DPS/FontSBP.h
-include/DPS/FontSamplP.h
-include/DPS/FontSample.h
-include/DPS/PSres.h
-include/DPS/XDPS.h
-include/DPS/XDPSlib.h
-include/DPS/XDPSproto.h
-include/DPS/dpsNXargs.h
-include/DPS/dpsXclient.h
-include/DPS/dpsXcommon.h
-include/DPS/dpsXpreview.h
-include/DPS/dpsXshare.h
-include/DPS/dpsXuserpath.h
-include/DPS/dpsclient.h
-include/DPS/dpsconfig.h
-include/DPS/dpsexcept.h
-include/DPS/dpsfriends.h
-include/DPS/dpsops.h
-include/DPS/psops.h
-include/X11/Composite.h
-include/X11/CompositeP.h
-include/X11/ConstrainP.h
-include/X11/Constraint.h
-include/X11/Core.h
-include/X11/CoreP.h
-include/X11/DECkeysym.h
-include/X11/HPkeysym.h
-include/X11/ICE/ICE.h
-include/X11/ICE/ICEconn.h
-include/X11/ICE/ICElib.h
-include/X11/ICE/ICEmsg.h
-include/X11/ICE/ICEproto.h
-include/X11/ICE/ICEutil.h
-include/X11/Intrinsic.h
-include/X11/IntrinsicP.h
-include/X11/Object.h
-include/X11/ObjectP.h
-include/X11/PEX5/PEX.h
-include/X11/PEX5/PEXlib.h
-include/X11/PEX5/PEXlibint.h
-include/X11/PEX5/PEXproto.h
-include/X11/PEX5/PEXprotost.h
-include/X11/PM/PM.h
-include/X11/PM/PMproto.h
-include/X11/RectObj.h
-include/X11/RectObjP.h
-include/X11/SM/SM.h
-include/X11/SM/SMlib.h
-include/X11/SM/SMproto.h
-include/X11/Shell.h
-include/X11/ShellP.h
-include/X11/StringDefs.h
-include/X11/Sunkeysym.h
-include/X11/Vendor.h
-include/X11/VendorP.h
-include/X11/X.h
-include/X11/X10.h
-include/X11/XF86keysym.h
-include/X11/XKBlib.h
-include/X11/XWDFile.h
-include/X11/Xalloca.h
-include/X11/Xarch.h
-include/X11/Xatom.h
-include/X11/Xauth.h
-include/X11/Xaw/AllWidgets.h
-include/X11/Xaw/AsciiSink.h
-include/X11/Xaw/AsciiSinkP.h
-include/X11/Xaw/AsciiSrc.h
-include/X11/Xaw/AsciiSrcP.h
-include/X11/Xaw/AsciiText.h
-include/X11/Xaw/AsciiTextP.h
-include/X11/Xaw/Box.h
-include/X11/Xaw/BoxP.h
-include/X11/Xaw/Cardinals.h
-include/X11/Xaw/Command.h
-include/X11/Xaw/CommandP.h
-include/X11/Xaw/Dialog.h
-include/X11/Xaw/DialogP.h
-include/X11/Xaw/Form.h
-include/X11/Xaw/FormP.h
-include/X11/Xaw/Grip.h
-include/X11/Xaw/GripP.h
-include/X11/Xaw/Label.h
-include/X11/Xaw/LabelP.h
-include/X11/Xaw/List.h
-include/X11/Xaw/ListP.h
-include/X11/Xaw/MenuButtoP.h
-include/X11/Xaw/MenuButton.h
-include/X11/Xaw/MultiSink.h
-include/X11/Xaw/MultiSinkP.h
-include/X11/Xaw/MultiSrc.h
-include/X11/Xaw/MultiSrcP.h
-include/X11/Xaw/Paned.h
-include/X11/Xaw/PanedP.h
-include/X11/Xaw/Panner.h
-include/X11/Xaw/PannerP.h
-include/X11/Xaw/Porthole.h
-include/X11/Xaw/PortholeP.h
-include/X11/Xaw/Print.h
-include/X11/Xaw/PrintSP.h
-include/X11/Xaw/Repeater.h
-include/X11/Xaw/RepeaterP.h
-include/X11/Xaw/Reports.h
-include/X11/Xaw/Scrollbar.h
-include/X11/Xaw/ScrollbarP.h
-include/X11/Xaw/Simple.h
-include/X11/Xaw/SimpleMenP.h
-include/X11/Xaw/SimpleMenu.h
-include/X11/Xaw/SimpleP.h
-include/X11/Xaw/Sme.h
-include/X11/Xaw/SmeBSB.h
-include/X11/Xaw/SmeBSBP.h
-include/X11/Xaw/SmeLine.h
-include/X11/Xaw/SmeLineP.h
-include/X11/Xaw/SmeP.h
-include/X11/Xaw/StripCharP.h
-include/X11/Xaw/StripChart.h
-include/X11/Xaw/Template.c
-include/X11/Xaw/Template.h
-include/X11/Xaw/TemplateP.h
-include/X11/Xaw/Text.h
-include/X11/Xaw/TextP.h
-include/X11/Xaw/TextSink.h
-include/X11/Xaw/TextSinkP.h
-include/X11/Xaw/TextSrc.h
-include/X11/Xaw/TextSrcP.h
-include/X11/Xaw/Tip.h
-include/X11/Xaw/TipP.h
-include/X11/Xaw/Toggle.h
-include/X11/Xaw/ToggleP.h
-include/X11/Xaw/Tree.h
-include/X11/Xaw/TreeP.h
-include/X11/Xaw/VendorEP.h
-include/X11/Xaw/Viewport.h
-include/X11/Xaw/ViewportP.h
-include/X11/Xaw/XawImP.h
-include/X11/Xaw/XawInit.h
-include/X11/Xcms.h
-include/X11/Xdefs.h
-include/X11/Xdmcp.h
-include/X11/Xft/XftFreetype.h
-include/X11/Xfuncproto.h
-include/X11/Xfuncs.h
-include/X11/Xlib.h
-include/X11/XlibConf.h
-include/X11/Xlibint.h
-include/X11/Xlocale.h
-include/X11/Xmd.h
-include/X11/Xmu/Atoms.h
-include/X11/Xmu/CharSet.h
-include/X11/Xmu/CloseHook.h
-include/X11/Xmu/Converters.h
-include/X11/Xmu/CurUtil.h
-include/X11/Xmu/CvtCache.h
-include/X11/Xmu/DisplayQue.h
-include/X11/Xmu/Drawing.h
-include/X11/Xmu/Editres.h
-include/X11/Xmu/EditresP.h
-include/X11/Xmu/Error.h
-include/X11/Xmu/ExtAgent.h
-include/X11/Xmu/Initer.h
-include/X11/Xmu/Lookup.h
-include/X11/Xmu/Misc.h
-include/X11/Xmu/StdCmap.h
-include/X11/Xmu/StdSel.h
-include/X11/Xmu/SysUtil.h
-include/X11/Xmu/WidgetNode.h
-include/X11/Xmu/WinUtil.h
-include/X11/Xmu/Xct.h
-include/X11/Xmu/Xmu.h
-include/X11/Xos.h
-include/X11/Xos_r.h
-include/X11/Xosdefs.h
-include/X11/Xpoll.h
-include/X11/XprintAppUtil/xpapputil.h
-include/X11/XprintUtil/xprintutil.h
-include/X11/Xproto.h
-include/X11/Xprotostr.h
-include/X11/Xresource.h
-include/X11/Xthreads.h
-include/X11/Xutil.h
-include/X11/ap_keysym.h
-include/X11/bitmaps/1x1
-include/X11/bitmaps/2x2
-include/X11/bitmaps/Dashes
-include/X11/bitmaps/Down
-include/X11/bitmaps/Excl
-include/X11/bitmaps/FlipHoriz
-include/X11/bitmaps/FlipVert
-include/X11/bitmaps/Fold
-include/X11/bitmaps/Left
-include/X11/bitmaps/Right
-include/X11/bitmaps/RotateLeft
-include/X11/bitmaps/RotateRight
-include/X11/bitmaps/Stipple
-include/X11/bitmaps/Term
-include/X11/bitmaps/Up
-include/X11/bitmaps/black
-include/X11/bitmaps/black6
-include/X11/bitmaps/box6
-include/X11/bitmaps/boxes
-include/X11/bitmaps/calculator
-include/X11/bitmaps/card.xbm
-include/X11/bitmaps/cntr_ptr
-include/X11/bitmaps/cntr_ptrmsk
-include/X11/bitmaps/cross_weave
-include/X11/bitmaps/dimple1
-include/X11/bitmaps/dimple3
-include/X11/bitmaps/dot
-include/X11/bitmaps/down.xbm
-include/X11/bitmaps/dropbar7
-include/X11/bitmaps/dropbar8
-include/X11/bitmaps/escherknot
-include/X11/bitmaps/flagdown
-include/X11/bitmaps/flagup
-include/X11/bitmaps/flipped_gray
-include/X11/bitmaps/gray
-include/X11/bitmaps/gray1
-include/X11/bitmaps/gray3
-include/X11/bitmaps/grid16
-include/X11/bitmaps/grid2
-include/X11/bitmaps/grid4
-include/X11/bitmaps/grid8
-include/X11/bitmaps/hlines2
-include/X11/bitmaps/hlines3
-include/X11/bitmaps/icon
-include/X11/bitmaps/keyboard.xbm
-include/X11/bitmaps/keyboard16
-include/X11/bitmaps/ldblarrow
-include/X11/bitmaps/left.xbm
-include/X11/bitmaps/left_ptr
-include/X11/bitmaps/left_ptrmsk
-include/X11/bitmaps/letters
-include/X11/bitmaps/light_gray
-include/X11/bitmaps/mailempty
-include/X11/bitmaps/mailemptymsk
-include/X11/bitmaps/mailfull
-include/X11/bitmaps/mailfullmsk
-include/X11/bitmaps/mensetmanus
-include/X11/bitmaps/menu10
-include/X11/bitmaps/menu12
-include/X11/bitmaps/menu16
-include/X11/bitmaps/menu6
-include/X11/bitmaps/menu8
-include/X11/bitmaps/monitor.xbm
-include/X11/bitmaps/mouse.xbm
-include/X11/bitmaps/narrower.xbm
-include/X11/bitmaps/noletters
-include/X11/bitmaps/opendot
-include/X11/bitmaps/opendotMask
-include/X11/bitmaps/plaid
-include/X11/bitmaps/rdblarrow
-include/X11/bitmaps/right.xbm
-include/X11/bitmaps/right_ptr
-include/X11/bitmaps/right_ptrmsk
-include/X11/bitmaps/root_weave
-include/X11/bitmaps/scales
-include/X11/bitmaps/shorter.xbm
-include/X11/bitmaps/sipb
-include/X11/bitmaps/star
-include/X11/bitmaps/starMask
-include/X11/bitmaps/stipple
-include/X11/bitmaps/taller.xbm
-include/X11/bitmaps/target
-include/X11/bitmaps/terminal
-include/X11/bitmaps/tie_fighter
-include/X11/bitmaps/up.xbm
-include/X11/bitmaps/vlines2
-include/X11/bitmaps/vlines3
-include/X11/bitmaps/weird_size
-include/X11/bitmaps/wide_weave
-include/X11/bitmaps/wider.xbm
-include/X11/bitmaps/wingdogs
-include/X11/bitmaps/woman
-include/X11/bitmaps/xfd_icon
-include/X11/bitmaps/xlogo11
-include/X11/bitmaps/xlogo16
-include/X11/bitmaps/xlogo32
-include/X11/bitmaps/xlogo64
-include/X11/bitmaps/xsnow
-include/X11/cursorfont.h
-include/X11/extensions/Print.h
-include/X11/extensions/Printstr.h
-include/X11/extensions/XIE.h
-include/X11/extensions/XIElib.h
-include/X11/extensions/XIEproto.h
-include/X11/extensions/XIEprotost.h
-include/X11/extensions/XKBbells.h
-include/X11/extensions/XKBconfig.h
-include/X11/extensions/XKBfile.h
-include/X11/extensions/XKBrules.h
-include/X11/extensions/XKBui.h
-include/X11/extensions/XKM.h
-include/X11/extensions/XKMformat.h
-include/X11/extensions/XRes.h
-include/X11/extensions/XResproto.h
-include/X11/extensions/Xdamage.h
-include/X11/extensions/Xevie.h
-include/X11/extensions/Xeviestr.h
-include/X11/extensions/Xinerama.h
-include/X11/extensions/XvMClib.h
-include/X11/extensions/Xvlib.h
-include/X11/extensions/damageproto.h
-include/X11/extensions/damagewire.h
-include/X11/extensions/dmxext.h
-include/X11/extensions/dmxproto.h
-include/X11/extensions/fontcache.h
-include/X11/extensions/fontcacheP.h
-include/X11/extensions/fontcachstr.h
-include/X11/extensions/panoramiXext.h
-include/X11/extensions/panoramiXproto.h
-include/X11/extensions/panoramiXwrap.h
-include/X11/extensions/record.h
-include/X11/extensions/recordstr.h
-include/X11/extensions/scrnsaver.h
-include/X11/extensions/xevieplaceholder.h
-include/X11/extensions/xf86bigfont.h
-include/X11/extensions/xf86bigfstr.h
-include/X11/extensions/xf86dga.h
-include/X11/extensions/xf86dga1.h
-include/X11/extensions/xf86dga1str.h
-include/X11/extensions/xf86dgastr.h
-include/X11/extensions/xf86misc.h
-include/X11/extensions/xf86mscstr.h
-include/X11/extensions/xf86vmode.h
-include/X11/extensions/xf86vmstr.h
-include/X11/extensions/xtrapbits.h
-include/X11/extensions/xtrapddmi.h
-include/X11/extensions/xtrapdi.h
-include/X11/extensions/xtrapemacros.h
-include/X11/extensions/xtraplib.h
-include/X11/extensions/xtraplibp.h
-include/X11/extensions/xtrapproto.h
-include/X11/fonts/FS.h
-include/X11/fonts/FSlib.h
-include/X11/fonts/FSproto.h
-include/X11/fonts/codeconv/cconvversion.h
-include/X11/fonts/codeconv/xttcap.h
-include/X11/fonts/codeconv/xttcconv.h
-include/X11/fonts/codeconv/xttcconvP.h
-include/X11/fonts/codeconv/xttcommon.h
-include/X11/fonts/codeconv/xttversion.h
-include/X11/fonts/fontenc.h
-include/X11/fonts/fsmasks.h
-include/X11/keysym.h
-include/X11/keysymdef.h
-include/X11/pixmaps/card.xpm
-include/X11/pixmaps/computer.xpm
-include/X11/pixmaps/deny-always.xpm
-include/X11/pixmaps/deny.xpm
-include/X11/pixmaps/keyboard.xpm
-include/X11/pixmaps/logo.xpm
-include/X11/pixmaps/monitor.xpm
-include/X11/pixmaps/mouse.xpm
-include/X11/pixmaps/permit-always.xpm
-include/X11/pixmaps/permit.xpm
-include/X11/pixmaps/skull.xpm
-include/X11/pixmaps/xorg-bw.xpm
-include/X11/pixmaps/xorg.xpm
-include/xf86Optrec.h
-include/xf86Parser.h
-lib/libFS.a
-lib/libFS.so
-lib/libFS.so.6
-lib/libFS.so.6.0
-lib/libICE.6.3.dylib
-lib/libICE.6.dylib
-lib/libICE.a
-lib/libICE.dylib
-lib/libICE.so
-lib/libICE.so.6
-lib/libICE.so.6.3
-lib/libPEX5.6.0.dylib
-lib/libPEX5.6.dylib
-lib/libPEX5.a
-lib/libPEX5.dylib
-lib/libPEX5.so
-lib/libPEX5.so.6
-lib/libPEX5.so.6.0
-lib/libSM.6.0.dylib
-lib/libSM.6.dylib
-lib/libSM.a
-lib/libSM.dylib
-lib/libSM.so
-lib/libSM.so.6
-lib/libSM.so.6.0
-lib/libX11.6.1.dylib
-lib/libX11.6.2.dylib
-lib/libX11.6.dylib
-lib/libX11.a
-lib/libX11.dylib
-lib/libX11.so
-lib/libX11.so.6
-lib/libX11.so.6.1
-lib/libX11.so.6.2
-lib/libXIE.6.0.dylib
-lib/libXIE.6.dylib
-lib/libXIE.a
-lib/libXIE.dylib
-lib/libXIE.so
-lib/libXIE.so.6
-lib/libXIE.so.6.0
-lib/libXRes.a
-lib/libXRes.so
-lib/libXRes.so.1
-lib/libXRes.so.1.0
-lib/libXTrap.6.4.dylib
-lib/libXTrap.6.dylib
-lib/libXTrap.a
-lib/libXTrap.dylib
-lib/libXTrap.so
-lib/libXTrap.so.6
-lib/libXTrap.so.6.4
-lib/libXau.a
-lib/libXau.so
-lib/libXau.so.6
-lib/libXau.so.6.0
-lib/libXaw.6.1.dylib
-lib/libXaw.6.dylib
-lib/libXaw.7.0.dylib
-lib/libXaw.7.dylib
-lib/libXaw.a
-lib/libXaw.dylib
-lib/libXaw.so
-lib/libXaw.so.6
-lib/libXaw.so.6.1
-lib/libXaw.so.7
-lib/libXaw.so.7.0
-lib/libXaw.so.8.0
-lib/libXdamage.a
-lib/libXdamage.so.1.0
-lib/libXdmcp.a
-lib/libXdmcp.so
-lib/libXdmcp.so.6
-lib/libXdmcp.so.6.0
-lib/libXdpms.a
-lib/libXevie.a
-lib/libXevie.so.1.0
-lib/libXext.6.3.dylib
-lib/libXext.6.4.dylib
-lib/libXext.6.dylib
-lib/libXext.a
-lib/libXext.dylib
-lib/libXext.so
-lib/libXext.so.6
-lib/libXext.so.6.3
-lib/libXext.so.6.4
-lib/libXfont.1.3.dylib
-lib/libXfont.1.4.dylib
-lib/libXfont.1.dylib
-lib/libXfont.a
-lib/libXfont.dylib
-lib/libXfont.so
-lib/libXfont.so.1
-lib/libXfont.so.1.3
-lib/libXfont.so.1.4
-lib/libXfont.so.1.5
-lib/libXfontcache.a
-lib/libXfontcache.so
-lib/libXfontcache.so.1
-lib/libXfontcache.so.1.2
-lib/libXft.1.0.dylib
-lib/libXft.1.1.dylib
-lib/libXft.1.dylib
-lib/libXft.dylib
-lib/libXft.so.1
-lib/libXft.so.1.0
-lib/libXft.so.1.1
-lib/libXi.6.0.dylib
-lib/libXi.6.dylib
-lib/libXi.a
-lib/libXi.dylib
-lib/libXi.so
-lib/libXi.so.6
-lib/libXi.so.6.0
-lib/libXinerama.1.0.dylib
-lib/libXinerama.1.dylib
-lib/libXinerama.a
-lib/libXinerama.dylib
-lib/libXinerama.so
-lib/libXinerama.so.1
-lib/libXinerama.so.1.0
-lib/libXmu.6.0.dylib
-lib/libXmu.6.2.dylib
-lib/libXmu.6.dylib
-lib/libXmu.a
-lib/libXmu.dylib
-lib/libXmu.so
-lib/libXmu.so.6
-lib/libXmu.so.6.0
-lib/libXmu.so.6.2
-lib/libXmuu.1.0.dylib
-lib/libXmuu.1.dylib
-lib/libXmuu.a
-lib/libXmuu.dylib
-lib/libXmuu.so
-lib/libXmuu.so.1
-lib/libXmuu.so.1.0
-lib/libXp.6.2.dylib
-lib/libXp.6.dylib
-lib/libXp.a
-lib/libXp.dylib
-lib/libXp.so
-lib/libXp.so.6
-lib/libXp.so.6.2
-lib/libXprintAppUtil.a
-lib/libXprintUtil.a
-lib/libXss.a
-lib/libXss.so
-lib/libXss.so.1
-lib/libXss.so.1.0
-lib/libXt.6.0.dylib
-lib/libXt.6.dylib
-lib/libXt.a
-lib/libXt.dylib
-lib/libXt.so
-lib/libXt.so.6
-lib/libXt.so.6.0
-lib/libXtst.6.1.dylib
-lib/libXtst.6.dylib
-lib/libXtst.a
-lib/libXtst.dylib
-lib/libXtst.so
-lib/libXtst.so.6
-lib/libXtst.so.6.1
-lib/libXv.1.0.dylib
-lib/libXv.1.dylib
-lib/libXv.a
-lib/libXv.dylib
-lib/libXv.so
-lib/libXv.so.1
-lib/libXv.so.1.0
-lib/libXvMC.a
-lib/libXvMC.so
-lib/libXvMC.so.1
-lib/libXvMC.so.1.0
-lib/libXxf86dga.a
-lib/libXxf86dga.so
-lib/libXxf86dga.so.1
-lib/libXxf86dga.so.1.0
-lib/libXxf86dga.so.1.1
-lib/libXxf86misc.a
-lib/libXxf86misc.so
-lib/libXxf86misc.so.1
-lib/libXxf86misc.so.1.0
-lib/libXxf86misc.so.1.1
-lib/libXxf86vm.a
-lib/libXxf86vm.so
-lib/libXxf86vm.so.1
-lib/libXxf86vm.so.1.0
-lib/libdmx.a
-lib/libdmx.so
-lib/libdmx.so.1
-lib/libdmx.so.1.0
-lib/libdps.1.0.dylib
-lib/libdps.1.dylib
-lib/libdps.a
-lib/libdps.dylib
-lib/libdps.so
-lib/libdps.so.1
-lib/libdps.so.1.0
-lib/libdpstk.1.0.dylib
-lib/libdpstk.1.dylib
-lib/libdpstk.a
-lib/libdpstk.dylib
-lib/libdpstk.so
-lib/libdpstk.so.1
-lib/libdpstk.so.1.0
-lib/libfntstubs.a
-lib/libfontenc.a
-lib/libfontenc.so
-lib/libfontenc.so.1
-lib/libfontenc.so.1.0
-lib/liboldX.6.0.dylib
-lib/liboldX.6.dylib
-lib/liboldX.a
-lib/liboldX.dylib
-lib/liboldX.so
-lib/liboldX.so.6
-lib/liboldX.so.6.0
-lib/libpsres.1.0.dylib
-lib/libpsres.1.dylib
-lib/libpsres.a
-lib/libpsres.dylib
-lib/libpsres.so
-lib/libpsres.so.1
-lib/libpsres.so.1.0
-lib/libxf86config.a
-lib/libxkbfile.a
-lib/libxkbfile.so
-lib/libxkbfile.so.1
-lib/libxkbfile.so.1.0
-lib/libxkbui.a
-lib/libxkbui.so
-lib/libxkbui.so.1
-lib/libxkbui.so.1.0
-lib/pkgconfig/xdamage.pc
-lib/pkgconfig/xevie.pc
diff --git a/pkgtools/x11-links/files/xorg.Xcomposite b/pkgtools/x11-links/files/xorg.Xcomposite
deleted file mode 100644
index 69963100d8b..00000000000
--- a/pkgtools/x11-links/files/xorg.Xcomposite
+++ /dev/null
@@ -1,5 +0,0 @@
-# $NetBSD: xorg.Xcomposite,v 1.1 2005/07/25 20:50:25 reed Exp $
-include/X11/extensions/Xcomposite.h
-lib/libXcomposite.so.1.0
-lib/libXcomposite.a
-lib/pkgconfig/xcomposite.pc
diff --git a/pkgtools/x11-links/files/xorg.Xfixes b/pkgtools/x11-links/files/xorg.Xfixes
deleted file mode 100644
index 9a5d42b458d..00000000000
--- a/pkgtools/x11-links/files/xorg.Xfixes
+++ /dev/null
@@ -1,8 +0,0 @@
-# $NetBSD: xorg.Xfixes,v 1.1 2005/07/25 20:50:25 reed Exp $
-#
-include/X11/extensions/Xfixes.h
-lib/libXfixes.a
-lib/libXfixes.so
-lib/libXfixes.so.3
-lib/libXfixes.so.3.0
-lib/pkgconfig/xfixes.pc
diff --git a/pkgtools/x11-links/files/xorg.compositeext b/pkgtools/x11-links/files/xorg.compositeext
deleted file mode 100644
index a33bb2294d8..00000000000
--- a/pkgtools/x11-links/files/xorg.compositeext
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xorg.compositeext,v 1.1 2005/07/25 20:50:25 reed Exp $
-include/X11/extensions/composite.h
-include/X11/extensions/compositeproto.h
-lib/pkgconfig/compositeext.pc
diff --git a/pkgtools/x11-links/files/xorg.compositeproto b/pkgtools/x11-links/files/xorg.compositeproto
deleted file mode 100644
index 69fff625310..00000000000
--- a/pkgtools/x11-links/files/xorg.compositeproto
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xorg.compositeproto,v 1.1 2006/04/19 15:56:38 reed Exp $
-include/X11/extensions/composite.h
-include/X11/extensions/compositeproto.h
-lib/pkgconfig/compositeext.pc
diff --git a/pkgtools/x11-links/files/xorg.fixesext b/pkgtools/x11-links/files/xorg.fixesext
deleted file mode 100644
index 611bb30675a..00000000000
--- a/pkgtools/x11-links/files/xorg.fixesext
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xorg.fixesext,v 1.1 2005/07/25 20:50:25 reed Exp $
-include/X11/extensions/xfixesproto.h
-include/X11/extensions/xfixeswire.h
-lib/pkgconfig/fixesext.pc
diff --git a/pkgtools/x11-links/files/xorg.fixesproto b/pkgtools/x11-links/files/xorg.fixesproto
deleted file mode 100644
index c7523f3ac68..00000000000
--- a/pkgtools/x11-links/files/xorg.fixesproto
+++ /dev/null
@@ -1,4 +0,0 @@
-# $NetBSD: xorg.fixesproto,v 1.1 2006/04/19 15:56:38 reed Exp $
-include/X11/extensions/xfixesproto.h
-include/X11/extensions/xfixeswire.h
-lib/pkgconfig/fixesext.pc
diff --git a/pkgtools/x11-links/files/xorg.xextensions b/pkgtools/x11-links/files/xorg.xextensions
deleted file mode 100644
index 27b778dfc89..00000000000
--- a/pkgtools/x11-links/files/xorg.xextensions
+++ /dev/null
@@ -1,54 +0,0 @@
-# $NetBSD: xorg.xextensions,v 1.1 2005/07/25 20:50:25 reed Exp $
-include/X11/extensions/MITMisc.h
-include/X11/extensions/XEVI.h
-include/X11/extensions/XEVIstr.h
-include/X11/extensions/XI.h
-include/X11/extensions/XInput.h
-include/X11/extensions/XIproto.h
-include/X11/extensions/XKB.h
-include/X11/extensions/XKBgeom.h
-include/X11/extensions/XKBproto.h
-include/X11/extensions/XKBsrv.h
-include/X11/extensions/XKBstr.h
-include/X11/extensions/XLbx.h
-include/X11/extensions/XShm.h
-include/X11/extensions/XTest.h
-include/X11/extensions/Xag.h
-include/X11/extensions/Xagsrv.h
-include/X11/extensions/Xagstr.h
-include/X11/extensions/Xcup.h
-include/X11/extensions/Xcupstr.h
-include/X11/extensions/Xdbe.h
-include/X11/extensions/Xdbeproto.h
-include/X11/extensions/Xext.h
-include/X11/extensions/Xv.h
-include/X11/extensions/XvMC.h
-include/X11/extensions/XvMCproto.h
-include/X11/extensions/Xvproto.h
-include/X11/extensions/bigreqstr.h
-include/X11/extensions/dpms.h
-include/X11/extensions/dpmsstr.h
-include/X11/extensions/extutil.h
-include/X11/extensions/lbxbuf.h
-include/X11/extensions/lbxbufstr.h
-include/X11/extensions/lbxdeltastr.h
-include/X11/extensions/lbximage.h
-include/X11/extensions/lbxopts.h
-include/X11/extensions/lbxstr.h
-include/X11/extensions/lbxzlib.h
-include/X11/extensions/mitmiscstr.h
-include/X11/extensions/multibuf.h
-include/X11/extensions/multibufst.h
-include/X11/extensions/saver.h
-include/X11/extensions/saverproto.h
-include/X11/extensions/security.h
-include/X11/extensions/securstr.h
-include/X11/extensions/shape.h
-include/X11/extensions/shapestr.h
-include/X11/extensions/shmstr.h
-include/X11/extensions/sync.h
-include/X11/extensions/syncstr.h
-include/X11/extensions/xcmiscstr.h
-include/X11/extensions/xtestext1.h
-include/X11/extensions/xteststr.h
-lib/pkgconfig/xextensions.pc
diff --git a/pkgtools/x11-links/files/xorg.xextproto b/pkgtools/x11-links/files/xorg.xextproto
deleted file mode 100644
index a47e3b06c5e..00000000000
--- a/pkgtools/x11-links/files/xorg.xextproto
+++ /dev/null
@@ -1,54 +0,0 @@
-# $NetBSD: xorg.xextproto,v 1.1 2006/04/19 15:56:38 reed Exp $
-include/X11/extensions/MITMisc.h
-include/X11/extensions/XEVI.h
-include/X11/extensions/XEVIstr.h
-include/X11/extensions/XI.h
-include/X11/extensions/XInput.h
-include/X11/extensions/XIproto.h
-include/X11/extensions/XKB.h
-include/X11/extensions/XKBgeom.h
-include/X11/extensions/XKBproto.h
-include/X11/extensions/XKBsrv.h
-include/X11/extensions/XKBstr.h
-include/X11/extensions/XLbx.h
-include/X11/extensions/XShm.h
-include/X11/extensions/XTest.h
-include/X11/extensions/Xag.h
-include/X11/extensions/Xagsrv.h
-include/X11/extensions/Xagstr.h
-include/X11/extensions/Xcup.h
-include/X11/extensions/Xcupstr.h
-include/X11/extensions/Xdbe.h
-include/X11/extensions/Xdbeproto.h
-include/X11/extensions/Xext.h
-include/X11/extensions/Xv.h
-include/X11/extensions/XvMC.h
-include/X11/extensions/XvMCproto.h
-include/X11/extensions/Xvproto.h
-include/X11/extensions/bigreqstr.h
-include/X11/extensions/dpms.h
-include/X11/extensions/dpmsstr.h
-include/X11/extensions/extutil.h
-include/X11/extensions/lbxbuf.h
-include/X11/extensions/lbxbufstr.h
-include/X11/extensions/lbxdeltastr.h
-include/X11/extensions/lbximage.h
-include/X11/extensions/lbxopts.h
-include/X11/extensions/lbxstr.h
-include/X11/extensions/lbxzlib.h
-include/X11/extensions/mitmiscstr.h
-include/X11/extensions/multibuf.h
-include/X11/extensions/multibufst.h
-include/X11/extensions/saver.h
-include/X11/extensions/saverproto.h
-include/X11/extensions/security.h
-include/X11/extensions/securstr.h
-include/X11/extensions/shape.h
-include/X11/extensions/shapestr.h
-include/X11/extensions/shmstr.h
-include/X11/extensions/sync.h
-include/X11/extensions/syncstr.h
-include/X11/extensions/xcmiscstr.h
-include/X11/extensions/xtestext1.h
-include/X11/extensions/xteststr.h
-lib/pkgconfig/xextensions.pc
diff --git a/pkgtools/x11-links/files/xsgi b/pkgtools/x11-links/files/xsgi
deleted file mode 100644
index 3c2826e28d5..00000000000
--- a/pkgtools/x11-links/files/xsgi
+++ /dev/null
@@ -1,560 +0,0 @@
-# $NetBSD: xsgi,v 1.2 2005/03/07 04:03:09 jschauma Exp $
-#
-include/X11/Composite.h
-include/X11/CompositeP.h
-include/X11/ConstrainP.h
-include/X11/Constraint.h
-include/X11/Core.h
-include/X11/CoreP.h
-include/X11/DECkeysym.h
-include/X11/HPkeysym.h
-include/X11/ICE/ICE.h
-include/X11/ICE/ICEconn.h
-include/X11/ICE/ICElib.h
-include/X11/ICE/ICEmsg.h
-include/X11/ICE/ICEproto.h
-include/X11/ICE/ICEutil.h
-include/X11/Intrinsic.h
-include/X11/IntrinsicP.h
-include/X11/Mrm/IDB.h
-include/X11/Mrm/Mrm.h
-include/X11/Mrm/MrmAppl.h
-include/X11/Mrm/MrmDecls.h
-include/X11/Mrm/MrmPublic.h
-include/X11/Mrm/MrmWidget.h
-include/X11/Object.h
-include/X11/ObjectP.h
-include/X11/PM/PM.h
-include/X11/PM/PMproto.h
-include/X11/RectObj.h
-include/X11/RectObjP.h
-include/X11/ResConfigP.h
-include/X11/SGIFastAtom.h
-include/X11/SGIScheme.h
-include/X11/SGIkeysym.h
-include/X11/SM/SM.h
-include/X11/SM/SMlib.h
-include/X11/SM/SMproto.h
-include/X11/SgiStrParse.h
-include/X11/Sgm/Arc.h
-include/X11/Sgm/ArcP.h
-include/X11/Sgm/ColorC.h
-include/X11/Sgm/ColorCP.h
-include/X11/Sgm/ColorChooserSwatch.h
-include/X11/Sgm/ColorHexagon.h
-include/X11/Sgm/Column.h
-include/X11/Sgm/ColumnP.h
-include/X11/Sgm/CommonColorCP.h
-include/X11/Sgm/Dial.h
-include/X11/Sgm/DialP.h
-include/X11/Sgm/DropPocket.h
-include/X11/Sgm/DropPocketP.h
-include/X11/Sgm/DynaMenu.h
-include/X11/Sgm/DynaMenuP.h
-include/X11/Sgm/Finder.h
-include/X11/Sgm/FinderP.h
-include/X11/Sgm/GLColorSliderGadget.h
-include/X11/Sgm/GLColorSliderGadgetC.h
-include/X11/Sgm/GLColorSliderManager.h
-include/X11/Sgm/GLColorSliderManagerC.h
-include/X11/Sgm/GlxDraw.h
-include/X11/Sgm/GlxDrawP.h
-include/X11/Sgm/Graph.h
-include/X11/Sgm/GraphP.h
-include/X11/Sgm/Grid.h
-include/X11/Sgm/GridP.h
-include/X11/Sgm/HPanedW.h
-include/X11/Sgm/HPanedWP.h
-include/X11/Sgm/IconG.h
-include/X11/Sgm/IconGP.h
-include/X11/Sgm/List.h
-include/X11/Sgm/ListP.h
-include/X11/Sgm/OglColorCP.h
-include/X11/Sgm/OglColorHexagon.h
-include/X11/Sgm/OglColorSliderGadget.h
-include/X11/Sgm/OglColorSliderGadgetC.h
-include/X11/Sgm/OglColorSliderManager.h
-include/X11/Sgm/OglColorSliderManagerC.h
-include/X11/Sgm/Osc.h
-include/X11/Sgm/OscP.h
-include/X11/Sgm/RubberBoard.h
-include/X11/Sgm/RubberBoardP.h
-include/X11/Sgm/ScrollBar.h
-include/X11/Sgm/ScrollBarP.h
-include/X11/Sgm/ScrolledWP.h
-include/X11/Sgm/SgColor.h
-include/X11/Sgm/SgList.h
-include/X11/Sgm/SpringBox.h
-include/X11/Sgm/SpringBoxP.h
-include/X11/Sgm/ThumbWheel.h
-include/X11/Sgm/ThumbWheelP.h
-include/X11/Sgm/VisualDrawingA.h
-include/X11/Sgm/VisualDrawingAP.h
-include/X11/Sgm/ZbText.h
-include/X11/Sgm/ZbTextP.h
-include/X11/Sgm/ZoomBar.h
-include/X11/Sgm/ZoomBarP.h
-include/X11/Shell.h
-include/X11/ShellP.h
-include/X11/StringDefs.h
-include/X11/Sunkeysym.h
-include/X11/Vendor.h
-include/X11/VendorP.h
-include/X11/X.h
-include/X11/X10.h
-include/X11/XKBlib.h
-include/X11/XWDFile.h
-include/X11/Xalloca.h
-include/X11/Xatom.h
-include/X11/Xauth.h
-include/X11/Xaw/AllWidgets.h
-include/X11/Xaw/AsciiSink.h
-include/X11/Xaw/AsciiSinkP.h
-include/X11/Xaw/AsciiSrc.h
-include/X11/Xaw/AsciiSrcP.h
-include/X11/Xaw/AsciiText.h
-include/X11/Xaw/AsciiTextP.h
-include/X11/Xaw/Box.h
-include/X11/Xaw/BoxP.h
-include/X11/Xaw/Cardinals.h
-include/X11/Xaw/Command.h
-include/X11/Xaw/CommandP.h
-include/X11/Xaw/Dialog.h
-include/X11/Xaw/DialogP.h
-include/X11/Xaw/Form.h
-include/X11/Xaw/FormP.h
-include/X11/Xaw/Grip.h
-include/X11/Xaw/GripP.h
-include/X11/Xaw/Label.h
-include/X11/Xaw/LabelP.h
-include/X11/Xaw/List.h
-include/X11/Xaw/ListP.h
-include/X11/Xaw/MenuButtoP.h
-include/X11/Xaw/MenuButton.h
-include/X11/Xaw/MultiSink.h
-include/X11/Xaw/MultiSinkP.h
-include/X11/Xaw/MultiSrc.h
-include/X11/Xaw/MultiSrcP.h
-include/X11/Xaw/Paned.h
-include/X11/Xaw/PanedP.h
-include/X11/Xaw/Panner.h
-include/X11/Xaw/PannerP.h
-include/X11/Xaw/Porthole.h
-include/X11/Xaw/PortholeP.h
-include/X11/Xaw/Repeater.h
-include/X11/Xaw/RepeaterP.h
-include/X11/Xaw/Reports.h
-include/X11/Xaw/Scrollbar.h
-include/X11/Xaw/ScrollbarP.h
-include/X11/Xaw/Simple.h
-include/X11/Xaw/SimpleMenP.h
-include/X11/Xaw/SimpleMenu.h
-include/X11/Xaw/SimpleP.h
-include/X11/Xaw/Sme.h
-include/X11/Xaw/SmeBSB.h
-include/X11/Xaw/SmeBSBP.h
-include/X11/Xaw/SmeLine.h
-include/X11/Xaw/SmeLineP.h
-include/X11/Xaw/SmeP.h
-include/X11/Xaw/StripCharP.h
-include/X11/Xaw/StripChart.h
-include/X11/Xaw/Template.c
-include/X11/Xaw/Template.h
-include/X11/Xaw/TemplateP.h
-include/X11/Xaw/Text.h
-include/X11/Xaw/TextP.h
-include/X11/Xaw/TextSink.h
-include/X11/Xaw/TextSinkP.h
-include/X11/Xaw/TextSrc.h
-include/X11/Xaw/TextSrcP.h
-include/X11/Xaw/Toggle.h
-include/X11/Xaw/ToggleP.h
-include/X11/Xaw/Tree.h
-include/X11/Xaw/TreeP.h
-include/X11/Xaw/VendorEP.h
-include/X11/Xaw/Viewport.h
-include/X11/Xaw/ViewportP.h
-include/X11/Xaw/XawImP.h
-include/X11/Xaw/XawInit.h
-include/X11/Xcms.h
-include/X11/Xdmcp.h
-include/X11/Xfuncproto.h
-include/X11/Xfuncs.h
-include/X11/Xlib.h
-include/X11/Xlibint.h
-include/X11/Xlocale.h
-include/X11/Xirisw/Arc.h
-include/X11/Xirisw/ArcP.h
-include/X11/Xirisw/ColorC.h
-include/X11/Xirisw/ColorCP.h
-include/X11/Xirisw/ColorChooserSwatch.h
-include/X11/Xirisw/ColorHexagon.h
-include/X11/Xirisw/Column.h
-include/X11/Xirisw/ColumnP.h
-include/X11/Xirisw/CommonColorCP.h
-include/X11/Xirisw/Dial.h
-include/X11/Xirisw/DialP.h
-include/X11/Xirisw/DropPocket.h
-include/X11/Xirisw/DropPocketP.h
-include/X11/Xirisw/DynaMenu.h
-include/X11/Xirisw/DynaMenuP.h
-include/X11/Xirisw/Finder.h
-include/X11/Xirisw/FinderP.h
-include/X11/Xirisw/GLColorSliderGadget.h
-include/X11/Xirisw/GLColorSliderGadgetC.h
-include/X11/Xirisw/GLColorSliderManager.h
-include/X11/Xirisw/GLColorSliderManagerC.h
-include/X11/Xirisw/GlxDraw.h
-include/X11/Xirisw/GlxDrawP.h
-include/X11/Xirisw/Graph.h
-include/X11/Xirisw/GraphP.h
-include/X11/Xirisw/Grid.h
-include/X11/Xirisw/GridP.h
-include/X11/Xirisw/HPanedW.h
-include/X11/Xirisw/HPanedWP.h
-include/X11/Xirisw/IconG.h
-include/X11/Xirisw/IconGP.h
-include/X11/Xirisw/List.h
-include/X11/Xirisw/ListP.h
-include/X11/Xirisw/OglColorCP.h
-include/X11/Xirisw/OglColorHexagon.h
-include/X11/Xirisw/OglColorSliderGadget.h
-include/X11/Xirisw/OglColorSliderGadgetC.h
-include/X11/Xirisw/OglColorSliderManager.h
-include/X11/Xirisw/OglColorSliderManagerC.h
-include/X11/Xirisw/Osc.h
-include/X11/Xirisw/OscP.h
-include/X11/Xirisw/RubberBoard.h
-include/X11/Xirisw/RubberBoardP.h
-include/X11/Xirisw/ScrollBar.h
-include/X11/Xirisw/ScrollBarP.h
-include/X11/Xirisw/ScrolledWP.h
-include/X11/Xirisw/SgColor.h
-include/X11/Xirisw/SgList.h
-include/X11/Xirisw/SpringBox.h
-include/X11/Xirisw/SpringBoxP.h
-include/X11/Xirisw/ThumbWheel.h
-include/X11/Xirisw/ThumbWheelP.h
-include/X11/Xirisw/VisualDrawingA.h
-include/X11/Xirisw/VisualDrawingAP.h
-include/X11/Xirisw/ZbText.h
-include/X11/Xirisw/ZbTextP.h
-include/X11/Xirisw/ZoomBar.h
-include/X11/Xirisw/ZoomBarP.h
-include/X11/Xm/ArrowB.h
-include/X11/Xm/ArrowBG.h
-include/X11/Xm/ArrowBGP.h
-include/X11/Xm/ArrowBP.h
-include/X11/Xm/AtomMgr.h
-include/X11/Xm/BaseClassP.h
-include/X11/Xm/BulletinB.h
-include/X11/Xm/BulletinBP.h
-include/X11/Xm/CacheP.h
-include/X11/Xm/CascadeB.h
-include/X11/Xm/CascadeBG.h
-include/X11/Xm/CascadeBGP.h
-include/X11/Xm/CascadeBP.h
-include/X11/Xm/Command.h
-include/X11/Xm/CommandP.h
-include/X11/Xm/CutPaste.h
-include/X11/Xm/CutPasteP.h
-include/X11/Xm/DesktopP.h
-include/X11/Xm/DialogS.h
-include/X11/Xm/DialogSEP.h
-include/X11/Xm/DialogSP.h
-include/X11/Xm/Display.h
-include/X11/Xm/DisplayP.h
-include/X11/Xm/DragC.h
-include/X11/Xm/DragCP.h
-include/X11/Xm/DragDrop.h
-include/X11/Xm/DragIcon.h
-include/X11/Xm/DragIconP.h
-include/X11/Xm/DragOverS.h
-include/X11/Xm/DragOverSP.h
-include/X11/Xm/DrawP.h
-include/X11/Xm/DrawingA.h
-include/X11/Xm/DrawingAP.h
-include/X11/Xm/DrawnB.h
-include/X11/Xm/DrawnBP.h
-include/X11/Xm/DropSMgr.h
-include/X11/Xm/DropSMgrP.h
-include/X11/Xm/DropTrans.h
-include/X11/Xm/DropTransP.h
-include/X11/Xm/ExtObjectP.h
-include/X11/Xm/FileSB.h
-include/X11/Xm/FileSBP.h
-include/X11/Xm/Form.h
-include/X11/Xm/FormP.h
-include/X11/Xm/Frame.h
-include/X11/Xm/FrameP.h
-include/X11/Xm/GadgetP.h
-include/X11/Xm/GrabShell.h
-include/X11/Xm/Label.h
-include/X11/Xm/LabelG.h
-include/X11/Xm/LabelGP.h
-include/X11/Xm/LabelP.h
-include/X11/Xm/List.h
-include/X11/Xm/ListP.h
-include/X11/Xm/MainW.h
-include/X11/Xm/MainWP.h
-include/X11/Xm/ManagerP.h
-include/X11/Xm/MenuShell.h
-include/X11/Xm/MenuShellP.h
-include/X11/Xm/MenuUtilP.h
-include/X11/Xm/MessageB.h
-include/X11/Xm/MessageBP.h
-include/X11/Xm/MwmUtil.h
-include/X11/Xm/PanedW.h
-include/X11/Xm/PanedWP.h
-include/X11/Xm/PrimitiveP.h
-include/X11/Xm/Protocols.h
-include/X11/Xm/ProtocolsP.h
-include/X11/Xm/PushB.h
-include/X11/Xm/PushBG.h
-include/X11/Xm/PushBGP.h
-include/X11/Xm/PushBP.h
-include/X11/Xm/RCUtilsP.h
-include/X11/Xm/RepType.h
-include/X11/Xm/RowColumn.h
-include/X11/Xm/RowColumnP.h
-include/X11/Xm/SashP.h
-include/X11/Xm/Scale.h
-include/X11/Xm/ScaleP.h
-include/X11/Xm/Screen.h
-include/X11/Xm/ScreenP.h
-include/X11/Xm/ScrollBar.h
-include/X11/Xm/ScrollBarP.h
-include/X11/Xm/ScrolledW.h
-include/X11/Xm/ScrolledWP.h
-include/X11/Xm/SelectioB.h
-include/X11/Xm/SelectioBP.h
-include/X11/Xm/SeparatoG.h
-include/X11/Xm/SeparatoGP.h
-include/X11/Xm/Separator.h
-include/X11/Xm/SeparatorP.h
-include/X11/Xm/Sgi.h
-include/X11/Xm/SgiP.h
-include/X11/Xm/ShellEP.h
-include/X11/Xm/TearOffBP.h
-include/X11/Xm/TearOffP.h
-include/X11/Xm/Text.h
-include/X11/Xm/TextF.h
-include/X11/Xm/TextFP.h
-include/X11/Xm/TextFSelP.h
-include/X11/Xm/TextInP.h
-include/X11/Xm/TextOutP.h
-include/X11/Xm/TextP.h
-include/X11/Xm/TextSelP.h
-include/X11/Xm/TextStrSoP.h
-include/X11/Xm/ToggleB.h
-include/X11/Xm/ToggleBG.h
-include/X11/Xm/ToggleBGP.h
-include/X11/Xm/ToggleBP.h
-include/X11/Xm/TransltnsP.h
-include/X11/Xm/VaSimpleP.h
-include/X11/Xm/VendorS.h
-include/X11/Xm/VendorSEP.h
-include/X11/Xm/VendorSP.h
-include/X11/Xm/VirtKeys.h
-include/X11/Xm/VirtKeysP.h
-include/X11/Xm/WorldP.h
-include/X11/Xm/Xm.h
-include/X11/Xm/XmAll.h
-include/X11/Xm/XmP.h
-include/X11/Xm/XmStrDefs.h
-include/X11/Xm/XmosP.h
-include/X11/Xm/sgi_visual.h
-include/X11/Xmd.h
-include/X11/Xmu/Atoms.h
-include/X11/Xmu/CharSet.h
-include/X11/Xmu/CloseHook.h
-include/X11/Xmu/Converters.h
-include/X11/Xmu/CurUtil.h
-include/X11/Xmu/CvtCache.h
-include/X11/Xmu/DisplayQue.h
-include/X11/Xmu/Drawing.h
-include/X11/Xmu/Editres.h
-include/X11/Xmu/EditresP.h
-include/X11/Xmu/Error.h
-include/X11/Xmu/ExtAgent.h
-include/X11/Xmu/Initer.h
-include/X11/Xmu/Misc.h
-include/X11/Xmu/StdCmap.h
-include/X11/Xmu/StdSel.h
-include/X11/Xmu/SysUtil.h
-include/X11/Xmu/WidgetNode.h
-include/X11/Xmu/WinUtil.h
-include/X11/Xmu/Xct.h
-include/X11/Xmu/Xmu.h
-include/X11/Xos.h
-include/X11/Xos_r.h
-include/X11/Xosdefs.h
-include/X11/Xpoll.h
-include/X11/Xproto.h
-include/X11/Xprotostr.h
-include/X11/Xresource.h
-include/X11/Xthreads.h
-include/X11/Xutil.h
-include/X11/Xw32defs.h
-include/X11/ap_keysym.h
-include/X11/cursorfont.h
-include/X11/extensions/MITMisc.h
-include/X11/extensions/SGIMisc.h
-include/X11/extensions/SGIStereo.h
-include/X11/extensions/SpeechProto.h
-include/X11/extensions/XEVI.h
-include/X11/extensions/XEVIstr.h
-include/X11/extensions/XI.h
-include/X11/extensions/XIE.h
-include/X11/extensions/XIEproto.h
-include/X11/extensions/XIEprotost.h
-include/X11/extensions/XInput.h
-include/X11/extensions/XIproto.h
-include/X11/extensions/XKB.h
-include/X11/extensions/XKBbells.h
-include/X11/extensions/XKBconfig.h
-include/X11/extensions/XKBfile.h
-include/X11/extensions/XKBgeom.h
-include/X11/extensions/XKBproto.h
-include/X11/extensions/XKBrules.h
-include/X11/extensions/XKBsrv.h
-include/X11/extensions/XKBstr.h
-include/X11/extensions/XKBui.h
-include/X11/extensions/XKM.h
-include/X11/extensions/XKMformat.h
-include/X11/extensions/XSGIvc.h
-include/X11/extensions/XSGIvcPlatformParamsP.h
-include/X11/extensions/XSGIvcproto.h
-include/X11/extensions/XSGIvcstr.h
-include/X11/extensions/XScreenSaver.h
-include/X11/extensions/XShm.h
-include/X11/extensions/XSpeech.h
-include/X11/extensions/XSpeechProto.h
-include/X11/extensions/XTest.h
-include/X11/extensions/Xag.h
-include/X11/extensions/Xagsrv.h
-include/X11/extensions/Xagstr.h
-include/X11/extensions/Xcup.h
-include/X11/extensions/Xcupstr.h
-include/X11/extensions/Xdbe.h
-include/X11/extensions/Xdbeproto.h
-include/X11/extensions/Xext.h
-include/X11/extensions/Xinerama.h
-include/X11/extensions/XineramaProto.h
-include/X11/extensions/XpanoramixXext.h
-include/X11/extensions/Xsetmon.h
-include/X11/extensions/Xv.h
-include/X11/extensions/Xvlib.h
-include/X11/extensions/Xvproto.h
-include/X11/extensions/bits.h
-include/X11/extensions/dpms.h
-include/X11/extensions/dpmsstr.h
-include/X11/extensions/extutil.h
-include/X11/extensions/lbxbuf.h
-include/X11/extensions/lbxbufstr.h
-include/X11/extensions/lbxdeltastr.h
-include/X11/extensions/lbximage.h
-include/X11/extensions/lbxopts.h
-include/X11/extensions/lbxstr.h
-include/X11/extensions/lbxzlib.h
-include/X11/extensions/panoramiXext.h
-include/X11/extensions/panoramiXproto.h
-include/X11/extensions/readdisplay.h
-include/X11/extensions/readdisplaystr.h
-include/X11/extensions/record.h
-include/X11/extensions/recordstr.h
-include/X11/extensions/security.h
-include/X11/extensions/securstr.h
-include/X11/extensions/sgiAC.h
-include/X11/extensions/sgiACstr.h
-include/X11/extensions/sgiACutil.h
-include/X11/extensions/sgiPriv.h
-include/X11/extensions/sgiXnmbx.h
-include/X11/extensions/sgiXnmbxProto.h
-include/X11/extensions/sgicap.h
-include/X11/extensions/sgicapstr.h
-include/X11/extensions/sgistereostr.h
-include/X11/extensions/shape.h
-include/X11/extensions/sync.h
-include/X11/extensions/xemacros.h
-include/X11/extensions/xtestext1.h
-include/X11/extensions/xtrapddmi.h
-include/X11/extensions/xtrapdi.h
-include/X11/extensions/xtraplib.h
-include/X11/extensions/xtraplibp.h
-include/X11/extensions/xtrapproto.h
-include/X11/fonts/FS.h
-include/X11/fonts/FSlib.h
-include/X11/fonts/FSproto.h
-include/X11/fonts/fsmasks.h
-include/X11/imComp.h
-include/X11/imCompInt.h
-include/X11/keysym.h
-include/X11/keysymdef.h
-include/X11/uil/Uil.h
-include/X11/uil/UilDBDef.h
-include/X11/uil/UilDef.h
-include/X11/uil/UilSymDef.h
-include/X11/uil/UilSymGen.h
-include/X11/uil/UilSymGl.h
-include/X11/uil/XmAppl.uil
-include/X11/xpm.h
-lib/X11/config/Imake.cf
-lib/X11/config/Imake.rules
-lib/X11/config/Imake.tmpl
-lib/X11/config/Library.tmpl
-lib/X11/config/Threads.tmpl
-lib/X11/config/X11.rules
-lib/X11/config/X11.tmpl
-lib/X11/config/host.def
-lib/X11/config/noop.rules
-lib/X11/config/sgi.cf
-lib/X11/config/sgiIncludes.tmpl
-lib/X11/config/sgiLib.rules
-lib/X11/config/sgiLib.tmpl
-lib/X11/config/site.def
-lib@ABI@/libFS.a
-lib@ABI@/libICE.a
-lib@ABI@/libSM.a
-lib@ABI@/libXTrap.a
-lib@ABI@/libXau.a
-lib@ABI@/libXaw.a
-lib@ABI@/libXdmcp.a
-lib@ABI@/libXext.a
-lib@ABI@/libXi.a
-lib@ABI@/libXmu.a
-lib@ABI@/libXnmbx.a
-lib@ABI@/libXt.a
-lib@ABI@/libXtst.a
-lib@ABI@/liboldX.a
-lib@ABI@/libxkbfile.a
-lib@ABI@/libz.a
-lib@ABI@/libICE.so
-lib@ABI@/libSM.so
-lib@ABI@/libX11.so
-lib@ABI@/libX11.so.1
-lib@ABI@/libX11.so.3
-lib@ABI@/libXaw.so
-lib@ABI@/libXaw.so.2
-lib@ABI@/libXext.so
-lib@ABI@/libXi.so
-lib@ABI@/libXmu.so
-lib@ABI@/libXm.so
-lib@ABI@/libXt.so
-lib@ABI@/libMrm.so
-lib@ABI@/libMrm.so.1
-lib@ABI@/libMrm.so.2
-lib@ABI@/libSgm.so
-lib@ABI@/libSgm.so.1
-lib@ABI@/libSgm.so.2
-lib@ABI@/libSgw.so
-lib@ABI@/libSgw.so.1
-lib@ABI@/libUil.so
-lib@ABI@/libUil.so.1
-lib@ABI@/libUil.so.2
-lib@ABI@/libXm.so
-lib@ABI@/libXm.so.1
-lib@ABI@/libXm.so.2
-lib@ABI@/libXpm.so
-lib@ABI@/libXpm.so.1
-lib@ABI@/libXpm.so.2
diff --git a/pkgtools/x11-links/openwin.mk b/pkgtools/x11-links/openwin.mk
deleted file mode 100644
index dd91d66921c..00000000000
--- a/pkgtools/x11-links/openwin.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# $NetBSD: openwin.mk,v 1.4 2006/05/22 22:22:04 jlam Exp $
-
-FILES_LIST= ${FILESDIR}/openwin
-
-# Fix bugs in older versions of openwin headers
-STDC_REPLACE= -e 's/^\#if (__STDC__/\#if (defined(__STDC__)/'
-STDC_REPLACE+= -e 's/^\#if ((__STDC__/\#if ((defined(__STDC__)/'
-
-CREATE_X11LINK= case $$file in \
- include/X11/Xlibint.h) \
- ${SED} ${STDC_REPLACE} < $$src > $$dest; \
- ;; \
- include/X11/Xmd.h) \
- ${SED} ${STDC_REPLACE} < $$src > $$dest; \
- ;; \
- include/X11/extensions/multibufst.h) \
- ${SED} ${STDC_REPLACE} < $$src > $$dest; \
- ;; \
- *) \
- ${LN} -s $$src $$dest; \
- esac
-
-# disable checking of shared library dependencies, as openwin/dt can
-# have some libraries missing in a "normal" installation and this
-# shouldn't break the package.
-#
-CHECK_SHLIBS_SUPPORTED= no
diff --git a/pkgtools/x11-links/version.mk b/pkgtools/x11-links/version.mk
deleted file mode 100644
index efddd1938fd..00000000000
--- a/pkgtools/x11-links/version.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-# $NetBSD: version.mk,v 1.2 2006/09/27 16:41:20 joerg Exp $
-#
-# This Makefile fragment is included by Makefiles that need to access
-# the X11_TYPE and version number of a native X11 distribution.
-#
-# The following variables are provided by this file:
-#
-# BUILTIN_X11_TYPE.native is the X11_TYPE of the native X11
-# distribution detected on the system.
-#
-# BUILTIN_X11_VERSION.native is the version number, where applicable,
-# of the native X11 distribution detected on the system.
-#
-
-.if !defined(BUILTIN_X11_VERSION.native)
-. include "../../x11/xorg-libs/version.mk"
-. include "xfree-version.mk"
-
-. if defined(BUILTIN_X11_VERSION.xorg)
-BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.xorg}
-BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.xorg}
-. elif defined(BUILTIN_X11_VERSION.XFree86)
-BUILTIN_X11_TYPE.native= ${BUILTIN_X11_TYPE.XFree86}
-BUILTIN_X11_VERSION.native= ${BUILTIN_X11_VERSION.XFree86}
-. elif !empty(X11BASE:M*openwin)
-BUILTIN_X11_TYPE.native= openwin
-. elif ${OPSYS} == "IRIX"
-BUILTIN_X11_TYPE.native= xsgi
-. elif ${OPSYS} == "OSF1"
-BUILTIN_X11_TYPE.native= xdec
-. else
-BUILTIN_X11_TYPE.native= unknown
-. endif
-.endif
-MAKEVARS+= BUILTIN_X11_VERSION.native
diff --git a/pkgtools/x11-links/xdec.mk b/pkgtools/x11-links/xdec.mk
deleted file mode 100644
index c0cc3f3d59f..00000000000
--- a/pkgtools/x11-links/xdec.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# $NetBSD: xdec.mk,v 1.1 2004/11/20 06:34:26 grant Exp $
-
-FILES_LIST= ${FILESDIR}/xdec
diff --git a/pkgtools/x11-links/xfree-version.mk b/pkgtools/x11-links/xfree-version.mk
deleted file mode 100644
index 51a6f8fe8ee..00000000000
--- a/pkgtools/x11-links/xfree-version.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# $NetBSD: xfree-version.mk,v 1.1 2006/09/27 16:41:20 joerg Exp $
-#
-# This Makefile fragment is included by Makefiles that need to access
-# the X11_TYPE and version number of a XFree86 distribution.
-#
-# The following variables are provided by this file:
-#
-# BUILTIN_X11_TYPE.XFree86 is the X11_TYPE of the XFree86 distribution
-# and is simply "XFree86".
-#
-# BUILTIN_X11_VERSION.XFree86 is the version number of the XFree86
-# distribution detected on the system.
-#
-
-BUILTIN_X11_TYPE.XFree86= XFree86
-
-BUILTIN_FIND_FILES_VAR:= CF_XFREE86 CF_XFREE86_VERSION
-BUILTIN_FIND_FILES.CF_XFREE86= ${X11BASE}/lib/X11/config/xfree86.cf
-BUILTIN_FIND_FILES.CF_XFREE86_VERSION= ${X11BASE}/lib/X11/config/version.def
-.include "../../mk/buildlink3/find-files.mk"
-
-.if !defined(BUILTIN_X11_VERSION.XFree86) && \
- exists(${CF_XFREE86}) && exists(${CF_XFREE86_VERSION})
-BUILTIN_X11_VERSION.XFree86!= \
- ${AWK} '/\#define[ ]*XF86_VERSION_MAJOR/ { M = $$3 } \
- /\#define[ ]*XF86_VERSION_MINOR/ { m = "."$$3 } \
- /\#define[ ]*XF86_VERSION_PATCH/ { p = "."$$3 } \
- /\#define[ ]*XF86_VERSION_SNAP/ { s = "."$$3 } \
- /\#define[ ]*XFree86Version/ { \
- V = $$3; \
- if (M == "") M = int(V / 1000) % 10; \
- if (m == "") m = "."(int(V / 100) % 10); \
- if (p == "") p = "."(int(V / 10) % 10); \
- if (s == "") s = "."(V % 10); \
- } \
- END { if (s == ".0") s = ""; \
- if (p == ".0" && s == "") p = ""; \
- printf "%s%s%s%s\n", M, m, p, s }' \
- ${CF_XFREE86_VERSION}
-.endif
-MAKEVARS+= BUILTIN_X11_VERSION.XFree86
diff --git a/pkgtools/x11-links/xfree.mk b/pkgtools/x11-links/xfree.mk
deleted file mode 100644
index ce9ed5e1836..00000000000
--- a/pkgtools/x11-links/xfree.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# $NetBSD: xfree.mk,v 1.15 2006/12/15 20:33:00 joerg Exp $
-
-FILES_LIST= ${FILESDIR}/xfree
-
-.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../graphics/MesaLib/buildlink3.mk"
-.include "../../graphics/freetype2/buildlink3.mk"
-.include "../../graphics/glu/buildlink3.mk"
-.include "../../x11/libXft/buildlink3.mk"
-.include "../../x11/libXpm/buildlink3.mk"
-.include "../../textproc/expat/buildlink3.mk"
-.include "../../x11/libXcursor/buildlink3.mk"
-.include "../../x11/libXrandr/buildlink3.mk"
-.include "../../x11/libXrender/buildlink3.mk"
-.include "../../x11/renderproto/buildlink3.mk"
-.include "../../x11/randrproto/buildlink3.mk"
-
-# Check if any headers and libraries for ${X11_MODULES} found in
-# ${X11BASE} actually belong to the base XFree86 or not.
-#
-.for _pkg_ in ${BUILDLINK_PACKAGES:Nx11-links}
-CHECK_BUILTIN.${_pkg_}:= yes
-USE_BUILTIN.${_pkg_}= yes
-. sinclude "${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk"
-CHECK_BUILTIN.${_pkg_}:= no
-.endfor
-
-.for _pkg_ in ${BUILDLINK_PACKAGES:Nx11-links}
-IGNORE_PKG.${_pkg_}= yes
-. if (defined(IS_BUILTIN.${_pkg_}) && !empty(IS_BUILTIN.${_pkg_}:M[yY][eE][sS]) ) && \
- exists(${FILESDIR}/xfree.${_pkg_})
-FILES_LIST+= ${FILESDIR}/xfree.${_pkg_}
-. endif
-.endfor
diff --git a/pkgtools/x11-links/xorg.mk b/pkgtools/x11-links/xorg.mk
deleted file mode 100644
index 95bb2781e3b..00000000000
--- a/pkgtools/x11-links/xorg.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-# $NetBSD: xorg.mk,v 1.5 2007/02/10 15:45:21 tonio Exp $
-#
-# This is for X.org, but use "xfree" files also.
-
-FILES_LIST= ${FILESDIR}/xorg
-
-# libXdamage and damageext only in pkgsrc-wip so not used here
-# XXX: what about xaw?
-
-.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../graphics/MesaLib/buildlink3.mk"
-.include "../../graphics/freetype2/buildlink3.mk"
-.include "../../graphics/glu/buildlink3.mk"
-.include "../../x11/libXft/buildlink3.mk"
-.include "../../x11/libXpm/buildlink3.mk"
-.include "../../textproc/expat/buildlink3.mk"
-.include "../../x11/compositeproto/buildlink3.mk"
-.include "../../x11/fixesproto/buildlink3.mk"
-.include "../../x11/xextproto/buildlink3.mk"
-.include "../../x11/xproto/buildlink3.mk"
-.include "../../x11/libXcomposite/buildlink3.mk"
-.include "../../x11/libXcursor/buildlink3.mk"
-.include "../../x11/libXfixes/buildlink3.mk"
-.include "../../x11/libXrandr/buildlink3.mk"
-.include "../../x11/libXrender/buildlink3.mk"
-.include "../../x11/renderproto/buildlink3.mk"
-.include "../../x11/randrproto/buildlink3.mk"
-
-# XXX what is ${X11_MODULES} ?
-
-# Check if any headers and libraries for ${X11_MODULES} found in
-# ${X11BASE} actually belong to the base Xorg or not.
-#
-# XXX: maybe skip iconv and zlib too?
-.for _pkg_ in ${BUILDLINK_PACKAGES:Nx11-links}
-CHECK_BUILTIN.${_pkg_}:= yes
-USE_BUILTIN.${_pkg_}= yes
-. sinclude "${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk"
-CHECK_BUILTIN.${_pkg_}:= no
-.endfor
-
-.for _pkg_ in ${BUILDLINK_PACKAGES:Nx11-links}
-IGNORE_PKG.${_pkg_}= yes
-. if defined(IS_BUILTIN.${_pkg_}) && !empty(IS_BUILTIN.${_pkg_}:M[yY][eE][sS])
-. if exists(${FILESDIR}/xorg.${_pkg_})
-FILES_LIST+= ${FILESDIR}/xorg.${_pkg_}
-. elif exists(${FILESDIR}/xfree.${_pkg_})
-FILES_LIST+= ${FILESDIR}/xfree.${_pkg_}
-. endif
-. endif
-.endfor
diff --git a/pkgtools/x11-links/xsgi.mk b/pkgtools/x11-links/xsgi.mk
deleted file mode 100644
index c66da61fd79..00000000000
--- a/pkgtools/x11-links/xsgi.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# $NetBSD: xsgi.mk,v 1.1 2003/09/02 07:14:45 jlam Exp $
-
-FILES_LIST= ${FILESDIR}/xsgi
diff --git a/pkgtools/xpkgwedge/DEINSTALL b/pkgtools/xpkgwedge/DEINSTALL
deleted file mode 100755
index 0e90f9cf628..00000000000
--- a/pkgtools/xpkgwedge/DEINSTALL
+++ /dev/null
@@ -1,55 +0,0 @@
-# $NetBSD: DEINSTALL,v 1.9 2004/04/30 19:44:21 tv Exp $
-
-FONT_PROGS="@FONT_PROGS@"
-X11BASE=@X11BASE@
-
-X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
-HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
-SITEDEF=${PKG_PREFIX}/lib/X11/config/site.def
-SV4LIB=${PKG_PREFIX}/lib/X11/config/sv4Lib.tmpl
-
-case ${STAGE} in
-VIEW-DEINSTALL)
- ${ECHO_N} "Removing font program symlinks from view..."
- for prog in ${FONT_PROGS}; do
- if [ -f ${PKG_PREFIX}/bin/$prog -a \
- ${PKG_PREFIX} != ${X11BASE} ]; then
- ${RM} -f ${PKG_PREFIX}/bin/$prog
- fi
- done
- ${ECHO} "done."
-
- ${ECHO_N} "Updating ${HOSTDEF}..."
- ${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
- ( ${GREP} -v xpkgwedge ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF}
- ${RM} -f ${HOSTDEF}.bak
- if [ ${PKG_PREFIX} != ${X11BASE} -a -f ${X11_HOSTDEF} ] && \
- ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}; then
- ${RM} -f ${HOSTDEF}
- fi
- case `uname`:${X11BASE} in
- *:*openwin)
- ${RM} -f ${SITEDEF} ${SV4LIB}
- ;;
- Interix:/usr/X11R6)
- ${RM} -f ${SITEDEF}
- ;;
- esac
- ${ECHO} "done."
- ;;
-
-DEINSTALL)
- ${ECHO_N} "Removing font program symlinks..."
- for prog in ${FONT_PROGS}; do
- if [ -f ${PKG_PREFIX}/bin/$prog -a \
- ${PKG_PREFIX} != ${X11BASE} ]; then
- ${RM} -f ${PKG_PREFIX}/bin/$prog
- fi
- done
- ${ECHO} "done."
- ;;
-
-POST-DEINSTALL)
- ${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE}
- ;;
-esac
diff --git a/pkgtools/xpkgwedge/DESCR b/pkgtools/xpkgwedge/DESCR
deleted file mode 100644
index eca4e106a33..00000000000
--- a/pkgtools/xpkgwedge/DESCR
+++ /dev/null
@@ -1,8 +0,0 @@
-Xpkgwedge, not a "real" program in the traditional sense, is a hack that
-allows users to compile X11 pkgs from pkgsrc and install them outside of
-the X11 tree - even if they use imake - by using pkgxmkmf.
-
-Pkgxmkmf is a slightly modified xmkmf from the X11R6.3 release and supports
-finding config files in ${LOCALBASE}/lib/X11/config, if it exists, and in
-${X11BASE}/lib/X11/config. In all other respects, it is identical to xmkmf.
-Please refer to xmkmf(1) for more information.
diff --git a/pkgtools/xpkgwedge/INSTALL b/pkgtools/xpkgwedge/INSTALL
deleted file mode 100644
index c164f231e53..00000000000
--- a/pkgtools/xpkgwedge/INSTALL
+++ /dev/null
@@ -1,63 +0,0 @@
-# $NetBSD: INSTALL,v 1.11 2004/04/30 19:44:21 tv Exp $
-
-FONT_PROGS="@FONT_PROGS@"
-X11BASE=@X11BASE@
-
-X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def
-HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def
-X11_SITEDEF=${X11BASE}/lib/X11/config/site.def
-SITEDEF=${PKG_PREFIX}/lib/X11/config/site.def
-X11_SV4LIB=${X11BASE}/lib/X11/config/sv4Lib.tmpl
-SV4LIB=${PKG_PREFIX}/lib/X11/config/sv4Lib.tmpl
-
-SV4LIB_SUBST_SED="-e s/^ / /"
-SITEDEF_SUBST_SED="-e s/\#endif.*VendorCF.*/\#include <host.def>\\
-&/"
-
-case ${STAGE} in
-POST-INSTALL)
- ${ECHO_N} "Symlinking font programs..."
- for prog in ${FONT_PROGS}; do
- if [ -f ${X11BASE}/bin/$prog -a \
- ${PKG_PREFIX} != ${X11BASE} ]; then
- ${LN} -fs ${X11BASE}/bin/$prog \
- ${PKG_PREFIX}/bin/$prog
- fi
- done
- ${ECHO} "done."
- ;;
-
-VIEW-INSTALL)
- if [ ${PKG_PREFIX} = ${X11BASE} -o -s ${HOSTDEF} ]; then
- ${ECHO_N} "Updating ${HOSTDEF}..."
- ${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
- else
- ${ECHO_N} "Creating ${HOSTDEF}..."
- if [ -f ${X11_HOSTDEF} ]; then
- ${CP} -f ${X11_HOSTDEF} ${HOSTDEF}.bak
- else
- ${CP} -f /dev/null ${HOSTDEF}.bak
- fi
- fi
- ( ${ECHO} '#include <xpkgwedge.def>'; \
- ${GREP} -v xpkgwedge ${HOSTDEF}.bak; \
- ) > ${HOSTDEF}
- ${RM} -f ${HOSTDEF}.bak
- ${ECHO} "done."
- case `uname`:${X11BASE} in
- *:*openwin)
- ${ECHO_N} "Patching OpenWindows templates..."
- ${SED} "${SITEDEF_SUBST_SED}" ${X11_SITEDEF} > ${SITEDEF}
- ${SED} "${SV4LIB_SUBST_SED}" ${X11_SV4LIB} > ${SV4LIB}
- ${ECHO} "done."
- ;;
- Interix:/usr/X11R6)
- ${ECHO_N} "Patching Interix templates..."
- ${SED} -e "1i\\
-#include <host.def>
-" -e "/CcCmd/d;/ProjectRoot/d" ${X11_SITEDEF} > ${SITEDEF}
- ${ECHO} "done."
- ;;
- esac
- ;;
-esac
diff --git a/pkgtools/xpkgwedge/MESSAGE b/pkgtools/xpkgwedge/MESSAGE
deleted file mode 100644
index eec7eaefd38..00000000000
--- a/pkgtools/xpkgwedge/MESSAGE
+++ /dev/null
@@ -1,23 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.3 2003/10/19 07:16:33 grant Exp $
-
-NOTES:
-
-* You MUST set the environment variable XAPPLRESDIR in /etc/profile and
- /etc/csh.login by hand in order to make pkgs built with xpkgwedge run
- properly, e.g.
-
- XAPPLRESDIR=${PREFIX}/lib/X11/app-defaults
- export XAPPLRESDIR
-
- and
-
- setenv XAPPLRESDIR ${PREFIX}/lib/X11/app-defaults
-
- respectively.
-
- If any users set XAPPLRESDIR in their own environment, these settings
- will not work -- such users need to set XUSERFILESEARCHPATH (syntax
- can be found in XtResolvePathname(3Xt)).
-
-===========================================================================
diff --git a/pkgtools/xpkgwedge/Makefile b/pkgtools/xpkgwedge/Makefile
deleted file mode 100644
index 7b9b32e12ab..00000000000
--- a/pkgtools/xpkgwedge/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-# $NetBSD: Makefile,v 1.71 2006/10/09 12:52:36 joerg Exp $
-
-DISTNAME= xpkgwedge-1.16
-CATEGORIES= pkgtools devel x11
-MASTER_SITES= # empty
-DISTFILES= # empty
-
-MAINTAINER= jlam@pkgsrc.org
-HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/doc/pkgsrc.html
-COMMENT= Allows X11 pkgs to be built and used outside of $${X11BASE}
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
-PKG_DESTDIR_SUPPORT= user-destdir
-
-WRKSRC= ${WRKDIR}
-EXTRACT_ONLY= # empty
-USE_LANGUAGES= # empty
-NO_BUILD= yes
-NO_CONFIGURE= yes
-NO_CHECKSUM= yes
-
-.include "../../mk/bsd.prefs.mk"
-
-USE_TOOLS+= imake:run xmkmf:run
-
-.if ${LOCALBASE} == ${X11BASE}
-PKG_SKIP_REASON+= "xpkgwedge is not needed when X11BASE is LOCALBASE"
-.endif
-
-.if exists(${X11BASE}/bin/mkfontscale)
-CONFLICTS+= mkfontscale-[0-9]*
-.endif
-
-INSTALLATION_DIRS= bin lib/X11/config
-
-# FONT_PROGS are symlinked from ${X11BASE}/bin to ${PREFIX}/bin to allow
-# ${PREFIX}/bin/${prog} to always work.
-#
-FONT_PROGS= bdftopcf fstobdf mkfontdir mkfontscale
-
-FILES_SUBST+= VIEWBASE=${VIEWBASE}
-FILES_SUBST+= FONT_PROGS=${FONT_PROGS:Q}
-FILES_SUBST+= MAKE=${IMAKE_MAKE:Q}
-USE_TOOLS+= ${IMAKE_TOOLS}
-
-.if ${OPSYS} == "Darwin"
-PLIST_SUBST+= IS_DARWIN=
-USE_TOOLS+= patch
-.else
-PLIST_SUBST+= IS_DARWIN="@comment "
-.endif
-
-.if ${OPSYS} == "IRIX"
-PLIST_SUBST+= IS_IRIX=
-USE_TOOLS+= patch
-. if !empty(OS_VERSION:M6*)
-PLIST_SUBST+= IS_IRIX5="@comment "
-PLIST_SUBST+= IS_IRIX6=
-. else
-PLIST_SUBST+= IS_IRIX5=
-PLIST_SUBST+= IS_IRIX6="@comment "
-. endif
-.else
-PLIST_SUBST+= IS_IRIX="@comment "
-PLIST_SUBST+= IS_IRIX5="@comment "
-PLIST_SUBST+= IS_IRIX6="@comment "
-.endif
-
-.include "../../mk/x11.buildlink3.mk"
-
-SUBST_CLASSES+= paths
-SUBST_FILES.paths= ${WRKDIR}/pkgxmkmf
-SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
-SUBST_SED.paths+= -e 's,@X11BASE@,${X11BASE},g'
-SUBST_SED.paths+= -e 's,@VIEWBASE@,${VIEWBASE},g'
-SUBST_SED.paths+= -e 's,@MAKE@,${IMAKE_MAKE},g'
-SUBST_STAGE.paths= post-patch
-
-post-extract:
- @${CP} ${FILESDIR}/xpkgwedge.def ${WRKSRC}
- @${CP} ${FILESDIR}/pkgxmkmf.in ${WRKDIR}/pkgxmkmf
-
-.if defined(X11_TYPE) && !empty(X11_TYPE:Mxorg)
-X11TYPEFLAGS?= -L${X11BASE}/lib ${COMPILER_RPATH_FLAG}${X11BASE}/lib
-SUBST_CLASSES+= fix
-SUBST_STAGE.fix= post-patch
-SUBST_FILES.fix= xpkgwedge.def
-SUBST_SED.fix= -e "s|@X11TYPEFLAGS@|${X11TYPEFLAGS}|"
-.else # X11_TYPE == xorg.
-SUBST_CLASSES+= foo
-SUBST_STAGE.foo= post-patch
-SUBST_FILES.foo= xpkgwedge.def
-SUBST_SED.foo= -e "s|\#define ExtraLoadFlags @X11TYPEFLAGS@||"
-.endif # X11_TYPE == native.
-
-do-install:
- ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/config
- ${INSTALL_DATA} ${WRKSRC}/xpkgwedge.def ${DESTDIR}${PREFIX}/lib/X11/config
- ${INSTALL_SCRIPT} ${WRKSRC}/pkgxmkmf ${DESTDIR}${PREFIX}/bin/pkgxmkmf
- @case ${OPSYS} in \
- Darwin) \
- ${INSTALL_DATA} ${X11BASE}/lib/X11/config/darwin.cf ${DESTDIR}${PREFIX}/lib/X11/config; \
- cd ${DESTDIR}${PREFIX}/lib/X11/config && patch ${PATCH_STRIP} < ${FILESDIR}/darwin.cf.patch; \
- ;; \
- IRIX) \
- ${INSTALL_DATA} ${X11BASE}/lib/X11/config/sgi.cf ${DESTDIR}${PREFIX}/lib/X11/config; \
- if [ ${OS_VERSION} -ge 6 ]; then \
- ${INSTALL_DATA} ${X11BASE}/lib/X11/config/X11.rules ${DESTDIR}${PREFIX}/lib/X11/config; \
- cd ${DESTDIR}${PREFIX}/lib/X11/config && patch ${PATCH_STRIP} < ${FILESDIR}/irix6.patch; \
- else \
- ${INSTALL_DATA} ${X11BASE}/lib/X11/config/sgiLib.rules ${DESTDIR}${PREFIX}/lib/X11/config; \
- cd ${DESTDIR}${PREFIX}/lib/X11/config && patch ${PATCH_STRIP} < ${FILESDIR}/irix5.patch; \
- fi; \
- ;; \
- esac
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/xpkgwedge/PLIST b/pkgtools/xpkgwedge/PLIST
deleted file mode 100644
index adfbe44ebbd..00000000000
--- a/pkgtools/xpkgwedge/PLIST
+++ /dev/null
@@ -1,7 +0,0 @@
-@comment $NetBSD: PLIST,v 1.6 2006/09/09 20:31:46 schwarz Exp $
-bin/pkgxmkmf
-lib/X11/config/xpkgwedge.def
-${IS_DARWIN}lib/X11/config/darwin.cf
-${IS_IRIX}lib/X11/config/sgi.cf
-${IS_IRIX5}lib/X11/config/sgiLib.rules
-${IS_IRIX6}lib/X11/config/X11.rules
diff --git a/pkgtools/xpkgwedge/files/darwin.cf.patch b/pkgtools/xpkgwedge/files/darwin.cf.patch
deleted file mode 100644
index 6938429edd7..00000000000
--- a/pkgtools/xpkgwedge/files/darwin.cf.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: darwin.cf.patch,v 1.1 2006/04/10 13:38:36 schwarz Exp $
-
---- darwin.cf.orig 2005-12-04 20:52:30.000000000 +0100
-+++ darwin.cf 2005-12-04 20:51:38.000000000 +0100
-@@ -289,6 +289,8 @@
- # undef ServerExtraDefines
- # define ServerExtraDefines XFree86ServerDefines -UX_BYTE_ORDER -DROOTLESS -DDDXTIME
-
-+#ifndef InstallFlags
- #define InstallFlags -c -o root -g wheel
-+#endif
-
- #endif /* XAppleServer */
diff --git a/pkgtools/xpkgwedge/files/irix5.patch b/pkgtools/xpkgwedge/files/irix5.patch
deleted file mode 100644
index 2075cbe51e7..00000000000
--- a/pkgtools/xpkgwedge/files/irix5.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-$NetBSD: irix5.patch,v 1.3 2006/09/10 13:44:58 schwarz Exp $
-
---- sgi.cf.orig 2006-09-09 17:13:25.000000000 +0200
-+++ sgi.cf 2006-09-10 10:15:18.000000000 +0200
-@@ -178,8 +178,10 @@
- #define AsCmd $(TOOLROOT)/usr/bin/as
- #define CcCmd $(TOOLROOT)/usr/bin/cc
- #ifdef UseInstalled
-+#ifndef InstallCmd
- #define InstallCmd bsdinst
- #endif
-+#endif
- #ifndef LdCmd
- #define LdCmd $(TOOLROOT)/usr/bin/ld
- #endif
-@@ -188,12 +190,14 @@
- * Actually, it doesn't matter what MakeCmd is, since we don't use it.
- * We assume that $(MAKE) gets set for us by make.
- */
--#define MakeCmd $(TOOLROOT)/bin/make
-+/*#define MakeCmd $(TOOLROOT)/bin/make */
- #define TroffCmd psroff -t
-
- #define StandardIncludes -nostdinc -I$(ROOT)/usr/include
-
-+#ifndef ExtraLibraries
- #define ExtraLibraries /**/
-+#endif
-
- /*
- * If we specify -nostdlib, we must supply the complete library
-@@ -252,23 +256,19 @@
- #define ManSuffix 1
- #define LibManSuffix 3
-
--#undef ManDir
--#undef LibmanDir
--#define ManDir $(CATMAN1DIR)$(MANPACKAGE)
--#define LibmanDir $(CATMAN3DIR)$(MANPACKAGE)
- #define NroffManDir $(MAN1DIR)$(MANPACKAGE)
- #define NroffLibmanDir $(MAN3DIR)$(MANPACKAGE)
-
- #ifdef UseInstalled
-- MANUSR = /usr/share/local
-+ MANUSR = ManUsr
- #else
- MANUSR = /usr/share
- #endif
-
-- CATMAN1DIR = $(MANUSR)/catman/u_man/cat1
-- CATMAN3DIR = $(MANUSR)/catman/p_man/cat3
-- MAN1DIR = $(MANUSR)/man/u_man/man1
-- MAN3DIR = $(MANUSR)/man/p_man/man3
-+ CATMAN1DIR = $(MANUSR)/tman/cat1
-+ CATMAN3DIR = $(MANUSR)/tman/cat3
-+ MAN1DIR = $(MANUSR)/man/man1
-+ MAN3DIR = $(MANUSR)/man/man3
-
- /*
- * MANPACKAGE is the directory inside of cat? or man? that man pages should
-@@ -281,22 +281,22 @@
- * InstallManPageLong - misc changes for sgi.
- */
- #define InstallManPageLong(file,destdir,dest) @@\
--file.nr.z : file.man @@\
-+file.nr.gz : file.man @@\
- @if [ -f file.man ]; then \ @@\
-- $(RM) file.nr file.nr.z && \ @@\
-+ $(RM) file.nr file.nr.gz && \ @@\
- tbl file.man | eqn | nroff -man - > file.nr && \ @@\
-- pack -f file.nr; \ @@\
-+ $(GZIP_CMD) file.nr; \ @@\
- fi @@\
- @@\
--install.man:: file.nr.z @@\
-+install.man:: file.nr.gz @@\
- MakeDir($(DESTDIR)destdir); \ @@\
- if [ -f file.man ]; then \ @@\
- $(INSTALL) -c $(INSTMANFLAGS) \ @@\
-- file.nr.z $(DESTDIR)destdir/dest.z; \ @@\
-+ file.nr.gz $(DESTDIR)destdir/dest.$(MANSUFFIX).gz; \ @@\
- fi @@\
- @@\
- clean:: @@\
-- $(RM) file.nr file.nr.z
-+ $(RM) file.nr file.nr.gz
-
- /*
- * InstallManPageAliases - generate rules to install manual page aliases.
---- sgiLib.rules.orig 2006-09-10 10:29:23.000000000 +0200
-+++ sgiLib.rules 2006-09-09 21:06:23.000000000 +0200
-@@ -97,8 +97,8 @@
- $(INSTALL) -c $(INSTLIBFLAGS) Concat4(lib,libname,.so,rev) \ @@\
- $(DESTDIR)dest ; \ @@\
- STR=rev; if [ -n "$${STR}" ]; then \ @@\
-- $(INSTALL) -c -l Concat4(lib,libname,.so,rev) \ @@\
-- Concat3(lib,libname,.so) $(DESTDIR)dest ; \ @@\
-+ $(LN) Concat4(lib,libname,.so,rev) \ @@\
-+ $(DESTDIR)dest/Concat3(lib,libname,.so) ; \ @@\
- fi
-
- /*
diff --git a/pkgtools/xpkgwedge/files/irix6.patch b/pkgtools/xpkgwedge/files/irix6.patch
deleted file mode 100644
index 7713d41764f..00000000000
--- a/pkgtools/xpkgwedge/files/irix6.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: irix6.patch,v 1.1 2006/04/10 13:38:36 schwarz Exp $
-
---- X11.rules.orig Thu Jun 12 09:12:20 2003
-+++ X11.rules Sun Jun 8 10:31:35 2003
-@@ -79,7 +79,7 @@
- #if UseInstalledX11
- #if defined(X11ProjectRoot)
- # define X11BuildLibPath $(XPROJECTROOT)/lib
--else
-+#else
- # define X11BuildLibPath $(USRLIBDIR)
- #endif
- #elif ImportX11
---- sgi.cf.orig Thu Jun 12 09:12:20 2003
-+++ sgi.cf Sun Jun 8 12:55:50 2003
-@@ -241,7 +241,9 @@
- * Actually, it doesn't matter what MakeCmd is, since we don't use it.
- * We assume that $(MAKE) gets set for us by make.
- */
-+#ifndef MakeCmd
- #define MakeCmd $(TOOLROOTSAFE) $(TOOLROOT)/sbin/make
-+#endif
- #define TroffCmd psroff -t
-
- #define StandardIncludes -nostdinc -I$(ROOT)/usr/include
-@@ -320,10 +322,14 @@
- #define NroffFilemanDir $(MAN4DIR)$(MANPACKAGE)
- #define NroffMiscmanDir $(MAN5DIR)$(MANPACKAGE)
-
-+#ifndef ManUsr
- #ifdef UseInstalled
- MANUSR = /usr/share/local
- #else
- MANUSR = /usr/share
-+#endif
-+#else
-+ MANUSR = ManUsr
- #endif
-
- CATMAN1DIR = $(MANUSR)/catman/u_man/cat1
diff --git a/pkgtools/xpkgwedge/files/pkgxmkmf.in b/pkgtools/xpkgwedge/files/pkgxmkmf.in
deleted file mode 100644
index c6166cd788d..00000000000
--- a/pkgtools/xpkgwedge/files/pkgxmkmf.in
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-#
-# XFree86 Id: xc/config/util/xmkmf.cpp,v 1.3 2000/11/16 21:57:10 dawes Exp
-# XConsortium Id: xmkmf.cpp /main/22 1996/09/28 16:17:05 rws
-#
-# $NetBSD: pkgxmkmf.in,v 1.6 2005/06/14 20:12:51 jlam Exp $
-#
-# make a Makefile from an Imakefile from inside or outside the sources
-# with support for config files in ${PREFIX}/lib/X11/config
-
-usage="usage: $0 [-a] [top_of_sources_pathname [current_directory]]"
-
-xcfgdir=@X11BASE@/lib/X11/config
-lcfgdir=@PREFIX@/lib/X11/config
-vcfgdir=@VIEWBASE@/lib/X11/config
-configdirspec=''
-if [ "${xcfgdir}" != "${lcfgdir}" -a -d ${lcfgdir} ]; then
- configdirspec="${configdirspec} -I${lcfgdir}"
-fi
-if [ "${lcfgdir}" != "${vcfgdir}" -a -d ${vcfgdir} ]; then
- configdirspec="${configdirspec} -I${vcfgdir}"
-fi
-configdirspec="${configdirspec} -I${xcfgdir}"
-
-topdir=
-curdir=.
-do_all=
-imake_defines=
-
-while [ $# -gt 0 ]
-do
- case "$1" in
- -D*)
- imake_defines="$imake_defines $1"
- shift
- ;;
- -a)
- do_all="yes"
- shift
- ;;
- *)
- break
- ;;
- esac
-done
-
-case $# in
- 0) ;;
- 1) topdir=$1 ;;
- 2) topdir=$1 curdir=$2 ;;
- *) echo "$usage" 1>&2; exit 1 ;;
-esac
-
-case "$topdir" in
- -*) echo "$usage" 1>&2; exit 1 ;;
-esac
-
-if [ -f Makefile ]; then
- echo mv -f Makefile Makefile.bak
- mv -f Makefile Makefile.bak
-fi
-
-if [ "$topdir" = "" ]; then
- args="-DUseInstalled "$configdirspec
-else
- args="-I$topdir/config/cf -DTOPDIR=$topdir -DCURDIR=$curdir"
-fi
-
-echo imake $imake_defines $args
-case "$do_all" in
-yes)
- imake $imake_defines $args &&
- echo "make Makefiles" &&
- @MAKE@ Makefiles &&
- echo "make includes" &&
- @MAKE@ includes &&
- echo "make depend" &&
- @MAKE@ depend
- ;;
-*)
- imake $imake_defines $args
- ;;
-esac
diff --git a/pkgtools/xpkgwedge/files/xpkgwedge.def b/pkgtools/xpkgwedge/files/xpkgwedge.def
deleted file mode 100644
index 1be76bed769..00000000000
--- a/pkgtools/xpkgwedge/files/xpkgwedge.def
+++ /dev/null
@@ -1,124 +0,0 @@
-/* $NetBSD: xpkgwedge.def,v 1.12 2004/07/31 01:42:06 xtraeme Exp $ */
-
-#ifdef BeforeVendorCF
-
-/*
- * OS-specific overrides for Interix to make it behave similarly to NetBSD
- * when creating binaries for pkgsrc.
- */
-#ifdef __INTERIX
-#undef ForceNormalLib /* this is always YES on Interix */
-#define NullMakeCommand @ true
-#define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIRPATH)
-
-#ifdef UseInstalled
-#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
-#define LinkBuildSonameLibrary(lib) true
-#else
-#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) -Wl,-rpath-link,$(BUILDLIBDIR)
-#define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); \
- cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
-#endif
-
-/*
- * Oy, what a hack: see pkgsrc/devel/libtool for an explanation of the
- * bizarre --image-base option used below.
- */
-#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
-AllTarget(Concat(lib,libname.so.rev)) @@\
- @@\
-Concat(lib,libname.so.rev): solist @@\
- $(RM) $@~ @@\
- @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\
- (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) \ @@\
- -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280)) \ @@\
- -Wl,-h,$$SONAME solist $(REQUIREDLIBS)); \ @@\
- $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
- LinkBuildSonameLibrary($$SONAME) @@\
- $(RM) $@ @@\
- $(MV) $@~ $@ @@\
- LinkBuildLibrary($@) @@\
- $(RM) Concat(lib,libname.so) @@\
- $(LN) $@ Concat(lib,libname.so) @@\
- LinkBuildLibrary(Concat(lib,libname.so)) @@\
- @@\
-clean:: @@\
- @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\
- set -x; $(RM) $$SONAME @@\
- $(RM) Concat(lib,libname.so) @@\
- $(RM) Concat(lib,libname.so.rev)
-
-#define InstallSharedLibrary(libname,rev,dest) @@\
-install:: Concat(lib,libname.so.rev) @@\
- MakeDir($(DESTDIR)dest) @@\
- $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
- @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ @@\
- set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\
- $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\
- $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
-
-#endif /* __INTERIX && BeforeVendorCF */
-
-#endif /* BeforeVendorCF */
-
-#ifdef AfterVendorCF
-
-/*
- * The following defines inject a "PREFIX=" make-time option that lets the
- * user twiddle the ProjectRoot setting with a single switch. This makes
- * the command "make PREFIX=/path/to/install all install" work as expected.
- */
-
-#ifndef ProjectRoot
-/*
- * Assume the worst: this should not happen in practice, as this setup
- * does not work with the classical /usr/{include,lib}/X11 layout.
- */
-#define ProjectRoot /usr/X11
-#endif
-
-X11_ROOT = ProjectRoot
-
-#undef ProjectRoot
-#define ProjectRoot $(PREFIX)
-#undef ConfigDir
-#define ConfigDir $(X11_ROOT)/lib/X11/config
-
-/*
- * This emits dual -I and -L options to cc automatically, one for the actual
- * X11 root, and one for the user-set prefix.
- */
-#define X11ProjectRoot $(X11_ROOT)
-#define ExtraLoadFlags @X11TYPEFLAGS@
-
-/*
- * InstallAppDefaultsLong - general rule to install application default file
- * if the InstallAppDefFiles configuration parameter is set.
- *
- * This is the same as the one in X11.tmpl, but without the LinkConfDirectory.
- * LinkConfDirectory removes the app-defaults directory in $(PREFIX)/lib/X11
- * and creates a link to the real X11 app-defaults directory and moves the old
- * app-defaults files into it. This is not what we want for pkgsrc.
- */
-#ifndef InstallAppDefaultsLong
-#if InstallAppDefFiles
-#define InstallAppDefaultsLong(file,class) @@\
-InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
-#else
-#define InstallAppDefaultsLong(file,class) @@\
-InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
-#endif /* InstallAppDefFiles */
-#endif /* InstallAppDefaultsLong */
-
-#ifdef UseInstalled
-/*
- * We need to redefine ImakeCmd so that imake will look in both
- * $(PREFIX)/lib/X11/config and $(VIEWBASE)/lib/X11/config *before*
- * looking in the standard X11 config directory to override any
- * configuration files installed there.
- */
-#undef ImakeCmd
-#define ImakeCmd imake -I$(PREFIX)/lib/X11/config -I$(VIEWBASE)/lib/X11/config
-#endif
-
-#endif /* AfterVendorCF */